mirror of
https://github.com/openwrt/packages.git
synced 2025-10-10 09:11:28 +00:00
Modified 025-remove-unsupported-option.patch to both remove the bsdtar command as it ends in errors, see below, and to circumvent an error when extracting to overlayfs[1]. Error when extracting rootfs tarball with bsdtar: tar --absolute-names --numeric-owner '--xattrs-include=*' -xpJf /var/cache/lxc//download/archlinux/current/amd64//default/rootfs.tar.xz -C /mnt/data/lxc/test/rootfs ./usr/bin/newgidmap: Cannot restore extended attributes on this system: Illegal byte sequence lxc-create: test: ../src/lxc/lxccontainer.c: create_run_template: 1589 Failed to create container from template lxc-create: test: ../src/lxc/tools/lxc_create.c: lxc_create_main: 318 Failed to create container test 1. https://github.com/openwrt/openwrt/issues/15888 Signed-off-by: John Audia <therealgraysky@proton.me> Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
--- a/templates/lxc-download.in
|
|
+++ b/templates/lxc-download.in
|
|
@@ -375,32 +375,7 @@ fi
|
|
# Unpack the rootfs
|
|
echo "Unpacking the rootfs"
|
|
|
|
-IS_BSD_TAR="false"
|
|
-if tar --version | grep -sq "bsdtar"; then
|
|
- IS_BSD_TAR="true"
|
|
-fi
|
|
-
|
|
-EXCLUDES=""
|
|
-excludelist=$(relevant_file excludes)
|
|
-if [ -f "${excludelist}" ]; then
|
|
- while read -r line; do
|
|
- if [ ${IS_BSD_TAR} = "true" ]; then
|
|
- line="^${line}"
|
|
- fi
|
|
- EXCLUDES="${EXCLUDES} --exclude=${line}"
|
|
- done < "${excludelist}"
|
|
-fi
|
|
-
|
|
-# Do not surround ${EXCLUDES} by quotes. This does not work. The solution could
|
|
-# use array but this is not POSIX compliant. The only POSIX compliant solution
|
|
-# is to use a function wrapper, but the latter can't be used here as the args
|
|
-# are dynamic. We thus need to ignore the warning brought by shellcheck.
|
|
-# shellcheck disable=SC2086
|
|
-if [ "${IS_BSD_TAR}" = "true" ]; then
|
|
- tar ${EXCLUDES} --numeric-owner -xpJf "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}"
|
|
-else
|
|
- tar --anchored ${EXCLUDES} --numeric-owner --xattrs-include='*' -xpJf "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}"
|
|
-fi
|
|
+tar --absolute-names --numeric-owner --xattrs-include='*' -xpJf "${LXC_CACHE_PATH}/rootfs.tar.xz" -C "${LXC_ROOTFS}"
|
|
|
|
mkdir -p "${LXC_ROOTFS}/dev/pts/"
|
|
|