Source: sayonara
Version: 1.6.0~beta6+ds-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

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

This is because it generated a manual page that included the current
build date.

Patch attached that uses CMake's ability to respect the
SOURCE_DATE_EPOCH environment variable [1].

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/004-Reproducible-build.patch       1970-01-01 
01:00:00.000000000 +0100
--- b/debian/patches/004-Reproducible-build.patch       2020-12-15 
16:27:39.320114684 +0000
@@ -0,0 +1,16 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2020-12-15
+
+--- sayonara-1.6.0~beta6+ds.orig/resources/CMakeLists.txt
++++ sayonara-1.6.0~beta6+ds/resources/CMakeLists.txt
+@@ -18,8 +18,7 @@ if(NOT GZIP_BINARY)
+     message("gzip not found. No manpage will be created")
+ else()
+     ## create date for manpage
+-    execute_process(COMMAND env LC_TIME="en_US.utf8" date "+%d %B %Y" 
OUTPUT_VARIABLE SAYONARA_MANPAGE_DATE)
+-    string(REGEX REPLACE "\n$" "" SAYONARA_MANPAGE_DATE 
"${SAYONARA_MANPAGE_DATE}")
++    STRING(TIMESTAMP SAYONARA_MANPAGE_DATE "%d %B %Y" UTC)
+     
+     ## create manpage
+     configure_file(sayonara.1.man.in 
--- a/debian/patches/series     2020-12-15 16:10:44.935220084 +0000
--- b/debian/patches/series     2020-12-15 16:27:38.400102950 +0000
@@ -2,3 +2,4 @@
 002-Fix_qt5_build_error.patch
 003-Fix_appdata.patch
 0004-Disable-3rdParty-code.patch
+004-Reproducible-build.patch

Reply via email to