All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] Tidy up support for compressed fit-dtb.blob.
@ 2019-05-02  0:42 Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs Vagrant Cascadian
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02  0:42 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.

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


Vagrant Cascadian (3):
  Add fit-dtb.blob* to .gitignore to also exclude compressed blobs.
  Clean fit-dtb.blob* to also catch compressed blobs.
  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 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs.
  2019-05-02  0:42 [U-Boot] [PATCH 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
@ 2019-05-02  0:42 ` Vagrant Cascadian
  2019-05-02  9:23   ` Marek Vasut
  2019-05-02  0:42 ` [U-Boot] [PATCH 2/3] Clean fit-dtb.blob* to also catch " Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 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  0:42 UTC (permalink / raw)
  To: u-boot

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

 .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 2/3] Clean fit-dtb.blob* to also catch compressed blobs.
  2019-05-02  0:42 [U-Boot] [PATCH 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs Vagrant Cascadian
@ 2019-05-02  0:42 ` Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian
  2 siblings, 0 replies; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02  0:42 UTC (permalink / raw)
  To: u-boot

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

 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 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds.
  2019-05-02  0:42 [U-Boot] [PATCH 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs Vagrant Cascadian
  2019-05-02  0:42 ` [U-Boot] [PATCH 2/3] Clean fit-dtb.blob* to also catch " Vagrant Cascadian
@ 2019-05-02  0:42 ` Vagrant Cascadian
  2 siblings, 0 replies; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02  0:42 UTC (permalink / raw)
  To: 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

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

 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 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs.
  2019-05-02  0:42 ` [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs Vagrant Cascadian
@ 2019-05-02  9:23   ` Marek Vasut
  2019-05-02 16:44     ` Vagrant Cascadian
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2019-05-02  9:23 UTC (permalink / raw)
  To: u-boot

On 5/2/19 2:42 AM, Vagrant Cascadian wrote:
> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
> ---

Commit message is missing on this and 2/3 patch , otherwise the series
looks good, thanks.

>  .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
> 


-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs.
  2019-05-02  9:23   ` Marek Vasut
@ 2019-05-02 16:44     ` Vagrant Cascadian
  2019-05-02 17:07       ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Vagrant Cascadian @ 2019-05-02 16:44 UTC (permalink / raw)
  To: u-boot

On 2019-05-02, Marek Vasut wrote:
> On 5/2/19 2:42 AM, Vagrant Cascadian wrote:
>> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
>> ---
>
> Commit message is missing on this and 2/3 patch , otherwise the series
> looks good, thanks.

I'm not sure what more to add that isn't already in the subject
line... should I break it up into two lines:

  Add fit-dtb.blob* to .gitignore.

  Also excludes compressed blobs.

?

I guess I could also mention the commit where compressed blobs were
introduced... that would drag it out a bit longer.

Thanks!


live well,
  vagrant


>>  .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
>> 
>
>
> -- 
> Best regards,
> Marek Vasut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190502/84dae146/attachment.sig>

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

* [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs.
  2019-05-02 16:44     ` Vagrant Cascadian
@ 2019-05-02 17:07       ` Marek Vasut
  0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2019-05-02 17:07 UTC (permalink / raw)
  To: u-boot

On 5/2/19 6:44 PM, Vagrant Cascadian wrote:
> On 2019-05-02, Marek Vasut wrote:
>> On 5/2/19 2:42 AM, Vagrant Cascadian wrote:
>>> Signed-off-by: Vagrant Cascadian <vagrant@reproducible-builds.org>
>>> ---
>>
>> Commit message is missing on this and 2/3 patch , otherwise the series
>> looks good, thanks.
> 
> I'm not sure what more to add that isn't already in the subject
> line... should I break it up into two lines:
> 
>   Add fit-dtb.blob* to .gitignore.
> 
>   Also excludes compressed blobs.

I think so ... and that it's the same you applied to the SPL part maybe ?

-- 
Best regards,
Marek Vasut

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

end of thread, other threads:[~2019-05-02 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02  0:42 [U-Boot] [PATCH 0/3] Tidy up support for compressed fit-dtb.blob Vagrant Cascadian
2019-05-02  0:42 ` [U-Boot] [PATCH 1/3] Add fit-dtb.blob* to .gitignore to also exclude compressed blobs Vagrant Cascadian
2019-05-02  9:23   ` Marek Vasut
2019-05-02 16:44     ` Vagrant Cascadian
2019-05-02 17:07       ` Marek Vasut
2019-05-02  0:42 ` [U-Boot] [PATCH 2/3] Clean fit-dtb.blob* to also catch " Vagrant Cascadian
2019-05-02  0:42 ` [U-Boot] [PATCH 3/3] Set time and umask on fit-dtb.blob to ensure reproducibile builds Vagrant Cascadian

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.