Skip to content

Commit

Permalink
Add workaround for busybox cpio
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 4, 2024
1 parent 8a81ef8 commit 9803e16
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9803e16

Please sign in to comment.