mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Package extended attributes in distro.img and Core Updates
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
12
lfs/cdrom
12
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user