diff options
author | dancer <dancer> | 2003-12-23 13:56:34 +0000 |
---|---|---|
committer | dancer <dancer> | 2003-12-23 13:56:34 +0000 |
commit | a8045fd73200c1ba47f064f14813ed799b78ac77 (patch) | |
tree | dbf0baecb49fc3a5d1d4548fdc5aa053caba1867 | |
parent | fabcb2bae7541eb52a3f292393ae8902889d9c74 (diff) | |
download | pbuilder-a8045fd73200c1ba47f064f14813ed799b78ac77.tar pbuilder-a8045fd73200c1ba47f064f14813ed799b78ac77.tar.gz |
+2003-12-23 Junichi Uekawa <dancer@debian.org>
+
+ * Makefile (install): update build rules to install pdebuild-internal
+
+ * pbuilderrc.5: update document USE_PDEBUILD_INTERNAL
+
+ * pdebuild-user-mode-linux.1: document --use-pdebuild-internal
+
+ * pdebuild.1: document --use-pdebuild-internal
+
+ * pbuilder-modules: document use-pdebuild-internal
+
+ * pbuilder-checkparams: --use-pdebuild-internal option.
+
+ * pdebuild: use pdebuild-internal if USE_PDEBUILD_INTERNAL option is 'yes'
+
+ * pdebuild-user-mode-linux: use pdebuild-internal if USE_PDEBUILD_INTERNAL option is 'yes'
+
+ * pdebuild-internal: Implement a pbuilder execute script to be
+ used for pdebuild without doing debian/rules clean outside of chroot.
+
+ * pbuilder-checkparams: support multiple bindmounts;
+ delimit it with spaces.
+
+ * pbuilder-modules: add --debug option here.
+
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | debian/changelog | 14 | ||||
-rwxr-xr-x | pbuilder-checkparams | 6 | ||||
-rw-r--r-- | pbuilder-modules | 4 | ||||
-rw-r--r-- | pbuilder-uml.conf.5 | 4 | ||||
-rw-r--r-- | pbuilderrc.5 | 8 | ||||
-rw-r--r-- | pdebuild | 12 | ||||
-rw-r--r-- | pdebuild-internal | 40 | ||||
-rw-r--r-- | pdebuild-user-mode-linux | 10 | ||||
-rw-r--r-- | pdebuild-user-mode-linux.1 | 16 | ||||
-rw-r--r-- | pdebuild.1 | 15 |
12 files changed, 151 insertions, 13 deletions
@@ -1,6 +1,33 @@ +2003-12-23 Junichi Uekawa <dancer@debian.org> + + * Makefile (install): update build rules to install pdebuild-internal + + * pbuilderrc.5: update document USE_PDEBUILD_INTERNAL + + * pdebuild-user-mode-linux.1: document --use-pdebuild-internal + + * pdebuild.1: document --use-pdebuild-internal + + * pbuilder-modules: document use-pdebuild-internal + + * pbuilder-checkparams: --use-pdebuild-internal option. + + * pdebuild: use pdebuild-internal if USE_PDEBUILD_INTERNAL option is 'yes' + + * pdebuild-user-mode-linux: use pdebuild-internal if USE_PDEBUILD_INTERNAL option is 'yes' + + * pdebuild-internal: Implement a pbuilder execute script to be + used for pdebuild without doing debian/rules clean outside of chroot. + + * pbuilder-checkparams: support multiple bindmounts; + delimit it with spaces. + + * pbuilder-modules: add --debug option here. + 2003-12-20 Junichi Uekawa <dancer@debian.org> * examples/execute_installtest.sh: add /etc/mailname hack for emacs. + note known bugs as comment. 2003-12-18 Junichi Uekawa <dancer@debian.org> @@ -2,6 +2,10 @@ INSTALL_DIRECTORY=install -d -m 0755 INSTALL_FILE=install -m 0644 INSTALL_EXECUTABLE=install -m 0755 + +# +# To add new script, add it to here, so that it will be tested. And then add a rule to install: target. +# SHELLCODES=pbuilder-buildpackage \ pbuilder-buildpackage-funcs \ pbuilder-checkparams \ @@ -14,7 +18,8 @@ SHELLCODES=pbuilder-buildpackage \ pbuilder-user-mode-linux \ pbuilder \ pdebuild \ - pdebuild-user-mode-linux + pdebuild-user-mode-linux \ + pdebuild-internal check: set -e; @@ -60,6 +65,7 @@ install: $(INSTALL_EXECUTABLE) pdebuild-user-mode-linux $(DESTDIR)/usr/bin $(INSTALL_EXECUTABLE) debuild-pbuilder $(DESTDIR)/usr/bin $(INSTALL_EXECUTABLE) pbuilder-satisfydepends $(DESTDIR)/usr/lib/pbuilder/ + $(INSTALL_EXECUTABLE) pdebuild-internal $(DESTDIR)/usr/lib/pbuilder/ $(INSTALL_FILE) pbuilderrc $(DESTDIR)/etc $(INSTALL_FILE) pbuilderrc $(DESTDIR)/usr/share/pbuilder $(INSTALL_FILE) pbuilder-uml.conf $(DESTDIR)/etc/pbuilder diff --git a/debian/changelog b/debian/changelog index 152d8d8..f02c6ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,18 @@ pbuilder (0.97) UNRELEASED; urgency=low * update installtest script - - -- Junichi Uekawa <dancer@debian.org> Sat, 20 Dec 2003 15:04:53 +0900 + * allow multiple --bindmounts option to be specified for multiple + bind-mount operation. + * Support pdebuild which does not run debian/rules clean outside of + chroot. Set 'USE_PDEBUILD_INTERNAL=yes' to use it, or + --use-pdebuild-internal. It will not be the default yet, because + it changes the manner of operation drastically. + - "pdebuild builds source package outside chroot" by + Matt Kraai (Closes: #211230). + - "pbuilder: don't run debian/rules clean outside chroot" by + thanks to Brian May (Closes: #215192). + + -- Junichi Uekawa <dancer@debian.org> Tue, 23 Dec 2003 22:14:45 +0900 pbuilder (0.96) unstable; urgency=low diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 346e24d..de9682c 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -152,7 +152,7 @@ while [ -n "$1" ]; do shift; ;; --bindmounts) - BINDMOUNTS="$2" + BINDMOUNTS="${BINDMOUNTS} $2" shift; shift; ;; ## pdebuild option @@ -168,6 +168,10 @@ while [ -n "$1" ]; do PBUILDERROOTCMD="$2"; shift; shift; ;; + --use-pdebuild-internal) + USE_PDEBUILD_INTERNAL=yes; + shift; + ;; ## internal options. --internal-chrootexec) # specify custom chrootexec function -- this is internal debugging function diff --git a/pbuilder-modules b/pbuilder-modules index d67b58e..e106ca6 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -66,10 +66,12 @@ pbuilder-options: --binary-arch --preserve-buildplace --bindmounts [bind-mount-point] + --debug -pdebuild-specific pbuilder-options +pdebuild-specific pbuilder-options: --pbuilderroot [command to obtain root privilege for pbuilder] --buildsourceroot [command to obtain root privilege for dpkg-buildpackage] + --use-pdebuild-internal EOF exit 1 } diff --git a/pbuilder-uml.conf.5 b/pbuilder-uml.conf.5 index 46c019f..fc0c01b 100644 --- a/pbuilder-uml.conf.5 +++ b/pbuilder-uml.conf.5 @@ -77,7 +77,9 @@ is stored. It is advised to set .B "APTCACHEHARDLINK" -to no in +to +.I no +in .B "pbuilderrc(5)" .SH "AUTHOR" diff --git a/pbuilderrc.5 b/pbuilderrc.5 index 04bb9dc..f488eae 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -281,6 +281,14 @@ bind-mount. Do not bind-mount .B "/" +.B "USE_PDEBUILD_INTERNAL=" "yes" +When this option is set to +.I yes +.B "pdebuild-internal" +implementation of +.B pdebuild +is used. + .SH "AUTHOR" Initial coding, and main maintenance is done by Junichi Uekawa <dancer@debian.org>. @@ -33,9 +33,13 @@ PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p') PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') ARCHITECTURE=$(dpkg-architecture -qDEB_HOST_ARCH) -dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} -${PBUILDERROOTCMD} pbuilder build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc -if [ "${AUTO_DEBSIGN}" = "yes" ]; then - debsign "${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" +if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then + ${PBUILDERROOTCMD} pbuilder execute "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} +else + dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} + ${PBUILDERROOTCMD} pbuilder build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc fi +if [ "${AUTO_DEBSIGN}" = "yes" ]; then + debsign "${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" +fi
\ No newline at end of file diff --git a/pdebuild-internal b/pdebuild-internal new file mode 100644 index 0000000..686226f --- /dev/null +++ b/pdebuild-internal @@ -0,0 +1,40 @@ +#! /bin/bash +# pbuilder-internal -- personal Debian package builder, internal routine +# Copyright (C) 2003 Junichi Uekawa +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# invoke this as +# pbuilder execute pdebuild-internal --bindmount "${pwd}/.." "$1" +# does not support --buildresult, but should that be required ? +# +# Risk: May corrupt your files depending on how user-mode-linux works, if used inside UML. +# Will take longer if your package does not successfully run 'debian/rules clean' +# + +set -e + +echo "Using: $Id$" + +# I am probably running as root; make sure I have pbuilder installed here. +apt-get install -y pbuilder devscripts + +# I'm not going to have the same LOGNAME as outside, I'm root. +export LOGNAME=root + +cd "$1" +export PBCURRENTCOMMANDLINEOPERATION="pdebuild" +/usr/lib/pbuilder/pbuilder-satisfydepends +/usr/bin/debuild diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux index 46fcd4a..8b86131 100644 --- a/pdebuild-user-mode-linux +++ b/pdebuild-user-mode-linux @@ -32,9 +32,13 @@ PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p') PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') ARCHITECTURE=$(dpkg-architecture -qDEB_HOST_ARCH) -dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} || true -pbuilder-user-mode-linux build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc +if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then + pbuilder-user-mode-linux execute "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} +else + dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} || true + pbuilder-user-mode-linux build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc +fi + if [ "${AUTO_DEBSIGN}" = "yes" ]; then debsign "${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" fi - diff --git a/pdebuild-user-mode-linux.1 b/pdebuild-user-mode-linux.1 index bd577b7..14391b3 100644 --- a/pdebuild-user-mode-linux.1 +++ b/pdebuild-user-mode-linux.1 @@ -40,6 +40,22 @@ The place which build result is stored. The configuration file is used, and passed on to .BR "pbuilder-user-mode-linux" . + +.TP +.BI "--use-pdebuild-internal" +Uses a different implementation of pdebuild, which calls clean and build inside +the chroot, using bind-mounts. + +.B "pdebuild-internal" +tries to run debian/rules clean inside the chroot. +To achieve the goal, the working directory is passed on inside the chroot, +in the form of bind-mounting and +.B debuild +is run. + +This option will not protect the working directory and its parent directories +from the build scripts. + .TP .BI "-- [" "pbuilder options" "]" @@ -44,6 +44,21 @@ The configuration file is used, and passed on to .BR "pbuilder" . .TP +.BI "--use-pdebuild-internal" +Uses a different implementation of pdebuild, which calls clean and build inside +the chroot, using bind-mounts. + +.B "pdebuild-internal" +tries to run debian/rules clean inside the chroot. +To achieve the goal, the working directory is passed on inside the chroot, +in the form of bind-mounting and +.B debuild +is run. + +This option will not protect the working directory and its parent directories +from the build scripts. + +.TP .BI "-- [" "pbuilder options" "]" After the |