Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] fs/erofs: enable support for reproducible build
@ 2023-01-16  8:33 Casey Reeves
  2023-01-16 20:55 ` Yann E. MORIN
  2023-01-17  9:26 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Casey Reeves @ 2023-01-16  8:33 UTC (permalink / raw)
  To: buildroot; +Cc: Casey Reeves

When BR2_REPRODUCIBLE is selected, this sets the filesystem timestamps
to $SOURCE_DATE_EPOCH.

It also sets the filesystem UUID to the nil uuid, to ensure a random one
isn't picked during generation.

Signed-off-by: Casey Reeves <casey@xogium.me>
---
 fs/erofs/erofs.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/erofs/erofs.mk b/fs/erofs/erofs.mk
index 0e9d4401a9..5567cd43ef 100644
--- a/fs/erofs/erofs.mk
+++ b/fs/erofs/erofs.mk
@@ -10,6 +10,11 @@ ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZ4HC),y)
 ROOTFS_EROFS_ARGS += -zlz4hc
 endif
 
+ifeq ($(BR2_REPRODUCIBLE),y)
+ROOTFS_EROFS_ARGS += -T $(SOURCE_DATE_EPOCH)
+ROOTFS_EROFS_ARGS += -U 00000000-0000-0000-0000-000000000000
+endif
+
 ifneq ($(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE),0)
 ROOTFS_EROFS_ARGS += -C$(strip $(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE))
 endif
-- 
2.39.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] fs/erofs: enable support for reproducible build
  2023-01-16  8:33 [Buildroot] [PATCH] fs/erofs: enable support for reproducible build Casey Reeves
@ 2023-01-16 20:55 ` Yann E. MORIN
  2023-01-17  9:26 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-01-16 20:55 UTC (permalink / raw)
  To: Casey Reeves; +Cc: buildroot

Casey, All,

On 2023-01-16 09:33 +0100, Casey Reeves spake thusly:
> When BR2_REPRODUCIBLE is selected, this sets the filesystem timestamps
> to $SOURCE_DATE_EPOCH.
> 
> It also sets the filesystem UUID to the nil uuid, to ensure a random one
> isn't picked during generation.
> 
> Signed-off-by: Casey Reeves <casey@xogium.me>

Thank you for this patch. We did a review in private, but I let a minor
nit split through the cracks (probably because of -ECOFFEE), so I fixed
it: I made the two assignments a single one, split on two lines.

I also slightly reworded the commit to start with an explanation of the
issue (mkfs.erofs uses the current date, and random data for the UUID),
followed by the solution to fix it.

Thanks, I know it's been a bit stressing for you to submit a patch, so,
I'll reiterate: no stess! ;-)

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  fs/erofs/erofs.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/fs/erofs/erofs.mk b/fs/erofs/erofs.mk
> index 0e9d4401a9..5567cd43ef 100644
> --- a/fs/erofs/erofs.mk
> +++ b/fs/erofs/erofs.mk
> @@ -10,6 +10,11 @@ ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZ4HC),y)
>  ROOTFS_EROFS_ARGS += -zlz4hc
>  endif
>  
> +ifeq ($(BR2_REPRODUCIBLE),y)
> +ROOTFS_EROFS_ARGS += -T $(SOURCE_DATE_EPOCH)
> +ROOTFS_EROFS_ARGS += -U 00000000-0000-0000-0000-000000000000
> +endif
> +
>  ifneq ($(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE),0)
>  ROOTFS_EROFS_ARGS += -C$(strip $(BR2_TARGET_ROOTFS_EROFS_PCLUSTERSIZE))
>  endif
> -- 
> 2.39.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] fs/erofs: enable support for reproducible build
  2023-01-16  8:33 [Buildroot] [PATCH] fs/erofs: enable support for reproducible build Casey Reeves
  2023-01-16 20:55 ` Yann E. MORIN
@ 2023-01-17  9:26 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-01-17  9:26 UTC (permalink / raw)
  To: Casey Reeves; +Cc: buildroot

>>>>> "Casey" == Casey Reeves <casey@xogium.me> writes:

 > When BR2_REPRODUCIBLE is selected, this sets the filesystem timestamps
 > to $SOURCE_DATE_EPOCH.

 > It also sets the filesystem UUID to the nil uuid, to ensure a random one
 > isn't picked during generation.

 > Signed-off-by: Casey Reeves <casey@xogium.me>

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-01-17  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16  8:33 [Buildroot] [PATCH] fs/erofs: enable support for reproducible build Casey Reeves
2023-01-16 20:55 ` Yann E. MORIN
2023-01-17  9:26 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox