[PATCH] Use NEWS file date instead of build date

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Use NEWS file date instead of build date

Bernhard M. Wiedemann
as date in man page headers, in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

Also use UTC to be independent of timezone

---
While working on making openSUSE Linux package builds reproducible,
I found that the systemtap package would differ in the stappaths.7
man page

An alternative solution could use $SOURCE_DATE_EPOCH
to allow to override the date but leave the default behaviour as before.
But I think few people care about which date goes into the manual.
---
 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 099664f..1f0b64d 100755
--- a/configure
+++ b/configure
@@ -11451,7 +11451,7 @@ $as_echo "$as_me: staprun will link $staprun_LIBS" >&6;}
 $as_echo "$as_me: stapbpf will link $stapbpf_LIBS" >&6;}
 
 
-date=`date +%Y-%m-%d`
+date=`date -u -r NEWS +%Y-%m-%d`
 
 cat >>confdefs.h <<_ACEOF
 #define DATE "$date"
diff --git a/configure.ac b/configure.ac
index a5cb47c..a10fd83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -598,7 +598,7 @@ AC_MSG_NOTICE([stapbpf will link $stapbpf_LIBS])
 
 
 dnl Plop in the build (configure) date
-date=`date +%Y-%m-%d`
+date=`date -u -r NEWS +%Y-%m-%d`
 AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date])
 AC_SUBST(DATE, "$date")
 
--
2.13.6

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use NEWS file date instead of build date

David Smith-19
Hmm. I wonder if it wouldn't make more sense just to remove the DATE
stuff from configure.ac and stappaths.7.in. I'm not sure it adds much
value. For reference sake, here's the one and only place where DATE is
used. This is in stappaths.7.in:

This manual page was generated on @DATE@ for systemtap @VERSION@.

On Fri, Nov 24, 2017 at 9:00 AM, Bernhard M. Wiedemann
<[hidden email]> wrote:

> as date in man page headers, in order to make builds reproducible.
> See https://reproducible-builds.org/ for why this is good.
>
> Also use UTC to be independent of timezone
>
> ---
> While working on making openSUSE Linux package builds reproducible,
> I found that the systemtap package would differ in the stappaths.7
> man page
>
> An alternative solution could use $SOURCE_DATE_EPOCH
> to allow to override the date but leave the default behaviour as before.
> But I think few people care about which date goes into the manual.
> ---
>  configure    | 2 +-
>  configure.ac | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 099664f..1f0b64d 100755
> --- a/configure
> +++ b/configure
> @@ -11451,7 +11451,7 @@ $as_echo "$as_me: staprun will link $staprun_LIBS" >&6;}
>  $as_echo "$as_me: stapbpf will link $stapbpf_LIBS" >&6;}
>
>
> -date=`date +%Y-%m-%d`
> +date=`date -u -r NEWS +%Y-%m-%d`
>
>  cat >>confdefs.h <<_ACEOF
>  #define DATE "$date"
> diff --git a/configure.ac b/configure.ac
> index a5cb47c..a10fd83 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -598,7 +598,7 @@ AC_MSG_NOTICE([stapbpf will link $stapbpf_LIBS])
>
>
>  dnl Plop in the build (configure) date
> -date=`date +%Y-%m-%d`
> +date=`date -u -r NEWS +%Y-%m-%d`
>  AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date])
>  AC_SUBST(DATE, "$date")
>
> --
> 2.13.6
>



--
David Smith
Principal Software Engineer
Red Hat
Reply | Threaded
Open this post in threaded view
|

[PATCH] Do not add build date into man pages

Bernhard M. Wiedemann
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.
---
 man/cs/stappaths.7.in | 2 +-
 man/stappaths.7.in    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/cs/stappaths.7.in b/man/cs/stappaths.7.in
index 416393d..eb8ca76 100644
--- a/man/cs/stappaths.7.in
+++ b/man/cs/stappaths.7.in
@@ -18,7 +18,7 @@ stappaths \- důležitá umístění souborů a adresářů systemtapu
 ..
 
 .SH POPIS
-Tato manuálová stránka byla vygenerována @DATE@ pro systemtap @VERSION@.
+Tato manuálová stránka byla vygenerována pro systemtap @VERSION@.
 Následuje seznam důležitých umístění souborů a adresářů.
 
 .TP
diff --git a/man/stappaths.7.in b/man/stappaths.7.in
index 2b469f2..7382444 100644
--- a/man/stappaths.7.in
+++ b/man/stappaths.7.in
@@ -18,7 +18,7 @@ stappaths \- systemtap configurable file paths
 ..
 
 .SH DESCRIPTION
-This manual page was generated on @DATE@ for systemtap @VERSION@.
+This manual page was generated for systemtap @VERSION@.
 The following section will list the main paths in systemtap that are
 important to know and may be required to reference.
 .TP
--
2.13.6

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Use NEWS file date instead of build date

David Smith-19
In reply to this post by David Smith-19
Commit 8aeb376b6 removes all the 'DATE' processing to make the builds
more reproducible.

On Mon, Nov 27, 2017 at 9:57 AM, David Smith <[hidden email]> wrote:

> Hmm. I wonder if it wouldn't make more sense just to remove the DATE
> stuff from configure.ac and stappaths.7.in. I'm not sure it adds much
> value. For reference sake, here's the one and only place where DATE is
> used. This is in stappaths.7.in:
>
> This manual page was generated on @DATE@ for systemtap @VERSION@.
>
> On Fri, Nov 24, 2017 at 9:00 AM, Bernhard M. Wiedemann
> <[hidden email]> wrote:
>> as date in man page headers, in order to make builds reproducible.
>> See https://reproducible-builds.org/ for why this is good.
>>
>> Also use UTC to be independent of timezone
>>
>> ---
>> While working on making openSUSE Linux package builds reproducible,
>> I found that the systemtap package would differ in the stappaths.7
>> man page
>>
>> An alternative solution could use $SOURCE_DATE_EPOCH
>> to allow to override the date but leave the default behaviour as before.
>> But I think few people care about which date goes into the manual.
>> ---
>>  configure    | 2 +-
>>  configure.ac | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 099664f..1f0b64d 100755
>> --- a/configure
>> +++ b/configure
>> @@ -11451,7 +11451,7 @@ $as_echo "$as_me: staprun will link $staprun_LIBS" >&6;}
>>  $as_echo "$as_me: stapbpf will link $stapbpf_LIBS" >&6;}
>>
>>
>> -date=`date +%Y-%m-%d`
>> +date=`date -u -r NEWS +%Y-%m-%d`
>>
>>  cat >>confdefs.h <<_ACEOF
>>  #define DATE "$date"
>> diff --git a/configure.ac b/configure.ac
>> index a5cb47c..a10fd83 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -598,7 +598,7 @@ AC_MSG_NOTICE([stapbpf will link $stapbpf_LIBS])
>>
>>
>>  dnl Plop in the build (configure) date
>> -date=`date +%Y-%m-%d`
>> +date=`date -u -r NEWS +%Y-%m-%d`
>>  AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date])
>>  AC_SUBST(DATE, "$date")
>>
>> --
>> 2.13.6
>>
>
>
>
> --
> David Smith
> Principal Software Engineer
> Red Hat



--
David Smith
Principal Software Engineer
Red Hat
Reply | Threaded
Open this post in threaded view
|

[PATCH] Do not add build date into cs man page

Bernhard M. Wiedemann
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.

This portion was missing in commit 8aeb376b6
---
 man/cs/stappaths.7.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/cs/stappaths.7.in b/man/cs/stappaths.7.in
index 416393d..eb8ca76 100644
--- a/man/cs/stappaths.7.in
+++ b/man/cs/stappaths.7.in
@@ -18,7 +18,7 @@ stappaths \- důležitá umístění souborů a adresářů systemtapu
 ..
 
 .SH POPIS
-Tato manuálová stránka byla vygenerována @DATE@ pro systemtap @VERSION@.
+Tato manuálová stránka byla vygenerována pro systemtap @VERSION@.
 Následuje seznam důležitých umístění souborů a adresářů.
 
 .TP
--
2.13.6

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Do not add build date into cs man page

David Smith-19
Added in commit df9c969e3 (along with one more DATE reference I found).

On Wed, Dec 6, 2017 at 7:57 AM, Bernhard M. Wiedemann
<[hidden email]> wrote:

> in order to make builds reproducible.
> See https://reproducible-builds.org/ for why this is good.
>
> This portion was missing in commit 8aeb376b6
> ---
>  man/cs/stappaths.7.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/cs/stappaths.7.in b/man/cs/stappaths.7.in
> index 416393d..eb8ca76 100644
> --- a/man/cs/stappaths.7.in
> +++ b/man/cs/stappaths.7.in
> @@ -18,7 +18,7 @@ stappaths \- důležitá umístění souborů a adresářů systemtapu
>  ..
>
>  .SH POPIS
> -Tato manuálová stránka byla vygenerována @DATE@ pro systemtap @VERSION@.
> +Tato manuálová stránka byla vygenerována pro systemtap @VERSION@.
>  Následuje seznam důležitých umístění souborů a adresářů.
>
>  .TP
> --
> 2.13.6
>



--
David Smith
Principal Software Engineer
Red Hat