The package rpms/golang-github-google-jsonnet.git has added or updated architecture
specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-google-jsonnet.git/....
Change:
+%ifnarch s390x
Thanks.
Full change:
============
commit 92b1f93fa162d4f7c36c6197f35ac221e13da93d
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Tue Mar 3 21:16:20 2020 +0100
Initial import (#1797130)
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..22d7aac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/go-jsonnet-0.15.0.tar.gz
diff --git a/0001-Prevent-int-overflow.patch b/0001-Prevent-int-overflow.patch
new file mode 100644
index 0000000..e6d899e
--- /dev/null
+++ b/0001-Prevent-int-overflow.patch
@@ -0,0 +1,29 @@
+From ee8a186f4346c08ac7b8364f73d3ac99551ae83f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?=
+ <30413512+eclipseo(a)users.noreply.github.com>
+Date: Thu, 13 Feb 2020 23:21:58 +0100
+Subject: [PATCH] Prevent int overflow
+
+---
+ builtins.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/builtins.go b/builtins.go
+index 9d5d94b9..eae363b5 100644
+--- a/builtins.go
++++ b/builtins.go
+@@ -862,11 +862,11 @@ func liftBitwise(f func(int64, int64) int64) func(*interpreter,
traceElement, va
+ return nil, err
+ }
+ if x.value < math.MinInt64 || x.value > math.MaxInt64 {
+- msg := fmt.Sprintf("Bitwise operator argument %v outside of range [%v,
%v]", x.value, math.MinInt64, math.MaxInt64)
++ msg := fmt.Sprintf("Bitwise operator argument %v outside of range [%v,
%v]", x.value, int64(math.MinInt64), int64(math.MaxInt64))
+ return nil, makeRuntimeError(msg, i.getCurrentStackTrace(trace))
+ }
+ if y.value < math.MinInt64 || y.value > math.MaxInt64 {
+- msg := fmt.Sprintf("Bitwise operator argument %v outside of range [%v,
%v]", y.value, math.MinInt64, math.MaxInt64)
++ msg := fmt.Sprintf("Bitwise operator argument %v outside of range [%v,
%v]", y.value, int64(math.MinInt64), int64(math.MaxInt64))
+ return nil, makeRuntimeError(msg, i.getCurrentStackTrace(trace))
+ }
+ return makeDoubleCheck(i, trace, float64(f(int64(x.value), int64(y.value))))
+
diff --git a/golang-github-google-jsonnet.spec b/golang-github-google-jsonnet.spec
new file mode 100644
index 0000000..1484502
--- /dev/null
+++ b/golang-github-google-jsonnet.spec
@@ -0,0 +1,73 @@
+# Generated by go2rpm 1
+%ifnarch s390x
+%bcond_without check
+%endif
+
+#
https://github.com/google/go-jsonnet
+%global goipath
github.com/google/go-jsonnet
+Version: 0.15.0
+
+%gometa
+
+%global common_description %{expand:
+This an implementation of Jsonnet in pure Go. It is feature complete but is not
+as heavily exercised as the Jsonnet C++ implementation. Please try it out and
+give feedback.}
+
+%global golicenses LICENSE
+%global godocs README.md
+
+Name: %{goname}
+Release: 1%{?dist}
+Summary: Implementation of Jsonnet in pure Go
+
+# Upstream license specification: Apache-2.0
+License: ASL 2.0
+
+URL: %{gourl}
+Source0: %{gosource}
+# Prevent int overflow
+#
https://github.com/google/go-jsonnet/pull/377
+Patch0: 0001-Prevent-int-overflow.patch
+
+BuildRequires:
golang(github.com/fatih/color)
+
+%if %{with check}
+# Tests
+BuildRequires:
golang(github.com/sergi/go-diff/diffmatchpatch)
+%endif
+
+%description
+%{common_description}
+
+%gopkg
+
+%prep
+%goprep
+%patch0 -p1
+
+%build
+for cmd in cmd/* ; do
+ %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
+done
+
+%install
+%gopkginstall
+install -m 0755 -vd %{buildroot}%{_bindir}
+install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
+
+%if %{with check}
+%check
+%gocheck
+%endif
+
+%files
+%license LICENSE
+%doc README.md
+%{_bindir}/*
+
+%gopkgfiles
+
+%changelog
+* Sat Feb 01 00:48:04 CET 2020 Robert-Andr Mauchin <zebob.m(a)gmail.com> - 0.15.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..2b82a45
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (go-jsonnet-0.15.0.tar.gz) =
b0f4deba2fa3fc06171f7ab92304c2f8659ad9c7a71c9f6defef59b476e048cd3e9477f8d3a63f9c908f0af1fb9236e9be5f8a15b0678d40c5eb71a3734519f6