From dd77b72852e780df9d51ea9e4c9534f3626173cd Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Sun, 5 Jun 2016 13:12:47 +0300 Subject: [PATCH] debootstrap-ng: preserve extended attributes --- debootstrap-ng.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debootstrap-ng.sh b/debootstrap-ng.sh index 9b61d90702..4a18e0d4db 100644 --- a/debootstrap-ng.sh +++ b/debootstrap-ng.sh @@ -124,7 +124,7 @@ create_rootfs_cache() if [[ -f $cache_fname ]]; then local date_diff=$(( ($(date +%s) - $(stat -c %Y $cache_fname)) / 86400 )) display_alert "Extracting $display_name" "$date_diff days old" "info" - pv -p -b -r -c -N "$display_name" "$cache_fname" | pigz -dc | tar xp -C $CACHEDIR/sdcard/ + pv -p -b -r -c -N "$display_name" "$cache_fname" | pigz -dc | tar xp --xattrs -C $CACHEDIR/sdcard/ else display_alert "Creating new rootfs for" "$RELEASE" "info" @@ -246,7 +246,7 @@ create_rootfs_cache() # based on rootfs size calculation umount_chroot - tar cp --directory=$CACHEDIR/sdcard/ --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \ + tar cp --xattrs --directory=$CACHEDIR/sdcard/ --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \ --exclude='./sys/*' . | pv -p -b -r -s $(du -sb $CACHEDIR/sdcard/ | cut -f1) -N "$display_name" | pigz > $cache_fname fi mount_chroot @@ -429,11 +429,11 @@ create_image() if [[ $ROOTFS_TYPE != nfs ]]; then display_alert "Copying files to image" "tmprootfs.raw" "info" - rsync -aHWh --exclude="/boot/*" --exclude="/dev/*" --exclude="/proc/*" --exclude="/run/*" --exclude="/tmp/*" \ + rsync -aHWXh --exclude="/boot/*" --exclude="/dev/*" --exclude="/proc/*" --exclude="/run/*" --exclude="/tmp/*" \ --exclude="/sys/*" --info=progress2,stats1 $CACHEDIR/sdcard/ $CACHEDIR/mount/ else display_alert "Creating rootfs archive" "rootfs.tgz" "info" - tar cp --directory=$CACHEDIR/sdcard/ --exclude='./boot/*' --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \ + tar cp --xattrs --directory=$CACHEDIR/sdcard/ --exclude='./boot/*' --exclude='./dev/*' --exclude='./proc/*' --exclude='./run/*' --exclude='./tmp/*' \ --exclude='./sys/*' . | pv -p -b -r -s $(du -sb $CACHEDIR/sdcard/ | cut -f1) -N "rootfs.tgz" | pigz > $DEST/images/$VERSION-rootfs.tgz fi @@ -444,7 +444,7 @@ create_image() rsync -rLtWh --info=progress2,stats1 $CACHEDIR/sdcard/boot $CACHEDIR/mount else # ext4 - rsync -aHWh --info=progress2,stats1 $CACHEDIR/sdcard/boot $CACHEDIR/mount + rsync -aHWXh --info=progress2,stats1 $CACHEDIR/sdcard/boot $CACHEDIR/mount fi # DEBUG: print free space