← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad-buildd/sbuild-schroot into lp:launchpad-buildd

 

The proposal to merge lp:~cjwatson/launchpad-buildd/sbuild-schroot into lp:launchpad-buildd has been updated.

Description changed to:

This is closer to how Debian buildds behave and to how developers typically run sbuild interactively, so should further reduce the number of Launchpad-specific failures; and although we have to spend about the same number of lines of code on setup, I think less of it is about working around peculiar idiosyncrasies.  It also has the substantial benefit of the inactivity timeout actually working properly, so a build that leaves processes hanging around will eventually be reaped automatically rather than having to be cancelled manually.

The diff of the "User Environment" reported by sbuild is as follows:

 APT_CONFIG=/var/lib/sbuild/apt.conf
 DEB_BUILD_OPTIONS=noautodbgsym parallel=4
-HOME=/home/buildd
+HOME=/sbuild-nonexistent
 LANG=C.UTF-8
 LC_ALL=C.UTF-8
 LOGNAME=buildd
-MAIL=/var/mail/buildd
-OLDPWD=/
-PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
-PWD=/<<PKGBUILDDIR>>
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+SCHROOT_ALIAS_NAME=build-PACKAGEBUILD-37
+SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-37
+SCHROOT_COMMAND=env
+SCHROOT_GID=2501
+SCHROOT_GROUP=buildd
+SCHROOT_SESSION_ID=build-PACKAGEBUILD-37
+SCHROOT_UID=2001
+SCHROOT_USER=buildd
 SHELL=/bin/sh
-SUDO_COMMAND=/usr/sbin/chroot /<<CHROOT>> su buildd -s /bin/sh -c cd '/<<PKGBUILDDIR>>' && 'env'
-SUDO_GID=2501
-SUDO_UID=2001
-SUDO_USER=buildd
 TERM=unknown
 USER=buildd
-USERNAME=root
+V=1

Of these:

 * The SUDO_* and SCHROOT_* changes are natural.
 * Dropping MAIL, OLDPWD, and PWD seems correct (shells will set PWD later anyway).
 * Dropping /usr/local/games from PATH should be harmless.
 * sudo sets USERNAME, but it's rather non-standard and there's no obvious reason why it bothers, and in any case its value was arguably wrong here.
 * I'd intended to set V=1 way back in launchpad-buildd 125 but it was eaten by the environment filter and I didn't notice.
 * The change in HOME might possibly cause some problems, since it's now a nonexistent directory.  However, this matches Debian so it might just as easily cause some progressions, and I think it's more correct this way.

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/sbuild-schroot/+merge/327634
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/sbuild-schroot into lp:launchpad-buildd.


References