From 7108866f0d6c95c93e22ec758582a5516d2cc6a6 Mon Sep 17 00:00:00 2001 From: parazyd Date: Mon, 15 Jun 2020 16:26:53 +0200 Subject: [PATCH] Try to get tarballs to actually work when booted. --- zlibs/bootstrap | 11 +++++++---- zlibs/imaging | 6 ++++-- zlibs/rsync | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/zlibs/bootstrap b/zlibs/bootstrap index 419b655..e505a07 100644 --- a/zlibs/bootstrap +++ b/zlibs/bootstrap @@ -1,5 +1,5 @@ #!/usr/bin/env zsh -# Copyright (c) 2016-2017 Dyne.org Foundation +# Copyright (c) 2016-2020 Dyne.org Foundation # libdevuansdk maintained by Ivan J. # # This file is part of libdevuansdk @@ -161,8 +161,11 @@ bootstrap_tar_pack() { pushd ${strapdir} mkdir -p ${_dest} silly - sudo tar czfp $bootstrap_tgz \ - --exclude={./boot,./dev,./sys,./proc} . + sudo tar czfp "$bootstrap_tgz" . \ + --xattrs \ + --xattrs-include=security.capability \ + --xattrs-include=user.pax.flags \ + --exclude={./boot,./dev,./sys,./proc} || zerr popd fi } @@ -178,7 +181,7 @@ bootstrap_tar_unpack() { } sudo rm -rf "${strapdir}"/* silly - sudo tar xfp $bootstrap_tgz -C ${strapdir} + sudo tar xpf "$bootstrap_tgz" -C "$strapdir" --xattrs-include='*.*' --numeric-owner 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 609e99a..ea32ba0 100644 --- a/zlibs/imaging +++ b/zlibs/imaging @@ -1,5 +1,5 @@ #!/usr/bin/env zsh -# Copyright (c) 2016-2017 Dyne.org Foundation +# Copyright (c) 2016-2020 Dyne.org Foundation # libdevuansdk is maintained by Ivan J. # # This file is part of libdevuansdk @@ -313,6 +313,8 @@ tar_strapdir() { mkdir -p "$R/dist" silly pushd "$strapdir" - sudo tar czf "$R/dist/${image_name}.tar.gz" . || zerr + sudo tar czf "$R/dist/${image_name}.tar.gz" . \ + --xattrs --xattrs-include=security.capability \ + --xattrs.include=user.pax.flags || zerr popd } diff --git a/zlibs/rsync b/zlibs/rsync index 28578cb..8fc0acf 100644 --- a/zlibs/rsync +++ b/zlibs/rsync @@ -1,5 +1,5 @@ #!/usr/bin/env zsh -# Copyright (c) 2016-2017 Dyne.org Foundation +# Copyright (c) 2016-2020 Dyne.org Foundation # libdevuansdk is maintained by Ivan J. # # This file is part of libdevuansdk @@ -33,7 +33,7 @@ rsync_to_raw_image() { tar_strapdir || zerr notice "rsyncing strapdir to raw image..." - sudo rsync -HPavz -q ./* $workdir/mnt || { + sudo rsync -HPaq ./* $workdir/mnt || { image_raw_umount die "not enough space, please report a bug" zerr