diff options
Diffstat (limited to 'pdebuild-internal')
-rw-r--r-- | pdebuild-internal | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pdebuild-internal b/pdebuild-internal index 91ce3fb..32a2012 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -73,9 +73,20 @@ export PBCURRENTCOMMANDLINEOPERATION="pdebuild" /usr/lib/pbuilder/pbuilder-satisfydepends apt-get install -y --force-yes fakeroot -# create the user similar to that used outside +# 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. |