From 8bacf08b4a0e55163c92bf6d8ceb5672d7798187 Mon Sep 17 00:00:00 2001 From: dancer Date: Wed, 8 Jan 2003 09:09:55 +0000 Subject: +2003-01-08 Junichi Uekawa + + * pbuilder-user-mode-linux (UML_EXTRAOPT): --logfile option. + + * pbuilder-user-mode-linux.1: and document these new options. + + * pbuilder-user-mode-linux (OPERATION): --override-config option passed + through to pbuilder. + (EXTRAOPT): quote ${EXTRAOPT} which is probably meant to be passed + through. + (UML_EXTRAOPT): define as variable that is used to pass uml extra options. + and, of course, add these options: --binary-arch --override-config --timeout --http-proxy --configfile --hookdir --aptconfdir + + + * debian/rules (binary-arch): add manual page installation + + * pbuilder-uml.conf.5: new manual page + + * pbuilder-uml.conf (UML_MEM): Use 128MB memory per default, it would + be better to use that. + + * pbuilder-user-mode-linux: export HOME inside UML + Try and umount the device afterwards, so that it will be clean-mount + the next time. + thanks: Matt Zimmerman + (OPERATION): --uml-mem option. + + * pbuilder-checkparams: update copyright + + * pdebuild: update copyright info. + + * update copyright information to add 2003. + + * pbuilder-user-mode-linux: LOGNAME is set as soon as + entering UML. + --- ChangeLog | 38 ++++++++++++++++++++++++- THANKS | 1 + debian/changelog | 12 ++++++-- debian/rules | 2 +- pbuilder-checkparams | 2 +- pbuilder-uml.conf | 4 +++ pbuilder-uml.conf.5 | 70 ++++++++++++++++++++++++++++++++++++++++++++++ pbuilder-user-mode-linux | 31 ++++++++++++++++---- pbuilder-user-mode-linux.1 | 43 ++++++++++++++++++++++++++-- pbuilderrc.5 | 2 +- pdebuild | 16 +++++++++++ 11 files changed, 207 insertions(+), 14 deletions(-) create mode 100644 pbuilder-uml.conf.5 diff --git a/ChangeLog b/ChangeLog index d69514b..327a9f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2003-01-08 Junichi Uekawa + + * pbuilder-user-mode-linux (UML_EXTRAOPT): --logfile option. + + * pbuilder-user-mode-linux.1: and document these new options. + + * pbuilder-user-mode-linux (OPERATION): --override-config option passed + through to pbuilder. + (EXTRAOPT): quote ${EXTRAOPT} which is probably meant to be passed + through. + (UML_EXTRAOPT): define as variable that is used to pass uml extra options. + and, of course, add these options: --binary-arch --override-config --timeout --http-proxy --configfile --hookdir --aptconfdir + + + * debian/rules (binary-arch): add manual page installation + + * pbuilder-uml.conf.5: new manual page + + * pbuilder-uml.conf (UML_MEM): Use 128MB memory per default, it would + be better to use that. + + * pbuilder-user-mode-linux: export HOME inside UML + Try and umount the device afterwards, so that it will be clean-mount + the next time. + thanks: Matt Zimmerman + (OPERATION): --uml-mem option. + + * pbuilder-checkparams: update copyright + + * pdebuild: update copyright info. + + * update copyright information to add 2003. + + * pbuilder-user-mode-linux: LOGNAME is set as soon as + entering UML. + 2003-01-07 Junichi Uekawa * Documentation/pbuilder-doc.xml (PBUILDER_UML_IMAGE): update notes @@ -1073,7 +1109,7 @@ energy. When pbuilder stabilizes, I will look at doing it. 14 Jan 2002 Junichi Uekawa - Copyright (c) 2001, 2002 Junichi Uekawa + Copyright (c) 2001-2003 Junichi Uekawa $Id$ diff --git a/THANKS b/THANKS index baa5f78..c83e253 100644 --- a/THANKS +++ b/THANKS @@ -22,6 +22,7 @@ Daniel Schepler Andrew Lau Sam Couter Jose Carlos Garcia Sogo +Matt Zimmerman I thank them all! diff --git a/debian/changelog b/debian/changelog index 37c9b25..7e70c76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,16 @@ pbuilder (0.60) UNRELEASED; urgency=low * customized documentation stylesheets to look like other netfort pages - - -- Junichi Uekawa Tue, 7 Jan 2003 19:25:06 +0900 + * Changing the timing LOGNAME is set inside UML. + * UML: umount the device after running pbuilder. + * UML: set $HOME inside (closes: #175785) + thanks to Matt Zimmerman for noticing the problem. + * UML: manual page pbuilder-uml.conf.5 added. + * UML: --uml-mem option for specifying amount of memory. + implement --override-config. + * UML: --logfile option implemented. + + -- Junichi Uekawa Wed, 8 Jan 2003 17:54:17 +0900 pbuilder (0.59) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 12cf066..63553b9 100755 --- a/debian/rules +++ b/debian/rules @@ -63,7 +63,7 @@ ifeq (${ARCH},i386) dh_testdir -a dh_testroot -a dh_installdocs -a - dh_installman -ppbuilder-uml pbuilder-user-mode-linux.1 + dh_installman -ppbuilder-uml pbuilder-user-mode-linux.1 pbuilder-uml.conf.5 dh_installchangelogs -a dh_link -a dh_compress -a diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 6eb51da..db9cd8f 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -1,7 +1,7 @@ #! /bin/bash # this is sourced from pbuilder packages to process the optional parameters. # pbuilder -- personal Debian package builder -# Copyright (C) 2001,2002 Junichi Uekawa +# Copyright (C) 2001-2003 Junichi Uekawa # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/pbuilder-uml.conf b/pbuilder-uml.conf index f927623..9dac6d0 100644 --- a/pbuilder-uml.conf +++ b/pbuilder-uml.conf @@ -1,3 +1,5 @@ +#documented in pbuilder-uml.conf.5 + MY_ETH0=tuntap,,,192.168.0.2 UML_IP=192.168.0.3 UML_NETMASK=255.255.255.0 @@ -7,4 +9,6 @@ UML_GATEWAY=192.168.0.1 PBUILDER_UML_IMAGE="${HOME}/uml-image" UML_MOUNT_TMPFS="no" BUILDPLACE="${HOME}/tmp/" +UML_MEM=128M + diff --git a/pbuilder-uml.conf.5 b/pbuilder-uml.conf.5 new file mode 100644 index 0000000..4225764 --- /dev/null +++ b/pbuilder-uml.conf.5 @@ -0,0 +1,70 @@ +.TH "pbuilder-uml.conf" 5 "2003 Jan 8" "Debian" "pbuilder" +.SH NAME +pbuilder-uml.conf \- configuration file for user-mode-linux port of pbuilder +.SH DESCRIPTION +.B "/etc/pbuilder/pbuilder-uml.conf" +contains default values used in +.B pbuilder-user-mode-linux +program invocation. + +.SH "FORMAT" +.TP +.BI "MY_ETH0=" "tuntap,,,192.168.0.2" +Configures ethernet setting used for booting linux. +See how rootstrap boots your system, and copy that. + +.TP +.BI "UML_IP=" "192.168.0.3" +IP address to use for guest OS. + +.TP +.BI "UML_NETMASK" "=255.255.255.0" +Guest OS netmask + +.TP +.BI "UML_NETWORK" "=192.168.0.0" +Guest OS network + +.TP +.BI "UML_BROADCAST" "=255.255.255.255" +Guest OS broadcast + +.TP +.BI "UML_GATEWAY" "=192.168.0.1" +Guest OS gateway + +.TP +.BI "PBUILDER_UML_IMAGE=" "${HOME}/uml-image" +Guest OS file system image. + +.TP +.BI "UML_MOUNT_TMPFS=" "no" +Whether to mount tmpfs inside the guest image. +This is probably mostly useless. + +.TP +.BI "BUILDPLACE=" "${HOME}/tmp/" +The location which build will take place. +.B pbuilder-user-mode-linux +will place temporary COW files to there. + +.TP +.BI "UML_MEM=" "128" +The amount of memory allowed for UML. +Give more value to here. + +.SH AUTHOR +Initial coding, and main maintenance is done by +Junichi Uekawa . + +The homepage is available at +.B "http://www.netfort.gr.jp/~dancer/software/pbuilder.html" +.SH "FILES" +.I "/etc/pbuilder/pbuilder-uml.conf, ${HOME}/.pbuilderrc" +.SH "SEE ALSO" +.RI "pbuilder-user-mode-linux (" 1 "), " +.RI "pbuilder (" 8 "), " +.RI "pbuilderrc (" 5 "), " +.RI "pdebuild (" 1 ")" + + diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 7383404..8a7a95c 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -1,7 +1,7 @@ #! /bin/bash # common modules for pbuilder. # pbuilder -- personal Debian package builder -# Copyright (C) 2001,2002 Junichi Uekawa +# Copyright (C) 2001-2003 Junichi Uekawa # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,7 +50,6 @@ function operate_uml () { # use this script file to bootstrap the pbuilder inside the UML INSIDE_PBUILDER=$(tempfile) trap cleanup_function exit - UML_CHROOT_MOUNTPOINT=/mnt/ #The following script is ran inside UML as soon as it is started. @@ -60,6 +59,8 @@ function operate_uml () { mount -t proc /proc /proc mount -t tmpfs /tmp /tmp mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT} +export LOGNAME="${LOGNAME}" +export HOME="${HOME}" if [ "${UML_MOUNT_TMPFS}" = "yes" ]; then mount -t tmpfs ${UML_CHROOT_MOUNTPOINT}/tmp ${UML_CHROOT_MOUNTPOINT}/tmp else @@ -96,22 +97,23 @@ 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 ${UML_CHROOT_MOUNTPOINT} --internal-build-uml ${BUILDING_DSC_FILE} +pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT} --buildresult "" --buildplace ${UML_CHROOT_MOUNTPOINT} --internal-build-uml ${BUILDING_DSC_FILE} +umount ${UML_CHROOT_MOUNTPOINT} 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} + echo Invoking: "linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty ubd0=/ ubd1=${PBUILDER_COW}${PBUILDER_UML_IMAGE} devfs=mount init=${INSIDE_PBUILDER}" + linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty ubd0=/ ubd1="${PBUILDER_COW}${PBUILDER_UML_IMAGE}" devfs=mount init=${INSIDE_PBUILDER} } PBUILDER_COW="" OPERATION="$1" +UML_EXTRAOPT= shift; while [ -n "$1" ] ; do @@ -148,10 +150,27 @@ while [ -n "$1" ] ; do UML_MOUNT_TMPFS="$2"; shift; shift; ;; + --uml-mem) + UML_MEM="$2"; + shift; shift; + ;; --distribution) UML_DISTRIBUTION="$2"; shift; shift; ;; + #things that can be passed through without options + --override-config|--binary-arch) + UML_EXTRAOPT="${UML_EXTRAOPT} $1" + shift;; + #things that can be passed through with options + --timeout|--http-proxy|--configfile|--hookdir|--aptconfdir) + UML_EXTRAOPT="${UML_EXTRAOPT} $1 $2" + shift; shift;; + --logfile) + exec > $(readlink -f "$2"); + exec 2>&1 + PBUILDER_BUILD_LOGFILE=$(readlink -f "$2") + shift;shift;; --) shift; break; diff --git a/pbuilder-user-mode-linux.1 b/pbuilder-user-mode-linux.1 index 6b91bd3..b1e8cce 100644 --- a/pbuilder-user-mode-linux.1 +++ b/pbuilder-user-mode-linux.1 @@ -42,6 +42,10 @@ within the user-mode-linux environment. .B "login" Invokes shell within UML. +.TP +.BI "--uml-image [" "UML image" "]" +Specify the UML image to use. + .TP .BI "--eth0 [" "uml option for eth0" "]" Specify this option as parameter to UML. @@ -50,7 +54,6 @@ Specify this option as parameter to UML. .BI "--uml-ip [" "IP inside UML" "]" Specify this to set the IP inside UML. - .TP .BI "--uml-netmask [" "netmask" "]" .TP @@ -70,6 +73,43 @@ Specify whether to mount tmpfs inside UML chroot. .TP .BI "--distribution [" "sid" "]" Specify the distribution. +see pbuilder.8 + +.TP +.BI "--binary-arch" +Specify only to build binary-arch targets. +see pbuilder.8 + +.TP +.BI "--timeout " "timeouttime" +Timeout build after specified time. +see pbuilder.8 + +.TP +.BI "--configfile " "config file to read" +Makes pbuilder to read the config file inside UML. + +.TP +.BI "--hookdir " "location of hooks" +Makes pbuilder use the specified hookdir inside UML. + +.TP +.BI "--aptconfdir " "apt configuretion directory" +Makes pbuilder to use specified apt configuration directory instead of +other settings. See pbuilder.8 + +.TP +.BI "--override-config" +Specify this option along with +.B --distribution +to switch distribution using +.B "pbuilder-user-mode-linux update" + +.TP +.BI "--logfile " "logfilename" +Specify this option to make the output go to +.I logfilename +instead of standard output. .SH "NOTES" This software is in early stage of development. @@ -83,7 +123,6 @@ targets, .B pbuider-user-mode-linux will try to use COW devices. - .SH "FILES" .TP .I "/etc/pbuilderrc" diff --git a/pbuilderrc.5 b/pbuilderrc.5 index bae7878..b99c81c 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -264,7 +264,7 @@ The homepage is available at .B "http://www.netfort.gr.jp/~dancer/software/pbuilder.html" .SH "FILES" -.I "/etc/pbuilderrc" +.I "/etc/pbuilderrc, ${HOME}/.pbuilderrc" .SH "SEE ALSO" .RI "pbuilder (" 8 "), " .RI "pdebuild (" 1 ")" diff --git a/pdebuild b/pdebuild index 3ed7067..522941d 100644 --- a/pdebuild +++ b/pdebuild @@ -1,4 +1,20 @@ #! /bin/bash +# pbuilder -- personal Debian package builder +# Copyright (C) 2001-2003 Junichi Uekawa +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA set -e while ! test -d ./debian -o "$(pwd)" = "/" ; do -- cgit v1.2.3