From 76e62017424d96e448a9b183d4f1319fe28d53b5 Mon Sep 17 00:00:00 2001 From: dancer Date: Sun, 29 Jan 2006 21:19:19 +0000 Subject: implement hookdir for workaround of initscripts and cdebootstrap bug. add G hooks for pbuilder create. --- ChangeLog | 15 +++++++++++++++ Makefile | 7 +++---- debian/changelog | 4 +++- examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh | 12 ++++++++++++ pbuilder-createbuildenv | 3 +++ pbuilder.8 | 8 ++++++++ testsuite/run-test.sh | 2 +- 7 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh diff --git a/ChangeLog b/ChangeLog index 1d0a09e..68a00e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2006-01-30 Junichi Uekawa + + * Makefile: install the script + + * examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh: implement workaround. + + * pbuilder.8: document G hook. + + * pbuilder-createbuildenv: add G hook + + * testsuite/run-test.sh: use the workaround dir for testing. + + * Makefile: install workaround hooks to + /usr/share/doc/pbuilder/examples/workaround + 2006-01-24 Junichi Uekawa * examples/B92test-pkg: improve the script a bit; do not fail if diff --git a/Makefile b/Makefile index 07ae143..a301940 100644 --- a/Makefile +++ b/Makefile @@ -89,10 +89,9 @@ install: $(INSTALL_EXECUTABLE) examples/pbuilder-distribution.sh $(DESTDIR)/usr/share/doc/pbuilder/examples # install workaround for initscripts -- 2005-12-21 - $(INSTALL_DIRECTORY) $(DESTDIR)/usr/share/doc/pbuilder/examples/344089 - $(INSTALL_EXECUTABLE) examples/E50-initscripts-2.86.ds1-7.workaround.sh $(DESTDIR)/usr/share/doc/pbuilder/examples/344089 - - + $(INSTALL_DIRECTORY) $(DESTDIR)/usr/share/doc/pbuilder/examples/workaround + $(INSTALL_EXECUTABLE) examples/E50-initscripts-2.86.ds1-7.workaround.sh $(DESTDIR)/usr/share/doc/pbuilder/examples/workaround + $(INSTALL_EXECUTABLE) examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh $(DESTDIR)/usr/share/doc/pbuilder/examples/workaround cd pbuildd; make install DESTDIR=$(DESTDIR) cd Documentation; make install DESTDIR=$(DESTDIR) diff --git a/debian/changelog b/debian/changelog index ae9d49e..0d2a110 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ pbuilder (0.146) UNRELEASED; urgency=low * improve B92test-pkg: cd to package build directory before invoking test scripts. + * work around 350262, bug in initscripts and cdebootstrap interaction. + Use --hookdir=/usr/share/doc/pbuilder/examples/ - -- Junichi Uekawa Tue, 24 Jan 2006 19:00:44 +0900 + -- Junichi Uekawa Mon, 30 Jan 2006 06:15:02 +0900 pbuilder (0.145) unstable; urgency=low diff --git a/examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh b/examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh new file mode 100644 index 0000000..e4749c0 --- /dev/null +++ b/examples/G50-initscripts-2.86.ds1-11-cdebootstrap0.3.9.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# work around initscripts postinst which mounts /sys with cdebootstrap. +# Bug: #350262 + +set +e + +umount /sys +umount /run +umount /proc/bus/usb +umount /dev/shm + +exit 0; diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index 9b208c3..e387043 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -70,11 +70,14 @@ fi echo " -> debootstrap finished" loadhooks + mkdir -p "$BUILDPLACE/tmp/buildd" copy_local_configuration installaptlines +executehooks "G" + echo "Refreshing the base.tgz " echo " -> upgrading packages" mountproc diff --git a/pbuilder.8 b/pbuilder.8 index 1482a6b..86b5d69 100644 --- a/pbuilder.8 +++ b/pbuilder.8 @@ -329,6 +329,14 @@ or .B execute target. +.B "G" +is executed just after debootstrap finishes, +and configuration is loaded, and pbuilder starts mounting /proc and invoking +.B "apt-get install" +in +.B create +target. + \" End of hookdir description diff --git a/testsuite/run-test.sh b/testsuite/run-test.sh index b080967..9fe66fe 100755 --- a/testsuite/run-test.sh +++ b/testsuite/run-test.sh @@ -27,7 +27,7 @@ testbuild=$testdir/dir1 testbuild2=$testdir/dir2 testbuild3=$testdir/dir3 -HOOKOPTION=" --hookdir /usr/share/doc/pbuilder/examples/344089" +HOOKOPTION=" --hookdir /usr/share/doc/pbuilder/examples/workaround" for DEBOOTSTRAP in debootstrap cdebootstrap; do case $DEBOOTSTRAP in -- cgit v1.2.3