fs: introduce a macro for reproducible command
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
98d1e7f928
commit
31fd0b1cac
10
fs/common.mk
10
fs/common.mk
@ -34,6 +34,12 @@ ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
|
||||
USERS_TABLE = $(FS_DIR)/users_table.txt
|
||||
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
|
||||
|
||||
ifeq ($(BR2_REPRODUCIBLE),y)
|
||||
define ROOTFS_REPRODUCIBLE
|
||||
find $(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$(SOURCE_DATE_EPOCH)
|
||||
endef
|
||||
endif
|
||||
|
||||
ROOTFS_COMMON_TAR = $(FS_DIR)/rootfs.common.tar
|
||||
|
||||
.PHONY: rootfs-common
|
||||
@ -119,9 +125,7 @@ endif
|
||||
echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
|
||||
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
ifeq ($$(BR2_REPRODUCIBLE),y)
|
||||
echo "find $$(TARGET_DIR) -print0 | xargs -0 -r touch -hd @$$(SOURCE_DATE_EPOCH)" >> $$(FAKEROOT_SCRIPT)
|
||||
endif
|
||||
$$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT)
|
||||
$$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT)
|
||||
$$(foreach hook,$$(ROOTFS_POST_CMD_HOOKS),\
|
||||
$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
|
||||
|
Loading…
Reference in New Issue
Block a user