]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
configure: Generate version from date of last commit not current date
authorRay Strode <rstrode@redhat.com>
Tue, 15 Feb 2022 18:34:39 +0000 (13:34 -0500)
committerRay Strode <halfline@gmail.com>
Tue, 15 Feb 2022 20:11:54 +0000 (20:11 +0000)
Using the date at build time prevents the build from being reproducible
later.

In order to facilitate reproducible builds, this commit changes the
logic to derive the version from the date of the last commit.

configure.ac

index 6e00c0c0815232188309cfd3010a9ea94c5c317d..608ad02c8b268f1ffa6e0ba62dea7da2eaed0636 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT([plymouth],
-        m4_esyscmd_s([date +%y.%V.$(git rev-list $(git describe --abbrev=0)..HEAD --count) || echo 0]),
+        m4_esyscmd_s([date +%y.%V.$(git rev-list $(git describe --abbrev=0)..HEAD --count) -d "@$(git log -1 --pretty=format:%ct)" || echo 0]),
         [https://gitlab.freedesktop.org/plymouth/plymouth/issues])
 AC_CONFIG_SRCDIR(src/main.c)
 AC_CONFIG_HEADER(config.h)