Hello community,

here is the log from the commit of package lv2 for openSUSE:Factory checked in 
at 2018-07-13 10:19:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lv2 (Old)
 and      /work/SRC/openSUSE:Factory/.lv2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lv2"

Fri Jul 13 10:19:25 2018 rev:14 rq:621796 version:1.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/lv2/lv2.changes  2018-03-24 16:10:50.457315214 
+0100
+++ /work/SRC/openSUSE:Factory/.lv2.new/lv2.changes     2018-07-13 
10:20:39.902406223 +0200
@@ -1,0 +2,5 @@
+Mon Jul  9 19:36:47 UTC 2018 - [email protected]
+
+- Add reproducible.patch to make lv2 package build reproducible (boo#1047218)
+
+-------------------------------------------------------------------

New:
----
  reproducible.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lv2.spec ++++++
--- /var/tmp/diff_new_pack.KguqA4/_old  2018-07-13 10:20:45.058412383 +0200
+++ /var/tmp/diff_new_pack.KguqA4/_new  2018-07-13 10:20:45.058412383 +0200
@@ -34,6 +34,8 @@
 Source1:        lv2-rpmlintrc
 # Patch-Fix-Upstream  lv2pkgconfig.patch [email protected] -- Add "/" to 
end of -I directory because otherwise pkg-config outputs nothing.
 Patch0:         lv2pkgconfig.patch
+# Patch-Fix-Upstream reproducible.patch bmwiedemann
+Patch1:         reproducible.patch
 BuildRequires:  pkg-config
 BuildRequires:  python-rdflib
 BuildRequires:  pkgconfig(gtk+-2.0) >= 2.18.0
@@ -168,6 +170,7 @@
 %prep
 %setup -q
 %patch0
+%patch1 -p1
 
 %build
 export CFLAGS='%{optflags}'

++++++ reproducible.patch ++++++
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date: 2018-04-16

https://github.com/drobilla/lv2/pull/21
https://github.com/drobilla/lv2/pull/22

make lv2 package build reproducible

Index: lv2-1.14.0/lv2specgen/lv2specgen.py
===================================================================
--- lv2-1.14.0.orig/lv2specgen/lv2specgen.py
+++ lv2-1.14.0/lv2specgen/lv2specgen.py
@@ -45,6 +45,7 @@ import optparse
 import os
 import re
 import sys
+import time
 import xml.sax.saxutils
 import xml.dom
 import xml.dom.minidom
@@ -113,7 +114,7 @@ def findStatements(model, s, p, o):
 def findOne(m, s, p, o):
     l = findStatements(m, s, p, o)
     try:
-        return l.next()
+        return sorted(l)[0]
     except:
         return None
 
@@ -396,7 +397,7 @@ def rdfsPropertyInfo(term, m):
     domains = findStatements(m, term, rdfs.domain, None)
     domainsdoc = ""
     first = True
-    for d in domains:
+    for d in sorted(domains):
         union = findOne(m, getObject(d), owl.unionOf, None)
         if union:
             uris = parseCollection(m, getObject(union))
@@ -414,7 +415,7 @@ def rdfsPropertyInfo(term, m):
     ranges = findStatements(m, term, rdfs.range, None)
     rangesdoc = ""
     first = True
-    for r in ranges:
+    for r in sorted(ranges):
         union = findOne(m, getObject(r), owl.unionOf, None)
         if union:
             uris = parseCollection(m, getObject(union))
@@ -477,13 +478,14 @@ def rdfsClassInfo(term, m):
             restrictions.append(getSubject(meta_type))
 
     if len(superclasses) > 0:
+        superclasses.sort()
         doc += "\n<tr><th>Sub-class of</th>"
         first = True
         for superclass in superclasses:
             doc += getProperty(getTermLink(superclass), first)
             first = False
 
-    for r in restrictions:
+    for r in sorted(restrictions):
         props = findStatements(m, r, None, None)
         onProp = None
         comment = None
@@ -529,6 +531,7 @@ def rdfsClassInfo(term, m):
     # Find out about properties which have rdfs:domain of t
     d = classdomains.get(str(term), "")
     if d:
+        d.sort()
         dlist = ''
         first = True
         for k in d:
@@ -539,6 +542,7 @@ def rdfsClassInfo(term, m):
     # Find out about properties which have rdfs:range of t
     r = classranges.get(str(term), "")
     if r:
+        r.sort()
         rlist = ''
         first = True
         for k in r:
@@ -606,7 +610,7 @@ def rdfsInstanceInfo(term, m):
     doc = ""
 
     first = True
-    for match in findStatements(m, term, rdf.type, None):
+    for match in sorted(findStatements(m, term, rdf.type, None)):
         doc += getProperty(getTermLink(getObject(match),
                                        term,
                                        rdf.type),
@@ -942,7 +946,7 @@ def releaseChangeset(m, release, prefix=
 
     entry = ''
     #entry = '<dd><ul>\n'
-    for i in findStatements(m, getObject(changeset), dcs.item, None):
+    for i in sorted(findStatements(m, getObject(changeset), dcs.item, None)):
         item  = getObject(i)
         label = findOne(m, item, rdfs.label, None)
         if not label:
@@ -1276,8 +1280,9 @@ def specgen(specloc, indir, style_uri, d
     else:
         template = template.replace('@COMMENT@', '')
 
-    template = template.replace('@DATE@', 
datetime.datetime.utcnow().strftime('%F'))
-    template = template.replace('@TIME@', 
datetime.datetime.utcnow().strftime('%F %H:%M UTC'))
+    build_date = 
datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', 
time.time())))
+    template = template.replace('@DATE@', build_date.strftime('%F'))
+    template = template.replace('@TIME@', build_date.strftime('%F %H:%M UTC'))
 
     return template
 

Reply via email to