[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#949817: shotcut: please make the build reproducible



Source: shotcut
Version: 19.12.31-1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

Hi,

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

This is because it uses the current build date for the SHOTCUT_VERSION
variable. A patch is attached that bases this value on
SOURCE_DATE_EPOCH [1] instead.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.patch	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible-build.patch	2020-01-25 11:52:56.730142822 +0000
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2020-01-25
+
+--- shotcut-19.12.31.orig/src/src.pro
++++ shotcut-19.12.31/src/src.pro
+@@ -323,7 +323,7 @@ debug_and_release {
+ LIBS += -lCuteLogger
+ 
+ isEmpty(SHOTCUT_VERSION) {
+-    !win32:SHOTCUT_VERSION = $$system(date "+%y.%m.%d")
++    !win32:SHOTCUT_VERSION = $$system(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%y.%m.%d")
+      win32:SHOTCUT_VERSION = adhoc
+ }
+ DEFINES += SHOTCUT_VERSION=\\\"$$SHOTCUT_VERSION\\\"
--- a/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/series	2020-01-25 11:52:55.762163756 +0000
@@ -0,0 +1 @@
+reproducible-build.patch

Reply to: