aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/README.Debian3
-rw-r--r--debian/TODO2
-rw-r--r--debian/changelog13
-rwxr-xr-xdebian/rules2
-rwxr-xr-xpbuilder2
-rwxr-xr-xpbuilder-buildpackage15
-rwxr-xr-xpbuilder-checkparams4
-rwxr-xr-xpbuilder-createbuildenv4
-rw-r--r--pbuilder-modules1
-rw-r--r--pbuilder.113
-rwxr-xr-xpbuilderrc3
11 files changed, 59 insertions, 3 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
index 540f977..40bd0d8 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -29,7 +29,8 @@ please file a bug to "build-essential" for packages,
or to pbuilder if some other thing is necessary.
-I would say this package works fine if these packages manage to build
+I would say this package works fine if these packages manage to build.
+
Testsuite:
ecasound
glibc ( a very good test. )
diff --git a/debian/TODO b/debian/TODO
index 1549dde..f7c5d0d 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -6,6 +6,8 @@ TODO and possible bugs:
[!xxx xxx] formats are not parsed, and should really not exist.
* Now parses the .dsc file, however, the format of .dsc file is not really documented anywhere?
* Parse the .changes file instead of guessing the resultant objects ... ? (the content of file probably changes depending on the version... not a good idea.
+ * Cache the apt-get cache. pbuilder creates too much net traffic as
+ is. -- and it is implemented.
$Id$
diff --git a/debian/changelog b/debian/changelog
index 9913d11..96874c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+pbuilder (0.6) unstable; urgency=low
+
+ * Added a man page for /etc/pbuilderrc configuration file.
+ Should help people understand what is going on...
+ * Added a feature of caching the contents of /var/cache/apt/archives
+ inside the chroot.
+ * pbuilder clean will clean the apt cache.
+ * REMOVEPACKAGES is a configurable option now.
+ Please be warned, if you are upgrading, that "lilo" might be left
+ on your chroot, which could potentially cause nasty damage.
+
+ -- Junichi Uekawa <dancer@debian.org> Sun, 23 Sep 2001 16:02:38 +0900
+
pbuilder (0.5) unstable; urgency=low
* fixed logic error in invocation to apt-cache.
diff --git a/debian/rules b/debian/rules
index 58bfe81..bc7e1a6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,7 +59,7 @@ binary-arch: build install
# dh_installmime
# dh_installinit
# dh_installcron
- dh_installman pbuilder.1
+ dh_installman pbuilder.1 pbuilderrc.5
# dh_installinfo
# dh_undocumented
dh_installchangelogs
diff --git a/pbuilder b/pbuilder
index 862aa61..80eaad6 100755
--- a/pbuilder
+++ b/pbuilder
@@ -26,6 +26,8 @@ case "$1" in
. /etc/pbuilderrc
echo "Cleaning [$BUILDPLACE]"
test -n "$BUILDPLACE" && rm -rf "$BUILDPLACE"/*
+ echo "Cleaning [$APTCACHE]"
+ test -n "$APTCACHE" && rm -rf "$APTCACHE"/*
;;
login)
shift
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index 50671d3..414539d 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -155,8 +155,23 @@ $CHROOTEXEC /bin/bash -c "( cd tmp/buildd; /usr/bin/dpkg-source -x $(basename $P
abortingfunction
exit 1;
)
+
+if [ -n "$APTCACHE" ]; then
+ echo "Obtaining the cached apt archive contents"
+ cp "$APTCACHE"/* "$BUILDPLACE/var/cache/apt/archives/"
+fi
echo Installing the build-deps
checkbuilddep
+if [ -n "$APTCACHE" ]; then
+ echo "Copying back the cached apt archive contents"
+ for A in "$BUILDPLACE/var/cache/apt/archives/"*; do
+ if [ ! -f "$APTCACHE/"$(basename "$A") ]; then
+ echo " -> new cache content "$(basename "$A")" added"
+ cp "$A" "$APTCACHE/"
+ fi
+ done
+fi
+
echo Building the package
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
if ! $CHROOTEXEC /bin/bash -c "cd tmp/buildd/*/; dpkg-buildpackage"; then
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index feb21fc..1b2d6f0 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -42,6 +42,10 @@ while [ -n "$1" ]; do
BUILDRESULT=$(readlink -f "$2");
shift; shift;
;;
+ --removepackages)
+ REMOVEPACKAGES="$2";
+ shift; shift;
+ ;;
--help)
showhelp
;;
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index ccf7e12..acbb824 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -37,7 +37,9 @@ echo "Refreshing the base.tgz "
echo " -> upgrading packages"
mountproc
$CHROOTEXEC /usr/bin/apt-get update
-$CHROOTEXEC /usr/bin/dpkg --purge lilo
+if [ -n "$REMOVEPACKAGES" ]; then
+ $CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
+fi
$CHROOTEXEC /usr/bin/apt-get -y dist-upgrade
$CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES
$CHROOTEXEC /usr/bin/apt-get clean
diff --git a/pbuilder-modules b/pbuilder-modules
index 372aaf8..3c09c97 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -34,6 +34,7 @@ Operation Options:
--http-proxy [proxy]
--distribution [distribution(potato/woody/sid)]
--buildresult [location-to-copy-build-result]
+ --removepackages [packages-to-remove on pbuilder create]
EOF
exit 1
}
diff --git a/pbuilder.1 b/pbuilder.1
index f998c38..e7bb23b 100644
--- a/pbuilder.1
+++ b/pbuilder.1
@@ -40,6 +40,8 @@ in the chroot environment created using the
.B "clean"
Cleans up the directory specified by the configuration
.B "BUILDPLACE"
+and
+.B "APTCACHE"
specified in
.I "/etc/pbuilderrc"
@@ -93,9 +95,20 @@ Specifies the distribution used. Currently the supported values are
.B "sid"
and
.B "woody".
+.TP
+.BI "--removepackages [" "packages to remove" "]"
+Removes the packages on creating the
+.BI "base.tgz" "."
+Use this option to remove potentially dangerous or undesirable
+packages, like
+.B "lilo"
+which nobody will need to have inside a chroot.
.SH "FILES"
.TP
.I "/etc/pbuilderrc"
The configuration file for pbuilder.
.SH AUTHOR
Junichi Uekawa <dancer@debian.org>
+.SH "SEE ALSO"
+.RI "pbuilderrc (" 5 ") "
+
diff --git a/pbuilderrc b/pbuilderrc
index 13468e8..b7a3d32 100755
--- a/pbuilderrc
+++ b/pbuilderrc
@@ -12,3 +12,6 @@ BUILDRESULT=/var/cache/pbuilder/result/
# specifying the distribution forces the distribution on "pbuilder update"
#DISTRIBUTION=woody
+#specify the cache for APT
+APTCACHE=/var/cache/pbuilder/aptcache/
+REMOVEPACKAGES=lilo