Merge lp:~cjwatson/launchpad-buildd/sbuild-schroot into lp:launchpad-buildd
| Status: | Merged |
|---|---|
| Merged at revision: | 250 |
| Proposed branch: | lp:~cjwatson/launchpad-buildd/sbuild-schroot |
| Merge into: | lp:launchpad-buildd |
| Diff against target: |
309 lines (+76/-60) 9 files modified
MANIFEST.in (+0/-1) bin/sbuild-package (+0/-27) bin/sudo-wrapper (+0/-4) debian/changelog (+1/-0) debian/control (+1/-1) debian/launchpad-buildd.install (+0/-1) lpbuildd/binarypackage.py (+30/-3) lpbuildd/tests/test_binarypackage.py (+26/-6) sbuildrc (+18/-17) |
| To merge this branch: | bzr merge lp:~cjwatson/launchpad-buildd/sbuild-schroot |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2017-07-18 | Approve on 2017-08-03 |
|
Review via email:
|
|||
Commit Message
Configure sbuild to use schroot sessions rather than sudo.
Description of the Change
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=
DEB_BUILD_
-HOME=/home/buildd
+HOME=/
LANG=C.UTF-8
LC_ALL=C.UTF-8
LOGNAME=buildd
-MAIL=/
-OLDPWD=/
-PATH=/
-PWD=/<
+PATH=/
+SCHROOT_
+SCHROOT_
+SCHROOT_
+SCHROOT_GID=2501
+SCHROOT_
+SCHROOT_
+SCHROOT_UID=2001
+SCHROOT_
SHELL=/bin/sh
-SUDO_COMMAND=
-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.
- 229. By Colin Watson on 2017-08-03
-
Simplify using install(1).
- 230. By Colin Watson on 2017-08-03
-
Merge trunk.
