aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-17 20:51:21 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-06-17 20:54:56 +0000
commit32c1cd2878a265297276b3edcc2ed0cbc8c0c81e (patch)
treeba26c5075e81695eb71e3c0d4800d578edb3dd4e
parent3d796ccd6294107414d3c5e3d8a219ef39f5a4b8 (diff)
downloadpbuilder-32c1cd2878a265297276b3edcc2ed0cbc8c0c81e.tar
pbuilder-32c1cd2878a265297276b3edcc2ed0cbc8c0c81e.tar.gz
set the USER env variable to BUILDUSERNAME, to fix FTBFS of some package which check for not being run as root using that variable
Closes: #677666 Thanks: Tim Landscheidt <tim@tim-landscheidt.de> for the initial patch
-rw-r--r--debian/changelog8
-rwxr-xr-xpbuilder-buildpackage4
2 files changed, 8 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 53c3d95..40806fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
pbuilder (0.215+nmu4) UNRELEASED; urgency=medium
* debian/source/format: 3.0 (native).
- * Do real cleanup, don't hide temporary files under .gitignore, rather teach
- makefiles' clean targets how to deal with them properly.
+ * Do real cleanup, don't hide temporary files under .gitignore, rather
+ teach makefiles' clean targets how to deal with them properly.
+ * set the USER env variable to BUILDUSERNAME, to fix FTBFS of some package
+ which check for not being run as root using that variable.
+ Thanks to Tim Landscheidt <tim@tim-landscheidt.de> for the initial patch.
+ Closes: #677666
-- Mattia Rizzolo <mattia@mapreri.org> Wed, 17 Jun 2015 20:36:23 +0000
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 78f028b..d434a43 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -36,8 +36,8 @@ if [ -n "$BUILDUSERNAME" -a -n "$BUILDUSERID" ]; then
# LD_PRELOAD: Normal users don't have write access to build
# environment, so cowdancer shouldn't have to run, and fakeroot
# should be running later, so it shouldn't matter.
- # LOGNAME: set this to shut up some tools.
- SUTOUSER="LD_PRELOAD= LOGNAME=$BUILDUSERNAME /sbin/start-stop-daemon --start --pidfile /dev/null --chuid $BUILDUSERNAME --startas /bin/sh"
+ # LOGNAME and USER: set this to shut up some tools.
+ SUTOUSER="LD_PRELOAD= LOGNAME=$BUILDUSERNAME USER=$BUILDUSERNAME /sbin/start-stop-daemon --start --pidfile /dev/null --chuid $BUILDUSERNAME --startas /bin/sh"
DEBBUILDOPTS="${DEBBUILDOPTS:+$DEBBUILDOPTS }-rfakeroot"
EXTRAPACKAGES="${EXTRAPACKAGES} fakeroot"
log "I: using fakeroot in build."