https://bugzilla.redhat.com/show_bug.cgi?id=1534567
Robert-André Mauchin changed:
What|Removed |Added
Status|NEW |ASSIGNED
CC||zebo...@gmail.com
Assignee|nob...@fedoraproject.org|zebo...@gmail.com
Flags||fedora-review?
--- Comment #1 from Robert-André Mauchin ---
- If you package a dev snapshot, you should provide the commit date in the
Release: field.
%global commit e863d83e403e8d694fa7d17f4af3cd176624ef12
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20171219
Name: golang-%{provider}-%{project}-%{repo}
Version:0
Release:0.1.%{commitdate}git%{shortcommit}%{?dist}
And:
* Mon Jan 15 2018 Marek Skalický -
0-0.1.20171219gite863d83
- You should remove:
%files
%license LICENSE
%doc README.md AUTHORS
as it only contains doc and license
- Tests fail on all arches:
https://koji.fedoraproject.org/koji/taskinfo?taskID=24218445
+ go test -compiler gc -ldflags ' -extldflags '\''-Wl,-z,relro
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\'''
github.com/spacemonkeygo/openssl
# github.com/spacemonkeygo/openssl
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/key_test.go:80:
Fatal call has possible formatting directive %s
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/key_test.go:294:
Fatal call has possible formatting directive %s
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/sha1_test.go:38:
Fatal call has possible formatting directive %x
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/sha1_test.go:76:
Fatal call has possible formatting directive %x
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/sha256_test.go:38:
Fatal call has possible formatting directive %x
../../BUILDROOT/golang-github-spacemonkeygo-openssl-0-0.1.gite863d83.fc28.x86_64/usr/share/gocode/src/github.com/spacemonkeygo/openssl/sha256_test.go:76:
Fatal call has possible formatting directive %x
FAILgithub.com/spacemonkeygo/openssl [build failed]
To solve this, I propose you a simple patch which replaces the problematic
"Fatal" with "Fatalf":
diff -up
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/key_test.go.fix_go_warning
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/key_test.go
--- openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/key_test.go.fix_go_warning
2018-01-06 00:06:25.0 +0100
+++ openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/key_test.go2018-01-15
20:00:40.727292766 +0100
@@ -77,7 +77,7 @@ func TestMarshal(t *testing.T) {
}
tls_der := x509.MarshalPKCS1PrivateKey(tls_key)
if !bytes.Equal(der, tls_der) {
-t.Fatal("invalid private key der bytes: %s\n v.s. %s\n",
+t.Fatalf("invalid private key der bytes: %s\n v.s. %s\n",
hex.Dump(der), hex.Dump(tls_der))
}
@@ -291,7 +291,7 @@ func TestMarshalEC(t *testing.T) {
t.Fatal(err)
}
if !bytes.Equal(der, tls_der) {
-t.Fatal("invalid private key der bytes: %s\n v.s. %s\n",
+t.Fatalf("invalid private key der bytes: %s\n v.s. %s\n",
hex.Dump(der), hex.Dump(tls_der))
}
diff -up
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha1_test.go.fix_go_warning
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha1_test.go
---
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha1_test.go.fix_go_warning
2018-01-06 00:06:25.0 +0100
+++ openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha1_test.go2018-01-15
20:01:38.878103115 +0100
@@ -35,7 +35,7 @@ func TestSHA1(t *testing.T) {
}
if expected != got {
-t.Fatal("exp:%x got:%x", expected, got)
+t.Fatalf("exp:%x got:%x", expected, got)
}
}
}
@@ -73,7 +73,7 @@ func TestSHA1Writer(t *testing.T) {
}
if got != exp {
-t.Fatal("exp:%x got:%x", exp, got)
+t.Fatalf("exp:%x got:%x", exp, got)
}
}
}
diff -up
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha256_test.go.fix_go_warning
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha256_test.go
---
openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha256_test.go.fix_go_warning
2018-01-06 00:06:25.0 +0100
+++ openssl-e863d83e403e8d694fa7d17f4af3cd176624ef12/sha256_test.go
2018-01-15 20:02:17.046978632 +0100
@@ -35,7 +35,7 @@ func TestSHA256(t *testing.T) {
}
if expected != got {