The package rpms/golang-gopkg-redis-6.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-gopkg-redis-6.git/commit/?id=....
Change: +%ifarch x86_64
Thanks.
Full change: ============
commit d558d92de49951e1d6708c0d2c1d439de7bb401d Author: Robert-Andr Mauchin zebob.m@gmail.com Date: Wed Mar 4 16:10:54 2020 +0100
Initial import (#1801881)
Signed-off-by: Robert-Andr Mauchin zebob.m@gmail.com
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e60f49f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/redis-6.15.7.tar.gz diff --git a/golang-gopkg-redis-6.spec b/golang-gopkg-redis-6.spec new file mode 100644 index 0000000..d686551 --- /dev/null +++ b/golang-gopkg-redis-6.spec @@ -0,0 +1,74 @@ +# Generated by go2rpm 1 +# https://github.com/go-redis/redis/issues/1268 +%ifarch x86_64 +%bcond_without check +%endif + +# https://github.com/go-redis/redis +%global goipath gopkg.in/redis.v6 +%global forgeurl https://github.com/go-redis/redis +Version: 6.15.7 + +%gometa + +%global goaltipaths github.com/go-redis/redis + +%global common_description %{expand: +Type-safe Redis client for Golang.} + +%global golicenses LICENSE +%global godocs CHANGELOG.md README.md + +Name: %{goname} +Release: 1%{?dist} +Summary: Type-safe Redis client for Golang + +# Upstream license specification: BSD-2-Clause +# BSD: main library +# ASL 2.0: internal/consistenthash +License: BSD and ASL 2.0 +URL: %{gourl} +Source0: %{gosource} +# test fixes and do not assume use of system redis-server for testing +Patch0: redis-testing-fixes.patch + +%if %{with check} +# Tests +BuildRequires: redis +BuildRequires: golang(github.com/onsi/ginkgo) +BuildRequires: golang(github.com/onsi/gomega) +%endif + +%description +%{common_description} + +%gopkg + +%prep +%goprep +%patch0 -p1 +find . -name "*.go" -exec sed -i "s|github.com/go-redis/redis|gopkg.in/redis.v6|" "{}" +; + +%install +%gopkginstall +%global _testdata_redis_src %{_builddir}/redis-%{version}/testdata/redis/src +mkdir -p %{_testdata_redis_src} +ln -s %{_bindir}/redis-server %{_testdata_redis_src}/redis-server + +%if %{with check} +%check +# Run a test Redis server rather than assuming the system +# is running one already (see patch0) - non-default port. +redis-cli -p 28126 SHUTDOWN 2>/dev/null || true +redis-server --port 28126 & +sleep 0.2 # time to startup +redis-cli -p 28126 PING || exit 1 +%gocheck +redis-cli -p 28126 SHUTDOWN || exit 1 +%endif + +%gopkgfiles + +%changelog +* Tue Feb 11 20:42:25 CET 2020 Robert-Andr Mauchin zebob.m@gmail.com - 6.15.7-1 +- Initial package diff --git a/redis-testing-fixes.patch b/redis-testing-fixes.patch new file mode 100644 index 0000000..2e08660 --- /dev/null +++ b/redis-testing-fixes.patch @@ -0,0 +1,64 @@ +diff -up redis-6.15.7/bench_test.go.orig redis-6.15.7/bench_test.go +--- redis-6.15.7/bench_test.go.orig 2020-02-02 09:52:57.000000000 +0100 ++++ redis-6.15.7/bench_test.go 2020-03-02 23:01:32.529458045 +0100 +@@ -12,7 +12,7 @@ import ( + + func benchmarkRedisClient(poolSize int) *redis.Client { + client := redis.NewClient(&redis.Options{ +- Addr: ":6379", ++ Addr: ":28126", + DialTimeout: time.Second, + ReadTimeout: time.Second, + WriteTimeout: time.Second, +diff -up redis-6.15.7/example_instrumentation_test.go.orig redis-6.15.7/example_instrumentation_test.go +--- redis-6.15.7/example_instrumentation_test.go.orig 2020-02-02 09:52:57.000000000 +0100 ++++ redis-6.15.7/example_instrumentation_test.go 2020-03-02 23:01:32.530458046 +0100 +@@ -8,7 +8,7 @@ import ( + + func Example_instrumentation() { + redisdb := redis.NewClient(&redis.Options{ +- Addr: ":6379", ++ Addr: ":28126", + }) + redisdb.WrapProcess(func(old func(cmd redis.Cmder) error) func(cmd redis.Cmder) error { + return func(cmd redis.Cmder) error { +@@ -26,7 +26,7 @@ func Example_instrumentation() { + + func ExamplePipeline_instrumentation() { + redisdb := redis.NewClient(&redis.Options{ +- Addr: ":6379", ++ Addr: ":28126", + }) + + redisdb.WrapProcessPipeline(func(old func([]redis.Cmder) error) func([]redis.Cmder) error { +diff -up redis-6.15.7/example_test.go.orig redis-6.15.7/example_test.go +--- redis-6.15.7/example_test.go.orig 2020-02-02 09:52:57.000000000 +0100 ++++ redis-6.15.7/example_test.go 2020-03-02 23:14:58.894901898 +0100 +@@ -13,7 +13,7 @@ var redisdb *redis.Client + + func init() { + redisdb = redis.NewClient(&redis.Options{ +- Addr: ":6379", ++ Addr: ":28126", + DialTimeout: 10 * time.Second, + ReadTimeout: 30 * time.Second, + WriteTimeout: 30 * time.Second, +@@ -24,7 +24,7 @@ func init() { + + func ExampleNewClient() { + redisdb := redis.NewClient(&redis.Options{ +- Addr: "localhost:6379", // use default Addr ++ Addr: "localhost:28126", // use default Addr + Password: "", // no password set + DB: 0, // use default DB + }) +@@ -56,7 +56,7 @@ func ExampleNewFailoverClient() { + // setup Redis Sentinel. + redisdb := redis.NewFailoverClient(&redis.FailoverOptions{ + MasterName: "master", +- SentinelAddrs: []string{":26379"}, ++ SentinelAddrs: []string{":38126"}, + }) + redisdb.Ping() + } + diff --git a/sources b/sources new file mode 100644 index 0000000..631196f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (redis-6.15.7.tar.gz) = 81a120e6a5057fd3afef197d12671b56740c2da89abbec799e3ad9d3f54ae65f71d56f901fb2b7484452195f889a764f43539d85be41ea9dd0cb2cbe8d13c135