The package rpms/golang-github-minio-sha256-simd.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-minio-sha256-simd.g....
Change:
-%ifnarch %{ix86}
Thanks.
Full change:
============
commit ce87d619d80e851db1e5005295a16d0d70f09a97
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Fri Sep 6 10:33:42 2019 +0200
include upstream patch to fix tests on 32-bit architectures
diff --git a/e57049a.patch b/e57049a.patch
new file mode 100644
index 0000000..09ae966
--- /dev/null
+++ b/e57049a.patch
@@ -0,0 +1,66 @@
+From e57049a46bfcd23c7e8f1aa03cac490de3a81876 Mon Sep 17 00:00:00 2001
+From: Steven Allen <steven(a)stebalien.com>
+Date: Thu, 5 Sep 2019 16:30:38 -0700
+Subject: [PATCH] test: fix tests on i386 and arm (#50)
+
+fixes #48
+---
+ sha256_test.go | 31 ++++++++++++++++++++-----------
+ 1 file changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/sha256_test.go b/sha256_test.go
+index 9433b37..89499e3 100644
+--- a/sha256_test.go
++++ b/sha256_test.go
+@@ -52,6 +52,7 @@ package sha256
+ import (
+ "encoding/hex"
+ "fmt"
++ "runtime"
+ "strings"
+ "testing"
+ )
+@@ -2210,6 +2211,25 @@ var golden = []sha256Test{
+ func TestGolden(t *testing.T) {
+ blockfuncSaved := blockfunc
+
++ defer func() {
++ blockfunc = blockfuncSaved
++ }()
++
++ if true {
++ blockfunc = blockfuncGeneric
++ for _, g := range golden {
++ s := fmt.Sprintf("%x", Sum256([]byte(g.in)))
++ if Sum256([]byte(g.in)) != g.out {
++ t.Fatalf("Generic: Sum256 function: sha256(%s) = %s want %s", g.in, s,
hex.EncodeToString(g.out[:]))
++ }
++ }
++ }
++
++ if runtime.GOARCH == "386" || runtime.GOARCH == "arm" {
++ // doesn't support anything but the generic version.
++ return
++ }
++
+ if sha && ssse3 && sse41 {
+ blockfunc = blockfuncSha
+ for _, g := range golden {
+@@ -2246,17 +2266,6 @@ func TestGolden(t *testing.T) {
+ }
+ }
+ }
+- if true {
+- blockfunc = blockfuncGeneric
+- for _, g := range golden {
+- s := fmt.Sprintf("%x", Sum256([]byte(g.in)))
+- if Sum256([]byte(g.in)) != g.out {
+- t.Fatalf("Generic: Sum256 function: sha256(%s) = %s want %s", g.in, s,
hex.EncodeToString(g.out[:]))
+- }
+- }
+- }
+-
+- blockfunc = blockfuncSaved
+ }
+
+ func TestSize(t *testing.T) {
diff --git a/golang-github-minio-sha256-simd.spec b/golang-github-minio-sha256-simd.spec
index 38e3ae4..0901d42 100644
--- a/golang-github-minio-sha256-simd.spec
+++ b/golang-github-minio-sha256-simd.spec
@@ -1,7 +1,5 @@
# Generated by go2rpm
-%ifnarch %{ix86}
%bcond_without check
-%endif
#
https://github.com/minio/sha256-simd
%global goipath
github.com/minio/sha256-simd
@@ -24,7 +22,7 @@ by J. Guilford et al.}
%global godocs README.md
Name: %{goname}
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Accelerate SHA256 computations in pure Go using simd
# Upstream license specification: Apache-2.0
@@ -32,6 +30,9 @@ License: ASL 2.0
URL: %{gourl}
Source0: %{gosource}
+# upstream patch to fix tests on 32-bit architectures
+Patch0: %{gourl}/commit/e57049a.patch
+
%description
%{common_description}
@@ -39,6 +40,7 @@ Source0: %{gosource}
%prep
%goprep
+%patch0 -p1
%install
%gopkginstall
@@ -51,6 +53,9 @@ Source0: %{gosource}
%gopkgfiles
%changelog
+* Fri Sep 06 2019 Fabio Valentini <decathorpe(a)gmail.com> - 0.1.0-3
+- Include upstream patch to fix tests on 32-bit architectures.
+
* Thu Jul 25 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.1.0-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild