From 4321ce986a85f588125cc960687da1ad908841b7 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 10 Jul 2024 17:16:48 +0000 Subject: [PATCH] Config: Reorganise the arguments for COPY_FILES Signed-off-by: Michael Tremer --- lfs/Config | 18 ++++++------------ lfs/cdrom | 2 +- lfs/core-updates | 5 +---- lfs/flash-images | 2 +- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/lfs/Config b/lfs/Config index eead89b5c..279fbe902 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 724ead9ef..c41d7d583 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 6b56f0cff..9aeada6e8 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 5623f2e3c..c54489bce 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)) -- 2.39.5