diff --git a/0001-Compare-date-using-SOURCE_DATE_EPOCH-in-both-cases.patch b/0001-Compare-date-using-SOURCE_DATE_EPOCH-in-both-cases.patch new file mode 100644 index 0000000..8eee148 --- /dev/null +++ b/0001-Compare-date-using-SOURCE_DATE_EPOCH-in-both-cases.patch @@ -0,0 +1,43 @@ +From 607782293bc07922434b786bf08aca8f35415db1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sun, 23 Aug 2020 19:31:26 +0200 +Subject: [PATCH] Compare date using SOURCE_DATE_EPOCH in both cases +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Robert-André Mauchin +--- + help_test.go | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/help_test.go b/help_test.go +index ba75c7a..8d053f9 100644 +--- a/help_test.go ++++ b/help_test.go +@@ -7,6 +7,7 @@ import ( + "fmt" + "os" + "runtime" ++ "strconv" + "strings" + "testing" + "time" +@@ -229,6 +230,14 @@ func TestMan(t *testing.T) { + got := buf.String() + + tt := time.Now() ++ source_date_epoch := os.Getenv("SOURCE_DATE_EPOCH") ++ if source_date_epoch != "" { ++ sde, err := strconv.ParseInt(source_date_epoch, 10, 64) ++ if err != nil { ++ panic(fmt.Sprintf("Invalid SOURCE_DATE_EPOCH: %s", err)) ++ } ++ tt = time.Unix(sde, 0) ++ } + + var envDefaultName string + +-- +2.28.0 + diff --git a/golang-github-jessevdk-flags.spec b/golang-github-jessevdk-flags.spec index c004479..eb14a74 100644 --- a/golang-github-jessevdk-flags.spec +++ b/golang-github-jessevdk-flags.spec @@ -18,13 +18,15 @@ specifying command line options.} %global godocs examples README.md Name: %{goname} -Release: 6%{?dist} +Release: 7%{?dist} Summary: Go command line option parser # Upstream license specification: BSD-3-Clause License: BSD URL: %{gourl} Source0: %{gosource} +# FTBFS: Compare date using SOURCE_DATE_EPOCH in both cases +Patch0: 0001-Compare-date-using-SOURCE_DATE_EPOCH-in-both-cases.patch BuildRequires: golang(golang.org/x/sys/unix) @@ -35,6 +37,7 @@ BuildRequires: golang(golang.org/x/sys/unix) %prep %goprep +%patch0 -p1 %install %gopkginstall @@ -47,6 +50,9 @@ BuildRequires: golang(golang.org/x/sys/unix) %gopkgfiles %changelog +* Tue Jul 28 14:32:09 CEST 2020 Robert-André Mauchin - 1.4.0-7.20200728gitc17162f +- Fix FTBFS + * Tue Jul 28 14:32:09 CEST 2020 Robert-André Mauchin - 1.4.0-6.20200728gitc17162f - Bump to commit c17162fe8fd74f119ff938c5c67af63e3bac5ded