Эх сурвалжийг харах

mkrootfs,mkplatformfs: preserve xattrs when compressing/extracting

things like capabilities were not being preserved

fixes #299
classabbyamp 2 жил өмнө
parent
commit
c820517fbc
2 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 2 2
      mkplatformfs.sh.in
  2. 1 1
      mkrootfs.sh.in

+ 2 - 2
mkplatformfs.sh.in

@@ -151,7 +151,7 @@ if [ ! -e "$BASE_TARBALL" ]; then
 fi
 
 info_msg "Expanding base tarball $BASE_TARBALL into $ROOTFS for $PLATFORM build."
-tar xf "$BASE_TARBALL" -C "$ROOTFS"
+tar xf "$BASE_TARBALL" --xattrs --xattrs-include='*' -C "$ROOTFS"
 
 # This will install, but not configure, the packages specified by
 # $PKGS.  After this step we will do an xbps-reconfigure -f $PKGS
@@ -223,7 +223,7 @@ if [ "$COMPRESSION" = "y" ]; then
     # Finally we can compress the tarball, the name will include the
     # platform and the date on which the tarball was built.
     tarball=${FILENAME:-void-${PLATFORM}-PLATFORMFS-$(date -u '+%Y%m%d').tar.xz}
-    run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
+    run_cmd "tar cp --posix --xattrs --xattrs-include='*' -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
     [ $? -ne 0 ] && die "Failed to compress tarball"
 
     # Now that we have the tarball we don't need the rootfs anymore, so we

+ 1 - 1
mkrootfs.sh.in

@@ -211,7 +211,7 @@ rm -rf "$ROOTFS/var/cache/*" 2>/dev/null
 # Finally we can compress the tarball, the name will include the
 # architecture and the date on which the tarball was built.
 : "${FILENAME:=void-${XBPS_TARGET_ARCH}-ROOTFS-$(date -u '+%Y%m%d').tar.xz}"
-run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $FILENAME "
+run_cmd "tar cp --posix --xattrs --xattrs-include='*' -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $FILENAME "
 
 # Now that we have the tarball we don't need the rootfs anymore, so we
 # can get rid of it.