[22689] | 1 | This hierarchy contains Debian/Ubuntu-specific materials, also known |
---|
| 2 | as "Debathena". The contents are: |
---|
| 3 | |
---|
| 4 | * debathena - Debathena-specific software packages such as PAM and NSS |
---|
| 5 | modules. |
---|
| 6 | |
---|
| 7 | * config - Packages for configuring native system software in a manner |
---|
| 8 | appropriate for Athena. |
---|
| 9 | |
---|
| 10 | * meta - Packages which contain nothing but dependencies on other |
---|
| 11 | packages and serve as an installation convenience. |
---|
| 12 | |
---|
| 13 | * scripts - Build scripts and supporting materials. |
---|
| 14 | |
---|
| 15 | Debian software used by Debathena: |
---|
| 16 | |
---|
| 17 | * schroot - Used to manage build chroot environments for each |
---|
[24193] | 18 | Debian/Ubuntu version. We use the device schroot type with aufs |
---|
| 19 | union mounts, which allows rapid construction of ephemeral copies |
---|
| 20 | of template "source" chroots, so that every binary package build |
---|
| 21 | is done in a clean environment. |
---|
[22689] | 22 | |
---|
| 23 | * debuild - Used to create Debian source packages from package |
---|
| 24 | source directories. |
---|
| 25 | |
---|
| 26 | * sbuild - Used to build binary packages from source packages inside |
---|
| 27 | schroot environments. |
---|
| 28 | |
---|
| 29 | * equivs - Used to create packages which only contain dependency |
---|
| 30 | information. Somewhat of a dirty hack, since it doesn't keep |
---|
| 31 | proper changelogs, but it reduces overhead. |
---|
| 32 | |
---|
| 33 | * CDBS (Common Debian Build System) - Referenced by debian/rules |
---|
| 34 | files in packages. Contains standard build rules to cut down on |
---|
| 35 | per-package boilerplate. |
---|
| 36 | |
---|
| 37 | * reprepro - Used to upload packages into the apt repositories. |
---|
| 38 | |
---|
| 39 | * approx - Used to create a local cache of Debian packages on the |
---|
| 40 | build server. This cache is referenced by the build chroots for |
---|
| 41 | improved performance. |
---|
| 42 | |
---|
[24928] | 43 | The remainder of this file documents procedures useful to Debathena |
---|
| 44 | developers and maintainers. |
---|
[22689] | 45 | |
---|
[22787] | 46 | Developers: Preferences setup |
---|
| 47 | ----------------------------- |
---|
[22689] | 48 | |
---|
[22787] | 49 | You will probably want a $HOME/.devscripts file containing the |
---|
| 50 | following: |
---|
[22689] | 51 | |
---|
[22787] | 52 | DEBUILD_DPKG_BUILDPACKAGE_OPTS="-sa -us -uc -i -I.svn" |
---|
[22689] | 53 | |
---|
[22787] | 54 | This will save you from having to specify those options every time you |
---|
[24928] | 55 | run debuild. The options mean: |
---|
[22689] | 56 | |
---|
[22787] | 57 | * Look for original source as a tarfile or create one. |
---|
| 58 | * Do not sign the source package. |
---|
| 59 | * Do not sign the changes file. |
---|
| 60 | * Ignore common version control metadata files when creating diffs. |
---|
| 61 | * Ignore .svn paths when creating tarballs. |
---|
[22689] | 62 | |
---|
[23046] | 63 | You will also want a $HOME/.sbuildrc file containing the following: |
---|
| 64 | |
---|
| 65 | $nolog = 1; |
---|
| 66 | $mailto = 'yourusername'; |
---|
| 67 | $log_dir = '/tmp/sbuild-logs'; |
---|
[23403] | 68 | $maintainer_name = 'Debathena Project <debathena@mit.edu>'; |
---|
[23046] | 69 | $force_orig_source = 1; |
---|
| 70 | $sbuild_mode = "user"; |
---|
| 71 | 1; |
---|
| 72 | |
---|
[22787] | 73 | You should also set the environment variable DEBATHENA_APT to |
---|
[24928] | 74 | "/afs/sipb.mit.edu/project/debathena/apt". |
---|
[22689] | 75 | |
---|
[22787] | 76 | Developers: Preparing a change |
---|
| 77 | ------------------------------ |
---|
[22689] | 78 | |
---|
[22787] | 79 | To prepare a change to a regular package (a source tree containing a |
---|
| 80 | debian/ subdir), make the edits in a checkout and record a changelog |
---|
| 81 | entry. You can either edit debian/changelog using emacs changelog |
---|
| 82 | mode (C-c C-v to add a new version entry, C-c C-a to add a change |
---|
[23752] | 83 | entry, C-c C-f to finalize the entry) or you can run "dadch" from |
---|
| 84 | the debathena locker / SVN scripts directory. |
---|
[22689] | 85 | |
---|
[22787] | 86 | When creating a new version entry, bump the upstream version number |
---|
| 87 | (to 10.0.0 if it was not already that high) if you are changing the |
---|
| 88 | main package source. Otherwise, just bump the Debian version |
---|
| 89 | component (change 0debathena1 to 0debathena2, for instance). |
---|
[22689] | 90 | |
---|
[22787] | 91 | Developers: Building a package for test purposes on one platform |
---|
| 92 | ---------------------------------------------------------------- |
---|
[22689] | 93 | |
---|
[22787] | 94 | After you have prepared a change, you will want to test that it builds |
---|
| 95 | and perhaps that it works before committing it. First, if it is an |
---|
| 96 | Athena source directory using autoconf, run "daconfiscate" to set up |
---|
| 97 | the autoconf boilerplate which we don't check in. Second, run |
---|
| 98 | "daorig" to copy or create an orig tarball in the parent directory if |
---|
| 99 | necessary. Third, run "debuild". The resulting package will be |
---|
| 100 | placed in the parent directory. |
---|
[22689] | 101 | |
---|
[22787] | 102 | In order to test if the package works, you can install it with "dpkg |
---|
| 103 | -i filename.deb". |
---|
[22689] | 104 | |
---|
[22787] | 105 | Developers: Building a package for test purposes on all platforms |
---|
| 106 | ----------------------------------------------------------------- |
---|
[22764] | 107 | |
---|
[22787] | 108 | If the package you are working on interacts with the native OS in ways |
---|
| 109 | that might vary from platform to platform, you may want to do a test |
---|
| 110 | build for all platforms. You will need to do this on |
---|
| 111 | linux-build-10.mit.edu or another machine which has been set up with |
---|
| 112 | build schroots. |
---|
| 113 | |
---|
| 114 | As above, run daconfiscate (if necessary) and then daorig. Then run |
---|
| 115 | "debuild -S" to create a source package. Now cd into the parent |
---|
| 116 | directory and identify the .dsc file created by debuild -S; it will |
---|
| 117 | have a name like debathena-just_9.4.0-0debathena2.dsc. Run "da |
---|
| 118 | sbuildhack filename.dsc" to perform the package builds. Each build |
---|
| 119 | will take place inside an ephemeral chroot based on a snapshot of a |
---|
| 120 | template for a particular Debian or Ubuntu version. If a build fails |
---|
| 121 | and it's not obvious from the build log why, you may need to create |
---|
| 122 | your own ephemeral chroot session with a command like "schroot -c |
---|
| 123 | gutsy-amd64-sbuild /bin/sh" and then run debuild from within the |
---|
| 124 | package sources. |
---|
| 125 | |
---|
| 126 | If the build is successful, it will create a set of packages with |
---|
| 127 | names like debathena-just_9.4.0-0debathena2~ubuntu6.06_amd64.deb. |
---|
| 128 | |
---|
| 129 | Developers: Building an equivs package |
---|
| 130 | -------------------------------------- |
---|
| 131 | |
---|
| 132 | Most of the packages under debathena/meta are faked up using equivs. |
---|
| 133 | To build one, just run: |
---|
| 134 | |
---|
| 135 | equivs-build --full filename.equivs |
---|
| 136 | |
---|
| 137 | These equivs files make reference to ../common, so you must have a |
---|
| 138 | checkout of debathena/meta/common alongside the particular |
---|
| 139 | meta-package you are building. |
---|
| 140 | |
---|
[23018] | 141 | Developers: The meaning of metapackages |
---|
| 142 | --------------------------------------- |
---|
| 143 | |
---|
| 144 | If you are adding a new package to the repository, you will probably |
---|
| 145 | at some point want to add it to one of the metapackages so that it |
---|
| 146 | doesn't have to be installed by hand. Here are some descriptions |
---|
| 147 | which may help identify which metapackage is best: |
---|
| 148 | |
---|
| 149 | * locker: Provides access to Athena locker software--AFS and |
---|
| 150 | automounter configuration, locker-related utilities, etc. |
---|
| 151 | |
---|
| 152 | * clients: Provides clients (either locally-written, like athinfo and |
---|
| 153 | Discuss, or configurations) for Athena services, as well as |
---|
| 154 | Athena-specific utility programs like "jot". Configurations for |
---|
| 155 | graphical client software are generally in the workstation package |
---|
| 156 | instead, in order to make this package less intrusive. |
---|
| 157 | |
---|
| 158 | * standard: Implies locker and clients. Also provides Athena shell |
---|
| 159 | customizations and dotfiles. |
---|
| 160 | |
---|
| 161 | * login: Implies standard. Configurations to merge the MIT user |
---|
| 162 | namespace into the local machine namespace for the purpose of user |
---|
| 163 | lookups and authentication. |
---|
| 164 | |
---|
[23752] | 165 | * login-graphical: Implies login. Configurations for the graphical login |
---|
[23018] | 166 | system and graphical client software intended to provide a standard |
---|
[23752] | 167 | X login experience using Athena home directories. |
---|
[23018] | 168 | |
---|
[23247] | 169 | * extra-software: Implies a set of Debian packages common to cluster |
---|
| 170 | machines and typical workstations. The resulting software set is |
---|
| 171 | rather large, and thus may not be desirable to all workstation |
---|
| 172 | configurations. Only stock Debian packages belong in this |
---|
| 173 | metapackage; do not add other Debathena packages to it. |
---|
[23018] | 174 | |
---|
[23752] | 175 | * workstation: Implies login-graphical and extra-software. The use case |
---|
| 176 | is the same as that of the old "private workstations", so it includes |
---|
| 177 | more centrally-managed configuration than standard or login does |
---|
| 178 | (unattended updates, etc.). New as of May 2009. |
---|
[23018] | 179 | |
---|
[23752] | 180 | * thirdparty: Software supported by 3partysw that upstream Ubuntu |
---|
| 181 | already happens to be keeping up to date, and is therefore easier to |
---|
| 182 | install via packages than through lockers. This package is HUGE (1 GB of |
---|
| 183 | network traffic, 3 GB installed), and is also not strongly tested on |
---|
| 184 | Debian or on older releases of Ubuntu. |
---|
| 185 | |
---|
| 186 | * cluster: Implies workstation and thirdparty. Configures public cluster |
---|
| 187 | machines (login-time LVM snapshots, cleanups between logins, public |
---|
| 188 | root password, etc.). The snapshot code requires a particular LVM |
---|
| 189 | layout that the PXE (netboot) cluster installer sets up. |
---|
| 190 | |
---|
[23018] | 191 | * debian-dev: Intended for developers of the system itself; provides a |
---|
| 192 | set of Debian packages used by Debathena for development. |
---|
| 193 | |
---|
| 194 | For the most part a package should be listed in the "Depends:" line of |
---|
| 195 | a metapackage, but in some cases it is appropriate to hedge by using |
---|
| 196 | "Recommends:", which will cause aptitude to succeed even if the |
---|
| 197 | package is unavailable. For example, a package which doesn't exist in |
---|
| 198 | all Debian/Ubuntu suites or isn't free can be listed under |
---|
| 199 | "Recommends:" so that our metapackages still work in all environments. |
---|
| 200 | |
---|
[23158] | 201 | Developers: Index of cluster packages |
---|
| 202 | ------------------------------------- |
---|
| 203 | |
---|
| 204 | Some private workstation admins may want specific pieces of cluster |
---|
| 205 | infrastructure. With Athena 9.4, they would typically install the |
---|
| 206 | entire Athena software suite and then turn off features they did not |
---|
| 207 | want via /etc/athena/rc.conf. That is not generally possible in |
---|
| 208 | Athena 10; a debathena-cluster machine acts like a cluster machine in |
---|
| 209 | all respects. Instead, the machine owner should install |
---|
| 210 | debathena-workstation and then install specific packages they might be |
---|
| 211 | interested in. At this time, candidate packages include: |
---|
| 212 | |
---|
| 213 | * debathena-dns-config: Installs a caching DNS resolver and |
---|
| 214 | configures the machine to use it. |
---|
| 215 | |
---|
| 216 | * debathena-tmp-cleaner: Cleans files in /tmp and /var/tmp which |
---|
| 217 | have not been recently accessed. |
---|
| 218 | |
---|
| 219 | * debathena-reactivate: Causes each graphical login to be performed |
---|
| 220 | in a separate ephemeral snapshot of the chroot. This package |
---|
| 221 | requires the root filesystem to be an LVM logical volume inside a |
---|
| 222 | volume group with 21GB of free space for the snapshots; if that is |
---|
| 223 | not the case, it will break graphical logins. Install with care. |
---|
| 224 | |
---|
| 225 | * debathena-auto-update: Periodically updates the machine's software |
---|
| 226 | and reboots (when no one is logged in) if necessary. |
---|
| 227 | |
---|
| 228 | Cluster packages which are generally not of interest to private |
---|
| 229 | machine owners include: |
---|
| 230 | |
---|
[23177] | 231 | * debathena-cluster-login-config: Configures a variety of system |
---|
| 232 | services to implement the cluster login policy (no tty logins, no |
---|
| 233 | user switching, screensaver logout button after 20 minutes, etc.). |
---|
| 234 | |
---|
[23158] | 235 | * debathena-clusterinfo: Looks up the machine's cluster information |
---|
| 236 | in Hesiod and caches it on local disk. |
---|
| 237 | |
---|
| 238 | * debathena-larvnet: Reports to the central larvnet server whether |
---|
| 239 | anyone has a graphical login to the machine. |
---|
| 240 | |
---|
[23162] | 241 | * debathena-syslog-config: Configures sysklogd so that some syslog |
---|
| 242 | messages are forwarded to a central logging host. |
---|
| 243 | |
---|
[22787] | 244 | Release engineer: Bootstrapping the project infrastructure |
---|
| 245 | ---------------------------------------------------------- |
---|
| 246 | |
---|
[22764] | 247 | 1. Create the package repository (detailed instructions on this |
---|
| 248 | pending). Set the DEBATHENA_APT environment variable to point to |
---|
| 249 | the package repository. Put a copy of the debathena "scripts" |
---|
| 250 | subdir in your path. |
---|
| 251 | |
---|
| 252 | 2. Create the build area. |
---|
| 253 | |
---|
[24565] | 254 | 3. Run 'dareprepro export' to set up the repository. Build each |
---|
| 255 | equivs package under meta/ using 'equivs-build --full *.equivs' |
---|
| 256 | and upload each with 'daupload-equivs-proposed *.changes', |
---|
| 257 | followed by 'damove -proposed "" PACKAGE' (replacing PACKAGE with |
---|
| 258 | the name of each equivs package you are moving). |
---|
[22764] | 259 | |
---|
| 260 | 4. Set up the build server. The basic structure of the apt |
---|
| 261 | repository must work for make-chroot to succeed, so this must |
---|
| 262 | happen after step 3. |
---|
| 263 | |
---|
| 264 | 5. For each normal Debian package in dependency order, cd into its |
---|
| 265 | directory in the build area and run "da sbuildhack *.dsc" and |
---|
[22787] | 266 | "daupload-release *_source.changes". If the package contains |
---|
| 267 | only an "Architecture: all" binary package, pass the -A option to |
---|
| 268 | both commands. |
---|
[22764] | 269 | |
---|
| 270 | The all-packages script can generate an approximation of the |
---|
| 271 | package list in dependency order, but it doesn't work right yet, |
---|
| 272 | and ideally it would be possible to do several builds in parallel |
---|
| 273 | using a Makefile like the one in scripts/build-server/build-all. |
---|
| 274 | Improvements to this machinery are pending. |
---|
| 275 | |
---|
[22787] | 276 | 6. For each package under third, run "da ./debathenify-PKG source |
---|
[23084] | 277 | binary upload". Any created directories under third/openafs/meta |
---|
| 278 | should be chmodded 777 to work around a perl/AFS permissions |
---|
| 279 | issue with File::Temp; if this is not done, OpenAFS metapackage |
---|
| 280 | builds will fail for other users. |
---|
[22764] | 281 | |
---|
[23090] | 282 | Release engineer: Updating the apt repository |
---|
| 283 | --------------------------------------------- |
---|
| 284 | |
---|
| 285 | 1. ssh to the build server as the builder account and change to the |
---|
| 286 | canonical build directory. |
---|
| 287 | |
---|
| 288 | 2. Run "gen-packages" to update the package list. (Or "gen-packages |
---|
| 289 | -c" if you know the AFS checkout of the source tree is up to date; |
---|
| 290 | it should update every half hour.) |
---|
| 291 | |
---|
| 292 | 3. Run "ood-packages" to produce a list of out-of-date packages. |
---|
| 293 | |
---|
| 294 | 4. For each out of date package, run "dasource PKG". Then change to |
---|
| 295 | the package directory and run "da sbuildhack *.dsc" and |
---|
| 296 | "daupload-release *_source.changes". If the package contains |
---|
| 297 | only an "Architecture: all" binary package, pass the -A option to |
---|
| 298 | both commands. |
---|
| 299 | |
---|
| 300 | 5. svn update the meta directory. If there are new subdirectories, |
---|
| 301 | chmod them 777 to work around a perl/AFS permissions issue with |
---|
| 302 | File::Temp. For each updated subdir, change to it, run |
---|
| 303 | "equivs-build --full *.equivs", and then "daequivsupload |
---|
| 304 | FILENAME.changes" on the produced changes file. |
---|
| 305 | |
---|
| 306 | 6. svn update the third directory. You can let autodebathenify |
---|
| 307 | handle the updated scripts, or you can touch |
---|
| 308 | ~/autodebathenify.suppress, make sure it's not running, and run |
---|
| 309 | "da ./debathenify-PKG source binary upload" in each updated |
---|
| 310 | directory. |
---|
| 311 | |
---|
| 312 | Sometimes you may have to mix up the order of the above steps in order |
---|
| 313 | to handle build dependencies. |
---|
| 314 | |
---|
[22787] | 315 | Release engineer: Setting up a build server |
---|
| 316 | ------------------------------------------- |
---|
[22689] | 317 | |
---|
[23752] | 318 | 1. Install either Debian testing (or stable, if it's new enough, but |
---|
| 319 | see the note about sbuild below) or the latest Ubuntu release. |
---|
| 320 | The build server must be installed with free space in an LVM |
---|
[24237] | 321 | volume group. The build chroots consume 4GB each. |
---|
[22729] | 322 | |
---|
[24237] | 323 | 2. Install debathena-login as per the the instructions in |
---|
[22729] | 324 | http://debathena.mit.edu/install. |
---|
| 325 | |
---|
[24237] | 326 | 3. apt-key add |
---|
| 327 | /afs/sipb.mit.edu/project/debathena/apt/debathena-archive-keyring.asc |
---|
[22743] | 328 | |
---|
[23248] | 329 | 4. Install the packages listed in scripts/build-server/packages |
---|
| 330 | (using "aptitude install"). |
---|
[22729] | 331 | |
---|
[23752] | 332 | Note that currently the build system uses the latest version of |
---|
[24193] | 333 | sbuild, so if you have not installed Debian testing, you'll need |
---|
| 334 | to set up apt pinning to grab sbuild from there. See the |
---|
| 335 | apt_preferences man page. You'll also need to grab schroot from |
---|
| 336 | Debian experimental. |
---|
[23248] | 337 | |
---|
[24237] | 338 | 5. Install the aufs-modules-2.6-amd64 package. |
---|
[22729] | 339 | |
---|
[24237] | 340 | 6. Append to /etc/approx/approx.conf the contents of |
---|
[23752] | 341 | scripts/build-server/approx.conf.tail. |
---|
| 342 | Run: /etc/init.d/approx restart |
---|
[22729] | 343 | |
---|
[24303] | 344 | 7. Apply scripts/build-server/mount-defaults.patch and |
---|
| 345 | scripts/build-server/pam-schroot.patch. |
---|
[22729] | 346 | |
---|
[24237] | 347 | 8. For each supported DIST (see scripts/debian-versions.sh) run: |
---|
[22787] | 348 | |
---|
[24928] | 349 | scripts/build-server/make-chroot DIST i386 |
---|
| 350 | scripts/build-server/make-chroot DIST amd64 |
---|
[22787] | 351 | |
---|
[24928] | 352 | Example: scripts/build-server/make-chroot intrepid i386 |
---|
[22729] | 353 | |
---|
[24237] | 354 | 9. Create a local account for builder with: |
---|
[22729] | 355 | |
---|
[24237] | 356 | adduser --uid 1047 --disabled-password builder |
---|
[22729] | 357 | |
---|
[24237] | 358 | Make the home directory mode 700. Install a |
---|
| 359 | daemon/linux-build-10.mit.edu keytab in the home directory as |
---|
| 360 | "keytab". Install a copy of the secret repository-signing key |
---|
| 361 | (debathena@mit.edu) in the home directory's keyring with |
---|
| 362 | something like: |
---|
[23046] | 363 | |
---|
[24237] | 364 | kinit builder |
---|
[24262] | 365 | gpg --export-secret-keys debathena@mit.edu | \ |
---|
[24237] | 366 | ssh -l builder machinename gpg --import |
---|
[23046] | 367 | |
---|
[24237] | 368 | Create a file named .sbuildrc in builder's homedir containing: |
---|
[23046] | 369 | |
---|
[24262] | 370 | $mailto = undef; |
---|
[24237] | 371 | $log_dir = '/tmp/sbuild-logs'; |
---|
| 372 | $maintainer_name = 'Debathena Project <debathena@mit.edu>'; |
---|
| 373 | $force_orig_source = 1; |
---|
| 374 | $sbuild_mode = "user"; |
---|
| 375 | 1; |
---|
[23046] | 376 | |
---|
[24237] | 377 | Create a file named .ssh/config in builder's homedir containing: |
---|
[23046] | 378 | |
---|
[24237] | 379 | Host svn.mit.edu |
---|
| 380 | User debuildsvn |
---|
[23050] | 381 | |
---|
[24237] | 382 | Add builder to the sbuild group in /etc/group. |
---|
[23050] | 383 | |
---|
[24237] | 384 | Copy scripts/build-server/autodebathenify to builder's homedir. |
---|
| 385 | Create a file named autodebathenify.config in builder's homedir |
---|
| 386 | containing: |
---|
[23046] | 387 | |
---|
[24262] | 388 | error_addr=debathena-root@mit.edu |
---|
| 389 | scripts_dir=/mit/debathena/bin |
---|
| 390 | build_dir=/mit/debathena/packages/third |
---|
| 391 | packages="lprng openafs" |
---|
| 392 | export DEBATHENA_APT=/mit/debathena/apt |
---|
[23046] | 393 | |
---|
[24237] | 394 | Copy scripts/build-server/autodebathenify.cron to builder's |
---|
| 395 | homedir and install it with "crontab autodebathenify.cron". |
---|
[23046] | 396 | |
---|
[24262] | 397 | Copy scripts/build-server/autolivebuilder to builder's |
---|
| 398 | homedir. Create a file called autolivebuilder.config in builder's |
---|
| 399 | homedir containing: |
---|
| 400 | |
---|
| 401 | error_addr=debathena-root@mit.edu |
---|
| 402 | release_version='9.04' |
---|
| 403 | release='jaunty' |
---|
| 404 | arch='i386' |
---|
| 405 | mirror='mirrors.mit.edu' |
---|
| 406 | gpg_opts=("-u" "0D8A9E8F") |
---|
| 407 | live_dir=/net/sipb-isilon-sc.mit.edu/ifs/mirror/sipb/debathena/livecd |
---|
| 408 | |
---|
[24237] | 409 | Create a file named .devscripts in builder's homedir containing: |
---|
[23046] | 410 | |
---|
[24237] | 411 | DEBUILD_DPKG_BUILDPACKAGE_OPTS="-sa -us -uc -i -I.svn" |
---|
[23085] | 412 | |
---|
[24237] | 413 | In builder's homedir, append to .bashrc: |
---|
[23085] | 414 | |
---|
[24237] | 415 | add debathena |
---|
| 416 | export PATH=$PATH:~/bin |
---|
| 417 | export DEBATHENA_APT=/mit/debathena/apt |
---|
[23065] | 418 | |
---|
| 419 | |
---|
[22787] | 420 | Release engineer: Removing a build chroot on the build server |
---|
| 421 | ------------------------------------------------------------- |
---|
[22729] | 422 | |
---|
[22787] | 423 | 1. Run VG=/dev/blah scripts/clean-schroots as root to make sure that |
---|
| 424 | the build chroot is not mounted, substituting the name of the |
---|
| 425 | volume group for blah. |
---|
[22729] | 426 | |
---|
[25325] | 427 | 2. Look in /etc/schroot/chroot.d/ and delete the file |
---|
[22729] | 428 | corresponding to the chroot. |
---|
| 429 | |
---|
| 430 | 3. Run lvchange -an blah/chrootname |
---|
| 431 | substituting the name of the volume group for blah and the chroot |
---|
| 432 | name for chroot. Example: lvchange -an dink/gutsy-i386-sbuild |
---|
| 433 | |
---|
[22764] | 434 | 4. Run lvremove blah/chrootname |
---|
| 435 | |
---|
[22985] | 436 | Release engineer: Removing a dist from the apt repository |
---|
| 437 | --------------------------------------------------------- |
---|
| 438 | |
---|
| 439 | 1. Inside the apt repository, edit conf/distributions and remove the |
---|
| 440 | distribution section. |
---|
| 441 | |
---|
[24565] | 442 | 2. Run dareprepro --delete clearvanished |
---|
[22985] | 443 | |
---|
[22787] | 444 | Release engineer: Setting up a canonical build area |
---|
| 445 | --------------------------------------------------- |
---|
[22764] | 446 | |
---|
| 447 | 1. Create an empty directory and cd into it. The canonical build |
---|
[23752] | 448 | area lives in /mit/debathena/packages/. |
---|
[22764] | 449 | |
---|
[22787] | 450 | 2. Run gen-packages to create the table of normal Debian packages. |
---|
[22764] | 451 | |
---|
[22787] | 452 | 3. Run dasource to create subdirs and source packages for each |
---|
| 453 | normal Debian package. |
---|
[22764] | 454 | |
---|
| 455 | 4. Create checkouts of the meta and third directories: |
---|
| 456 | |
---|
| 457 | svn co svn+ssh://svn.mit.edu/athena/trunk/debathena/meta |
---|
| 458 | svn co svn+ssh://svn.mit.edu/athena/trunk/debathena/third |
---|
[23084] | 459 | chmod 777 meta/* |
---|
[22764] | 460 | |
---|
[23084] | 461 | A couple of subdirectories of debathena/meta are normal Debian |
---|
[22764] | 462 | packages, so this will create redundant copies of those. Ignore |
---|
[23084] | 463 | them; they won't be used. |
---|
[22957] | 464 | |
---|
[24928] | 465 | Release engineer: Adding a new suite or rebuilding a suite |
---|
| 466 | ---------------------------------------------------------- |
---|
[22957] | 467 | |
---|
| 468 | This process is rarely performed and the infrastructure for it is |
---|
[24928] | 469 | imperfect. Substitute the name of the new suite for $suite in all |
---|
[22957] | 470 | steps below. |
---|
| 471 | |
---|
[22958] | 472 | 1. Make sure the apt repository is up to date with respect to the |
---|
[24875] | 473 | source tree for the existing dists. Check |
---|
| 474 | debathena.mit.edu/package-list/development and |
---|
| 475 | debathena.mit.edu/package-list/proposed. More importantly, make |
---|
| 476 | sure there is nothing in svn that isn't built. (An easy way to do |
---|
| 477 | this is running the check-unbuilt-packages script.) |
---|
[22958] | 478 | |
---|
[25325] | 479 | 2. Add the new dist to scripts/debian-versions.sh (and svn up into |
---|
| 480 | the locker). (It is not necessary to add the new dist to codes |
---|
| 481 | at this point, but it must be present in the gettag conditional.) |
---|
| 482 | If you are building an unreleased distribution, add an additional |
---|
| 483 | ~0.1 tag; if you're rebilding, bump that tag. |
---|
[22958] | 484 | |
---|
| 485 | 3. Create the new distribution in the apt repository's configuration |
---|
[24928] | 486 | file by editing /mit/debathena/apt/conf/gen-distributions and |
---|
| 487 | running it with output to the 'distributions' file in the same |
---|
[25325] | 488 | directory. Create the skeleton of the dist by running |
---|
| 489 | "dareprepro export" on the build server. (You don't need to do |
---|
| 490 | this if you're rebuilding.) |
---|
[22957] | 491 | |
---|
[24928] | 492 | 4. Add an appropriate sources.list.d/*/$suite.list entry in |
---|
| 493 | scripts/build-server. Commit and update |
---|
| 494 | /mit/debathena/bin/build-server. |
---|
| 495 | |
---|
[25325] | 496 | 5. On the build server (as root), create a chroot for the new distribution: |
---|
[24928] | 497 | |
---|
[25325] | 498 | First, check if /usr/share/debootstrap/scripts/$suite exists. |
---|
| 499 | If not, it may require downloading and installing a |
---|
[22957] | 500 | more recent version of the debootstrap package from the |
---|
[24928] | 501 | -backports dist corresponding to the build server's OS. (You |
---|
| 502 | presumably don't need to do this if you're rebuilding.) |
---|
[22957] | 503 | |
---|
[25325] | 504 | You could also just go into that directory and do |
---|
| 505 | "ln -s gutsy $suite" since it apparently hasn't changed in years. |
---|
| 506 | |
---|
| 507 | /mit/debathena/bin/build-server/make-chroot $suite i386 |
---|
| 508 | /mit/debathena/bin/build-server/make-chroot $suite amd64 |
---|
| 509 | |
---|
| 510 | |
---|
[22958] | 511 | 6. Fire up screen. |
---|
[22957] | 512 | |
---|
[24928] | 513 | 7. mkdir /mit/debathena/machines/awesome-build-server/stamps.$suite. |
---|
[22957] | 514 | |
---|
[22958] | 515 | 8. cd into a checkout of debathena/scripts/build-server/build-all. |
---|
[22957] | 516 | |
---|
[22958] | 517 | 9. Edit Makefile (and check in the edit) so that suite is the new |
---|
[22957] | 518 | distribution and psuite is the previously most recent Debian or |
---|
[24928] | 519 | Ubuntu distribution. psuite is used to generate the order of |
---|
| 520 | build-dependencies, so choose the closest distribution. If you are |
---|
| 521 | rebuilding, you can set psuite to suite. |
---|
[22957] | 522 | |
---|
[22958] | 523 | 10. Run "make deps.mk". |
---|
[22957] | 524 | |
---|
[24928] | 525 | 11. Run "make -k all". |
---|
[22958] | 526 | You can watch the builds happen in the other windows of the |
---|
| 527 | screen session. It's possible to do several builds at once with |
---|
[25325] | 528 | make -j N (except as of 7/2011 this is a bad idea) |
---|
[22957] | 529 | |
---|
[23094] | 530 | Release engineer: Maintaining autodebathenify |
---|
| 531 | --------------------------------------------- |
---|
| 532 | |
---|
[23185] | 533 | autodebathenify is a cron job which runs on the builder account and |
---|
| 534 | keeps the OpenAFS modules and modified packages under debathena/third |
---|
| 535 | up to date when there are upstream changes. It relies on the |
---|
| 536 | following: |
---|
[23094] | 537 | |
---|
| 538 | * builder@ATHENA.MIT.EDU has access to a local account named |
---|
| 539 | debuildsvn on svn.mit.edu with read access to the athena |
---|
| 540 | repository. |
---|
| 541 | |
---|
| 542 | * builder@ATHENA.MIT.EDU has write access to the canonical build |
---|
| 543 | area and apt repository in the dev cell. |
---|
| 544 | |
---|
| 545 | * The builder account on the build machine has a copy of the signing |
---|
| 546 | private key for the apt repository. |
---|
| 547 | |
---|
| 548 | The cron job will silently exit if it detects that it is already |
---|
| 549 | running. If it fails for any other reason, it will send mail to |
---|
| 550 | source-wash@mit.edu and touch a file named autodebathenify.suppress |
---|
| 551 | which will prevent it from running again until manual intervention. |
---|
| 552 | It is important to get autodebathenify running smoothly or the apt |
---|
| 553 | repository will become out of date with respect to third-party |
---|
| 554 | packages, which in turn will compromise the user experience. |
---|
| 555 | |
---|
| 556 | Even if you don't notice failure mail, it's good to check on the |
---|
| 557 | status of autodebathenify from time to time. To do this, get tickets |
---|
| 558 | as builder and ssh to linux-build-10 as builder. Run "ls -l logs" to |
---|
| 559 | see what's been going on. A logfile with size around 48K indicates |
---|
| 560 | that autodebathenify ran normally but didn't find any new work to do. |
---|
| 561 | A logfile with size around 60 means that autodebathenify.suppress |
---|
| 562 | exists and the cron job has stopped running. A longer logfile |
---|
| 563 | indicates that autodebathenify attempted to build and upload a |
---|
| 564 | package. |
---|
| 565 | |
---|
| 566 | Possible failure cases include: |
---|
| 567 | |
---|
| 568 | * One of the upstream apt repositories timed out during an "apt-get |
---|
[23119] | 569 | update" of an sbuild chroot. If this happens, you can just remove |
---|
| 570 | the autodebathenify.suppress file to get the cron job to start |
---|
| 571 | running again. |
---|
[23094] | 572 | |
---|
| 573 | * autodebathenify tried to build an upstream version which already |
---|
| 574 | exists. If this happens, the build will fail at upload time. If |
---|
| 575 | this happens, there is a bug in the part of the debathenify-* |
---|
| 576 | script which checks whether our apt repository already has the |
---|
| 577 | expected version of the built package. |
---|
| 578 | |
---|
| 579 | * Debian and Ubuntu have .orig files with the same name but |
---|
| 580 | different contexts for a particular third-party package. This has |
---|
| 581 | only happened once, with bash (which is currently not configured |
---|
| 582 | into autodebathenify for that reason). We do not have a general |
---|
| 583 | mechanism for resolving such issues at this time. |
---|
| 584 | |
---|
| 585 | * The new upstream version of the package is sufficiently different |
---|
| 586 | to cause our modifications to fail to apply, and our debathenify-* |
---|
| 587 | script needs to be adapted appropriately. |
---|
| 588 | |
---|
| 589 | The cron job is run out of builder's home directory, but its canonical |
---|
| 590 | source location is in debathena/scripts/build-server in this |
---|
| 591 | repository, should it need to be modified. |
---|
| 592 | |
---|
[23191] | 593 | After several months of operation, LVM snapshots on the build server |
---|
| 594 | will start to become slower and slower, as /etc/lvm/cache/.cache grows |
---|
| 595 | in size. Turning off the cache entirely seems to cause schroot to |
---|
| 596 | occasionally fail; the current solution is to rm /etc/lvm/cache/.cache |
---|
| 597 | every so often. |
---|
| 598 | |
---|
[23077] | 599 | Release engineer: apt repository HTTP server setup |
---|
| 600 | -------------------------------------------------- |
---|
| 601 | |
---|
[23752] | 602 | The apt repository server (debathena.mit.edu) is hosted on |
---|
| 603 | scripts.mit.edu out of the debathena locker. To replicate it on a |
---|
| 604 | dedicated server, install Apache and AFS (e.g., debathena-standard |
---|
| 605 | and apache2), and configure the document root to be |
---|
| 606 | /mit/debathena/web_scripts |
---|
[23077] | 607 | |
---|
[23752] | 608 | There's also a crontab in /mit/debathena/cron_scripts that updates |
---|
| 609 | the package lists on the website. It expects to be able to edit the |
---|
| 610 | web_scripts directory; on scripts, it does so with daemon.scripts |
---|
| 611 | permissions. |
---|
| 612 | |
---|
| 613 | Trac (http://debathena.mit.edu/trac/) expects to use sql.mit.edu |
---|
| 614 | for its database. |
---|