]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
Config: Reorganise the arguments for COPY_FILES
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jul 2024 17:16:48 +0000 (17:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Jul 2024 15:21:20 +0000 (15:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/Config
lfs/cdrom
lfs/core-updates
lfs/flash-images

index eead89b5cae813a34c26ca53b10a3f6a4a2f4bb4..279fbe9023eeeface409424eec8fb960505a5218 100644 (file)
@@ -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 *
 
index 724ead9ef7ee7fa84e2a9f898993dc552e29cbfd..c41d7d5837b2d9cf839e5e651294e912f565a545 100644 (file)
--- 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)
index 6b56f0cfffd6b5f75e6eb9b3a467063aee9bfb27..9aeada6e824b83a88ad8e74106ed21baac460315 100644 (file)
@@ -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)
index 5623f2e3c5c689b7dd0cda2ac51a0499f25d4ff8..c54489bcee371feed58465f981bbbb5ddc467f5a 100644 (file)
@@ -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))