diff options
author | dancer <dancer> | 2002-02-15 13:49:49 +0000 |
---|---|---|
committer | dancer <dancer> | 2002-02-15 13:49:49 +0000 |
commit | 19947091bfd4b910fd42e6db329fc4e074ff854a (patch) | |
tree | b1235ed95ebd6dd3f729ea6e88bf92a70ae6baa2 | |
parent | b87a01e5191e522be5f3dc7113c7f889c53004c1 (diff) | |
download | pbuilder-19947091bfd4b910fd42e6db329fc4e074ff854a.tar pbuilder-19947091bfd4b910fd42e6db329fc4e074ff854a.tar.gz |
updates, some potential changes.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | pbuilder-buildpackage | 25 | ||||
-rw-r--r-- | pbuilder.1 | 12 | ||||
-rwxr-xr-x | pbuilderrc | 4 | ||||
-rw-r--r-- | pbuilderrc.5 | 17 |
6 files changed, 70 insertions, 7 deletions
@@ -1,3 +1,16 @@ +2002-02-15 Junichi Uekawa <dancer@debian.org> + + * pbuilder.1: document updated, noting of minor details of + what option takes effect in what command. + + * pbuilder-buildpackage: changing it to use the specified uid. + EXTRAPACKAGES option is valued within "pbuilder build" + + * pbuilderrc.5: document BUILDUSERNAME, BUILDUSERID + + * pbuilderrc (BUILDUSERNAME): added + (BUILDUSERID): added + 2002-02-14 Junichi Uekawa <dancer@debian.org> * debian/TODO: document some known bugs and features. diff --git a/debian/changelog b/debian/changelog index 88cbbaf..56abde7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,9 +5,11 @@ pbuilder (0.23) unstable; urgency=low reported by Mark Brown (closes: #129053) (please test) * Fix update target to remove packages specified in REMOVEPACKAGES. - * pbuilder update requests apt-get to call dpkg with --force-confnew option + * Support building as non-root user, and using fakeroot inside + the chroot. (please test) + * EXTRAPACKAGES takes effect within the build target. (please test) - -- Junichi Uekawa <dancer@debian.org> Thu, 14 Feb 2002 20:32:58 +0900 + -- Junichi Uekawa <dancer@debian.org> Fri, 15 Feb 2002 21:23:22 +0900 pbuilder (0.22) unstable; urgency=low diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 5dd0e94..65fcb86 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -171,6 +171,8 @@ function checkbuilddep_internal () { function checkbuilddep () { checkbuilddep_internal + # install extra packages to the chroot + $CHROOTEXEC usr/bin/apt-get -y install ${EXTRAPACKAGES} } function echobacktime () { @@ -190,12 +192,25 @@ function saveaptcache_umountproc_cleanbuildplace () { umountproc_cleanbuildplace } +function createbuilduser () { + # create the build user + echo "$BUILDUSERNAME:x:$BUILDUSERID::/tmp/buildd:/bin/sh" >> $BUILDPLACE/etc/passwd + echo "$BUILDUSERNAME:x:$BUILDUSERID:" >> $BUILDPLACE/etc/group +} . /usr/lib/pbuilder/pbuilder-checkparams PACKAGENAME="$1" CHROOTEXEC="chroot $BUILDPLACE " - +if [ -n "$BUILDUSERNAME" -a -n "$BUILDUSERID" ]; then + SUTOUSER="su - $BUILDUSERNAME -- " + echo "I: using fakeroot in build." +else + # run the build in root + SUTOUSER="" + BUILDUSERID=0 + BUILDUSERNAME=root +fi if [ ! -f "$PACKAGENAME" ]; then echo "Command line parameter [$PACKAGENAME] is not a valid .dsc file name" >&2 exit 1; @@ -203,14 +218,14 @@ fi; showbuildbanner echobacktime - +createbuilduser extractbuildplace echo Copying source file copydsc "$PACKAGENAME" "$BUILDPLACE/tmp/buildd" echo Extracting source -if ! $CHROOTEXEC /bin/bash -c "( cd tmp/buildd; /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )"; then - echo pbuilder: Failed extracting the source >&2 +if ! $CHROOTEXEC /bin/bash -c "( cd tmp/buildd; chown $BUILDUSERNAME:$BUILDUSERNAME *; $SUTOUSER /usr/bin/dpkg-source -x $(basename $PACKAGENAME) )"; then + echo "pbuilder: Failed extracting the source" >&2 umountproc_cleanbuildplace exit 1; fi @@ -224,7 +239,7 @@ echo " -> Building the package" export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin" if [ -z "$DEBEMAIL" ]; then - if ! $CHROOTEXEC /bin/bash -c "cd tmp/buildd/*/; dpkg-buildpackage -us -uc $DEBBUILDOPTS"; then + if ! $CHROOTEXEC /bin/bash -c "cd tmp/buildd/*/; $SUTOUSER dpkg-buildpackage -us -uc $DEBBUILDOPTS"; then echo "pbuilder: Failed autobuilding of package" >&2 umountproc_cleanbuildplace exit 1; @@ -70,6 +70,13 @@ This may change in the future. .BI "--basetgz [" "basetgz-location" "]" Specifies the location of .B "base.tgz" + +This option will define the default distribution and +apt-lines when used in +.B "pbuilder update" +and +.B "pbuilder create" + .TP .BI "--buildplace [" "location of build" "]" Specifies the location where building and @@ -153,6 +160,11 @@ surrounded in double quotations, like Adds packages specified as an addition to the default, which is .B build-essential +by default. +This is used in +.B build +and +.B create .TP .BI "--configfile [" "configuration file to load" "]" @@ -37,3 +37,7 @@ DEBBUILDOPTS="-b" #APT configuration files directory APTCONFDIR="" + +# the username and ID used by pbuilder, inside chroot. Needs fakeroot, really +BUILDUSERID=1234 +#BUILDUSERNAME=pbuilder diff --git a/pbuilderrc.5 b/pbuilderrc.5 index 4ab5ab7..85688b2 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -21,6 +21,9 @@ This is overridden with the option Specifies extra packages which the system should install in the chroot on .BR "pbuilder create" "." +Also this is installed on +.B "pbuilder build" + .TP .BI "export DEBIAN_BUILDARCH=" "athlon" Uses this variable as @@ -158,6 +161,20 @@ in .TP +.BI "BUILDUSERID=" "1234" +The uid to be used inside chroot. +It should not collide with user-id outside the chroot. + +.TP +.BI "BUILDUSERNAME=" "pbuilder" +The user name of the user the build will run as. +Specifying this will enable the use of fakeroot inside +pbuilder. + +Note that this will require fakeroot to be installed within +the chroot. + +.TP .BI "APTCONFDIR=" "/etc/apt" Configures where the apt configuration files are copied from. By default, this value is empty, |