aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordancer <dancer>2003-03-10 11:01:01 +0000
committerdancer <dancer>2003-03-10 11:01:01 +0000
commit339ee7a89b7f9e0755090a1c764e41a4c5b172ad (patch)
tree4e81c66a4d3f14e4c58c084bf52de104281448a2
parentca62e88c1fd2574426cc228aef4a1c5064dd2853 (diff)
downloadpbuilder-339ee7a89b7f9e0755090a1c764e41a4c5b172ad.tar
pbuilder-339ee7a89b7f9e0755090a1c764e41a4c5b172ad.tar.gz
+ * debian/rules: add check target for build.
+ + * Makefile (check): add check target to makefile, to see if there is + any syntax error. + + * pbuilder-updatebuildenv: support --preserve-buildplace + apply things from + Daniel Schepler <schepler@math.berkeley.edu> + + * pbuilder-satisfydepends: support --preserve-buildplace + support Format: field. + + * pbuilder-modules (pbuilder-options): support --preserve-buildplace + + * pbuilder-buildpackage (PACKAGENAME): support --preserve-buildplace + + * pbuilder-buildpackage-funcs: support --preserve-buildplace + + * pbuilder-createbuildenv (DEBOOTSTRAPSCRIPT): support --preserve-buildplace + + * pbuilder-checkparams (PRESERVE_BUILDPLACE): add PRESERVE_BUILDPLACE + + * pbuilder.8: update docs to add --preserve-buildplace +
-rw-r--r--AUTHORS2
-rw-r--r--ChangeLog24
-rw-r--r--Makefile21
-rw-r--r--debian/changelog4
-rwxr-xr-xdebian/rules1
-rwxr-xr-xpbuilder-buildpackage16
-rw-r--r--pbuilder-buildpackage-funcs12
-rwxr-xr-xpbuilder-checkparams7
-rwxr-xr-xpbuilder-createbuildenv3
-rw-r--r--pbuilder-modules3
-rw-r--r--pbuilder-satisfydepends4
-rwxr-xr-xpbuilder-updatebuildenv6
-rw-r--r--pbuilder.826
13 files changed, 112 insertions, 17 deletions
diff --git a/AUTHORS b/AUTHORS
index 9ed119f..92124a4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,7 +6,7 @@ Daniel Kobras -- Patches and bugfixes for non-interactive building, and
some other bugs.
Dagfinn Ilmari Manns?er <ilmari@ping.uio.no> -- devfs support.
Henrique de Moraes Holschuh <hmh@debian.org> -- portion of pbuilder-satisfydepends (version dependency check)
-Daniel Schepler <schepler@math.berkeley.edu> -- many patches.
+Daniel Schepler <schepler@math.berkeley.edu> -- many patches, --preserve-buildplace
$Id$ \ No newline at end of file
diff --git a/ChangeLog b/ChangeLog
index e8dd262..dcc3e0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
2003-03-10 Junichi Uekawa <dancer@debian.org>
+ * debian/rules: add check target for build.
+
+ * Makefile (check): add check target to makefile, to see if there is
+ any syntax error.
+
+ * pbuilder-updatebuildenv: support --preserve-buildplace
+ apply things from
+ Daniel Schepler <schepler@math.berkeley.edu>
+
+ * pbuilder-satisfydepends: support --preserve-buildplace
+ support Format: field.
+
+ * pbuilder-modules (pbuilder-options): support --preserve-buildplace
+
+ * pbuilder-buildpackage (PACKAGENAME): support --preserve-buildplace
+
+ * pbuilder-buildpackage-funcs: support --preserve-buildplace
+
+ * pbuilder-createbuildenv (DEBOOTSTRAPSCRIPT): support --preserve-buildplace
+
+ * pbuilder-checkparams (PRESERVE_BUILDPLACE): add PRESERVE_BUILDPLACE
+
+ * pbuilder.8: update docs to add --preserve-buildplace
+
* pbuilder-satisfydepends: quote some strings... trying to be pedantic
* pbuilder-buildpackage-funcs: unset LOGNAME for when building with
diff --git a/Makefile b/Makefile
index c60ccc0..e13e1d7 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,27 @@ INSTALL_DIRECTORY=install -d -m 0755
INSTALL_FILE=install -m 0644
INSTALL_EXECUTABLE=install -m 0755
+SHELLCODES=pbuilder-buildpackage \
+ pbuilder-buildpackage-funcs \
+ pbuilder-checkparams \
+ pbuilder-createbuildenv \
+ pbuilder-loadconfig \
+ pbuilder-modules \
+ pbuilder-runhooks \
+ pbuilder-satisfydepends \
+ pbuilder-updatebuildenv \
+ pbuilder-user-mode-linux \
+ pbuilder \
+ pdebuild \
+ pdebuild-user-mode-linux
+
+check:
+ set -e;
+ for A in $(SHELLCODES); do \
+ bash -n $$A; \
+ echo $$A; \
+ done
+
clean:
rm -f *.bak *~ TAGS
diff --git a/debian/changelog b/debian/changelog
index 769a07e..d825a36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,8 +11,10 @@ pbuilder (0.67) UNRELEASED; urgency=low
* unset LOGNAME for root-build cases, it was only fixed on
fakeroot builds.
thanks Barak Pearlmutter <bap@cs.unm.edu> (closes: #183862)
+ * Apply patch from Daniel Schepler <schepler@math.berkeley.edu>,
+ to support --preserve-buildplace (closes: #183605)
- -- Junichi Uekawa <dancer@debian.org> Mon, 10 Mar 2003 18:58:35 +0900
+ -- Junichi Uekawa <dancer@debian.org> Mon, 10 Mar 2003 19:56:35 +0900
pbuilder (0.66) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index 362be01..bc1d7c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,6 +39,7 @@ install: build
dh_installdirs
# Add here commands to install the package into debian/build-package.
+ $(MAKE) check
$(MAKE) install DESTDIR=$(CURDIR)/debian/pbuilder
dh_movefiles -ppbuilder-uml --sourcedir=debian/pbuilder
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 47d08a1..8e87559 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -50,7 +50,6 @@ echobacktime
extractbuildplace
trap umountproc_cleanbuildplace exit
loadhooks
-createbuilduser
if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
if [ "${USE_PKGNAME_LOGFILE}" = "yes" ]; then
@@ -64,6 +63,14 @@ if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
fi
fi
+recover_aptcache
+echo "Installing the build-deps"
+trap saveaptcache_umountproc_cleanbuildplace exit
+checkbuilddep
+save_aptcache
+trap umountproc_cleanbuildplace exit
+createbuilduser
+
echo "Copying source file"
copydsc "$PACKAGENAME" "$BUILDPLACE/tmp/buildd"
executehooks "D"
@@ -74,13 +81,6 @@ if ! $CHROOTEXEC /bin/bash -c "( cd tmp/buildd; chown $BUILDUSERNAME:$BUILDUSERN
exit 1;
fi
-recover_aptcache
-echo "Installing the build-deps"
-trap saveaptcache_umountproc_cleanbuildplace exit
-checkbuilddep
-save_aptcache
-trap umountproc_cleanbuildplace exit
-
echo " -> Building the package"
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs
index 04bef48..cac6321 100644
--- a/pbuilder-buildpackage-funcs
+++ b/pbuilder-buildpackage-funcs
@@ -31,14 +31,22 @@ function copydsc () {
}
function checkbuilddep () {
+ # call satisfydepends
local BUILDOPT="--binary-all"
case "${BINARY_ARCH}" in
yes) BUILDOPT="--binary-arch";;
*) ;;
esac
- if ! /usr/lib/pbuilder/pbuilder-satisfydepends --control "$BUILDPLACE/"tmp/buildd/*/debian/control --chroot "$BUILDPLACE" "${BUILDOPT}" ; then
+ if /usr/lib/pbuilder/pbuilder-satisfydepends --control "$1" --chroot "$BUILDPLACE" "${BUILDOPT}" ; then
+ :
+ else
+ # If asked to preserve the build place, and pbuilder-satisfydepends
+ # didn't taint it, then don't clean it when exiting.
+ if [ $? -eq 2 -a "${PRESERVE_BUILDPLACE}" = "yes" ]; then
+ trap umountproc exit
+ fi
echo "E: pbuilder-satisfydepends failed." >&2
- exit 1
+ exit 2
fi
# install extra packages to the chroot
if [ -n "$EXTRAPACKAGES" ]; then
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index dc6ac86..2e37d67 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -27,6 +27,7 @@ OVERRIDE_APTLINES="no"
BINARY_ARCH="no"
PBUILDER_BUILD_LOGFILE=
USE_PKGNAME_LOGFILE=""
+PRESERVE_BUILDPLACE="no"
while [ -n "$1" ]; do
case "$1" in
@@ -116,6 +117,10 @@ while [ -n "$1" ]; do
DEBBUILDOPTS="${DEBBUILDOPTS} -B"
shift;
;;
+ --preserve-buildplace)
+ PRESERVE_BUILDPLACE="yes"
+ shift;
+ ;;
## pdebuild option
--auto-debsign)
AUTO_DEBSIGN="yes"
@@ -160,7 +165,7 @@ BUILDPLACE=${BUILDPLACE?"Build root directory is not defined"}
# the default is to add a PID in the buildplace specified in the config file.
BASEBUILDPLACE="$BUILDPLACE"
-if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then
+if [ "${INTERNAL_BUILD_UML}" != "yes" -a "${PRESERVE_BUILDPLACE}" != "yes" ]; then
BUILDPLACE="$BUILDPLACE/$$"
fi
if [ -z "${CHROOTEXEC}" ]; then
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index c37df58..63150ca 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -83,3 +83,6 @@ umountproc
trap cleanbuildplace exit
create_basetgz
+if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then
+ trap exit
+fi
diff --git a/pbuilder-modules b/pbuilder-modules
index d4d9abc..a693cbb 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -64,6 +64,7 @@ pbuilder-options:
--timeout [timeout time]
--override-config
--binary-arch
+ --preserve-buildplace
pdebuild-specific pbuilder-options
--pbuilderroot [command to obtain root privilege for pbuilder]
@@ -125,7 +126,7 @@ function cleanbuildplace () {
if [ "$?" -ne 0 ]; then
echo " -> Aborting with an error";
fi
- if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then
+ if [ "${INTERNAL_BUILD_UML}" != "yes" -a ! \( "${PRESERVE_BUILDPLACE}" = "yes" -a -d "$BUILDPLACE" \) ]; then
if [ -d "$BUILDPLACE" ]; then
echo " -> cleaning the build env "
rm -rf "$BUILDPLACE"
diff --git a/pbuilder-satisfydepends b/pbuilder-satisfydepends
index fec9f58..1af42c6 100644
--- a/pbuilder-satisfydepends
+++ b/pbuilder-satisfydepends
@@ -77,6 +77,7 @@ function checkbuilddep_internal () {
awk '
BEGIN{source=1}
/^$/ {source=0}
+/^Format:/ {source=1}
/^[^ ]*:/ {p=0}
tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1}
{if(p && source) {print $0}}' | \
@@ -139,7 +140,7 @@ tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1}
if [ "$SATISFIED" = "no" ]; then
echo "E: Could not satisfy build-dependency." >&2
if [ "$CONTINUE_FAIL" != "yes" ]; then
- exit 1
+ exit 2
fi
fi
done;
@@ -161,6 +162,7 @@ tolower($0) ~ /^'"${BD_REGEXP}"':/ {p=1}
for INSTALLPKG in $(cat "${DEBIAN_CONTROL}" | \
awk 'BEGIN{source=1}
/^$/ {source=0}
+/^Format:/ {source=1}
/^[^ ]*:/{p=0}
tolower($0) ~ /^'"${BC_REGEXP}"':/ {p=1}
{if(p && source) {print $0}}' | \
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index dee0b2b..868a293 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -50,4 +50,8 @@ trap cleanbuildplace exit
if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then
create_basetgz
fi
-cleanbuildplace
+if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then
+ trap exit
+fi
+
+
diff --git a/pbuilder.8 b/pbuilder.8
index 464b736..b926694 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -347,11 +347,35 @@ will not be deleted and reconstructed from
a
.B .tar.gz
file.
+Also,
+.B "pbuilder"
+will not add its process ID to the
+.B "--buildplace"
+as it usually would.
Useful when experimenting with
chroots, or trying to create chroots outside control
of
-.B pbuilder.
+.B "pbuilder."
+
+.TP
+.BI "--preserve-buildplace"
+Do not clean the
+.B "--buildplace"
+if it has the same contents as the
+.B .tar.gz
+file. As with
+.BR "--no-targz" ","
+suppresses appending
+.BR "pbuilder" "'s"
+process ID to the
+.BR "--buildplace" "."
+
+This is useful if you want to attempt to build a large number of
+packages successively, but you expect that many of them cannot have
+their build dependencies satisfied.
+
+
.SH "FILES"
.TP