diff options
author | dancer <dancer> | 2001-08-25 19:28:11 +0000 |
---|---|---|
committer | dancer <dancer> | 2001-08-25 19:28:11 +0000 |
commit | 065b933f10abb6a1b58015b0fa2e3a8f81d02eb1 (patch) | |
tree | fec8d06c1475ea5298e815b6468625959ab5254a | |
parent | 82cd5866919d77818b1518810d8dbb10efa8933f (diff) | |
download | pbuilder-065b933f10abb6a1b58015b0fa2e3a8f81d02eb1.tar pbuilder-065b933f10abb6a1b58015b0fa2e3a8f81d02eb1.tar.gz |
adding support for proc and using readlink
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | pbuilder-buildpackage | 12 | ||||
-rwxr-xr-x | pbuilder-checkparams | 4 | ||||
-rwxr-xr-x | pbuilder-createbuildenv | 18 | ||||
-rwxr-xr-x | pbuilder-updatebuildenv | 23 |
6 files changed, 39 insertions, 21 deletions
@@ -1,4 +1,5 @@ clean: + rm -f *.bak *~ install: install -d $(DESTDIR)/etc diff --git a/debian/control b/debian/control index cf359b7..68f63eb 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.5.6 Package: pbuilder Architecture: all -Depends: ${shlibs:Depends} +Depends: debootstrap, tar, shellutils, debianutils, ${shlibs:Depends} Description: personal package builder for Debian packages Constructs a chroot system, and builds a package inside the chroot. diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 1e4c52f..5d63436 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -32,16 +32,20 @@ function checkbuilddep () { PACKAGENAME="$1" CHROOTEXEC="chroot $BUILDPLACE " -echo cleaning the build env "[$BUILDPLACE]" +echo "cleaning the build env [$BUILDPLACE]" rm -rf "$BUILDPLACE" -echo building the build env +echo "building the build env" mkdir -p "$BUILDPLACE" ( cd "$BUILDPLACE" tar xfzp "$BASETGZ" mkdir -p "$BUILDPLACE/tmp/buildd" -) + ) +echo " -> mounting proc" +mkdir -p "$BUILDPLACE/proc" +mount -t proc /proc "$BUILDPLACE/proc" + echo Copying source file copydsc "$PACKAGENAME" "$BUILDPLACE/tmp/buildd" echo Extracting source @@ -51,3 +55,5 @@ checkbuilddep echo Building the package $CHROOTEXEC /bin/sh -c "(cd tmp/buildd/*/; dpkg-buildpackage)" +echo " -> unmounting proc" +umount "$BUILDPLACE/proc"
\ No newline at end of file diff --git a/pbuilder-checkparams b/pbuilder-checkparams index e7b72ca..ace5624 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -4,11 +4,11 @@ while [ -n $1 ]; do case "$1" in --basetgz) - BASETGZ="$2"; + BASETGZ=$(realink -f "$2"); shift; shift; ;; --buildplace) - BUILDPLACE="$2"; + BUILDPLACE=$(readlink -f "$2"); shift; shift; ;; --mirror) diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv index b6a01db..861e191 100755 --- a/pbuilder-createbuildenv +++ b/pbuilder-createbuildenv @@ -1,4 +1,4 @@ -#!/bin/bash +#! /bin/bash #necessary for installs. export LANG=C export LC_ALL=C @@ -14,27 +14,35 @@ echo Distribution is $DISTRIBUTION. echo cleaning the build env rm -rf $BUILDPLACE -echo building the build env +echo "building the build env" mkdir -p $BUILDPLACE +echo " -> mounting proc" +mkdir -p $BUILDPLACE/proc +mount -t proc /proc $BUILDPLACE/proc +echo " -> running debootstrap" cd $BUILDPLACE debootstrap $DISTRIBUTION . mkdir -p $BUILDPLACE/tmp/buildd +echo " -> copying local configuration" for a in passwd hosts hostname resolv.conf apt; do cp -r /etc/$a $BUILDPLACE/etc/; done -echo Installing apt-lines +echo "Installing apt-lines" cat > $BUILDPLACE/etc/apt/sources.list << EOF deb $MIRRORSITE $DISTRIBUTION main contrib non-free deb-src $MIRRORSITE $DISTRIBUTION main contrib non-free EOF -echo Refreshing the base.tgz +echo "Refreshing the base.tgz " +echo " -> upgrading packages" $CHROOTEXEC /usr/bin/apt-get update $CHROOTEXEC /usr/bin/dpkg --purge lilo $CHROOTEXEC /usr/bin/apt-get -y dist-upgrade $CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES $CHROOTEXEC /usr/bin/apt-get clean +echo " -> unmounting proc" +umount $BUILDPLACE/proc +echo " -> creating base.tgz" cd $BUILDPLACE tar cfz $BASETGZ * - diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv index 54f9a4c..510f34c 100755 --- a/pbuilder-updatebuildenv +++ b/pbuilder-updatebuildenv @@ -1,4 +1,4 @@ -#!/bin/bash +#! /bin/bash export LANG=C export LC_ALL=C @@ -8,19 +8,19 @@ CHROOTEXEC="chroot $BUILDPLACE " test -n "$DISTRIBUTION" && echo "Upgrading for distribution $DISTRIBUTION" -#cd $MYREPOSITORY -#echo Initializing repository -#dpkg-scanpackages . . | gzip > Packages.gz -#dpkg-scansources . . | gzip > Sources.gz - -echo cleaning the build env +echo "cleaning the build env" rm -rf $BUILDPLACE -echo building the build env +echo "building the build env" +echo " -> extracting base.tgz" mkdir -p $BUILDPLACE cd $BUILDPLACE tar xfzp $BASETGZ +echo " -> mounting proc" +mkdir -p "$BUILDPLACE/proc" +mount -t proc /proc $BUILDPLACE/proc mkdir -p $BUILDPLACE/tmp/buildd +echo " -> copying local configuration" for a in passwd hosts hostname resolv.conf; do cp /etc/$a $BUILDPLACE/etc/$a; done @@ -33,13 +33,16 @@ deb-src $MIRRORSITE debian $DISTRIBUTION main contrib non-free EOF fi -echo Refreshing the base.tgz +echo "Refreshing the base.tgz " +echo " -> upgrading packages" $CHROOTEXEC /usr/bin/apt-get update $CHROOTEXEC /usr/bin/dpkg --purge lilo $CHROOTEXEC /usr/bin/apt-get -y dist-upgrade $CHROOTEXEC /usr/bin/apt-get -y install build-essential dpkg-dev apt $EXTRAPACKAGES $CHROOTEXEC /usr/bin/apt-get clean +echo " -> unmounting proc" +umount $BUILDPLACE/proc +echo " -> creating base.tgz" cd $BUILDPLACE -echo Creating base.tgz tar cfz $BASETGZ * |