tTry to preserve acls and xattrs when tarring. - libdevuansdk - common library for devuan's simple distro kits
HTML git clone https://git.parazyd.org/libdevuansdk
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 58862d1cede3261dbd239fd33c09a71864bdf539
DIR parent 7108866f0d6c95c93e22ec758582a5516d2cc6a6
HTML Author: parazyd <parazyd@dyne.org>
Date: Mon, 22 Jun 2020 11:06:01 +0200
Try to preserve acls and xattrs when tarring.
Diffstat:
M zlibs/bootstrap | 7 +++++--
M zlibs/imaging | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
---
DIR diff --git a/zlibs/bootstrap b/zlibs/bootstrap
t@@ -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
}
t@@ -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
DIR diff --git a/zlibs/imaging b/zlibs/imaging
t@@ -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
}