Try to get tarballs to actually work when booted.

This commit is contained in:
parazyd 2020-06-15 16:26:53 +02:00
parent 353f4daea8
commit 7108866f0d
No known key found for this signature in database
GPG Key ID: 6B636BF0493EE747
3 changed files with 13 additions and 8 deletions

View File

@ -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. <parazyd@dyne.org>
#
# 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

View File

@ -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. <parazyd@dyne.org>
#
# 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
}

View File

@ -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. <parazyd@dyne.org>
#
# 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