]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Package extended attributes in distro.img and Core Updates
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Jan 2021 16:53:36 +0000 (16:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 6 Jan 2021 14:45:02 +0000 (14:45 +0000)
System capabilities are stored in extended file system attributes
which are by default not stored in tar balls.

This patch ensures that they are packaged and extracted.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/154/filelists/files
lfs/Config
lfs/cdrom
lfs/core-updates
lfs/flash-images
src/installer/main.c
src/pakfire/lib/functions.sh

index 1861bb92554d9914832866f04d3cffea1d82e0ca..dff15547b895f1c4bc8c51b4564cb2d19ce0ca32 100644 (file)
@@ -1,6 +1,7 @@
 etc/system-release
 etc/issue
 etc/os-release
+opt/pakfire/lib/functions.sh
 srv/web/ipfire/cgi-bin/country.cgi
 srv/web/ipfire/cgi-bin/credits.cgi
 srv/web/ipfire/cgi-bin/dhcp.cgi
index b16da91bdb4080c7a742b5a39ff64c79f29bd53c..524ba35c0d3b21ae35d099ca76abffc25fe5cced 100644 (file)
@@ -70,7 +70,10 @@ else
        PREFIX = /usr
 endif
 
-TAR_OPTIONS = --xz
+TAR_OPTIONS = \
+       --format=pax \
+       --acls \
+       --xattrs --xattrs-include='*'
 
 # URLs that are common sources of downloads.  If you're having trouble with
 # a site you should change its URL to that of a suitable mirror site.
index f18b80a033dc57bf13c9350789e100aa032ecf52..a764416d03afb28bac70de38e71dbd0cc5827f43 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -32,12 +32,6 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 # Fail when there is an error in the tar pipe
 SHELL=/bin/bash -o pipefail
 
-ifeq "$(BUILD_PLATFORM)" "arm"
-       TAR_OPTIONS =
-else
-       TAR_OPTIONS = --lzma
-endif
-
 HAS_MEMTEST = 0
 HAS_IPXE = 0
 HAS_ISOLINUX = 0
@@ -166,12 +160,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Compress root filesystem
        # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
        rm -rf $(DIR_TMP)/root && mkdir -p $(DIR_TMP)/root
-       tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/*' \
+       tar $(TAR_OPTIONS) -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/*' \
                --exclude='__pycache__' \
-               -C / --files-from=$(DIR_TMP)/ROOTFILES | tar -x -C $(DIR_TMP)/root
+               -C / --files-from=$(DIR_TMP)/ROOTFILES | tar $(TAR_OPTIONS) -x -C $(DIR_TMP)/root
        rm -f $(DIR_TMP)/ROOTFILES
        mkdir $(DIR_TMP)/root/sys
-       cd $(DIR_TMP)/root && tar cf - * | xz $(XZ_OPT) > $(DIR_TMP)/cdrom/distro.img
+       cd $(DIR_TMP)/root && tar $(TAR_OPTIONS) -cf - * | xz $(XZ_OPT) > $(DIR_TMP)/cdrom/distro.img
        rm -rf $(DIR_TMP)/root
 
        # Other files
index e0dfa69f4a1f0b4e0a4009c4015c195c684705a4..fa8b36d5016227a498fb46ee5303130c9fd48b45 100644 (file)
@@ -28,7 +28,6 @@ VER = ipfire
 
 THISAPP     = core-updates
 TARGET      = $(DIR_INFO)/$(THISAPP)
-TAR_OPTIONS = --xz
 
 ###############################################################################
 # Top-level Rules
@@ -72,13 +71,13 @@ core/%:
        sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
 
        #Remove doubled files with tar/untar/tar to save space
-       tar -c --exclude='proc/*' --exclude='tmp/ROOTFILES' --exclude='__pycache__' --exclude='#*' --exclude='dev/pts/*' \
+       tar $(TAR_OPTIONS) -c --exclude='proc/*' --exclude='tmp/ROOTFILES' --exclude='__pycache__' --exclude='#*' --exclude='dev/pts/*' \
                --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude \
                -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar
        mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES
-       tar -p --numeric-owner -x  -C /tmp -f /$(SNAME).tar
+       tar $(TAR_OPTIONS) -p --numeric-owner -x  -C /tmp -f /$(SNAME).tar
        rm -f /$(SNAME).tar
-       cd /tmp && XZ_OPT="$(XZ_OPT)" tar cJf /install/packages/package/files.tar.xz $(TAR_OPTIONS) * && rm -rf *
+       cd /tmp && XZ_OPT="$(XZ_OPT)" tar $(TAR_OPTIONS) -cJf /install/packages/package/files.tar.xz $(TAR_OPTIONS) * && rm -rf *
        cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
        rm /install/packages/package/ROOTFILES
        mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
index 5f39c488f610e25fdaa8ccd17952260e19ad0225..9fd9250553a5b848b0c693ad2c79fc67a1d5971c 100644 (file)
@@ -152,9 +152,9 @@ endif
 
        # Install IPFire
 ifneq "$(BUILD_PLATFORM)" "arm"
-       tar -x --xz -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
+       tar $(TAR_OPTIONS) -x --xz -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
 else
-       tar -x -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
+       tar $(TAR_OPTIONS) -x -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img
 endif
        -touch $(MNThdd)/lib/modules/$(KVER)-ipfire/modules.dep
        mkdir $(MNThdd)/proc
index 3eff481b05bb785c52fa7ede45b2cf9ae3a76cc4..00d1728882345f79ffba333cce4e209f3e6a2316 100644 (file)
@@ -781,7 +781,7 @@ int main(int argc, char *argv[]) {
 
        // Extract files...
        snprintf(commandstring, STRING_SIZE,
-               "/bin/tar -C /harddisk -xvf /cdrom/distro.img --xz 2>/dev/null");
+               "/bin/tar --acls --xattrs --xattrs-include='*' -C /harddisk -xvf /cdrom/distro.img --xz 2>/dev/null");
 
        if (runcommandwithprogress(60, 4, title, commandstring, INST_FILECOUNT,
                        _("Installing the system..."), logfile)) {
index 375169760ece68f4481ece3e2032ee987907e60d..5918649db0bde8a63d262b39a233a1ed36ccdf95 100644 (file)
@@ -24,7 +24,8 @@
 
 extract_files() {
        echo "Extracting files..."
-       tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
+       tar --acls --xattrs --xattrs-include='*' \
+               -xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
        echo "...Finished."
 }