Hello community,

here is the log from the commit of package fontforge for openSUSE:Factory 
checked in at 2018-08-07 10:49:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fontforge (Old)
 and      /work/SRC/openSUSE:Factory/.fontforge.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fontforge"

Tue Aug  7 10:49:24 2018 rev:47 rq:627211 version:20170731

Changes:
--------
--- /work/SRC/openSUSE:Factory/fontforge/fontforge.changes      2018-01-16 
09:35:57.175712293 +0100
+++ /work/SRC/openSUSE:Factory/.fontforge.new/fontforge.changes 2018-08-07 
10:49:43.020543616 +0200
@@ -1,0 +2,6 @@
+Wed Aug  1 03:37:01 UTC 2018 - bwiedem...@suse.com
+
+- Add reproducible.patch to override font build dates (boo#1047218)
+- repack sources to .xz since we have to repack already
+
+-------------------------------------------------------------------

Old:
----
  fontforge-20170731-repacked.tar.gz

New:
----
  fontforge-20170731-repacked.tar.xz
  reproducible.patch

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

Other differences:
------------------
++++++ fontforge.spec ++++++
--- /var/tmp/diff_new_pack.1YNbyk/_old  2018-08-07 10:49:44.636546508 +0200
+++ /var/tmp/diff_new_pack.1YNbyk/_new  2018-08-07 10:49:44.636546508 +0200
@@ -24,12 +24,14 @@
 Group:          Productivity/Graphics/Vector Editors
 Url:            http://fontforge.org/
 #       Source: 
https://github.com/fontforge/fontforge/archive/%{version}.tar.gz
-#           see bug 926061, fontforge-*-repacked.tar.gz does not contain 
fontforge-*/win/gold/libX11-*.noarch.rpm
-Source0:        fontforge-%{version}-repacked.tar.gz
+#           see bug 926061, fontforge-*-repacked.tar.xz does not contain 
fontforge-*/win/gold/libX11-*.noarch.rpm
+Source0:        fontforge-%{version}-repacked.tar.xz
 Source1:        get-source.sh
 # workardound for bug 930076, imho upstream should fix this
 # https://github.com/fontforge/fontforge/issues/2270
 Patch0:         fontforge-version.patch
+# PATCH-FIX-UPSTREAM bmwiedemann 
https://github.com/fontforge/fontforge/pull/3152
+Patch1:         reproducible.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  cairo-devel
@@ -96,6 +98,7 @@
 %prep
 %setup -q
 %patch0
+%patch1 -p1
 sed -i 's/\r$//' doc/html/{Big5.txt,corpchar.txt}
 # workaround for bug 930076; we just need the _version_of_the_release_! (see 
also fontforge-version.patch) ---
 grep 'doversion(FONTFORGE_MODTIME_STR)' fontforgeexe/startnoui.c && \

++++++ get-source.sh ++++++
--- /var/tmp/diff_new_pack.1YNbyk/_old  2018-08-07 10:49:44.660546551 +0200
+++ /var/tmp/diff_new_pack.1YNbyk/_new  2018-08-07 10:49:44.664546558 +0200
@@ -17,11 +17,12 @@
 pushd fontforge-$VERSION
 # do not depend on git
 git clone https://github.com/troydhanson/uthash
+git clone --depth 1 https://github.com/coreutils/gnulib.git gnulib
 # remove not shippable files (bug 926061)
 rm win/gold/libX11-*.noarch.rpm
 ./bootstrap --copy --force
 popd
-tar czf fontforge-$VERSION-repacked.tar.gz fontforge-$VERSION
+tar cJf fontforge-$VERSION-repacked.tar.xz fontforge-$VERSION
 rm -rf fontforge-$VERSION
 rm $VERSION.tar.gz
 

++++++ reproducible.patch ++++++
>From 4e850c134200d5a62bdecdd68a4ee31ef7688360 Mon Sep 17 00:00:00 2001
From: Gioele Barabucci <gio...@svario.it>
Date: Sat, 2 Sep 2017 12:08:06 +0200
Subject: [PATCH 1/3] Add GetTime function: override time(2) in case
 SOURCE_DATE_EPOCH is set

---
 fontforge/splinefont.c |  6 ++----
 gutils/gutils.c        | 10 ++++++++++
 inc/gutils.h           |  3 +++
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/fontforge/splinefont.c b/fontforge/splinefont.c
index 4cd7d6a7b..92c8ef1c5 100644
--- a/fontforge/splinefont.c
+++ b/fontforge/splinefont.c
@@ -55,7 +55,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <gfile.h>
-#include <time.h>
+#include <gutils.h>
 #include "unicoderange.h"
 #include "psfont.h"
 #include <locale.h>
@@ -604,9 +604,7 @@ return( true );
 }
 
 void SFSetModTime(SplineFont *sf) {
-    time_t now;
-    time(&now);
-    sf->modificationtime = now;
+    sf->modificationtime = GetTime();
 }
 
 static SplineFont *_SFReadPostScript(FILE *file,char *filename) {
diff --git a/gutils/gutils.c b/gutils/gutils.c
index bc945e8b9..72334fc2f 100644
--- a/gutils/gutils.c
+++ b/gutils/gutils.c
@@ -89,3 +89,13 @@ return( ret );
 #endif
 }
 
+time_t GetTime(void) {
+       time_t now;
+       if (getenv("SOURCE_DATE_EPOCH")) {
+               now = atol(getenv("SOURCE_DATE_EPOCH"));
+       } else {
+               now = time(NULL);
+       }
+
+       return now;
+}
diff --git a/inc/gutils.h b/inc/gutils.h
index 90b087641..112de734f 100644
--- a/inc/gutils.h
+++ b/inc/gutils.h
@@ -27,8 +27,11 @@
 #ifndef _GUTILS_H
 #define _GUTILS_H
 
+#include <time.h>
+
 extern int16 div_tables[257][2];
 
 extern const char *GetAuthor(void);
+extern time_t GetTime(void);
 
 #endif

>From 24aeddf65139ee50753537070e51b08c80346423 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedem...@suse.de>
Date: Mon, 18 Sep 2017 14:23:26 +0200
Subject: [PATCH 2/3] Improve GetTime function

to only call getenv once
---
 gutils/gutils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gutils/gutils.c b/gutils/gutils.c
index 72334fc2f..de2c3e207 100644
--- a/gutils/gutils.c
+++ b/gutils/gutils.c
@@ -91,8 +91,9 @@ return( ret );
 
 time_t GetTime(void) {
        time_t now;
-       if (getenv("SOURCE_DATE_EPOCH")) {
-               now = atol(getenv("SOURCE_DATE_EPOCH"));
+       const char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+       if (source_date_epoch) {
+               now = atol(source_date_epoch);
        } else {
                now = time(NULL);
        }

>From 078a1738a86717b46e02276bd85bb76893688eea Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedem...@suse.de>
Date: Mon, 18 Sep 2017 14:34:32 +0200
Subject: [PATCH 3/3] Use GetTime in more places

in order to make more kinds of font operations reproducible
---
 fontforge/dumppfa.c       | 4 ++--
 fontforge/splinesaveafm.c | 4 ++--
 fontforge/tottf.c         | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fontforge/dumppfa.c b/fontforge/dumppfa.c
index 524b06f85..b88d124a8 100644
--- a/fontforge/dumppfa.c
+++ b/fontforge/dumppfa.c
@@ -52,7 +52,7 @@
 # include <pwd.h>
 #endif
 #include <stdarg.h>
-#include <time.h>
+#include <gutils.h>
 #include "psfont.h"
 #include "splinefont.h"
 #include <gdraw.h>             /* For image defn */
@@ -1763,7 +1763,7 @@ static void dumpfontcomments(void (*dumpchar)(int ch,void 
*data), void *data,
     time_t now;
     const char *author = GetAuthor();
 
-    time(&now);
+    now = GetTime();
     /* Werner points out that the DSC Version comment has a very specific */
     /*  syntax. We can't just put in a random string, must be <real> <int> */
     /* So we can sort of do that for CID fonts (give it a <revsion> of 0 */
diff --git a/fontforge/splinesaveafm.c b/fontforge/splinesaveafm.c
index d37a69f32..420770cb4 100644
--- a/fontforge/splinesaveafm.c
+++ b/fontforge/splinesaveafm.c
@@ -46,7 +46,7 @@
 #include "splineutil.h"
 #include <utype.h>
 #include <ustring.h>
-#include <time.h>
+#include <gutils.h>
 #include <math.h>
 
 #include <sys/types.h>         /* For stat */
@@ -1183,7 +1183,7 @@ static void AfmSplineFontHeader(FILE *afm, SplineFont 
*sf, int formattype,
                  iscid ? "StartFontMetrics 4.1\n" :
                          "StartFontMetrics 2.0\n" );
     fprintf( afm, "Comment Generated by FontForge %d\n", 
FONTFORGE_VERSIONDATE_RAW );
-    time(&now);
+    now = GetTime();
     fprintf(afm,"Comment Creation Date: %s", ctime(&now));
     fprintf( afm, "FontName %s\n", sf->fontname );
     if ( sf->fullname!=NULL ) fprintf( afm, "FullName %s\n", sf->fullname );
diff --git a/fontforge/tottf.c b/fontforge/tottf.c
index f53da3fee..b3e065fdb 100644
--- a/fontforge/tottf.c
+++ b/fontforge/tottf.c
@@ -52,7 +52,7 @@
 #include "ttfspecial.h"
 #include <math.h>
 #include <unistd.h>
-#include <time.h>
+#include <gutils.h>
 #include <locale.h>
 #include <utype.h>
 #include <ustring.h>
@@ -3831,8 +3831,8 @@ void DefaultTTFEnglishNames(struct ttflangname *dummy, 
SplineFont *sf) {
     if ( dummy->names[ttf_subfamily]==NULL || 
*dummy->names[ttf_subfamily]=='\0' )
        dummy->names[ttf_subfamily] = utf8_verify_copy(SFGetModifiers(sf));
     if ( dummy->names[ttf_uniqueid]==NULL || *dummy->names[ttf_uniqueid]=='\0' 
) {
-       time(&now);
-       tm = localtime(&now);
+       now = GetTime();
+       tm = gmtime(&now);
        snprintf( buffer, sizeof(buffer), "%s : %s : %d-%d-%d",
                BDFFoundry?BDFFoundry:TTFFoundry?TTFFoundry:"FontForge 2.0",
                sf->fullname!=NULL?sf->fullname:sf->fontname,

Reply via email to