From 52908422880f8d5cfa18c577d4138d5449af37f6 Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Fri, 27 Jul 2018 09:46:55 +0200 Subject: Handle includes.chroot files installed over symlinked directories With the merged /usr feature now enabled in debootstrap, we have /bin and /lib which are symlinks to /usr/bin and /usr/lib. If the live-build configuration provides files in config/includes.chroot/lib/ or config/includes.chroot/bin/ then lb chroot_includes will replace the /lib or /bin symlink with real directories having only the content provided in chroot.includes and problems will follow... the build will usually fail later with a cryptic error message (for example a hook failing to execute /usr/bin/env). Work around the issue by creating a tarball of the files to install and by unpacking that tarball from within the chroot with appropriate options. --- scripts/build/chroot_includes | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build/chroot_includes b/scripts/build/chroot_includes index 21c0e261b..6ab4e288d 100755 --- a/scripts/build/chroot_includes +++ b/scripts/build/chroot_includes @@ -42,8 +42,12 @@ if Find_files config/includes.chroot/ then # Copying includes cd config/includes.chroot - find . | cpio -dmpu --no-preserve-owner "${OLDPWD}"/chroot + Echo_message "Creating a tarball with files from includes.chroot..." + tar cf "${OLDPWD}"/chroot/includes.chroot.tar . cd "${OLDPWD}" + Echo_message "Extracting the tarball in the chroot..." + Chroot chroot "tar -xvf includes.chroot.tar --no-same-owner --keep-directory-symlink --overwrite" + rm chroot/includes.chroot.tar # Creating stage file Create_stagefile .build/includes.chroot -- cgit v1.2.3