* [PATCH] doc/man: support reproducible builds
@ 2025-11-18 9:21 Hongxu Jia
2025-11-18 16:59 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Hongxu Jia @ 2025-11-18 9:21 UTC (permalink / raw)
To: djwong, linux-xfs, sandeen
From: Hongxu Jia <hongxu.jia@eng.windriver.com>
When compressing, 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@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] doc/man: support reproducible builds
2025-11-18 9:21 [PATCH] doc/man: support reproducible builds Hongxu Jia
@ 2025-11-18 16:59 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2025-11-18 16:59 UTC (permalink / raw)
To: Hongxu Jia; +Cc: linux-xfs, sandeen
On Tue, Nov 18, 2025 at 01:21:13AM -0800, Hongxu Jia wrote:
> From: Hongxu Jia <hongxu.jia@eng.windriver.com>
>
> When compressing, 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@eng.windriver.com>
Seems fine to me.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-18 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 9:21 [PATCH] doc/man: support reproducible builds Hongxu Jia
2025-11-18 16:59 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox