* [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
@ 2016-05-17 13:28 Ben Hutchings
2023-05-09 19:03 ` Salvatore Bonaccorso
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2016-05-17 13:28 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Alexander Shishkin
Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
This allows man pages to be built reproducibly.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -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;
--- a/tools/perf/Documentation/asciidoc.conf
+++ b/tools/perf/Documentation/asciidoc.conf
@@ -71,6 +71,9 @@ ifdef::backend-docbook[]
[header]
template::[header-declarations]
<refentry>
+<refentryinfo>
+template::[docinfo]
+</refentryinfo>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
2016-05-17 13:28 [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date Ben Hutchings
@ 2023-05-09 19:03 ` Salvatore Bonaccorso
2023-05-10 12:59 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Salvatore Bonaccorso @ 2023-05-09 19:03 UTC (permalink / raw)
To: Ben Hutchings, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo
Cc: Alexander Shishkin, linux-kernel
Hi Peter, Ingo, Arnaldo,
On Tue, May 17, 2016 at 02:28:09PM +0100, Ben Hutchings wrote:
> This allows man pages to be built reproducibly.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> --- a/tools/perf/Documentation/Makefile
> +++ b/tools/perf/Documentation/Makefile
> @@ -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;
> --- a/tools/perf/Documentation/asciidoc.conf
> +++ b/tools/perf/Documentation/asciidoc.conf
> @@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
2023-05-09 19:03 ` Salvatore Bonaccorso
@ 2023-05-10 12:59 ` Arnaldo Carvalho de Melo
2023-05-13 18:51 ` Ben Hutchings
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-05-10 12:59 UTC (permalink / raw)
To: Salvatore Bonaccorso
Cc: Ben Hutchings, Peter Zijlstra, Ingo Molnar, Alexander Shishkin,
linux-kernel
Em Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
> Hi Peter, Ingo, Arnaldo,
>
> On Tue, May 17, 2016 at 02:28:09PM +0100, Ben Hutchings wrote:
> > This allows man pages to be built reproducibly.
> >
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > --- a/tools/perf/Documentation/Makefile
> > +++ b/tools/perf/Documentation/Makefile
> > @@ -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;
> > --- a/tools/perf/Documentation/asciidoc.conf
> > +++ b/tools/perf/Documentation/asciidoc.conf
> > @@ -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?
Isn't this fixed in:
commit d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0d
Author: Ian Rogers <irogers@google.com>
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.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20190921041327.155054-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
2023-05-10 12:59 ` Arnaldo Carvalho de Melo
@ 2023-05-13 18:51 ` Ben Hutchings
2023-05-13 19:33 ` Ben Hutchings
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2023-05-13 18:51 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Salvatore Bonaccorso
Cc: Peter Zijlstra, Ingo Molnar, Alexander Shishkin, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]
On Wed, 2023-05-10 at 09:59 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
> > Hi Peter, Ingo, Arnaldo,
> >
> > On Tue, May 17, 2016 at 02:28:09PM +0100, Ben Hutchings wrote:
> > > This allows man pages to be built reproducibly.
> > >
> > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > > ---
> > > --- a/tools/perf/Documentation/Makefile
> > > +++ b/tools/perf/Documentation/Makefile
> > > @@ -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;
> > > --- a/tools/perf/Documentation/asciidoc.conf
> > > +++ b/tools/perf/Documentation/asciidoc.conf
> > > @@ -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?
>
> Isn't this fixed in:
>
> commit d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0d
> Author: Ian Rogers <irogers@google.com>
> 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.
[...]
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.
--
Ben Hutchings
Life would be so much easier if we could look at the source code.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
2023-05-13 18:51 ` Ben Hutchings
@ 2023-05-13 19:33 ` Ben Hutchings
0 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2023-05-13 19:33 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Salvatore Bonaccorso
Cc: Peter Zijlstra, Ingo Molnar, Alexander Shishkin, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2691 bytes --]
On Sat, 2023-05-13 at 20:51 +0200, Ben Hutchings wrote:
> On Wed, 2023-05-10 at 09:59 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, May 09, 2023 at 09:03:28PM +0200, Salvatore Bonaccorso escreveu:
> > > Hi Peter, Ingo, Arnaldo,
> > >
> > > On Tue, May 17, 2016 at 02:28:09PM +0100, Ben Hutchings wrote:
> > > > This allows man pages to be built reproducibly.
> > > >
> > > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > > > ---
> > > > --- a/tools/perf/Documentation/Makefile
> > > > +++ b/tools/perf/Documentation/Makefile
> > > > @@ -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;
> > > > --- a/tools/perf/Documentation/asciidoc.conf
> > > > +++ b/tools/perf/Documentation/asciidoc.conf
> > > > @@ -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?
> >
> > Isn't this fixed in:
> >
> > commit d586ac10ce56b2381b8e1d8ed74660c1b2b8ab0d
> > Author: Ian Rogers <irogers@google.com>
> > 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.
> [...]
>
> 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.
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.
> 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.
>
--
Ben Hutchings
Life would be so much easier if we could look at the source code.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-13 19:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 13:28 [PATCH] perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date Ben Hutchings
2023-05-09 19:03 ` Salvatore Bonaccorso
2023-05-10 12:59 ` Arnaldo Carvalho de Melo
2023-05-13 18:51 ` Ben Hutchings
2023-05-13 19:33 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox