Commit 339ee7a8 authored by dancer's avatar dancer

+ * 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
+
parent ca62e88c
......@@ -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
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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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"
......
......@@ -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
......
......@@ -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
......
......@@ -83,3 +83,6 @@ umountproc
trap cleanbuildplace exit
create_basetgz
if [ "${PRESERVE_BUILDPLACE}" = "yes" ]; then
trap exit
fi
......@@ -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"
......
......@@ -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}}' | \
......
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment