diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | pdebuild-internal | 14 |
3 files changed, 4 insertions, 15 deletions
@@ -1,8 +1,7 @@ 2006-11-03 Loic Minier <lool@dooz.org> * pdebuild-internal: install the passwd package before calling - groupadd and useradd; restore it's installation state after groupadd - and useradd. + groupadd and useradd. 2006-10-30 Loic Minier <lool@dooz.org> diff --git a/debian/changelog b/debian/changelog index 4ab557c..1bb17ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,7 @@ pbuilder (0.161) UNRELEASED; urgency=low errors shouldn't cause data loss; thanks Martin F Krafft; closes: #391390. * Unmount selinux and bind mounts first. * Fix usage of --pdebuild-internal: install passwd during groupadd/useradd - if necessary in pdebuild-internal. + in pdebuild-internal. -- Loic Minier <lool@dooz.org> Fri, 3 Nov 2006 18:43:49 +0100 diff --git a/pdebuild-internal b/pdebuild-internal index 32a2012..975b262 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -31,7 +31,8 @@ set -e echo "Using: $Id$" # I am probably running as root; make sure I have pbuilder installed here. -apt-get install -y --force-yes pbuilder +# passwd is needed as well because of useradd and groupadd calls. +apt-get install -y --force-yes pbuilder passwd # I'm not going to have the same LOGNAME as outside, I'm root. export LOGNAME=root @@ -73,20 +74,9 @@ export PBCURRENTCOMMANDLINEOPERATION="pdebuild" /usr/lib/pbuilder/pbuilder-satisfydepends apt-get install -y --force-yes fakeroot -# we will need "passwd" for groupadd/useradd, retain whether it was installed -# warning: dpkg --get-selections returns true for unknown packages -PASSWD_SELECTION="$(LC_ALL=C dpkg --get-selections passwd && true)" -if [ -z "$PASSWD_SELECTION" ]; then - PASSWD_SELECTION="passwd purge" -fi -# install passwd -apt-get install -y --force-yes passwd # create the user similar to that used outside groupadd -g "${BUILDRESULTGID}" -o pbgroup useradd -g pbgroup -u "${BUILDRESULTUID}" -o pbuser -# restore the state of the passwd package -echo "$PASSWD_SELECTION" | LC_ALL=C dpkg --set-selections -apt-get dselect-upgrade -u -y --force-yes # what about id -G output? if other groups than the designated is used, we're stuffed. |