From 3c5e1208aea7c1e075cfb633bb363e72177f971f94eff3e5357ac14faca800f9 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <dmueller@suse.com>
Date: Mon, 8 Oct 2018 11:20:57 +0000
Subject: [PATCH] Accepting request 640333 from
 home:bmwiedemann:branches:Base:System

Add reproducible.patch to override build date (boo#1047218)

OBS-URL: https://build.opensuse.org/request/show/640333
OBS-URL: https://build.opensuse.org/package/show/Base:System/gettext-runtime?expand=0&rev=146
---
 gettext-runtime-mini.changes | 12 ++++++++++++
 gettext-runtime-mini.spec    |  2 ++
 gettext-runtime.changes      |  5 +++++
 gettext-runtime.spec         |  2 ++
 reproducible.patch           | 28 ++++++++++++++++++++++++++++
 5 files changed, 49 insertions(+)
 create mode 100644 reproducible.patch

diff --git a/gettext-runtime-mini.changes b/gettext-runtime-mini.changes
index e8b8c78..f43d2d0 100644
--- a/gettext-runtime-mini.changes
+++ b/gettext-runtime-mini.changes
@@ -1,3 +1,15 @@
+-------------------------------------------------------------------
+Sat Oct  6 19:29:11 UTC 2018 - Bernhard Wiedemann <bwiedemann@suse.com>
+
+- Add reproducible.patch to override build date (boo#1047218)
+
+-------------------------------------------------------------------
+Wed Sep 19 08:24:19 UTC 2018 - Dr. Werner Fink <werner@suse.de>
+
+- Add patch msgfmt-reset-msg-length-after-remove.patch
+  which does reset the length of message string after a line
+  has been removed (boo#1106843)
+
 -------------------------------------------------------------------
 Thu May 24 10:45:49 CEST 2018 - kukuk@suse.de
 
diff --git a/gettext-runtime-mini.spec b/gettext-runtime-mini.spec
index 5f04062..914d0f4 100644
--- a/gettext-runtime-mini.spec
+++ b/gettext-runtime-mini.spec
@@ -77,6 +77,7 @@ Patch10:        msgfmt-remove-pot-creation-date.patch
 Patch11:        boo941629-unnessary-rpath-on-standard-path.patch
 # PATCH-FIX-SUSE Bug boo#1106843 
 Patch12:        msgfmt-reset-msg-length-after-remove.patch
+Patch13:        reproducible.patch
 
 %description
 This package contains the intl library as well as tools that ease the
@@ -142,6 +143,7 @@ as well as project examples.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p0
+%patch13 -p1
 
 %build
 # expect a couple "You should update your `aclocal.m4' by running aclocal."
diff --git a/gettext-runtime.changes b/gettext-runtime.changes
index a553da4..f43d2d0 100644
--- a/gettext-runtime.changes
+++ b/gettext-runtime.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Sat Oct  6 19:29:11 UTC 2018 - Bernhard Wiedemann <bwiedemann@suse.com>
+
+- Add reproducible.patch to override build date (boo#1047218)
+
 -------------------------------------------------------------------
 Wed Sep 19 08:24:19 UTC 2018 - Dr. Werner Fink <werner@suse.de>
 
diff --git a/gettext-runtime.spec b/gettext-runtime.spec
index 6d24267..dc8fbfb 100644
--- a/gettext-runtime.spec
+++ b/gettext-runtime.spec
@@ -77,6 +77,7 @@ Patch10:        msgfmt-remove-pot-creation-date.patch
 Patch11:        boo941629-unnessary-rpath-on-standard-path.patch
 # PATCH-FIX-SUSE Bug boo#1106843 
 Patch12:        msgfmt-reset-msg-length-after-remove.patch
+Patch13:        reproducible.patch
 
 %description
 This package contains the intl library as well as tools that ease the
@@ -142,6 +143,7 @@ as well as project examples.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p0
+%patch13 -p1
 
 %build
 # expect a couple "You should update your `aclocal.m4' by running aclocal."
diff --git a/reproducible.patch b/reproducible.patch
new file mode 100644
index 0000000..f63593b
--- /dev/null
+++ b/reproducible.patch
@@ -0,0 +1,28 @@
+merged upstream <https://savannah.gnu.org/bugs/?54367>
+
+Index: gettext-0.19.8.1/gettext-runtime/man/help2man
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-runtime/man/help2man
++++ gettext-0.19.8.1/gettext-runtime/man/help2man
+@@ -179,7 +179,7 @@ my ($help_text, $version_text) = map {
+ 	or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
+ } qw(help version);
+ 
+-my $date = strftime "%B %Y", localtime;
++my $date = strftime "%B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time);
+ (my $program = $ARGV[0]) =~ s!.*/!!;
+ my $package = $program;
+ my $version;
+Index: gettext-0.19.8.1/gettext-tools/man/help2man
+===================================================================
+--- gettext-0.19.8.1.orig/gettext-tools/man/help2man
++++ gettext-0.19.8.1/gettext-tools/man/help2man
+@@ -179,7 +179,7 @@ my ($help_text, $version_text) = map {
+ 	or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
+ } qw(help version);
+ 
+-my $date = strftime "%B %Y", localtime;
++my $date = strftime "%B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time);
+ (my $program = $ARGV[0]) =~ s!.*/!!;
+ my $package = $program;
+ my $version;