pbuilder git tree: Changes to 'master'
Junichi Uekawa
dancer at alioth.debian.org
Wed Mar 18 14:11:09 UTC 2009
pbuilder-buildpackage | 14 +++++++-------
pbuilder-modules | 16 ++++++++++++----
2 files changed, 19 insertions(+), 11 deletions(-)
New commits:
commit 6fd203c1f54e529ea7b1cca7189c647be9050bbf
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Wed Mar 18 12:46:18 2009 +0100
Bug#520251: pbuilder: Pbuilder does not umount bindmounts when ssh connection dies
Package: pbuilder
Version: 0.181
Severity: important
When pbuilder is executed over ssh and the ssh connection dies, it won't
umount bind mounts and won't clean up the build dir. Unfortunately,
cowbuilder WILL cleanup the build dir, wiping all bind mounts. The
execution order is like this:
ssh -> sudo -> cowbuilder -> pbuilder
Because of the sudo, the SIGHUP will not be delivered to pbuilder.
However, pbuilder will get SIGPIPE when writing to stdout or stderr.
In addition, even when SIGPIPE is ignored, a write to stdout will give
EPIPE, which causes echo to return with an error.
Therefore, you
- need to catch sigpipe in addition to sighup
- need to ignore sigpipe and sighup in the cleanup handler
- need to set +x in the cleanup handler to avoid exiting just
because echo returns an error.
The attached patch works for me but I have only edited
pbuilder-buildpackage and not the other commands.
More information about the Pbuilder-maint
mailing list