aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpbuilder-buildpackage7
-rw-r--r--pdebuild-internal4
-rw-r--r--pdebuild-user-mode-linux4
3 files changed, 12 insertions, 3 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index e13380d..c386628 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -120,7 +120,12 @@ DPKG_COMMANDLINE="dpkg-buildpackage -us -uc ${DEBEMAIL:+\"-e$DEBEMAIL\"} $DEBBUI
(
: Build process
- echo "cd tmp/buildd/*/ && ${DPKG_COMMANDLINE}${TWICE:+ && ${DPKG_COMMANDLINE}}" | $CHROOTEXEC $SUTOUSER
+ if [ -n "$TWICE" ]; then
+ DPKG_COMMANDLINE="$DPKG_COMMANDLINE && $DPKG_COMMANDLINE"
+ fi
+ DPKG_COMMANDLINE="cd tmp/buildd/*/ && $DPKG_COMMANDLINE"
+ log "I: Running $DPKG_COMMANDLINE"
+ echo "$DPKG_COMMANDLINE" | $CHROOTEXEC $SUTOUSER
) &
BUILD_PID=$!
if [ -n "${TIMEOUT_TIME}" ]; then
diff --git a/pdebuild-internal b/pdebuild-internal
index 9c41931..948f6b6 100644
--- a/pdebuild-internal
+++ b/pdebuild-internal
@@ -119,9 +119,11 @@ executehooks "A"
# do build with that user.
export DEBBUILDOPTS
+CMD="/usr/bin/dpkg-buildpackage -rfakeroot -us -uc '\${DEBBUILDOPTS}'"
+echo "I: Running $CMD"
# This command should be ran with current directory as bind-mounted
# package source directory
-if echo /usr/bin/dpkg-buildpackage -rfakeroot -us -uc '${DEBBUILDOPTS}' | \
+if echo "$CMD" | \
su -p pbuser;
then
# build was successful
diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux
index c87aff0..daab151 100644
--- a/pdebuild-user-mode-linux
+++ b/pdebuild-user-mode-linux
@@ -46,7 +46,9 @@ else
if ! dpkg-checkbuilddeps -B; then
echo "W: Unmet build-dependency in source" >&2
fi
- echo "dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | /bin/bash
+ CMD="dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS"
+ echo "I: Running $CMD" >&2
+ echo "$CMD" | /bin/bash
pbuilder-user-mode-linux build "$@" --buildresult "${UML_BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
fi