Skip to content

Commit

Permalink
Use fakeroot from autoconf
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Feb 8, 2020
1 parent 2864ae7 commit ea846fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test/debootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ tarball=`test -d "$DEBOOTSTRAP_CACHE" && cd "$DEBOOTSTRAP_CACHE"; pwd`/$vendor-$

debootstrap_opts="--arch=$arch ${variant:+--variant=$variant}"
if [ ! -f $tarball ]; then
FAKECHROOT=true fakeroot $DEBOOTSTRAP --make-tarball=$tarball --include=fakeroot $debootstrap_opts $release $destdir "$@"
FAKECHROOT=true $FAKEROOT $DEBOOTSTRAP --make-tarball=$tarball --include=fakeroot $debootstrap_opts $release $destdir "$@"
fi

rm -rf $destdir

ls -l $tarball

fakechroot fakeroot $DEBOOTSTRAP --unpack-tarball="$tarball" $debootstrap_opts $release $destdir || cat $destdir/debootstrap/debootstrap.log
fakechroot $FAKEROOT $DEBOOTSTRAP --unpack-tarball="$tarball" $debootstrap_opts $release $destdir || cat $destdir/debootstrap/debootstrap.log

unset CC CFLAGS LDFLAGS EXTRA_CFLAGS EXTRA_LDFLAGS V

HOME=/root fakechroot fakeroot $CHROOT $destdir apt-get -y --no-install-recommends install build-essential devscripts fakeroot gnupg
HOME=/root fakechroot $FAKEROOT $CHROOT $destdir apt-get -y --no-install-recommends install build-essential devscripts fakeroot gnupg

run sh -c 'cat /etc/apt/sources.list | sed "s/^deb/deb-src/" >> /etc/apt/sources.list'
run fakeroot apt-get -y update
run fakeroot apt-get -y --no-install-recommends build-dep hello
run $FAKEROOT apt-get -y update
run $FAKEROOT apt-get -y --no-install-recommends build-dep hello
run sh -c 'cd /tmp && apt-get -y source hello && cd hello-* && debuild --preserve-env -b -uc -us'
run fakeroot sh -c 'dpkg -i /tmp/hello_*.deb'
run $FAKEROOT sh -c 'dpkg -i /tmp/hello_*.deb'
run sh -c 'hello'
2 changes: 1 addition & 1 deletion test/t/zzdebootstrap.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ top_srcdir=${top_srcdir:-..}

test -n "$TEST_DEBOOTSTRAP" && ! test "$TEST_DEBOOTSTRAP" = 0 || skip_all 'TEST_DEBOOTSTRAP is false'
command -v $DEBOOTSTRAP >/dev/null 2>&1 || skip_all 'debootstrap command is missing (sudo apt-get install debootstrap)'
command -v fakeroot >/dev/null 2>&1 || skip_all 'fakeroot command is missing (sudo apt-get install fakeroot)'
command -v $FAKEROOT >/dev/null 2>&1 || skip_all 'fakeroot command is missing (sudo apt-get install fakeroot)'
command -v xzcat >/dev/null 2>&1 || skip_all 'xzcat command is missing (sudo apt-get install xz-utils)'
command -v lsb_release >/dev/null 2>&1 || skip_all 'lsb_release command is missing (sudo apt-get install lsb-release)'

Expand Down

0 comments on commit ea846fd

Please sign in to comment.