[Openvpn-devel] Make build deterministic, remove __DATE__

Message ID 20211213162841.15763-1-frank@lichtenheld.com
State Superseded
Headers show
Series [Openvpn-devel] Make build deterministic, remove __DATE__ | expand

Commit Message

Frank Lichtenheld Dec. 13, 2021, 5:28 a.m. UTC
The information provided by this is minimal
and it makes it more difficult to provide
deterministic builds. There are work-arounds
for that but I think it is easier to just remove
it completely.

Allows the build to pass with -Wdate-time -Werror.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
 src/openvpn/options.c | 1 -
 src/tapctl/main.c     | 1 -
 2 files changed, 2 deletions(-)

Comments

Arne Schwabe Dec. 13, 2021, 6:47 a.m. UTC | #1
Am 13.12.21 um 17:28 schrieb Frank Lichtenheld:
> The information provided by this is minimal
> and it makes it more difficult to provide
> deterministic builds. There are work-arounds
> for that but I think it is easier to just remove
> it completely.
> 
Acked-By: Arne Schwabe <arne@rfc2549.org>
Antonio Quartulli Jan. 21, 2022, 10:55 a.m. UTC | #2
Hi,

On 13/12/2021 17:28, Frank Lichtenheld wrote:
> The information provided by this is minimal
> and it makes it more difficult to provide
> deterministic builds. There are work-arounds
> for that but I think it is easier to just remove
> it completely.
> 
> Allows the build to pass with -Wdate-time -Werror.
> 
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>

Acked-by: Antonio Quartulli <a@unstable.cc>
Gert Doering Aug. 2, 2022, 2:27 a.m. UTC | #3
Hi,

On Mon, Dec 13, 2021 at 05:28:41PM +0100, Frank Lichtenheld wrote:
> The information provided by this is minimal
> and it makes it more difficult to provide
> deterministic builds. There are work-arounds
> for that but I think it is easier to just remove
> it completely.
> 
> Allows the build to pass with -Wdate-time -Werror.
> 
> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>

I see that this patch has two ACKs, but I feel I'd lose visibility
into my heap of test binaries all over the place.

OTOH, I do see the argument about deterministic (release) builds.

What we already do today is to include the git commit ID *iff* this
is built from git into CONFIGURE_GIT_REVISION (version.h) - maybe
this could be done in a similar way?

 - if there is no .git around (and/or $condition?), build without
   commit ID and no build date

 - if there is, add build date + git revision to "openvpn --version"

gert

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index ac13412a..79f453d4 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -105,7 +105,6 @@  const char title_string[] =
 #endif
 #endif
     " [AEAD]"
-    " built on " __DATE__
 ;
 
 #ifndef ENABLE_SMALL
diff --git a/src/tapctl/main.c b/src/tapctl/main.c
index a3d3966a..d60df275 100644
--- a/src/tapctl/main.c
+++ b/src/tapctl/main.c
@@ -44,7 +44,6 @@ 
 
 const TCHAR title_string[] =
     TEXT(PACKAGE_NAME) TEXT(" ") TEXT(PACKAGE_VERSION)
-    TEXT(" built on ") TEXT(__DATE__)
 ;
 
 static const TCHAR usage_message[] =