All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/3] Tidy up support for compressed fit-dtb.blob.
@ 2019-05-02 18:14 Vagrant Cascadian
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore Vagrant Cascadian
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02 18:14 UTC (permalink / raw)
  To: u-boot


Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

This introduces reproducibility issues as the timestamp and umask may
be embedded in the output when using gzip, lzop or possibly other
compression tools if added later. The included patch works around this
by setting the date and umask on the file when SOURCE_DATE_EPOCH is
set.

This is essentially the same fix applied to multi-dtb fit SPL images in:

  commit 8664ab7debab ("Set time and umask on multi-dtb fit images to
  ensure reproducibile builds.")

The compressed files were not added to gitignore or the clean targets,
and the other two patches in this series adds them.

Changes in v2:
- Mention commit where compressed fit-dtb.blob were introduced.
- Mention commit where compressed fit-dtb.blob were introduced.
- Add reference to similar fix in multi-dtb fit SPL images
- Mention commit where compressed fit-dtb.blob were introduced.

Vagrant Cascadian (3):
  Add fit-dtb.blob* to .gitignore.
  Remove fit-dtb.blob* in clean target.
  Set time and umask on fit-dtb.blob to ensure reproducibile builds.

 .gitignore | 2 +-
 Makefile   | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore.
  2019-05-02 18:14 [U-Boot] [PATCH v2 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
@ 2019-05-02 18:14 ` Vagrant Cascadian
  2019-05-10 11:12   ` Tom Rini
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target Vagrant Cascadian
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian
  2 siblings, 1 reply; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02 18:14 UTC (permalink / raw)
  To: u-boot

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

Adjust .gitignore to also exclude compressed blobs.

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
---

Changes in v2:
- Mention commit where compressed fit-dtb.blob were introduced.

 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index c2afcfbca2..d8b7b77844 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,7 +35,7 @@
 #
 # Top-level generic files
 #
-fit-dtb.blob
+fit-dtb.blob*
 /MLO*
 /SPL*
 /System.map
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target.
  2019-05-02 18:14 [U-Boot] [PATCH v2 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore Vagrant Cascadian
@ 2019-05-02 18:14 ` Vagrant Cascadian
  2019-05-10 11:12   ` Tom Rini
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian
  2 siblings, 1 reply; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02 18:14 UTC (permalink / raw)
  To: u-boot

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

Adjust Makefile to also clean compressed blobs.

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
---

Changes in v2:
- Mention commit where compressed fit-dtb.blob were introduced.

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d6a6ef19ab..68f2327bea 100644
--- a/Makefile
+++ b/Makefile
@@ -1779,7 +1779,7 @@ CLEAN_DIRS  += $(MODVERDIR) \
 			$(filter-out include, $(shell ls -1 $d 2>/dev/null))))
 
 CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
-	       boot* u-boot* MLO* SPL System.map fit-dtb.blob
+	       boot* u-boot* MLO* SPL System.map fit-dtb.blob*
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl \
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds.
  2019-05-02 18:14 [U-Boot] [PATCH v2 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore Vagrant Cascadian
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target Vagrant Cascadian
@ 2019-05-02 18:14 ` Vagrant Cascadian
  2019-05-10 11:12   ` Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02 18:14 UTC (permalink / raw)
  To: u-boot

Support for compressed fit-dtb.blob was added in:

  commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
  U-Boot")

When building compressed (lzop, gzip) fit-dtb.blob images, the
compression tool may embed the time or umask in the image.

Work around this by manually setting the time of the source file using
SOURCE_DATE_EPOCH and a hard-coded 0600 umask.

With gzip, this could be accomplished by using -n/--no-name, but lzop
has no current workaround:

  https://bugs.debian.org/896520

This is essentially the same fix applied to multi-dtb fit SPL images in:

  commit 8664ab7debab ("Set time and umask on multi-dtb fit images to
  ensure reproducibile builds.")

Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
---

Changes in v2:
- Add reference to similar fix in multi-dtb fit SPL images
- Mention commit where compressed fit-dtb.blob were introduced.

 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 68f2327bea..cff5ea4c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -1047,6 +1047,10 @@ fit-dtb.blob.lzo: fit-dtb.blob
 
 fit-dtb.blob: dts/dt.dtb FORCE
 	$(call if_changed,mkimage)
+ifneq ($(SOURCE_DATE_EPOCH),)
+	touch -d @$(SOURCE_DATE_EPOCH) fit-dtb.blob
+	chmod 0600 fit-dtb.blob
+endif
 
 MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
 	-a 0 -e 0 -E \
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore.
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore Vagrant Cascadian
@ 2019-05-10 11:12   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2019-05-10 11:12 UTC (permalink / raw)
  To: u-boot

On Thu, May 02, 2019 at 11:14:10AM -0700, Vagrant Cascadian wrote:

> Support for compressed fit-dtb.blob was added in:
> 
>   commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
>   U-Boot")
> 
> Adjust .gitignore to also exclude compressed blobs.
> 
> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/d55a8422/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target.
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target Vagrant Cascadian
@ 2019-05-10 11:12   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2019-05-10 11:12 UTC (permalink / raw)
  To: u-boot

On Thu, May 02, 2019 at 11:14:11AM -0700, Vagrant Cascadian wrote:

> Support for compressed fit-dtb.blob was added in:
> 
>   commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
>   U-Boot")
> 
> Adjust Makefile to also clean compressed blobs.
> 
> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/26811ea8/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds.
  2019-05-02 18:14 ` [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian
@ 2019-05-10 11:12   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2019-05-10 11:12 UTC (permalink / raw)
  To: u-boot

On Thu, May 02, 2019 at 11:14:12AM -0700, Vagrant Cascadian wrote:

> Support for compressed fit-dtb.blob was added in:
> 
>   commit 95f4bbd581cf ("lib: fdt: Allow LZO and GZIP DT compression in
>   U-Boot")
> 
> When building compressed (lzop, gzip) fit-dtb.blob images, the
> compression tool may embed the time or umask in the image.
> 
> Work around this by manually setting the time of the source file using
> SOURCE_DATE_EPOCH and a hard-coded 0600 umask.
> 
> With gzip, this could be accomplished by using -n/--no-name, but lzop
> has no current workaround:
> 
>   https://bugs.debian.org/896520
> 
> This is essentially the same fix applied to multi-dtb fit SPL images in:
> 
>   commit 8664ab7debab ("Set time and umask on multi-dtb fit images to
>   ensure reproducibile builds.")
> 
> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190510/ac66698d/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-10 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 18:14 [U-Boot] [PATCH v2 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
2019-05-02 18:14 ` [U-Boot] [PATCH v2 1/3] Add fit-dtb.blob* to .gitignore Vagrant Cascadian
2019-05-10 11:12   ` Tom Rini
2019-05-02 18:14 ` [U-Boot] [PATCH v2 2/3] Remove fit-dtb.blob* in clean target Vagrant Cascadian
2019-05-10 11:12   ` Tom Rini
2019-05-02 18:14 ` [U-Boot] [PATCH v2 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian
2019-05-10 11:12   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.