Bug#747946: debdiff

Thorsten Glaser tg at mirbsd.de
Thu May 22 18:42:02 UTC 2014


tag 747946 + patch
thanks

Helmut Grohne requested me to include this bugfix (patch attached)
should I indeed NMU pbuilder for #748967.

I’ve only mildly tested it so I cannot say it’s completely correct.
But I can still use cowbuilder with even as old as a sarge chroot
with it, so…

… and I’m only including it because Helmut asked nice and said that
Conflicts: systemd wouldn’t cut it as this also affects user name‐
spaces without systemd. ☺

bye,
//mirabilos
-- 
ah, that reminds me, thanks for the stellar entertainment that you and certain
other people provide on the Debian mailing lists │ sole reason I subscribed to
them (I'm not using Debian anywhere) is the entertainment factor │ Debian does
not strike me as a place for good humour, much less German admin-style humour
-------------- next part --------------
diff -Nru pbuilder-0.215+nmu1/debian/changelog pbuilder-0.215+nmu1/debian/changelog
--- pbuilder-0.215+nmu1/debian/changelog	2014-05-22 19:02:15.000000000 +0200
+++ pbuilder-0.215+nmu1/debian/changelog	2014-05-22 20:38:23.000000000 +0200
@@ -1,9 +1,10 @@
 pbuilder (0.215+nmu1) unstable; urgency=low
 
   * Non-maintainer upload.
-  * Disable network access during build by default on Linux
+  * Disable network access during build by default on Linux (Closes: #748967)
+  * Replace use of su as requested by Helmut Grohne (Closes: #747946)
 
- -- Thorsten Glaser <tg at mirbsd.de>  Thu, 22 May 2014 18:51:30 +0200
+ -- Thorsten Glaser <tg at mirbsd.de>  Thu, 22 May 2014 20:37:51 +0200
 
 pbuilder (0.215) unstable; urgency=low
 
diff -Nru pbuilder-0.215+nmu1/pbuilder-buildpackage pbuilder-0.215+nmu1/pbuilder-buildpackage
--- pbuilder-0.215+nmu1/pbuilder-buildpackage	2014-05-22 19:01:25.000000000 +0200
+++ pbuilder-0.215+nmu1/pbuilder-buildpackage	2014-05-22 20:35:42.000000000 +0200
@@ -37,16 +37,15 @@
     # 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.
-    # su -p : switch to user preserving env vars, we need most of them. 
-    SUTOUSER="env LD_PRELOAD= LOGNAME=$BUILDUSERNAME su -p $BUILDUSERNAME"
+    SUTOUSER="env LD_PRELOAD= LOGNAME=$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."
 else
     # run the build in root
-    SUTOUSER="su -p "
     BUILDUSERID=0
     BUILDUSERNAME=root
+    SUTOUSER="env LOGNAME=$BUILDUSERNAME /bin/sh"
 fi
 
 case $USENETWORK in


More information about the Pbuilder-maint mailing list