From 9803e16491f4e4ead6c45efc87e6be94affb1c21 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 4 Dec 2024 16:07:41 +0100 Subject: [PATCH] Add workaround for busybox cpio --- build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build b/build index 12d3de74..f7c8672d 100755 --- a/build +++ b/build @@ -1814,14 +1814,20 @@ for RECIPEPATH in "${RECIPEFILES[@]}" ; do echo "#!/bin/sh -e" > $BUILD_ROOT/.unpack.command shellquote cd "$TOPDIR/SOURCES" >> $BUILD_ROOT/.unpack.command echo >> $BUILD_ROOT/.unpack.command - echo -n 'cpio --extract --owner="'$BUILD_USER'" --unconditional --preserve-modification-time --make-directories <' >> $BUILD_ROOT/.unpack.command + if test -L $BUILD_ROOT/usr/bin/cpio -a $(readlink $BUILD_ROOT/usr/bin/cpio) = /bin/busybox ; then + rm -f $BUILD_ROOT/.build.unpackarchive + cp "$BUILD_DIR/unpackarchive" $BUILD_ROOT/.build.unpackarchive + echo -n 'perl /.build.unpackarchive --cpio < ' >> $BUILD_ROOT/.unpack.command + else + echo -n 'cpio --extract --owner="'$BUILD_USER'" --unconditional --preserve-modification-time --make-directories <' >> $BUILD_ROOT/.unpack.command + fi shellquote "$i" >> $BUILD_ROOT/.unpack.command echo >> $BUILD_ROOT/.unpack.command shellquote rm -f "$i" >> $BUILD_ROOT/.unpack.command echo >> $BUILD_ROOT/.unpack.command chmod 0755 $BUILD_ROOT/.unpack.command chroot $BUILD_ROOT su -c /.unpack.command - $BUILD_USER || cleanup_and_exit 1 - rm -f $BUILD_ROOT/.unpack.command + rm -f $BUILD_ROOT/.unpack.command $BUILD_ROOT/.build.unpackarchive done # macros may be used by buildtime services or non-rpm build types