Source: plymouth
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build year and week of year is embedded in several .pc files:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/plymouth.html

  /usr/lib/x86_64-linux-gnu/pkgconfig/ply-boot-client.pc

  Version:·22.32.
  vs.
  Version:·23.37.

This is because configure.ac sets the VERSION and PACKAGE_VERSION
variables based on the date and available git information. The attached
patch fixes this by using the version from debian/changelog.

If only the upstream version is preferred, then simply appending a sed
call could also be used:

  dpkg-parsechangelog --show-field Version | sed -e 's,-.*,,g'


With this patch applied, plymouth should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining plymouth!


live well,
  vagrant
From b94300e4304484aff3ee7d8a1f50875b341ba789 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 15 Aug 2022 02:11:30 +0000
Subject: [PATCH] configure.ac: Avoid embedding the date in the version.

Use the version from the last debian/changelog entry, otherwise the
build will differ if built on a different year and week and from git
builds vs. builds from source tarball.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6e00c0c..0de1856 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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([dpkg-parsechangelog --show-field Version]),
         [https://gitlab.freedesktop.org/plymouth/plymouth/issues])
 AC_CONFIG_SRCDIR(src/main.c)
 AC_CONFIG_HEADER(config.h)
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to