Try to preserve acls and xattrs when tarring.

This commit is contained in:
parazyd 2020-06-22 11:06:01 +02:00
parent 7108866f0d
commit 58862d1ced
No known key found for this signature in database
GPG Key ID: 6B636BF0493EE747
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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
}