diff options
| author | Jean-Marc BOUCHE <jean-marc.bouche@foss.st.com> | 2023-12-08 13:58:38 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-12-08 07:57:58 -0800 |
| commit | f60e4bfcbee68ea29c2c630b3fa5f4aedf500d95 (patch) | |
| tree | fa23e328c286c0be54ec6312be3f8b76dad8a577 | |
| parent | 0f9e5d1f9b62af785a65c1d5e6ab3b5d11befbff (diff) | |
| download | meta-openembedded-f60e4bfcbee68ea29c2c630b3fa5f4aedf500d95.tar.gz | |
terminus-font: build compressed archives with -n
When building this recipe, internal archives are compressed with
gzip. The compressed archives contain a header with the field
MTIME (Modification Time) which is initialized from the built
date. As a consequence, two builds of this recipe always generate
packages whose checksum differs.
Adding the -n option to gzip while compressing the archive does
not save the original time stamp by default hence making
reproducible package.
Signed-off-by: Jean-Marc BOUCHE <jean-marc.bouche@foss.st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch | 66 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/terminus-font/terminus-font_4.49.1.bb | 4 |
2 files changed, 69 insertions, 1 deletions
diff --git a/meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch b/meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch new file mode 100644 index 0000000000..97213c07da --- /dev/null +++ b/meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | Build compressed archives with -n | ||
| 2 | |||
| 3 | The compressed archives contain a header with the field MTIME | ||
| 4 | (Modification Time) which is initialized from the built date. | ||
| 5 | As a consequence, two separate builds generate compressed archives | ||
| 6 | whose checksum differs. Such behavior prevents reproducible builds. | ||
| 7 | |||
| 8 | Adding the -n option to gzip while compressing the archive does | ||
| 9 | not save the original time stamp by default hence making | ||
| 10 | reproducible build. | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate | ||
| 13 | |||
| 14 | Signed-off-by: Jean-Marc BOUCHE <jean-marc.bouche@foss.st.com> | ||
| 15 | Index: terminus-font-4.49.1/Makefile | ||
| 16 | =================================================================== | ||
| 17 | --- terminus-font-4.49.1.orig/Makefile | ||
| 18 | +++ terminus-font-4.49.1/Makefile | ||
| 19 | @@ -92,9 +92,9 @@ otbdir = $(prefix)/share/fonts/terminus | ||
| 20 | |||
| 21 | install: $(PSF) $(PCF) | ||
| 22 | mkdir -p $(DESTDIR)$(psfdir) | ||
| 23 | - for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 24 | + for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 25 | mkdir -p $(DESTDIR)$(x11dir) | ||
| 26 | - for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 27 | + for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 28 | |||
| 29 | uninstall: | ||
| 30 | for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 31 | @@ -193,7 +193,7 @@ psf: $(PSF) | ||
| 32 | |||
| 33 | install-psf: $(PSF) | ||
| 34 | mkdir -p $(DESTDIR)$(psfdir) | ||
| 35 | - for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 36 | + for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 37 | |||
| 38 | uninstall-psf: | ||
| 39 | for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 40 | @@ -202,7 +202,7 @@ psf-vgaw: $(PSF_VGAW) | ||
| 41 | |||
| 42 | install-psf-vgaw: $(PSF_VGAW) | ||
| 43 | mkdir -p $(DESTDIR)$(psfdir) | ||
| 44 | - for i in $(PSF_VGAW) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 45 | + for i in $(PSF_VGAW) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 46 | |||
| 47 | uninstall-psf-vgaw: | ||
| 48 | for i in $(PSF_VGAW) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done | ||
| 49 | @@ -279,7 +279,7 @@ pcf: $(PCF) | ||
| 50 | |||
| 51 | install-pcf: $(PCF) | ||
| 52 | mkdir -p $(DESTDIR)$(x11dir) | ||
| 53 | - for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 54 | + for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 55 | |||
| 56 | uninstall-pcf: | ||
| 57 | for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 58 | @@ -288,7 +288,7 @@ pcf-8bit: $(PCF_8BIT) | ||
| 59 | |||
| 60 | install-pcf-8bit: $(PCF_8BIT) | ||
| 61 | mkdir -p $(DESTDIR)$(x11dir) | ||
| 62 | - for i in $(PCF_8BIT) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 63 | + for i in $(PCF_8BIT) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
| 64 | |||
| 65 | uninstall-pcf-8bit: | ||
| 66 | for i in $(PCF_8BIT) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done | ||
diff --git a/meta-oe/recipes-graphics/terminus-font/terminus-font_4.49.1.bb b/meta-oe/recipes-graphics/terminus-font/terminus-font_4.49.1.bb index 65cafab9e8..1fabe2e29e 100644 --- a/meta-oe/recipes-graphics/terminus-font/terminus-font_4.49.1.bb +++ b/meta-oe/recipes-graphics/terminus-font/terminus-font_4.49.1.bb | |||
| @@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://OFL.TXT;md5=f57e6cca943dbc6ef83dc14f1855bdcc" | |||
| 9 | 9 | ||
| 10 | DEPENDS = "hostperl-runtime-native gzip-native bdftopcf-native" | 10 | DEPENDS = "hostperl-runtime-native gzip-native bdftopcf-native" |
| 11 | 11 | ||
| 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" | 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ |
| 13 | file://use-no-name-option-for-gzip.patch \ | ||
| 14 | " | ||
| 13 | SRC_URI[md5sum] = "1b6acbd221957e33c8a792ebfaf3a659" | 15 | SRC_URI[md5sum] = "1b6acbd221957e33c8a792ebfaf3a659" |
| 14 | SRC_URI[sha256sum] = "d961c1b781627bf417f9b340693d64fc219e0113ad3a3af1a3424c7aa373ef79" | 16 | SRC_URI[sha256sum] = "d961c1b781627bf417f9b340693d64fc219e0113ad3a3af1a3424c7aa373ef79" |
| 15 | 17 | ||
