aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordancer <dancer>2004-10-31 11:05:35 +0000
committerdancer <dancer>2004-10-31 11:05:35 +0000
commitd0e81d2fc7da900898cb9732bb92ce53e526ffba (patch)
treef1d751c39b2a9975f3bce508eb5d8c3f1d2010bf
parent98068b6f01921ac004e59303fa51bda1e22c06ac (diff)
downloadpbuilder-d0e81d2fc7da900898cb9732bb92ce53e526ffba.tar
pbuilder-d0e81d2fc7da900898cb9732bb92ce53e526ffba.tar.gz
+2004-10-31 Junichi Uekawa <dancer@debian.org>
+ + * Documentation/pbuilder-doc.xml (PBUILDER_UML_IMAGE): add notes on + BUILRESULTUID and SUDO interaction. + + * pbuilder-buildpackage (PACKAGENAME): move around buildresult dir creation before pkgname logfile creation. + + * pbuilder.8: add documentation for --save-after-login/exec option. + + * pbuilder: execute and login with --save-after-login/exec option. + + * pbuilder-user-mode-linux.1: add notes that uml-nocow is effective for exec and login. + + * pbuilder-uml-checkparams (UML_SAVE_AFTER_LOGIN): add UML_NOCOW for exec + + * pbuilder-checkparams (SAVE_AFTER_LOGIN): --save-after-login/exec command-option. + + * pdebuild-user-mode-linux.1: add notes that the option will override + pbuilder option. + + * pdebuild.1: add notes that the option will override pbuilder option + + * pdebuild-user-mode-linux: ditto. + + * pdebuild: override --debbbuildopts in pbuilder option when DEBBUILDOPTS is available and for non-internal mode. +
-rw-r--r--ChangeLog26
-rw-r--r--Documentation/pbuilder-doc.xml12
-rw-r--r--debian/changelog19
-rwxr-xr-xpbuilder29
-rwxr-xr-xpbuilder-buildpackage26
-rwxr-xr-xpbuilder-checkparams8
-rw-r--r--pbuilder-uml-checkparams1
-rwxr-xr-xpbuilder-user-mode-linux8
-rw-r--r--pbuilder-user-mode-linux.16
-rw-r--r--pbuilder.812
-rw-r--r--pdebuild2
-rw-r--r--pdebuild-user-mode-linux2
-rw-r--r--pdebuild-user-mode-linux.17
-rw-r--r--pdebuild.12
14 files changed, 144 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e8f949..aa41d1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2004-10-31 Junichi Uekawa <dancer@debian.org>
+
+ * Documentation/pbuilder-doc.xml (PBUILDER_UML_IMAGE): add notes on
+ BUILRESULTUID and SUDO interaction.
+
+ * pbuilder-buildpackage (PACKAGENAME): move around buildresult dir creation before pkgname logfile creation.
+
+ * pbuilder.8: add documentation for --save-after-login/exec option.
+
+ * pbuilder: execute and login with --save-after-login/exec option.
+
+ * pbuilder-user-mode-linux.1: add notes that uml-nocow is effective for exec and login.
+
+ * pbuilder-uml-checkparams (UML_SAVE_AFTER_LOGIN): add UML_NOCOW for exec
+
+ * pbuilder-checkparams (SAVE_AFTER_LOGIN): --save-after-login/exec command-option.
+
+ * pdebuild-user-mode-linux.1: add notes that the option will override
+ pbuilder option.
+
+ * pdebuild.1: add notes that the option will override pbuilder option
+
+ * pdebuild-user-mode-linux: ditto.
+
+ * pdebuild: override --debbbuildopts in pbuilder option when DEBBUILDOPTS is available and for non-internal mode.
+
2004-10-20 Junichi Uekawa <dancer@debian.org>
* debian/control: Remove uml package
diff --git a/Documentation/pbuilder-doc.xml b/Documentation/pbuilder-doc.xml
index 3469803..451ffac 100644
--- a/Documentation/pbuilder-doc.xml
+++ b/Documentation/pbuilder-doc.xml
@@ -693,6 +693,18 @@ $ mkdir ~/loginhooks
$ cp C10shell ~/loginhooks/E10shell
$ sudo pbuilder update --hookdir ~/loginhooks/E10shell
</screen>
+ <para>
+ It is also possible to add --save-after-exec, --save-after-login option
+ to <command>pbuilder login</command> session to achieve the goal.
+ Also, it is possible to add --uml-login-nocow option to <command>pbuilder-user-mode-linux login</command> session.
+ </para>
+ </sect1>
+ <sect1 id="BUILDRESULTUID">
+ <title>Setting BUILDRESULTUID for pdebuild sessions using sudo</title>
+ <para>
+ It is possible to set BUILDRESULTUID=$SUDO_UID in pbuilderrc
+ to set the proper BUILDRESULTUID when using sudo.
+ </para>
</sect1>
<sect1 id="tmpdir">
<title>Notes on usage of $TMPDIR</title>
diff --git a/debian/changelog b/debian/changelog
index a4c831f..26b297f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+pbuilder (0.118) unstable; urgency=low
+
+ * --debbuildopts behavior change for pdebuild:
+ It is now: pdebuild --debbuildopts "xxx"
+ It was: pdebuild --debbuildopts "xxx" -- --debbuildopts "xxx" (for internal pdebuild mode)
+ pdebuild --debbuildopts "xxx" (for non-internal pdebuild mode)
+ (closes: #278999)
+ * pbuilder: --save-after-login, --save-after-exec options added.
+ NOTE: pbuilder-UML already has --uml-login-nocow option, which is
+ equivalent to this new feature.
+ (closes: #275970, #275016)
+ * buildresult dir creation is done after pkgname-logfile creation.
+ Thanks: Mike Hommey <mh@glandium.org>
+ (closes: #273882)
+ * add notes on sudo and BUILDRESULTDUID on the manual
+ (closes: #271211)
+
+ -- Junichi Uekawa <dancer@debian.org> Sun, 31 Oct 2004 20:01:58 +0900
+
pbuilder (0.117) unstable; urgency=HIGH
* Remove pbuilder-user-mode-linux package for the time being, until
diff --git a/pbuilder b/pbuilder
index 5fcfb3c..27e3b93 100755
--- a/pbuilder
+++ b/pbuilder
@@ -65,6 +65,19 @@ File extracted to: $BUILDPLACE
fi
executehooks "F"
chroot "$BUILDPLACE" bin/bash
+
+ # saving the place afterwards
+ if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
+ if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+ echo "E: Invalid combination of internal-build-uml and save-after-login flags"
+ else
+ echo " -> Saving the results, modifications to this session will persist"
+ unloadhooks
+ umountproc
+ trap cleanbuildplace exit
+ create_basetgz
+ fi
+ fi
;;
execute)
# try to execute arbitrary program.
@@ -78,13 +91,29 @@ File extracted to: $BUILDPLACE
exit 1;
fi;
extractbuildplace
+
trap umountproc_cleanbuildplace exit
+
loadhooks
RUNNAME="$BUILDPLACE/run"
cat "$EXECPROGRAM" > "$RUNNAME"
chmod a+x "$RUNNAME"
executehooks "F"
chroot "$BUILDPLACE" /run "$@"
+
+
+ # saving the place afterwards
+ if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
+ if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+ echo "E: Invalid combination of internal-build-uml and save-after-login flags"
+ else
+ echo " -> Saving the results, modifications to this session will persist"
+ unloadhooks
+ umountproc
+ trap cleanbuildplace exit
+ create_basetgz
+ fi
+ fi
;;
dumpconfig)
shift
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 905690b..b2c6b48 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -51,6 +51,11 @@ extractbuildplace
trap umountproc_cleanbuildplace exit
loadhooks
+if [ -n "${BUILDRESULT}" ]; then
+ echo " -> created buildresult dir :${BUILDRESULT}"
+ mkdir -p "${BUILDRESULT}"
+fi
+
if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
if [ "${USE_PKGNAME_LOGFILE}" = "yes" ]; then
PBUILDER_BUILD_LOGFILE="${BUILDRESULT}/"$(basename "${PACKAGENAME}" .dsc)
@@ -125,19 +130,16 @@ executehooks "B"
trap cleanbuildplace exit
umountproc
-if [ -n "${BUILDRESULT}" ]; then
- mkdir -p "${BUILDRESULT}"
- if [ -d "${BUILDRESULT}" ]; then
- if [ -n "${BUILDRESULTUID}" ]; then
- chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- fi
- if [ -n "${BUILDRESULTGID}" ]; then
- chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
- fi
- cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true
- else
- echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2
+if [ -d "${BUILDRESULT}" ]; then
+ if [ -n "${BUILDRESULTUID}" ]; then
+ chown "${BUILDRESULTUID}:${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
fi
+ if [ -n "${BUILDRESULTGID}" ]; then
+ chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/*
+ fi
+ cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true
+else
+ echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2
fi
echobacktime
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index 40797ad..8383610 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -17,6 +17,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# This code is called for pbuilder and pbuilder inside pbuilder-uml;
+# pbuilder-uml calls uml-checkparams.
+
. /usr/lib/pbuilder/pbuilder-loadconfig
. /usr/lib/pbuilder/pbuilder-modules
@@ -30,6 +33,7 @@ USE_PKGNAME_LOGFILE=""
PRESERVE_BUILDPLACE="no"
unset EXTRA_CONFIGFILE || true
PBUILDER_DEBUGMODE=
+SAVE_AFTER_LOGIN=
#option for user-mode-linux only.
IGNORE_UMOUNT=""
@@ -178,6 +182,10 @@ while [ -n "$1" ]; do
USE_PDEBUILD_INTERNAL=yes;
shift;
;;
+ --save-after-login|--save-after-exec)
+ SAVE_AFTER_LOGIN=yes;
+ shift;
+ ;;
## internal options.
--internal-chrootexec)
# specify custom chrootexec function -- this is internal debugging function
diff --git a/pbuilder-uml-checkparams b/pbuilder-uml-checkparams
index b940e71..6c52126 100644
--- a/pbuilder-uml-checkparams
+++ b/pbuilder-uml-checkparams
@@ -35,6 +35,7 @@ UML_LOGIN_NOCOW=
while [ -n "$1" ] ; do
case "$1" in
+ # pbuilder UML options
--eth0)
MY_ETH0="$2";
shift; shift;
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux
index 7a8b28d..19dc2a9 100755
--- a/pbuilder-user-mode-linux
+++ b/pbuilder-user-mode-linux
@@ -168,8 +168,12 @@ case "${OPERATION}" in
operate_uml login
;;
execute)
- usecow
- EXTRACLEANUP=cleancow
+ if [ "${UML_LOGIN_NOCOW}" = "yes" ]; then
+ echo " -> Not using COW filesystem for login session, modifications to this session will persist"
+ else
+ usecow
+ EXTRACLEANUP=cleancow
+ fi
shift;
UML_EXECUTE_EXTRAOPT="${UML_EXECUTE_EXTRAOPT} $@"
operate_uml execute
diff --git a/pbuilder-user-mode-linux.1 b/pbuilder-user-mode-linux.1
index 21ba78f..e793e30 100644
--- a/pbuilder-user-mode-linux.1
+++ b/pbuilder-user-mode-linux.1
@@ -173,6 +173,12 @@ Do not use COW filesystem when using
.B "pbuilder-user-mode-linux login"
so that changes made in the log in session will persist.
+Effective in
+.B login
+and
+.B exec
+options.
+
\" copied from pbuilder.8
.TP
diff --git a/pbuilder.8 b/pbuilder.8
index 493c5f7..247b485 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -434,6 +434,18 @@ targets.
.BI "--debootstrapopts " "--variant=buildd"
Add extra command-line options to debootstrap.
+.TP
+.BI "--save-after-login "
+.TP
+.BI "--save-after-exec "
+Save the chroot image after exiting from the chroot instead of
+deleting changes.
+Effective for
+.B login
+and
+.B exec
+session.
+
.SH "FILES"
.TP
.I "/etc/pbuilderrc"
diff --git a/pdebuild b/pdebuild
index a70eb97..2256033 100644
--- a/pdebuild
+++ b/pdebuild
@@ -37,7 +37,7 @@ if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
${PBUILDERROOTCMD} pbuilder execute "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "${DEBBUILDOPTS}"
else
dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS
- ${PBUILDERROOTCMD} pbuilder build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
+ ${PBUILDERROOTCMD} pbuilder build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" --debbuildopts "${DEBBUILDOPTS}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
fi
if [ "${AUTO_DEBSIGN}" = "yes" ]; then
diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux
index b476451..e26b0bd 100644
--- a/pdebuild-user-mode-linux
+++ b/pdebuild-user-mode-linux
@@ -42,7 +42,7 @@ if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
pbuilder-user-mode-linux execute "$@" --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "${DEBBUILDOPTS}"
else
dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS
- pbuilder-user-mode-linux build "$@" --buildresult "${UML_BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
+ pbuilder-user-mode-linux build "$@" --buildresult "${UML_BUILDRESULT}" --debbuildopts "${DEBBUILDOPTS}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
fi
if [ "${AUTO_DEBSIGN}" = "yes" ]; then
diff --git a/pdebuild-user-mode-linux.1 b/pdebuild-user-mode-linux.1
index 5f657dd..2402c44 100644
--- a/pdebuild-user-mode-linux.1
+++ b/pdebuild-user-mode-linux.1
@@ -37,6 +37,13 @@ The configuration file is used, but not passed on to
.BR "pbuilder-user-mode-linux" .
.TP
+.BI "--debbuildopts [" "options to pass to dpkg-buildpackage" "]"
+
+The space-delimited list of options are passed to dpkg-buildpackage.
+This option overrides pbuilder option
+.B "--debbuildopts"
+
+.TP
.BI "--use-pdebuild-internal"
Uses a different implementation of pdebuild, which calls clean and build inside
the chroot, using bind-mounts.
diff --git a/pdebuild.1 b/pdebuild.1
index 30d85ab..2fca1d5 100644
--- a/pdebuild.1
+++ b/pdebuild.1
@@ -47,6 +47,8 @@ The configuration file is used, and passed on to
.BI "--debbuildopts [" "options to pass to dpkg-buildpackage" "]"
The space-delimited list of options are passed to dpkg-buildpackage.
+This option overrides pbuilder option
+.B "--debbuildopts"
.TP
.BI "--use-pdebuild-internal"