From c4b62bb18fb306857ea364cd86c0fca61d0d4c64 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 25 Sep 2023 16:31:16 +0100 Subject: [PATCH] scripts/make-rootfs.sh: move non-wrapper calls further up Move the cp/ln calls outside of the WRAPPER call block. The files that are referenced are either disowned by pacman or are explicitly "backup" files, such that pacman will not override them. Signed-off-by: Emil Velikov --- scripts/make-rootfs.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/make-rootfs.sh b/scripts/make-rootfs.sh index cf59108..8843c53 100755 --- a/scripts/make-rootfs.sh +++ b/scripts/make-rootfs.sh @@ -17,6 +17,9 @@ cat pacman-conf.d-noextract.conf >> "$BUILDDIR/etc/pacman.conf" sed 's/Include = /&rootfs/g' < "$BUILDDIR/etc/pacman.conf" > pacman.conf +cp --recursive --preserve=timestamps rootfs/* "$BUILDDIR/" +ln -fs /usr/lib/os-release "$BUILDDIR/etc/os-release" + $WRAPPER -- \ pacman -Sy -r "$BUILDDIR" \ --noconfirm --dbpath "$BUILDDIR/var/lib/pacman" \ @@ -24,14 +27,10 @@ $WRAPPER -- \ --noscriptlet \ --hookdir "$BUILDDIR/alpm-hooks/usr/share/libalpm/hooks/" base "$GROUP" -cp --recursive --preserve=timestamps rootfs/* "$BUILDDIR/" - $WRAPPER -- chroot "$BUILDDIR" update-ca-trust $WRAPPER -- chroot "$BUILDDIR" pacman-key --init $WRAPPER -- chroot "$BUILDDIR" pacman-key --populate -ln -fs /usr/lib/os-release "$BUILDDIR/etc/os-release" - # add system users $WRAPPER -- chroot "$BUILDDIR" /usr/bin/systemd-sysusers --root "/"