Message ID | 20231207094757.1089092-1-jean-marc.bouche@foss.st.com |
---|---|
State | Superseded |
Headers | show |
Series | [meta-oe] terminus-font: build compressed archives with -n | expand |
Hi Jean-Marc Thanks for your patch. Please Add a patch header describing what it does with SOB and Upstream-Status: added to it. On Thu, Dec 7, 2023 at 1:48 AM Jean-Marc BOUCHE <jean-marc.bouche@foss.st.com> wrote: > > 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> > --- > .../use-no-name-option-for-gzip.patch | 52 +++++++++++++++++++ > .../terminus-font/terminus-font_4.49.1.bb | 4 +- > 2 files changed, 55 insertions(+), 1 deletion(-) > create mode 100644 meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch > > 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 000000000..cb1fbcfaf > --- /dev/null > +++ b/meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch > @@ -0,0 +1,52 @@ > +Index: terminus-font-4.49.1/Makefile > +=================================================================== > +--- terminus-font-4.49.1.orig/Makefile > ++++ terminus-font-4.49.1/Makefile > +@@ -92,9 +92,9 @@ otbdir = $(prefix)/share/fonts/terminus > + > + install: $(PSF) $(PCF) > + mkdir -p $(DESTDIR)$(psfdir) > +- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > ++ for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > + mkdir -p $(DESTDIR)$(x11dir) > +- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > ++ for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > + > + uninstall: > + for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done > +@@ -193,7 +193,7 @@ psf: $(PSF) > + > + install-psf: $(PSF) > + mkdir -p $(DESTDIR)$(psfdir) > +- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > ++ for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > + > + uninstall-psf: > + for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done > +@@ -202,7 +202,7 @@ psf-vgaw: $(PSF_VGAW) > + > + install-psf-vgaw: $(PSF_VGAW) > + mkdir -p $(DESTDIR)$(psfdir) > +- for i in $(PSF_VGAW) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > ++ for i in $(PSF_VGAW) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done > + > + uninstall-psf-vgaw: > + for i in $(PSF_VGAW) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done > +@@ -279,7 +279,7 @@ pcf: $(PCF) > + > + install-pcf: $(PCF) > + mkdir -p $(DESTDIR)$(x11dir) > +- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > ++ for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > + > + uninstall-pcf: > + for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done > +@@ -288,7 +288,7 @@ pcf-8bit: $(PCF_8BIT) > + > + install-pcf-8bit: $(PCF_8BIT) > + mkdir -p $(DESTDIR)$(x11dir) > +- for i in $(PCF_8BIT) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > ++ for i in $(PCF_8BIT) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done > + > + uninstall-pcf-8bit: > + 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 65cafab9e..1fabe2e29 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" > > DEPENDS = "hostperl-runtime-native gzip-native bdftopcf-native" > > -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" > +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ > + file://use-no-name-option-for-gzip.patch \ > + " > SRC_URI[md5sum] = "1b6acbd221957e33c8a792ebfaf3a659" > SRC_URI[sha256sum] = "d961c1b781627bf417f9b340693d64fc219e0113ad3a3af1a3424c7aa373ef79" > > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#107276): https://lists.openembedded.org/g/openembedded-devel/message/107276 > Mute This Topic: https://lists.openembedded.org/mt/103031382/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
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 000000000..cb1fbcfaf --- /dev/null +++ b/meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch @@ -0,0 +1,52 @@ +Index: terminus-font-4.49.1/Makefile +=================================================================== +--- terminus-font-4.49.1.orig/Makefile ++++ terminus-font-4.49.1/Makefile +@@ -92,9 +92,9 @@ otbdir = $(prefix)/share/fonts/terminus + + install: $(PSF) $(PCF) + mkdir -p $(DESTDIR)$(psfdir) +- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done ++ for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done + mkdir -p $(DESTDIR)$(x11dir) +- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done ++ for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done + + uninstall: + for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done +@@ -193,7 +193,7 @@ psf: $(PSF) + + install-psf: $(PSF) + mkdir -p $(DESTDIR)$(psfdir) +- for i in $(PSF) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done ++ for i in $(PSF) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done + + uninstall-psf: + for i in $(PSF) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done +@@ -202,7 +202,7 @@ psf-vgaw: $(PSF_VGAW) + + install-psf-vgaw: $(PSF_VGAW) + mkdir -p $(DESTDIR)$(psfdir) +- for i in $(PSF_VGAW) ; do gzip -c $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done ++ for i in $(PSF_VGAW) ; do gzip -c -n $$i > $(DESTDIR)$(psfdir)/$$i.gz ; done + + uninstall-psf-vgaw: + for i in $(PSF_VGAW) ; do rm -f $(DESTDIR)$(psfdir)/$$i.gz ; done +@@ -279,7 +279,7 @@ pcf: $(PCF) + + install-pcf: $(PCF) + mkdir -p $(DESTDIR)$(x11dir) +- for i in $(PCF) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done ++ for i in $(PCF) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done + + uninstall-pcf: + for i in $(PCF) ; do rm -f $(DESTDIR)$(x11dir)/$$i.gz ; done +@@ -288,7 +288,7 @@ pcf-8bit: $(PCF_8BIT) + + install-pcf-8bit: $(PCF_8BIT) + mkdir -p $(DESTDIR)$(x11dir) +- for i in $(PCF_8BIT) ; do gzip -c $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done ++ for i in $(PCF_8BIT) ; do gzip -c -n $$i > $(DESTDIR)$(x11dir)/$$i.gz ; done + + uninstall-pcf-8bit: + 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 65cafab9e..1fabe2e29 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" DEPENDS = "hostperl-runtime-native gzip-native bdftopcf-native" -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ + file://use-no-name-option-for-gzip.patch \ + " SRC_URI[md5sum] = "1b6acbd221957e33c8a792ebfaf3a659" SRC_URI[sha256sum] = "d961c1b781627bf417f9b340693d64fc219e0113ad3a3af1a3424c7aa373ef79"
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> --- .../use-no-name-option-for-gzip.patch | 52 +++++++++++++++++++ .../terminus-font/terminus-font_4.49.1.bb | 4 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/terminus-font/terminus-font/use-no-name-option-for-gzip.patch