From 0eb16a4b1432477ed0672008f4ab040a6c66612b Mon Sep 17 00:00:00 2001 From: David Krauser Date: Wed, 25 Sep 2019 12:39:32 -0400 Subject: [PATCH] Enable building buildd artifacts with an ext4 image target. --- live-build/buildd/hooks/00-mirror.binary | 2 +- live-build/buildd/hooks/01-policy-rc-d.binary | 8 ++++---- live-build/buildd/hooks/50-buildd-tar.binary | 4 ++-- live-build/buildd/hooks/51-buildd-lxd.binary | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/live-build/buildd/hooks/00-mirror.binary b/live-build/buildd/hooks/00-mirror.binary index 7f3cdba4..a6722e0b 100755 --- a/live-build/buildd/hooks/00-mirror.binary +++ b/live-build/buildd/hooks/00-mirror.binary @@ -9,4 +9,4 @@ set -e # /var/lib/apt/lists/ has suitable cached Packages files; this speeds up # builds on buildds. sed -i "s,${LB_PARENT_MIRROR_BINARY},${LB_MIRROR_BINARY},g" \ - binary/etc/apt/sources.list + chroot/etc/apt/sources.list diff --git a/live-build/buildd/hooks/01-policy-rc-d.binary b/live-build/buildd/hooks/01-policy-rc-d.binary index d827875f..bdfaf52d 100755 --- a/live-build/buildd/hooks/01-policy-rc-d.binary +++ b/live-build/buildd/hooks/01-policy-rc-d.binary @@ -6,8 +6,8 @@ set -e # installed, but that doesn't work because live-build has already installed # a dummy one at that point. The simplest approach is to repair the # situation by putting it in place here. -if [ -L binary/etc/alternatives/policy-rc.d ] && \ - [ ! -e binary/usr/sbin/policy-rc.d ] && \ - [ ! -L binary/usr/sbin/policy-rc.d ]; then - ln -s /etc/alternatives/policy-rc.d binary/usr/sbin/policy-rc.d +if [ -L chroot/etc/alternatives/policy-rc.d ] && \ + [ ! -e chroot/usr/sbin/policy-rc.d ] && \ + [ ! -L chroot/usr/sbin/policy-rc.d ]; then + ln -s /etc/alternatives/policy-rc.d chroot/usr/sbin/policy-rc.d fi diff --git a/live-build/buildd/hooks/50-buildd-tar.binary b/live-build/buildd/hooks/50-buildd-tar.binary index 8be7b618..c9c4663a 100755 --- a/live-build/buildd/hooks/50-buildd-tar.binary +++ b/live-build/buildd/hooks/50-buildd-tar.binary @@ -6,5 +6,5 @@ set -e # gzip was chosen for fastest decompression speed: it decompresses buildd # chroots about twice as fast as xz and about five times as fast as bzip2. -tar --transform='s,^binary,chroot-autobuild,' --sort=name --numeric-owner \ - -czf "livecd.$PROJECT.rootfs.tar.gz" binary +tar --transform='s,^chroot,chroot-autobuild,' --sort=name --numeric-owner \ + -czf "livecd.$PROJECT.rootfs.tar.gz" chroot diff --git a/live-build/buildd/hooks/51-buildd-lxd.binary b/live-build/buildd/hooks/51-buildd-lxd.binary index b4b782d9..44b38213 100755 --- a/live-build/buildd/hooks/51-buildd-lxd.binary +++ b/live-build/buildd/hooks/51-buildd-lxd.binary @@ -11,6 +11,6 @@ tar --numeric-owner -cf "livecd.$PROJECT.lxd.tar" -C "$TMPDIR" metadata.yaml rm -rf "$TMPDIR" # When using the combined metadata/rootfs form, the rootfs must be under # rootfs/ rather than under chroot-autobuild/. -tar --transform='s,^binary,rootfs,' --sort=name --numeric-owner \ - -rf "livecd.$PROJECT.lxd.tar" binary +tar --transform='s,^chroot,rootfs,' --sort=name --numeric-owner \ + -rf "livecd.$PROJECT.lxd.tar" chroot gzip -9 "livecd.$PROJECT.lxd.tar"