Changeset 24193

Show
Ignore:
Timestamp:
11/19/09 18:16:30 (4 months ago)
Author:
broder
Message:

Update our build infrastructure and docs to use aufs chroots instead
of LVM snapshots.

Location:
trunk/debathena
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/debathena/NOTES

    r23752 r24193  
    2121 
    2222  * schroot - Used to manage build chroot environments for each 
    23     Debian/Ubuntu version.  We use the lvm-snapshot schroot type, 
    24     which allows rapid construction of ephemeral copies of template 
    25     "source" chroots, so that every binary package build is done in a 
    26     clean environment. 
     23    Debian/Ubuntu version.  We use the device schroot type with aufs 
     24    union mounts, which allows rapid construction of ephemeral copies 
     25    of template "source" chroots, so that every binary package build 
     26    is done in a clean environment. 
    2727 
    2828  * debuild - Used to create Debian source packages from package 
     
    336336 
    337337     Note that currently the build system uses the latest version of 
    338      sbuild, so if you have not installed Debian testing, you'll 
    339      need to set up apt pinning to grab sbuild from there. See the 
    340      apt_preferences man page. 
     338     sbuild, so if you have not installed Debian testing, you'll need 
     339     to set up apt pinning to grab sbuild from there. See the 
     340     apt_preferences man page. You'll also need to grab schroot from 
     341     Debian experimental. 
    341342 
    342343  5. Install debathena-standard, debathena-ssh-server, and 
     
    348349     when an error occurs building a source package.) 
    349350 
    350   6. Append to /etc/approx/approx.conf the contents of 
     351  6. Install the module-assistant package and build the aufs kernel 
     352     module by running "m-a -ti a-i aufs" 
     353 
     354  7. Append to /etc/approx/approx.conf the contents of 
    351355      scripts/build-server/approx.conf.tail. 
    352356     Run: /etc/init.d/approx restart 
    353357 
    354   7. Apply scripts/build-server/mount-defaults.patch. 
    355  
    356   8. Edit /etc/lvm/lvm.conf and change "archive = 1" to "archive = 0" 
    357      in order to avoid generating a bazillion backup files under 
    358      /etc/lvm/archive. 
    359  
    360   9. For each supported DIST (see scripts/debian-versions.sh) run: 
    361  
    362        VG=/dev/blah scripts/build-server/make-chroot DIST i386 
    363        VG=/dev/blah scripts/build-server/make-chroot DIST amd64 
    364  
    365      substituting the name of the volume group for blah. 
    366  
    367      Example: VG=/dev/dink scripts/build-server/make-chroot intrepid i386 
    368  
    369   10. Create a local account for builder with: 
     358  8. Apply scripts/build-server/mount-defaults.patch. 
     359 
     360  9. Copy scripts/build-server/07debathena to /etc/schroot/setup.d/ 
     361 
     362  10. For each supported DIST (see scripts/debian-versions.sh) run: 
     363 
     364        VG=/dev/blah scripts/build-server/make-chroot DIST i386 
     365        VG=/dev/blah scripts/build-server/make-chroot DIST amd64 
     366 
     367      substituting the name of the volume group for blah. 
     368 
     369      Example: VG=/dev/dink scripts/build-server/make-chroot intrepid i386 
     370 
     371  11. Create a local account for builder with: 
    370372 
    371373        adduser --uid 1047 --disabled-password builder 
  • trunk/debathena/scripts/build-server/make-chroot

    r24144 r24193  
    7474cat >> "$CONF" <<EOF 
    7575[$CHROOT] 
    76 type=lvm-snapshot 
     76type=device 
     77union-type=aufs 
    7778description=$CHROOT 
    78 priority=3 
    7979groups=root,sbuild 
    8080root-groups=root,sbuild 
    8181source-groups=root 
    8282device=$DEVICE 
    83 mount-options=-o noatime 
    84 lvm-snapshot-options=--size $SIZE 
    8583personality=$PERSONALITY 
    86 run-setup-scripts=true 
    87 run-exec-scripts=true 
    8884EOF 
    8985