Skip to contentSkip to conversation

fs/common.mk: do not store original names and timestamps when creating GZIP rootfs

PATCH New Atharva Lele 3 participants 5 messages Jul 16, 2019 – Aug 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 fs/common.mk: do not store original names and timestamps when creating GZIP rootfs

We don't use the GZIP environment variable to store GZIP options anymore. So explicitly add -n argument to the GZIP call to ensure reproducibility.

---
Changes v1 -> v2:
- Reversed order of patches

---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/common.mk +1 -1
index fceb38c5b9..ca46a331d6 100644
@@ -115,7 +115,7 @@ ROOTFS_$(2)_FINAL_RECURSIVE_DEPENDENCIES = $$(sort \
 
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y)
 ROOTFS_$(2)_COMPRESS_EXT = .gz
-ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c
+ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c -n
 endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y)
 ROOTFS_$(2)_COMPRESS_EXT = .bz2
Signature · 1 line
2.22.0
#1 lore raw

PATCH v2 2/2 Makefile: don't export GZIP environment variable

We export GZIP = -n so that GZIP does not record original name and timestamps. However..

GZIP environment variable is deprecated and soon will not be supported in future GZIP versions. GZIP suggests the use of a wrapper to pass options globally but it might be difficult to implement in Buildroot. For now, we don't export the variable and fix reproducibility issues per package as they show up in Autobuilder.

---
Changes v1 -> v2:
- Reversed order of patches

---
 Makefile | 1 -
 1 file changed, 1 deletion(-)
Makefile +0 -1
index c98a0ed87e..9cce934990 100644
@@ -248,7 +248,6 @@ ifeq ($(BR2_REPRODUCIBLE),y)
 export TZ = UTC
 export LANG = C
 export LC_ALL = C
-export GZIP = -n
 endif
 
 # To put more focus on warnings, be less verbose as default
Signature · 1 line
2.22.0
#2 lore raw

PATCH v2 2/2 Makefile: don't export GZIP environment variable

Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Atharva" == Atharva Lele <[email protected]> writes:

We export GZIP = -n so that GZIP does not record original name and timestamps. However..

GZIP environment variable is deprecated and soon will not be supported in future GZIP versions. GZIP suggests the use of a wrapper to pass options globally but it might be difficult to implement in Buildroot. For now, we don't export the variable and fix reproducibility issues per package as they show up in Autobuilder.

Quoted 5 lines

---
Changes v1 -> v2:
- Reversed order of patches

Committed to 2019.02.x and 2019.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 1/2 fs/common.mk: do not store original names and timestamps when creating GZIP rootfs

In reply to Atharva Lele

Hello Atharva,

Quoted 4 lines · On Tue, 16 Jul 2019 23:12:13 +0530 Atharva Lele <[email protected]> wrote:

We don't use the GZIP environment variable to store GZIP options anymore. So explicitly add -n argument to the GZIP call to ensure reproducibility.

Quoted 8 lines

---
Changes v1 -> v2:
- Reversed order of patches

---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Both applied, thanks! I had to reword a little bit the commit log of PATCH 1/2, because the wording was no longer really appropriate after you swapped the order of the two patches.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH v2 1/2 fs/common.mk: do not store original names and timestamps when creating GZIP rootfs

In reply to Atharva Lele
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Atharva" == Atharva Lele <[email protected]> writes:

We don't use the GZIP environment variable to store GZIP options anymore. So explicitly add -n argument to the GZIP call to ensure reproducibility.

Committed to 2019.02.x and 2019.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard