Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

lxc: fix lxc-download #24564

Merged
merged 2 commits into from
Feb 24, 2025
Merged

lxc: fix lxc-download #24564

merged 2 commits into from
Feb 24, 2025

Conversation

graysky2
Copy link
Contributor

This commit contains two fixes.

The first add gnu-tar as a dependency for lxc-create which is needed to properly extract the root file system tarball. Without it, symlink target of /bin/tar is busybox and it lacks proper support to extract with xattrs. The default gnu-tar is actually built without this support as well, but it is able to extract the rootfs tarballs with a warning not an error which is not the case with busybox which ends in an error.

The second is a fix to 025-remove-unsupported-option.patch which both removes bsdtar command as it ends in errors, see below, and circumvents 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. Create lxc container failed on tar extract failure (Directory renamed before its status could be extracted) openwrt#15888

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Maintainer: @ratkaj @neheb

@BKPepe
Copy link
Member

BKPepe commented Jul 16, 2024

I think and it might be even better to do that it is to split your single commit into two commits.

@graysky2
Copy link
Contributor Author

I think and it might be even better to do that it is to split your single commit into two commits.

@BKPepe - done

@graysky2
Copy link
Contributor Author

@BKPepe - friendly ping to review

@graysky2
Copy link
Contributor Author

@ratkaj - can you please review

@graysky2 graysky2 mentioned this pull request Jan 21, 2025
@graysky2
Copy link
Contributor Author

@1715173329 - do you mind reviewing this and merging?

@1715173329
Copy link
Member

please rebase and bump PKG_RELEASE.

Add gnu-tar as a dependency for lxc-create which is needed to
properly extract the root file system tarball. Without it,
symlink target of /bin/tar is busybox and it lacks proper
support to extract with xattrs.  The default gnu-tar is actually
built without this support as well, but it is able to extract
the rootfs tarballs with a warning not an error which is not the
case with busybox which ends in an error.

Signed-off-by: John Audia <therealgraysky@proton.me>

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne
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. openwrt/openwrt#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>
@graysky2
Copy link
Contributor Author

graysky2 commented Feb 24, 2025

please rebase and bump PKG_RELEASE.

done

@1715173329 1715173329 merged commit 96c96fe into openwrt:master Feb 24, 2025
2 of 12 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants