diff mbox series

[meta-filesystems,2/2] xfsprogs: support reproducible builds

Message ID 20251118092815.1068882-2-hongxu.jia@windriver.com
State New
Headers show
Series [meta-oe,1/2] php: remove php-phar to support reproducible build | expand

Commit Message

Hongxu Jia Nov. 18, 2025, 9:28 a.m. UTC
When compressing docs, do not save the original file name and
timestamp by default (gzip -n). Make archives be reproducible
at each build

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta-filesystems/conf/layer.conf              |  1 -
 ...-doc-man-support-reproducible-builds.patch | 54 +++++++++++++++++++
 .../recipes-utils/xfsprogs/xfsprogs_6.6.0.bb  |  1 +
 3 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 meta-filesystems/recipes-utils/xfsprogs/files/0001-doc-man-support-reproducible-builds.patch
diff mbox series

Patch

diff --git a/meta-filesystems/conf/layer.conf b/meta-filesystems/conf/layer.conf
index 4d147b7139..f3525365e7 100644
--- a/meta-filesystems/conf/layer.conf
+++ b/meta-filesystems/conf/layer.conf
@@ -25,5 +25,4 @@  BBFILES_DYNAMIC += " \
 # Please keep this list sorted
 OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES += " \
     e2tools-ptest \
-    xfsprogs-doc \
 "
diff --git a/meta-filesystems/recipes-utils/xfsprogs/files/0001-doc-man-support-reproducible-builds.patch b/meta-filesystems/recipes-utils/xfsprogs/files/0001-doc-man-support-reproducible-builds.patch
new file mode 100644
index 0000000000..182d45e4e2
--- /dev/null
+++ b/meta-filesystems/recipes-utils/xfsprogs/files/0001-doc-man-support-reproducible-builds.patch
@@ -0,0 +1,54 @@ 
+From c98d9022377e88f8cc2d557a4ffd321e6f2dd320 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@eng.windriver.com>
+Date: Tue, 18 Nov 2025 01:04:27 -0800
+Subject: [PATCH] doc/man: support reproducible builds
+
+When compressing, do not save the original file name and
+timestamp by default (gzip -n). Make archives be reproducible
+at each build
+
+Upstream-Status: Submitted [linux-xfs@vger.kernel.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@eng.windriver.com>
+---
+ doc/Makefile        | 2 +-
+ include/buildmacros | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/Makefile b/doc/Makefile
+index 83dfa38b..17b63c85 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -14,7 +14,7 @@ include $(BUILDRULES)
+ 
+ CHANGES.gz:
+ 	@echo "    [ZIP]    $@"
+-	$(Q)$(ZIP) --best -c < CHANGES > $@
++	$(Q)$(ZIP) -n --best -c < CHANGES > $@
+ 
+ install: default
+ 	$(INSTALL) -m 755 -d $(PKG_DOC_DIR)
+diff --git a/include/buildmacros b/include/buildmacros
+index 9183e5bc..6ba0d515 100644
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -105,7 +105,7 @@ INSTALL_MAN = \
+ 			t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
+ 			if $$first; then \
+ 				if $(HAVE_ZIPPED_MANPAGES); then \
+-					$(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
++					$(ZIP) -n -9 -c $$d > $$d.gz; _sfx=.gz; \
+ 				fi; \
+ 				u=$$m.$(MAN_SECTION)$$_sfx; \
+ 				echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
+@@ -132,6 +132,6 @@ endif
+ MAN_MAKERULE = \
+ 	@for f in *.[12345678] ""; do \
+ 		if test ! -z "$$f"; then \
+-			$(ZIP) --best -c < $$f > $$f.gz; \
++			$(ZIP) -n --best -c < $$f > $$f.gz; \
+ 		fi; \
+ 	done
+-- 
+2.49.0
+
diff --git a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_6.6.0.bb b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_6.6.0.bb
index 907b875718..80bce6f939 100644
--- a/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_6.6.0.bb
+++ b/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_6.6.0.bb
@@ -12,6 +12,7 @@  SRC_URI = "https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/${BP}.tar.xz \
            file://0001-support-usrmerge.patch \
            file://0004-configure-Use-AC_SYS_LARGERFILE-autoconf-macro.patch \
            file://0005-Replace-off64_t-stat64-with-off_t-stat.patch \
+           file://0001-doc-man-support-reproducible-builds.patch \
            "
 SRC_URI[sha256sum] = "50ca2f4676df8fab4cb4c3ef3dd512d5551e6844d40a65a31d5b8e03593d22df"
 inherit autotools-brokensep pkgconfig