aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--Documentation/pbuilder-doc.xml8
-rw-r--r--debian/changelog16
-rwxr-xr-xexamples/execute_installtest.sh17
-rwxr-xr-xexamples/execute_paramtest.sh15
-rwxr-xr-xpbuilder3
-rwxr-xr-xpbuilder-user-mode-linux7
-rw-r--r--pbuilder-user-mode-linux.12
-rw-r--r--pbuilder.82
-rwxr-xr-xtestsuite/run-test.sh1
10 files changed, 85 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5afc493..0991334 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2003-12-16 Junichi Uekawa <dancer@debian.org>
+
+ * Documentation/pbuilder-doc.xml: Document execute_installtest.sh
+
+ * examples/execute_installtest.sh: Install testing script. Calls apt.
+
+ * testsuite/run-test.sh (PBUILDER_UML): add regression test on execute script.
+
+ * pbuilder-user-mode-linux.1: update manual page on
+ passing on of the command-line on 'execute'.
+
+ * pbuilder.8: update manual page on passing on of the
+ command-line on 'execute'
+
+ * pbuilder-user-mode-linux (UML_EXECUTE_EXTRAOPT): added new option
+ for appending parameters to the end of the pbuilder-command-line.
+
+ * examples/execute_paramtest.sh: sample execute script;
+ to give what is given as a parameter.
+
+ * pbuilder-user-mode-linux: || true on unset.
+
+ * pbuilder: Accept command-line options for 'execute' command
+
2003-12-15 Junichi Uekawa <dancer@debian.org>
* Documentation/pbuilder-doc.xml (EXTRAPACKAGES): document problem with /dev/null
diff --git a/Documentation/pbuilder-doc.xml b/Documentation/pbuilder-doc.xml
index 0281676..61c7d8e 100644
--- a/Documentation/pbuilder-doc.xml
+++ b/Documentation/pbuilder-doc.xml
@@ -343,8 +343,10 @@
</para>
<itemizedlist>
<listitem>
- <para>Automatic install-remove-upgrade-remove-install-purge-upgrade-purge testsuite (distributed as an example)</para>
+ <para>Automatic install-remove-upgrade-remove-install-purge-upgrade-purge testsuite (distributed as an example, <filename>B91dpkg-i</filename>),
+ or just check that everything installs somewhat (<filename>execute_installtest.sh</filename></para>
</listitem>
+
<listitem>
<para>Automatically running lintian/linda (distributed as an example in
<filename>/usr/share/doc/pbuilder/examples/B90linda</filename>)</para>
@@ -893,8 +895,8 @@ read
</ulink>
</para>
</sect1>
- <sect1>
- <title>Inaccurate Background of pbuilder</title>
+ <sect1 id="pbuilderbackgroundhistory">
+ <title>Possibly inaccurate Background History of pbuilder</title>
<para>
The following is most possibly inaccurate account of how
pbuilder happened to come, and other attempts to
diff --git a/debian/changelog b/debian/changelog
index dcfee54..302c86f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,17 @@
pbuilder (0.96) UNRELEASED; urgency=low
- * Update documentation on using debconf inside pbuilder.
- Note in FAQ that /dev/null error comes from 'nodev' mount option.
-
- -- Junichi Uekawa <dancer@debian.org> Sun, 14 Dec 2003 22:17:30 +0900
+ * Update documentation
+ - Using debconf inside pbuilder.
+ - Note in FAQ that /dev/null error comes from 'nodev' mount option.
+ - Note that execute_installtest.sh can be used for light-weight
+ mass-install testing.
+ * pbuilder execute: now passes on command-line arguments to the script.
+ * pbuilder-user-mode-linux execute: ditto.
+ * examples/execute_installtest.sh: Tries to 'apt-get install' a package
+ and sees if it does install.
+ * examples/execute_paramtest.sh: Just dumps the parameter.
+
+ -- Junichi Uekawa <dancer@debian.org> Tue, 16 Dec 2003 08:22:46 +0900
pbuilder (0.95) unstable; urgency=low
diff --git a/examples/execute_installtest.sh b/examples/execute_installtest.sh
new file mode 100755
index 0000000..ba54f9d
--- /dev/null
+++ b/examples/execute_installtest.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# pbuilder example script.
+# Copyright 2003 Junichi Uekawa
+#Distributed under GPL version 2 or later
+
+#before running this script, make sure you have an up-to-date system with
+# pbuilder update.
+# $Id$
+
+
+# This will install a package using APT and see if that fails.
+
+set -ex
+
+apt-get install -y "$1"
+
+
diff --git a/examples/execute_paramtest.sh b/examples/execute_paramtest.sh
new file mode 100755
index 0000000..39b409d
--- /dev/null
+++ b/examples/execute_paramtest.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# pbuilder example script.
+# Copyright 2003 Junichi Uekawa
+#Distributed under GPL version 2 or later
+
+
+# this is parameter testing script for
+# pbuilder execute.
+# This program will output the command-line
+# $Id$
+
+
+echo "--- parameters given to this script"
+echo "[$@]"
+
diff --git a/pbuilder b/pbuilder
index 8e01ee5..b8df907 100755
--- a/pbuilder
+++ b/pbuilder
@@ -53,6 +53,7 @@ File extracted to: $BUILDPLACE
shift
. /usr/lib/pbuilder/pbuilder-checkparams
EXECPROGRAM="$1"
+ shift
if [ ! -f "${EXECPROGRAM}" ]; then
echo "Command line parameter [$EXECPROGRAM] does not exist" >&2
exit 1;
@@ -62,7 +63,7 @@ File extracted to: $BUILDPLACE
RUNNAME="$BUILDPLACE/run"
cat "$EXECPROGRAM" > "$RUNNAME"
chmod a+x "$RUNNAME"
- chroot "$BUILDPLACE" /run
+ chroot "$BUILDPLACE" /run "$@"
;;
*)
. /usr/lib/pbuilder/pbuilder-modules
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux
index 253fd09..60cf87d 100755
--- a/pbuilder-user-mode-linux
+++ b/pbuilder-user-mode-linux
@@ -111,7 +111,7 @@ chroot ${UML_CHROOT_MOUNTPOINT} /tmp/chrootshell
#some variables need to be set from outside values, possibly
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
export TMPDIR=/tmp
-unset EXTRAOPT
+unset EXTRAOPT || true
declare -a EXTRAOPT
if [ -n "${UML_DISTRIBUTION}" ]; then
EXTRAOPT[0]="--distribution"
@@ -125,7 +125,7 @@ else
mkdir -p ${UML_CHROOT_BUILDRESULTMOUNTDIR} || true
mount -t hostfs none "${UML_CHROOT_BUILDRESULTMOUNTDIR}" -o "${UML_BUILDRESULT}"
fi
-pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE}
+pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE} ${UML_EXECUTE_EXTRAOPT}
echo \$? > /proc/exitcode
EOF
@@ -149,6 +149,7 @@ PBUILDER_COW=""
OPERATION="$1"
UML_EXTRAOPT=
UML_DEBUGMODE=
+UML_EXECUTE_EXTRAOPT=
shift;
while [ -n "$1" ] ; do
@@ -273,6 +274,8 @@ case "${OPERATION}" in
execute)
usecow
EXTRACLEANUP=cleancow
+ shift;
+ UML_EXECUTE_EXTRAOPT="${UML_EXECUTE_EXTRAOPT} $@"
operate_uml execute
;;
create)
diff --git a/pbuilder-user-mode-linux.1 b/pbuilder-user-mode-linux.1
index 3aecfa3..17b215e 100644
--- a/pbuilder-user-mode-linux.1
+++ b/pbuilder-user-mode-linux.1
@@ -60,6 +60,8 @@ Invokes a command or script inside UML.
will copy the specified file into the UML system,
and run it.
+The remaining command-line arguments are passed on to the script.
+
.TP
.BI "--uml-image [" "UML image" "]"
Specify the UML image to use.
diff --git a/pbuilder.8 b/pbuilder.8
index 06f2e2f..6190e20 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -76,6 +76,8 @@ in a similar manner to
The file specified in the command-line argument will be
copied into the chroot, and invoked.
+The remaining arguments are passed on to the script.
+
.TP
.B "debuild"
Builds a Debian package from the Debian source directory.
diff --git a/testsuite/run-test.sh b/testsuite/run-test.sh
index b4ccf6e..3b3aa8f 100755
--- a/testsuite/run-test.sh
+++ b/testsuite/run-test.sh
@@ -16,6 +16,7 @@ if [ -x "${PBUILDER_UML}" ]; then
)
pbuilder-user-mode-linux build --uml-image $(pwd)/testimage --buildplace $(pwd)/testbuild/ --logfile pbuilder-user-mode-linux-build-${PKG}-${distribution}.log testbuild/${PKG}*.dsc
done
+ pbuilder-user-mode-linux execute --uml-image $(pwd)/testimage --logfile pbuilder-user-mode-linux-execute-${distribution}.log ../examples/execute_paramtest.sh test1 test2 test3
rm -rf testbuild testimage
done
fi