wiki:SettingUpABuildServer

Version 1 (modified by jdreed, 12 years ago) (diff)

--

  1. Install either Debian testing (or stable, if it's new enough, but see the note about sbuild below) or the latest Ubuntu release. The build server must be installed with free space in an LVM volume group. The build chroots consume 4GB each.
  1. Install debathena-login as per the the instructions in http://debathena.mit.edu/install.
  1. apt-key add /afs/sipb.mit.edu/project/debathena/apt/debathena-archive-keyring.asc
  1. Install the packages listed in scripts/build-server/packages (using "aptitude install").

Note that currently the build system uses the latest version of sbuild, so if you have not installed Debian testing, you'll need to set up apt pinning to grab sbuild from there. See the apt_preferences man page. You'll also need to grab schroot from Debian experimental.

  1. Install the aufs-modules-2.6-amd64 package.
  1. Append to /etc/approx/approx.conf the contents of

scripts/build-server/approx.conf.tail.

Run: /etc/init.d/approx restart

  1. Apply scripts/build-server/mount-defaults.patch and scripts/build-server/pam-schroot.patch.
  1. For each supported DIST (see scripts/debian-versions.sh) run:

scripts/build-server/make-chroot DIST i386 scripts/build-server/make-chroot DIST amd64

Example: scripts/build-server/make-chroot intrepid i386

  1. Create a local account for builder with:

adduser --uid 1047 --disabled-password builder

Make the home directory mode 700. Install a daemon/linux-build-10.mit.edu keytab in the home directory as "keytab". Install a copy of the secret repository-signing key (debathena@…) in the home directory's keyring with something like:

kinit builder gpg --export-secret-keys debathena@… | \

ssh -l builder machinename gpg --import

Create a file named .sbuildrc in builder's homedir containing:

$mailto = undef; $log_dir = '/tmp/sbuild-logs'; $maintainer_name = 'Debathena Project <debathena@…>'; $force_orig_source = 1; $sbuild_mode = "user"; 1;

Create a file named .ssh/config in builder's homedir containing:

Host svn.mit.edu

User debuildsvn

Add builder to the sbuild group in /etc/group.

Copy scripts/build-server/autodebathenify to builder's homedir. Create a file named autodebathenify.config in builder's homedir containing:

error_addr=debathena-root@… scripts_dir=/mit/debathena/bin build_dir=/mit/debathena/packages/third packages="lprng openafs" export DEBATHENA_APT=/mit/debathena/apt

Copy scripts/build-server/autodebathenify.cron to builder's homedir and install it with "crontab autodebathenify.cron".

Copy scripts/build-server/autolivebuilder to builder's homedir. Create a file called autolivebuilder.config in builder's homedir containing:

error_addr=debathena-root@… release_version='9.04' release='jaunty' arch='i386' mirror='mirrors.mit.edu' gpg_opts=("-u" "0D8A9E8F") live_dir=/net/sipb-isilon-sc.mit.edu/ifs/mirror/sipb/debathena/livecd

Create a file named .devscripts in builder's homedir containing:

DEBUILD_DPKG_BUILDPACKAGE_OPTS="-sa -us -uc -i -I.svn"

In builder's homedir, append to .bashrc:

add debathena export PATH=$PATH:~/bin export DEBATHENA_APT=/mit/debathena/apt