From e4cf518cbd319f9efd49d493f564aa15cef2ffab Mon Sep 17 00:00:00 2001 From: dancer Date: Sat, 28 Feb 2004 00:38:40 +0000 Subject: pbuilder memo implementation 0.100 --- ChangeLog | 25 +++++++++++++++++++++++++ Documentation/pbuilder-doc.xml | 11 +++++++++++ Makefile | 2 ++ THANKS | 1 + debian/changelog | 9 +++++++++ examples/D90chrootmemo | 8 ++++++++ examples/F90chrootmemo | 10 ++++++++++ pbuilder | 6 ++++++ pbuilder.8 | 14 ++++++++++++-- 9 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 examples/D90chrootmemo create mode 100644 examples/F90chrootmemo diff --git a/ChangeLog b/ChangeLog index 54bfc66..9f3a068 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2004-02-28 Junichi Uekawa + + * Makefile (install): install F90chrootmemo + + * pbuilder: implement hook F for login/execute + + * Documentation/pbuilder-doc.xml: update doc to use F hook. + + * examples/F90chrootmemo: create F example. + + * pbuilder.8: add "F" hook + +2004-02-27 Junichi Uekawa + + * Documentation/pbuilder-doc.xml: document the chrootmemo script in FAQ section. + + * Makefile (install): install the memo. + + * examples/D90chrootmemo: implement Turbo's request. + Add this to your hookdir. + +2004-02-23 Junichi Uekawa + + * pbuilder.8: fix typo on manual page from Matt Kraai + 2004-01-19 Junichi Uekawa * pdebuild-user-mode-linux.1: document diff --git a/Documentation/pbuilder-doc.xml b/Documentation/pbuilder-doc.xml index f82c947..f333887 100644 --- a/Documentation/pbuilder-doc.xml +++ b/Documentation/pbuilder-doc.xml @@ -841,6 +841,17 @@ read usual user-mode-linux overhead for system calls. It is more friendly to the hard drive. + + Creating a memo of your chroot + + You may want a sign that you are inside a chroot, when + working with chroot. + Check out examples/F90chrootmemo + hook script. + It will create a file called /CHROOT + inside your chroot. + + diff --git a/Makefile b/Makefile index 9adb802..d403888 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,8 @@ install: $(INSTALL_EXECUTABLE) examples/B91dpkg-i $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/C10shell $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/D10tmp $(DESTDIR)/usr/share/doc/pbuilder/examples + $(INSTALL_EXECUTABLE) examples/D90chrootmemo $(DESTDIR)/usr/share/doc/pbuilder/examples + $(INSTALL_EXECUTABLE) examples/F90chrootmemo $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/execute_installtest.sh $(DESTDIR)/usr/share/doc/pbuilder/examples $(INSTALL_EXECUTABLE) examples/execute_paramtest.sh $(DESTDIR)/usr/share/doc/pbuilder/examples cd pbuildd; make install DESTDIR=$(DESTDIR) diff --git a/THANKS b/THANKS index 3da6c94..3efc1c2 100644 --- a/THANKS +++ b/THANKS @@ -34,6 +34,7 @@ Roland Stigge "Aaron M. Ucko" Daniel Martin Artur R. Czechowski +Turbo Fredriksson I thank them all! diff --git a/debian/changelog b/debian/changelog index 64430fd..38370a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +pbuilder (0.100) unstable; urgency=low + + * Bug fix: "manual page typos", thanks to Matt Kraai (Closes: #233179). + * Bug fix: "Need to distinguish the chroot", thanks to Turbo Fredriksson + added an example hook script to implement that. + (Closes: #234862). + + -- Junichi Uekawa Sat, 28 Feb 2004 09:36:58 +0900 + pbuilder (0.99) unstable; urgency=low * Documentation update: diff --git a/examples/D90chrootmemo b/examples/D90chrootmemo new file mode 100644 index 0000000..d7f1d9d --- /dev/null +++ b/examples/D90chrootmemo @@ -0,0 +1,8 @@ +#!/bin/sh +# an example to make a note that this is a chroot in / +# suggested by Turbo Fredriksson + +echo "This is a chroot made by pbuilder" > /CHROOT + + + diff --git a/examples/F90chrootmemo b/examples/F90chrootmemo new file mode 100644 index 0000000..2e8b2a2 --- /dev/null +++ b/examples/F90chrootmemo @@ -0,0 +1,10 @@ +#!/bin/sh +# an example to make a note that this is a chroot in / +# suggested by Turbo Fredriksson + +# this shell is executed before logging in to chroot via login/execute. + +echo "This is a chroot made by pbuilder" > /CHROOT + + + diff --git a/pbuilder b/pbuilder index 4eba6a8..682ec50 100755 --- a/pbuilder +++ b/pbuilder @@ -52,8 +52,10 @@ case "$1" in login) shift . /usr/lib/pbuilder/pbuilder-checkparams + . /usr/lib/pbuilder/pbuilder-runhooks extractbuildplace trap umountproc_cleanbuildplace exit + loadhooks if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then echo " -> entering the shell" else @@ -61,12 +63,14 @@ case "$1" in File extracted to: $BUILDPLACE " fi + executehooks "F" chroot "$BUILDPLACE" bin/bash ;; execute) # try to execute arbitrary program. shift . /usr/lib/pbuilder/pbuilder-checkparams + . /usr/lib/pbuilder/pbuilder-runhooks EXECPROGRAM="$1" shift if [ ! -f "${EXECPROGRAM}" ]; then @@ -75,9 +79,11 @@ File extracted to: $BUILDPLACE fi; extractbuildplace trap umountproc_cleanbuildplace exit + loadhooks RUNNAME="$BUILDPLACE/run" cat "$EXECPROGRAM" > "$RUNNAME" chmod a+x "$RUNNAME" + executehooks "F" chroot "$BUILDPLACE" /run "$@" ;; *) diff --git a/pbuilder.8 b/pbuilder.8 index 159dabf..0ca95cb 100644 --- a/pbuilder.8 +++ b/pbuilder.8 @@ -210,9 +210,9 @@ This is used in .B "build" and .B "create" - (after successfully creating the initial chroot) +(after successfully creating the initial chroot) and -.B "update" +.BR "update" . The packages should be specified as a space-delimited list. @@ -282,8 +282,18 @@ Also useful for calling is executed after pbuilder update and pbuilder create terminates, before creating the tarball. +.B "F" +is executed just before user logs in, or +program starts executing, after chroot is created +in +.B login +or +.B execute +target. + \" End of hookdir description + .TP .BI "--debemail [" "maintainer-name " "]" -- cgit v1.2.3