From: Michael Tremer Date: Wed, 10 Jul 2024 17:16:48 +0000 (+0000) Subject: Config: Reorganise the arguments for COPY_FILES X-Git-Tag: v2.29-core188~10^2~259 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c166e83f1daf6448f04e353c3b4b4fb231b70698;p=ipfire-2.x.git Config: Reorganise the arguments for COPY_FILES Signed-off-by: Michael Tremer --- diff --git a/lfs/Config b/lfs/Config index eead89b5ca..279fbe9023 100644 --- a/lfs/Config +++ b/lfs/Config @@ -349,7 +349,7 @@ COLLECT_FILES = \ BUILD_ARCH="$(BUILD_ARCH)" \ BUILDTARGET="$(BUILDTARGET)" \ KVER="$(KVER)" \ - $(DIR_SRC)/src/scripts/archive.files $(BUILD_ARCH) $(1) $(2) + $(DIR_SRC)/src/scripts/archive.files $(BUILD_ARCH) $(1) $(2) | tee $(3) # Takes a filelist from standard input and streams a tarball with all files __FILES_IN = \ @@ -368,20 +368,17 @@ __FILES_OUT = \ tar \ --extract \ $(TAR_OPTIONS) \ - --directory="$(1)" - -__WRITE_ROOTFILE = tee $(1) + --directory=$(1) # Copies all files on a rootfile into the given directory define COPY_FILES - # Copy all files from $(1) to $(2) - $(call COLLECT_FILES,$(1)) | \ - $(if $(3),$(call __WRITE_ROOTFILE,$(3)) |) \ + # Copy all files from $(1) to $(2) ($(3)) + $(call COLLECT_FILES,$(1),$(3),$(4)) | \ $(call __FILES_IN) | \ $(call __FILES_OUT,$(2)) # Strip everything, except a few things - $(DIR_SRC)/src/stripper $(2) \ + $(DIR_SRC)/src/stripper $(4) \ --exclude=/lib/firmware \ --exclude=/usr/lib/go \ --exclude=/usr/lib/vdr \ @@ -466,7 +463,7 @@ define PAK rm -rf $(DIR_TMP_PAK)/root && mkdir -p $(DIR_TMP_PAK)/root # Copy all files - $(call COPY_FILES,$(DIR_TMP_PAK)/ROOTFILES,$(DIR_TMP_PAK)/root) + $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/packages,$(DIR_TMP_PAK)/root,$(PROG),$(DIR_TMP_PAK)/ROOTFILES) # Compress tarball $(call COMPRESS_XZ,$(DIR_TMP_PAK)/root,$(DIR_TMP_PAK)/files.tar.xz) @@ -474,9 +471,6 @@ define PAK # Cleanup temporary files rm -rf $(DIR_TMP_PAK)/root - # Remove any commented lines - sed -i $(DIR_TMP_PAK)/ROOTFILES -e "/^#/d" - # Make package cd $(DIR_TMP_PAK) && tar cf $(PACKAGES_DIR)/$(PROG)-$(VER)-$(PAK_VER).ipfire * diff --git a/lfs/cdrom b/lfs/cdrom index 724ead9ef7..c41d7d5837 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -148,7 +148,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) rm -rf $(DIR_TMP)/root && mkdir -p $(DIR_TMP)/root # Copy all files that we want - $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(DIR_TMP)/root) + $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(DIR_TMP)/root,) # Create mount points $(call CREATE_MOUNTPOINTS,$(DIR_TMP)/root) diff --git a/lfs/core-updates b/lfs/core-updates index 6b56f0cfff..9aeada6e82 100644 --- a/lfs/core-updates +++ b/lfs/core-updates @@ -55,10 +55,7 @@ install: @rm -rf $(ARCHIVE_DIR) && mkdir -pv $(ARCHIVE_DIR) $(ARCHIVE_TMP) # Generate the archive and write out the rootfile - $(call COPY_FILES, \ - $(DIR_SRC)/config/rootfiles/core/$(CORE)/filelists,$(ARCHIVE_TMP), \ - $(ARCHIVE_DIR)/ROOTFILES \ - ) + $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/core/$(CORE)/filelists,$(ARCHIVE_TMP),,$(ARCHIVE_DIR)/ROOTFILES) # Create the archive $(call COMPRESS_XZ,$(ARCHIVE_TMP),$(ARCHIVE_DIR)/files.tar.xz) diff --git a/lfs/flash-images b/lfs/flash-images index 5623f2e3c5..c54489bcee 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -140,7 +140,7 @@ ifeq "$(EFI)" "1" endif # Copy all files - $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(MNThdd)) + $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,,$(MNThdd)) # Create mount points $(call CREATE_MOUNTPOINTS,$(MNThdd))