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