Bug#1141841: grout: please make the build reproducible

Chris Lamb lamby at debian.org
Fri Jul 10 21:48:38 BST 2026


Source: grout
Version: 0.16.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
grout could not be built reproducibly.

This is because the grout.h file contains the current build year. A
patch is attached that will prefer SOURCE_DATE_EPOCH if available.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/reproducible-build.patch	2026-07-10 13:30:12.472696813 -0700
@@ -0,0 +1,20 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2026-07-10
+
+--- grout-0.16.0.orig/devtools/gen_api_header.sh
++++ grout-0.16.0/devtools/gen_api_header.sh
+@@ -2,8 +2,12 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright (c) 2026 Robin Jarry
+ 
++DATE_FMT="+%Y"
++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
++BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u "$DATE_FMT")
++
+ echo "// SPDX-License-Identifier: BSD-3-Clause"
+-echo "// Copyright (c) $(date +%Y) Red Hat"
++echo "// Copyright (c) $BUILD_DATE) Red Hat"
+ echo
+ echo "#pragma once"
+ echo
--- a/debian/patches/series	1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/series	2026-07-10 13:30:11.741821074 -0700
@@ -0,0 +1 @@
+reproducible-build.patch


More information about the Reproducible-bugs mailing list