[Buildroot] [PATCH 09/12] reproducibility/fs/cpio: generate archive with host-cpio
Arnout Vandecappelle
arnout at mind.be
Sat Jul 2 11:11:23 UTC 2016
On 14-06-16 17:31, Gilles Chanteperdrix wrote:
> Using the --reproducible option to generate a reproducible archive.
>
> Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
> ---
> fs/cpio/cpio.mk | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
> index e82167e..4da6648 100644
> --- a/fs/cpio/cpio.mk
> +++ b/fs/cpio/cpio.mk
> @@ -27,9 +27,17 @@ endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
>
> ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT
>
> +ifneq ($(BR2_REPRODUCIBLE),y)
> define ROOTFS_CPIO_CMD
> cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@
> endef
> +else
> +ROOTFS_CPIO_DEPENDENCIES += host-cpio
Instead of unconditionally building host-cpio, it would be better to check if
the installed cpio supports --reproducible. Cfr. what we do for tar, in
support/dependencies/check-host-tar.{sh,mk}.
Regards,
Arnout
> +
> +define ROOTFS_CPIO_CMD
> + cd $(TARGET_DIR) && find . | $(CPIO_REPRODUCIBLE) --quiet -o -H newc > $@
> +endef
> +endif
>
> $(BINARIES_DIR)/rootfs.cpio.uboot: $(BINARIES_DIR)/rootfs.cpio host-uboot-tools
> $(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
More information about the buildroot
mailing list