perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
PATCH 1/1 perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
This allows man pages to be built reproducibly.
---
tools/perf/Documentation/Makefile +3 -0
@@ -120,6 +120,9 @@ endif ifdef DOCBOOK_SUPPRESS_SP XMLTO_EXTRA += -m manpage-suppress-sp.xsl endif +ifdef KBUILD_BUILD_TIMESTAMP +ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) +endif SHELL_PATH ?= $(SHELL) # Shell quote;
tools/perf/Documentation/asciidoc.conf +3 -0
@@ -71,6 +71,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] <refentry> +<refentryinfo> +template::[docinfo] +</refentryinfo> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum>
Hi Peter, Ingo, Arnaldo,
Quoted 19 lines · Ben Hutchings
This allows man pages to be built reproducibly.
Signed-off-by Ben Hutchings <[email protected]>---
tools/perf/Documentation/Makefile +3
-0@@ -120,6 +120,9 @@ endif ifdef DOCBOOK_SUPPRESS_SP XMLTO_EXTRA += -m manpage-suppress-sp.xsl endif +ifdef KBUILD_BUILD_TIMESTAMP +ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) +endif SHELL_PATH ?= $(SHELL) # Shell quote;
tools/perf/Documentation/asciidoc.conf ifdef::backend-docbook[] · line 79
Quoted 9 lines
tools/perf/Documentation/asciidoc.conf +3
-0@@ -71,6 +71,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] <refentry> +<refentryinfo> +template::[docinfo] +</refentryinfo> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum>
As we do apply the change in Downstream in Debian, I was wondering if it just felt trough the cracks and could still be applied. Is there anything missing?
Regards,
Salvatore
Arnaldo Carvalho de Melo
maintainerEm Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
Quoted 27 lines
Hi Peter, Ingo, Arnaldo,
Quoted 24 lines · Ben Hutchings
This allows man pages to be built reproducibly.
Signed-off-by Ben Hutchings <[email protected]>---
tools/perf/Documentation/Makefile +3
-0@@ -120,6 +120,9 @@ endif ifdef DOCBOOK_SUPPRESS_SP XMLTO_EXTRA += -m manpage-suppress-sp.xsl endif +ifdef KBUILD_BUILD_TIMESTAMP +ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) +endif SHELL_PATH ?= $(SHELL) # Shell quote;tools/perf/Documentation/asciidoc.conf +2
-0@@ -71,6 +71,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] <refentry> +<refentryinfo> +template::[docinfo]
Quoted 8 lines
tools/perf/Documentation/asciidoc.conf ifdef::backend-docbook[] · line 79
Quoted 4 lines
tools/perf/Documentation/asciidoc.conf +1
-0+</refentryinfo> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum>As we do apply the change in Downstream in Debian, I was wondering if it just felt trough the cracks and could still be applied. Is there anything missing?
Isn't this fixed in:
commit d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0d
Author: Ian Rogers <[email protected]> Date: Fri Sep 20 21:13:27 2019 -0700
perf docs: Allow man page date to be specified
With this change if a perf_date parameter is provided to asciidoc then it will override the default date written to the man page metadata.
Without this change, or if the perf_date isn't specified, then the current date is written to the metadata.
Having this parameter allows the metadata to be constant if builds happen on different dates.
The name of the parameter is intended to be consistent with the existing perf_version parameter.
Quoted 39 lines · Arnaldo Carvalho de Melo
Em Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
Quoted 27 lines
Hi Peter, Ingo, Arnaldo,
Quoted 24 lines · Ben Hutchings
This allows man pages to be built reproducibly.
Signed-off-by Ben Hutchings <[email protected]>---
tools/perf/Documentation/Makefile +3
-0@@ -120,6 +120,9 @@ endif ifdef DOCBOOK_SUPPRESS_SP XMLTO_EXTRA += -m manpage-suppress-sp.xsl endif +ifdef KBUILD_BUILD_TIMESTAMP +ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) +endif SHELL_PATH ?= $(SHELL) # Shell quote;tools/perf/Documentation/asciidoc.conf +2
-0@@ -71,6 +71,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] <refentry> +<refentryinfo> +template::[docinfo]Quoted 8 lines
tools/perf/Documentation/asciidoc.conf ifdef::backend-docbook[] · line 79
Quoted 4 lines
tools/perf/Documentation/asciidoc.conf +1
-0+</refentryinfo> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum>As we do apply the change in Downstream in Debian, I was wondering if it just felt trough the cracks and could still be applied. Is there anything missing?
Isn't this fixed in:
Quoted 8 lines
commit
d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0dAuthor: Ian Rogers <[email protected]> Date: Fri Sep 20 21:13:27 2019 -0700perf docs: Allow man page date to be specified
With this change if a
perf_dateparameter is provided to asciidoc then it will override the default date written to the man page metadata.
[...]
Not entirely, because the value for perf_date is currently generated with "git log", and Debian package builds are not done from a Git checkout. I'll revise my patch to allow perf_date to be set from KBUILD_BUILD_TIMESTAMP, which is already used in the kernel build.
Ben.
Signature · 2 lines
Ben Hutchings Life would be so much easier if we could look at the source code.
Quoted 46 lines · Ben Hutchings
Quoted 45 lines · Arnaldo Carvalho de Melo
Em Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
Quoted 27 lines
Hi Peter, Ingo, Arnaldo,
Quoted 24 lines · Ben Hutchings
This allows man pages to be built reproducibly.
Signed-off-by Ben Hutchings <[email protected]>---
tools/perf/Documentation/Makefile +3
-0@@ -120,6 +120,9 @@ endif ifdef DOCBOOK_SUPPRESS_SP XMLTO_EXTRA += -m manpage-suppress-sp.xsl endif +ifdef KBUILD_BUILD_TIMESTAMP +ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d) +endif SHELL_PATH ?= $(SHELL) # Shell quote;tools/perf/Documentation/asciidoc.conf +2
-0@@ -71,6 +71,9 @@ ifdef::backend-docbook[] [header] template::[header-declarations] <refentry> +<refentryinfo> +template::[docinfo]Quoted 8 lines
tools/perf/Documentation/asciidoc.conf ifdef::backend-docbook[] · line 79
Quoted 4 lines
tools/perf/Documentation/asciidoc.conf +1
-0+</refentryinfo> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum>As we do apply the change in Downstream in Debian, I was wondering if it just felt trough the cracks and could still be applied. Is there anything missing?
Isn't this fixed in:
commit
d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0dAuthor: Ian Rogers <[email protected]> Date: Fri Sep 20 21:13:27 2019 -0700perf docs: Allow man page date to be specified
Quoted 7 lines
Quoted 2 lines
With this change if a
perf_dateparameter is provided to asciidoc then it will override the default date written to the man page metadata.[...]
Not entirely, because the value for
perf_dateis currently generated with "git log", and Debian package builds are not done from a Git checkout.
Also, that only affects doc builds using the original asciidoc, not asciidoctor.
By the way, the perf_version variable mentioned in that commit is now always empty because PERF_VERSION is no longer defined in Makefiles. But at least when using asciidoctor, the value of perf_version doesn't seem to affect the output anyway.
Ben.
Quoted 5 lines
I'll revise my patch to allow
perf_dateto be set fromKBUILD_BUILD_TIMESTAMP, which is already used in the kernel build.Ben.
Signature · 2 lines
Ben Hutchings Life would be so much easier if we could look at the source code.