Bug#949817: shotcut: please make the build reproducible

2020-01-25 Thread Chris Lamb
forwarded 949817 https://github.com/mltframework/shotcut/pull/824
thanks

I've forwarded this upstream here:

  https://github.com/mltframework/shotcut/pull/824


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#949817: shotcut: please make the build reproducible

2020-01-25 Thread Chris Lamb
Source: shotcut
Version: 19.12.31-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
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
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
--- a/debian/patches/reproducible-build.patch   1970-01-01 01:00:00.0 
+0100
--- b/debian/patches/reproducible-build.patch   2020-01-25 11:52:56.730142822 
+
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb 
+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.0 +0100
--- b/debian/patches/series 2020-01-25 11:52:55.762163756 +
@@ -0,0 +1 @@
+reproducible-build.patch