xfsprogs: support reproducible builds

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>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Hongxu Jia 2025-11-18 17:28:15 +08:00 committed by Khem Raj
parent 6d835df920
commit 0609698907
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 55 additions and 1 deletions

View File

@ -25,5 +25,4 @@ BBFILES_DYNAMIC += " \
# Please keep this list sorted
OEQA_REPRODUCIBLE_EXCLUDED_PACKAGES += " \
e2tools-ptest \
xfsprogs-doc \
"

View File

@ -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

View File

@ -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