diff options
author | dancer <dancer> | 2003-01-07 08:36:23 +0000 |
---|---|---|
committer | dancer <dancer> | 2003-01-07 08:36:23 +0000 |
commit | eebd1fa3ff0e4f2334d9c69a3db57b85594c284d (patch) | |
tree | c0aeb06c016a6a331dd622765234314fee2e88a4 | |
parent | d04a3e243d88d36d8e81fd4e578db4e8ca6eb8c2 (diff) | |
download | pbuilder-eebd1fa3ff0e4f2334d9c69a3db57b85594c284d.tar pbuilder-eebd1fa3ff0e4f2334d9c69a3db57b85594c284d.tar.gz |
+2003-01-07 Junichi Uekawa <dancer@debian.org>
+
+ * Documentation/pbuilder-doc.xml: update documentation
+ and add chapter on pbuilder-uml, document that pbuilder-uml actually
+ works, and some detailed nodes on how to use them.
+ Add FAQ entry on how to specify extra apt sources.
+
+ * pbuilder-user-mode-linux.1: update doc to document that
+ configuration files for pbuilder is now read in.
+
+ * pbuilder-user-mode-linux: add debug info, to print out
+ the command-line used for running uml.
+ export TMPDIR=/tmp inside the chroot inside UML.
+ change UML_CHROOT_MOUNTPOINT from /tmp/ubd1 to /mnt,
+ and do not mkdir UML_CHROOT_MOUNTPOINT.
+ fix /tmp creation script so that /tmp is writable when
+ not using tmpfs.
+ use tempfile in creating the COW file.
+ clean COW file after finishing.
+ remove temporary file created by tempfile, because UML doesn't seem to
+ like the zero-byte file. (POSSIBLE SECURITY PROBLEM)
+ extra cleanup added for cleanup_function
+
+ * pbuilder-uml.conf (BUILDPLACE): add definition of BUILDPLACE
+ for pbuilder-uml. It is probably needed, because BUILDPLACE
+ needs to be writable by the user for UML, while it is not for
+ pbuilder.
+
+ * pbuilder-user-mode-linux: load config for pbuilder also, before
+ trying to load other things.
+
+2003-01-06 Junichi Uekawa <dancer@debian.org>
+
+ * Documentation/pbuilder-doc.xml (EXTRAPACKAGES): document possible usage of pbuilder for dchroot.
+
+ * pbuilder.8: document --no-targz
+
+ * pbuilder-checkparams (USE_PKGNAME_LOGFILE): allow
+ --no-targz option as alias to --internal-build-uml
+
+ * pdebuild (ARCHITECTURE): use dpkg-architecture
+ to find out the architecture.
+ sign changes file not dsc file.
+ pointed out by
+ Andrew Lau <netsnipe@debianplanet.org>, bug #175432
+
+2003-01-04 Junichi Uekawa <dancer@debian.org>
+
+ * debian/control (Description): fix suggests to pbuilder-uml
-rw-r--r-- | ChangeLog | 50 | ||||
-rw-r--r-- | Documentation/pbuilder-doc.xml | 133 | ||||
-rw-r--r-- | debian/changelog | 24 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | pbuilder-checkparams | 2 | ||||
-rw-r--r-- | pbuilder-uml.conf | 1 | ||||
-rwxr-xr-x | pbuilder-user-mode-linux | 31 | ||||
-rw-r--r-- | pbuilder-user-mode-linux.1 | 13 | ||||
-rw-r--r-- | pbuilder.8 | 14 | ||||
-rw-r--r-- | pdebuild | 3 |
10 files changed, 252 insertions, 21 deletions
@@ -1,3 +1,53 @@ +2003-01-07 Junichi Uekawa <dancer@debian.org> + + * Documentation/pbuilder-doc.xml: update documentation + and add chapter on pbuilder-uml, document that pbuilder-uml actually + works, and some detailed nodes on how to use them. + Add FAQ entry on how to specify extra apt sources. + + * pbuilder-user-mode-linux.1: update doc to document that + configuration files for pbuilder is now read in. + + * pbuilder-user-mode-linux: add debug info, to print out + the command-line used for running uml. + export TMPDIR=/tmp inside the chroot inside UML. + change UML_CHROOT_MOUNTPOINT from /tmp/ubd1 to /mnt, + and do not mkdir UML_CHROOT_MOUNTPOINT. + fix /tmp creation script so that /tmp is writable when + not using tmpfs. + use tempfile in creating the COW file. + clean COW file after finishing. + remove temporary file created by tempfile, because UML doesn't seem to + like the zero-byte file. (POSSIBLE SECURITY PROBLEM) + extra cleanup added for cleanup_function + + * pbuilder-uml.conf (BUILDPLACE): add definition of BUILDPLACE + for pbuilder-uml. It is probably needed, because BUILDPLACE + needs to be writable by the user for UML, while it is not for + pbuilder. + + * pbuilder-user-mode-linux: load config for pbuilder also, before + trying to load other things. + +2003-01-06 Junichi Uekawa <dancer@debian.org> + + * Documentation/pbuilder-doc.xml (EXTRAPACKAGES): document possible usage of pbuilder for dchroot. + + * pbuilder.8: document --no-targz + + * pbuilder-checkparams (USE_PKGNAME_LOGFILE): allow + --no-targz option as alias to --internal-build-uml + + * pdebuild (ARCHITECTURE): use dpkg-architecture + to find out the architecture. + sign changes file not dsc file. + pointed out by + Andrew Lau <netsnipe@debianplanet.org>, bug #175432 + +2003-01-04 Junichi Uekawa <dancer@debian.org> + + * debian/control (Description): fix suggests to pbuilder-uml + 2003-01-03 Junichi Uekawa <dancer@debian.org> * Documentation/pbuilder-doc.xml: add notes on what kind of things diff --git a/Documentation/pbuilder-doc.xml b/Documentation/pbuilder-doc.xml index cb2c478..2dcda88 100644 --- a/Documentation/pbuilder-doc.xml +++ b/Documentation/pbuilder-doc.xml @@ -359,14 +359,14 @@ export DEBIAN_BUILDGCCVER=3.2 </sect1> </chapter> <chapter> - <title>Known Problems</title> + <title>Frequently asked questions</title> <para> Here, known problems and frequently asked questions are - documented. - This part is moved from README.Debian file. + documented. This portion was initially available in README.Debian + file, but moved into here. </para> <sect1> - <title>Notes on pbuilder create</title> + <title>pbuilder create fails</title> <para> It often happens that pbuilder cannot create latest chroot. Try upgrading pbuilder and debootstrap. @@ -388,6 +388,18 @@ export DEBIAN_BUILDGCCVER=3.2 in pbuilderrc. Take your pick. </para> </sect1> + <sect1> + <title>Specialized requirement on apt sources list</title> + <para> + If you have some very specialized requirements on your + apt setup inside pbuilder, + it is possible to specify that through + <command><option>--othermirror</option></command> + option. + Try something like: + <command><option>--othermirror "deb http://local/mirror stable main|deb-src http://local/source/repository ./"</option></command> + </para> + </sect1> </chapter> <chapter> <title>Experimental or wishlist features of pbuilder</title> @@ -413,12 +425,96 @@ export DEBIAN_BUILDGCCVER=3.2 on <command>chroot</command> and <command>tar</command> and <command>gzip</command>, which are known to work on most Unix systems. + However, <command>pbuilder-uml</command> uses COW method for + file access, and it is so much more faster than pbuilder + when building most packages. </para> <para> - Currently there are problems with rootstrap that - stops <command>pbuilder-uml</command> from starting, - and help, or success reports would be appreciated. + It has been verified that pbuilder-uml works, + as of version 0.59. + The configuration of pbuilder-uml goes in two steps: + <itemizedlist> + <listitem> + <para>Configuration of rootstrap</para> + <para>Configuration of pbuilder-uml</para> + </listitem> + </itemizedlist> </para> + <sect2> + <title>Configuring rootstrap</title> + <para> + <command>rootstrap</command> is a program that + is a wrapper to debootstrap, creating a Debian disk image inside + UML. + To configure rootstrap, there are several requirements. + </para> + <itemizedlist> + <listitem> + <para>install rootstrap package</para> + </listitem> + <listitem> + <para>add the user to uml-net group to allow access to network + <screen> +adduser dancer uml-net + </screen></para> + </listitem> + <listitem> + <para>Check that compile supports tun/tap interface, + and recompile the kernel if necessary + </para> + </listitem> + <listitem> + <para>Set up /etc/rootstrap/rootstrap.conf, for example, + if the current host is 192.168.1.2, changing following + entries to something like this seems to work. + <screen> +transport=tuntap +interface=eth0 +gateway=192.168.1.1 +mirror=http://192.168.1.2:8081/debian +host=192.168.1.198 +uml=192.168.1.199 +netmask=255.255.255.0 + </screen> + Some experimentation with configuration and running + <command>rootstrap ~/test.uml</command> to actually + test it would be handy. + </para> + </listitem> + </itemizedlist> + </sect2> + <sect2> + <title>Configuring pbuilder-uml</title> + <para> + The following needs to happen: + <itemizedlist> + <listitem> + <para>install pbuilder-uml package</para> + </listitem> + <listitem> + <para> + Set configuration file <filename>/etc/pbuilder/pbuilder-uml.conf</filename> as follows + <screen> +MY_ETH0=tuntap,,,192.168.1.198 +UML_IP=192.168.1.199 +UML_NETMASK=255.255.255.0 +UML_NETWORK=192.168.1.0 +UML_BROADCAST=255.255.255.255 +UML_GATEWAY=192.168.1.1 +PBUILDER_UML_IMAGE="/home/dancer/uml-image" + </screen> + and it needs to match rootstrap configuration. + </para> + </listitem> + <listitem> + <para>Run <command>pbuilder-user-mode-linux create --distribution sid</command> to create the image</para> + </listitem> + <listitem> + <para>Try running <command>pbuilder-user-mode-linux build </command></para> + </listitem> + </itemizedlist> + </para> + </sect2> </sect1> <sect1> <title>Using LVM</title> @@ -430,6 +526,29 @@ export DEBIAN_BUILDGCCVER=3.2 and so no measurement has been made, yet. </para> </sect1> + <sect1> + <title>Using pbuilder without tar.gz</title> + <para> + <command><option>--no-targz</option></command> + option of <command>pbuilder</command> + will allow usage of pbuilder in a different way + to conventional usage. + It will try to use existing chroot, + and will not try to clean up after + working on it. + It is an operation mode more like + <command>sbuild</command>. + </para> + <para> + It should be possible to create chroot images + for <command>dchroot</command> with following commands: + <screen> +# pbuilder create --distribution potato --no-targz --basetgz /chroot/potato +# pbuilder create --distribution woody --no-targz --basetgz /chroot/woody +# pbuilder create --distribution sid --no-targz --basetgz /chroot/sid + </screen> + </para> + </sect1> </chapter> <chapter> <title>Minor details</title> diff --git a/debian/changelog b/debian/changelog index 7ad26b8..899e68f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +pbuilder (0.59) unstable; urgency=low + + * Load config for pbuilder in pbuilder-uml, so that BUILDPLACE is defined. + buildpackage didn't work otherwise. + * Fixed pbuilder-uml so that it actually works. + * Document how to add extra apt sources in the documentation FAQ section. + * pbuider-uml now works, and document how to set it up in the documentation + (closes: #175583) + + -- Junichi Uekawa <dancer@debian.org> Tue, 7 Jan 2003 17:34:33 +0900 + +pbuilder (0.58) unstable; urgency=low + + * Fix Suggests to pbuider-uml. (closes: #175158) + * Sign changes file instead of dsc file in pdebuild + (closes: #175432) + thanks to Andrew Lau <netsnipe@debianplanet.org> for + reporting. + * Documentation updates, document some features possibly + useful for dchroot. + * add --no-targz option. + + -- Junichi Uekawa <dancer@debian.org> Mon, 6 Jan 2003 16:34:17 +0900 + pbuilder (0.57) unstable; urgency=low * A new year release. diff --git a/debian/control b/debian/control index 7b5668b..0e658c1 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Package: pbuilder Architecture: all Depends: debootstrap (>= 0.1.17.9), wget, gcc, debianutils (>= 1.13.1) Recommends: fakeroot, sudo, devscripts -Suggests: pbuilder-user-mode-linux +Suggests: pbuilder-uml Description: personal package builder for Debian packages pbuilder constructs a chroot system, and builds a package inside the chroot. diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 6e0f6e1..6eb51da 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -135,7 +135,7 @@ while [ -n "$1" ]; do CHROOTEXEC="$2" shift; shift; ;; - --internal-build-uml) + --internal-build-uml|--no-targz) # specify this option if I am running inside UML. echo " -> Running in pbuilder-user-mode-linux mode" INTERNAL_BUILD_UML="yes" diff --git a/pbuilder-uml.conf b/pbuilder-uml.conf index 9b0377d..f927623 100644 --- a/pbuilder-uml.conf +++ b/pbuilder-uml.conf @@ -6,4 +6,5 @@ UML_BROADCAST=255.255.255.255 UML_GATEWAY=192.168.0.1 PBUILDER_UML_IMAGE="${HOME}/uml-image" UML_MOUNT_TMPFS="no" +BUILDPLACE="${HOME}/tmp/" diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index a260748..7383404 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -22,34 +22,43 @@ set -e function cleanup_function () { rm -f ${INSIDE_PBUILDER} + ${EXTRACLEANUP} } -for CONFIGFILE in /usr/share/pbuilder/pbuilder-uml.conf /etc/pbuilder/pbuilder-uml.conf ${HOME}/.pbuilderrc; do +. /usr/lib/pbuilder/pbuilder-loadconfig + +for CONFIGFILE in /usr/share/pbuilder/pbuilder-uml.conf /etc/pbuilder/pbuilder-uml.conf ${HOME}/.pbuilderrc; do if [ -f ${CONFIGFILE} ]; then . ${CONFIGFILE} fi done function usecow () { - PBUILDER_COW="$BUILDPLACE/$$.cow," + PBUILDER_COWFILENAME=$(tempfile -d "${BUILDPLACE}" --suffix .cow) + PBUILDER_COW="${PBUILDER_COWFILENAME}," + rm -f "${PBUILDER_COWFILENAME}" +} + +function cleancow () { + # clean the cow file + rm -f "${PBUILDER_COWFILENAME}" } function operate_uml () { # opeartes on UML, and runs pbuilder $1 - - # use this script file to bootstrap the pbuilder inside the UML INSIDE_PBUILDER=$(tempfile) trap cleanup_function exit - UML_CHROOT_MOUNTPOINT=/tmp/ubd1 + UML_CHROOT_MOUNTPOINT=/mnt/ + +#The following script is ran inside UML as soon as it is started. cat <<EOF > ${INSIDE_PBUILDER} #! /bin/bash mount -t proc /proc /proc mount -t tmpfs /tmp /tmp -mkdir -p ${UML_CHROOT_MOUNTPOINT} mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT} if [ "${UML_MOUNT_TMPFS}" = "yes" ]; then mount -t tmpfs ${UML_CHROOT_MOUNTPOINT}/tmp ${UML_CHROOT_MOUNTPOINT}/tmp @@ -57,6 +66,7 @@ else # clean up tmp before playing with it. rm -rf ${UML_CHROOT_MOUNTPOINT}/tmp mkdir ${UML_CHROOT_MOUNTPOINT}/tmp + chmod 1777 ${UML_CHROOT_MOUNTPOINT}/tmp fi cat <<IP > ${UML_CHROOT_MOUNTPOINT}/etc/network/interfaces @@ -85,16 +95,18 @@ 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 export LOGNAME="${LOGNAME}" EXTRAOPT= if [ -n "${UML_DISTRIBUTION}" ]; then EXTRAOPT="--distribution ${UML_DISTRIBUTION}" fi -pbuilder "$1" ${EXTRAOPT} --buildresult "" --buildplace /tmp/ubd1/ --internal-build-uml ${BUILDING_DSC_FILE} +pbuilder "$1" ${EXTRAOPT} --buildresult "" --buildplace ${UML_CHROOT_MOUNTPOINT} --internal-build-uml ${BUILDING_DSC_FILE} EOF chmod a+x ${INSIDE_PBUILDER} + echo Invoking: "linux eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty ubd0=/ ubd1=${PBUILDER_COW}${PBUILDER_UML_IMAGE} devfs=mount init=${INSIDE_PBUILDER}" linux eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty ubd0=/ ubd1="${PBUILDER_COW}${PBUILDER_UML_IMAGE}" devfs=mount init=${INSIDE_PBUILDER} } @@ -102,7 +114,6 @@ PBUILDER_COW="" OPERATION="$1" shift; - while [ -n "$1" ] ; do case "$1" in --eth0) @@ -156,11 +167,12 @@ while [ -n "$1" ] ; do done BUILDING_DSC_FILE=$(readlink -f "$1") - +EXTRACLEANUP= case "${OPERATION}" in build) usecow + EXTRACLEANUP=cleancow operate_uml build ;; update) @@ -168,6 +180,7 @@ case "${OPERATION}" in ;; login) usecow + EXTRACLEANUP=cleancow operate_uml login ;; create) diff --git a/pbuilder-user-mode-linux.1 b/pbuilder-user-mode-linux.1 index 3eb86f2..6b91bd3 100644 --- a/pbuilder-user-mode-linux.1 +++ b/pbuilder-user-mode-linux.1 @@ -86,11 +86,20 @@ will try to use COW devices. .SH "FILES" .TP +.I "/etc/pbuilderrc" +The system-wide configuration file for pbuilder. +.TP +.I "/usr/share/pbuilder/pbuilderrc" +The default settings for pbuilder, used as fallback for all +values that is not specified in +.B "/etc/pbuilderrc." +.TP .B "/etc/pbuilder/pbuilder-uml.conf" -System-wide configuration file. +System-wide configuration file for pbuilder-uml, +it will take priority over pbuilder configurations. .TP .B "/usr/share/pbuilder/pbuilder-uml.conf" -Software-default configuration file. +Software-default configuration file for pbuilder-uml. .TP .B "${HOME}/.pbuilderrc" User-default configuration file. @@ -322,6 +322,20 @@ Setting after this option will re-set some parts of the effect. +.TP +.BI "--no-targz" +Not using base.tgz for operation. +The +.B "--buildplace" +will not be deleted and reconstructed from +a +.B .tar.gz +file. + +Useful when experimenting with +chroots, or trying to create chroots outside control +of +.B pbuilder. .SH "FILES" .TP @@ -14,10 +14,11 @@ fi; PKG_SOURCENAME=$(dpkg-parsechangelog|sed -n 's/^Source: //p') PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p') +ARCHITECTURE=$(dpkg-architecture -qDEB_HOST_ARCH) dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} || true ${PBUILDERROOTCMD} pbuilder build "$@" --buildresult "${BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc if [ "${AUTO_DEBSIGN}" = "yes" ]; then - debsign "${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}.dsc" + debsign "${BUILDRESULT}/${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes" fi |