Message ID | 20190716173518.11081-2-itsatharva@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2,1/2] package/cpio: add host version | expand |
Hello, On Tue, 16 Jul 2019 23:05:18 +0530 Atharva Lele <itsatharva@gmail.com> wrote: > +# --repoducible option was not introduced until cpio v2.12. Some distros The kind of double negation here "was not introduced until" looked a bit complicated compared to just "--reproducible was introduced in cpio v2.12". I've simplified the paragraph to: +# --repoducible option was introduced in cpio v2.12, which may not be +# available in some old distributions, so we build host-cpio And of course now I notice that --repoducible has a typo, and should be --reproducible. Oh well. > +# like Ubuntu 16.04 or Debian oldstable which package v2.11. Hence build > +# host-cpio. > +ifeq ($(BR2_REPRODUCIBLE), y) No space after comma. I fixed that up. Applied with those changes. Thanks! Thomas
diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk index 1f0cafe62f..275064d9cb 100644 --- a/fs/cpio/cpio.mk +++ b/fs/cpio/cpio.mk @@ -29,8 +29,16 @@ endif # BR2_ROOTFS_DEVICE_CREATION_STATIC ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT +# --repoducible option was not introduced until cpio v2.12. Some distros +# like Ubuntu 16.04 or Debian oldstable which package v2.11. Hence build +# host-cpio. +ifeq ($(BR2_REPRODUCIBLE), y) +ROOTFS_CPIO_DEPENDENCIES += host-cpio +ROOTFS_CPIO_OPTS += --reproducible +endif + define ROOTFS_CPIO_CMD - cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@ + cd $(TARGET_DIR) && find . | cpio $(ROOTFS_CPIO_OPTS) --quiet -o -H newc > $@ endef ifeq ($(BR2_TARGET_ROOTFS_CPIO_UIMAGE),y)