From 58862d1cede3261dbd239fd33c09a71864bdf539 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 22 Jun 2020 11:06:01 +0200 Subject: [PATCH] Try to preserve acls and xattrs when tarring. --- zlibs/bootstrap | 7 +++++-- zlibs/imaging | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zlibs/bootstrap b/zlibs/bootstrap index e505a07..c09499b 100644 --- a/zlibs/bootstrap +++ b/zlibs/bootstrap @@ -162,10 +162,12 @@ bootstrap_tar_pack() { mkdir -p ${_dest} silly sudo tar czfp "$bootstrap_tgz" . \ + --acls \ + --selinux \ --xattrs \ --xattrs-include=security.capability \ --xattrs-include=user.pax.flags \ - --exclude={./boot,./dev,./sys,./proc} || zerr + --exclude={./dev,./sys,./proc} || zerr popd fi } @@ -181,7 +183,8 @@ bootstrap_tar_unpack() { } sudo rm -rf "${strapdir}"/* silly - sudo tar xpf "$bootstrap_tgz" -C "$strapdir" --xattrs-include='*.*' --numeric-owner + sudo tar xpf "$bootstrap_tgz" -C "$strapdir" --xattrs-include='*.*' --numeric-owner \ + --acls --selinux --xattrs sudo mkdir -p ${strapdir}/{boot,dev,sys,proc} conf_print_sourceslist | sudo tee $strapdir/etc/apt/sources.list >/dev/null diff --git a/zlibs/imaging b/zlibs/imaging index ea32ba0..5e3abf9 100644 --- a/zlibs/imaging +++ b/zlibs/imaging @@ -314,7 +314,8 @@ tar_strapdir() { silly pushd "$strapdir" sudo tar czf "$R/dist/${image_name}.tar.gz" . \ - --xattrs --xattrs-include=security.capability \ + --acls --selinux --xattrs \ + --xattrs-include=security.capability \ --xattrs.include=user.pax.flags || zerr popd }