The package rpms/golang-github-google-go-github.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-go-github.gi....
Change:
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
Thanks.
Full change:
============
commit a86feed752f701393fcc7e845ccc73d2452b6d16
Author: Ed Marshall <esm(a)logic.net>
Date: Thu Jul 26 19:53:37 2018 -0700
Switch to forge-specific packaging, fix test failures with go 1.11
diff --git a/go-github-15.0.0-go111-fix-tests.patch
b/go-github-15.0.0-go111-fix-tests.patch
new file mode 100644
index 0000000..697b225
--- /dev/null
+++ b/go-github-15.0.0-go111-fix-tests.patch
@@ -0,0 +1,49 @@
+From 633f1e9872d4502746193f32a0ce0c59f4f66c4f Mon Sep 17 00:00:00 2001
+From: Dmitry Savintsev <dsavints(a)gmail.com>
+Date: Fri, 20 Jul 2018 15:21:03 +0200
+Subject: [PATCH] fix go vet and gofmt issues with go1.11
+
+github/repos_contents_test.go - use helper function to display string
+or <nil> using string pointer.
+
+github/misc_test.go - add a line break to allow passing gofmt check
+with both go1.10 and go.11.
+---
+ github/repos_contents_test.go | 15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/github/repos_contents_test.go b/github/repos_contents_test.go
+index 0a08e8c7..29bab8d2 100644
+--- a/github/repos_contents_test.go
++++ b/github/repos_contents_test.go
+@@ -56,10 +56,12 @@ func TestRepositoryContent_GetContent(t *testing.T) {
+ r := RepositoryContent{Encoding: tt.encoding, Content: tt.content}
+ got, err := r.GetContent()
+ if err != nil && !tt.wantErr {
+- t.Errorf("RepositoryContent(%q, %q) returned unexpected error: %v",
tt.encoding, tt.content, err)
++ t.Errorf("RepositoryContent(%s, %s) returned unexpected error: %v",
++ stringOrNil(tt.encoding), stringOrNil(tt.content), err)
+ }
+ if err == nil && tt.wantErr {
+- t.Errorf("RepositoryContent(%q, %q) did not return unexpected error",
tt.encoding, tt.content)
++ t.Errorf("RepositoryContent(%s, %s) did not return unexpected error",
++ stringOrNil(tt.encoding), stringOrNil(tt.content))
+ }
+ if want := tt.want; got != want {
+ t.Errorf("RepositoryContent.GetContent returned %+v, want %+v", got, want)
+@@ -67,6 +69,15 @@ func TestRepositoryContent_GetContent(t *testing.T) {
+ }
+ }
+
++// stringOrNil converts a potentially null string pointer to string.
++// For non-nil input pointer, the returned string is enclosed in double-quotes.
++func stringOrNil(s *string) string {
++ if s == nil {
++ return "<nil>"
++ }
++ return fmt.Sprintf("%q", *s)
++}
++
+ func TestRepositoriesService_GetReadme(t *testing.T) {
+ client, mux, _, teardown := setup()
+ defer teardown()
diff --git a/golang-github-google-go-github.spec b/golang-github-google-go-github.spec
index c1aa458..8da15bc 100644
--- a/golang-github-google-go-github.spec
+++ b/golang-github-google-go-github.spec
@@ -1,189 +1,69 @@
-# If any of the following macros should be set otherwise,
-# you can wrap any of them with the following conditions:
-# - %%if 0%%{centos} == 7
-# - %%if 0%%{?rhel} == 7
-# - %%if 0%%{?fedora} == 23
-# Or just test for particular distribution:
-# - %%if 0%%{centos}
-# - %%if 0%%{?rhel}
-# - %%if 0%%{?fedora}
-#
-# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
-# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0
condition.
-# (Don't forget to replace double percentage symbol with single one in order to apply
a condition)
-
-# Generate devel rpm
-%global with_devel 1
-# Build project from bundled dependencies
-%global with_bundled 0
-# Build with debug info rpm
-%global with_debug 0
-# Run tests in check section
-%global with_check 1
-# Generate unit-test rpm
-%global with_unit_test 1
-
-%if 0%{?with_debug}
-%global _dwz_low_mem_die_limit 0
-%else
-%global debug_package %{nil}
-%endif
-
-
-%global provider github
-%global provider_tld com
-%global project google
-%global repo go-github
#
https://github.com/google/go-github
-%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
-%global import_path %{provider_prefix}
-Name: golang-%{provider}-%{project}-%{repo}
+%global goipath
github.com/google/go-github
+
+%global common_description %{expand:
+go-github is a Go client library for accessing the GitHub API v3.}
+
Version: 15.0.0
-Release: 4%{?dist}
-Summary: Go library for accessing the GitHub API
-# Detected licences
-# - BSD (3 clause) at 'LICENSE'
-License: BSD
-URL: https://%{provider_prefix}
-Source0: https://%{provider_prefix}/archive/v%{version}/%{repo}-%{version}.tar.gz
-# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
-ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
-# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
-BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
+%gometa
+
+# gometa strips the leading "go-" off the name
+%global goname golang-github-google-go-github
+Name: %{goname}
+Release: 5%{?dist}
+Summary: Go library for accessing the GitHub API
+License: BSD
+URL: %{gourl}
+Source0: %{gosource}
+# Fix tests on go 1.11 beta
+#
https://github.com/google/go-github/pull/954
+Patch0: go-github-15.0.0-go111-fix-tests.patch
%description
-%{summary}
+%{common_description}
-%if 0%{?with_devel}
%package devel
Summary: %{summary}
-BuildArch: noarch
-%if 0%{?with_check} && ! 0%{?with_bundled}
+BuildRequires: mailcap
BuildRequires:
golang(github.com/google/go-querystring/query)
-%endif
-
-Requires:
golang(github.com/google/go-querystring/query)
-
-Provides: golang(%{import_path}/github) = %{version}-%{release}
%description devel
-%{summary}
+%{common_description}
This package contains library source intended for
building other packages which use import path with
-%{import_path} prefix.
-%endif
-
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%package unit-test-devel
-Summary: Unit tests for %{name} package
-%if 0%{?with_check}
-#Here comes all BuildRequires: PACKAGE the unit tests
-#in %%check section need for running
-%endif
-
-# test subpackage tests code from devel subpackage
-Requires: %{name}-devel = %{version}-%{release}
+%{goipath} prefix.
-%if 0%{?with_check} && ! 0%{?with_bundled}
-BuildRequires: mailcap
-%endif
-
-
-%description unit-test-devel
-%{summary}
-
-This package contains unit tests for project
-providing packages with %{import_path} prefix.
-%endif
%prep
-%setup -q -n %{repo}-%{version}
-
-%build
-%install
-# Remove network tests and examples, we don't need them packaged
-rm -r test example
-
-# source codes for building projects
-%if 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
-# find all *.go but no *_test.go files and generate devel.file-list
-for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname
"*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-%endif
-
-# testing files for this project
-%if 0%{?with_unit_test} && 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-# find all *_test.go files and generate unit-test-devel.file-list
-for file in $(find . -iname "*_test.go") ; do
- dirprefix=$(dirname $file)
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >>
unit-test-devel.file-list
-
- while [ "$dirprefix" != "." ]; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >>
devel.file-list
- dirprefix=$(dirname $dirprefix)
- done
-done
-%endif
-
-%if 0%{?with_devel}
-sort -u -o devel.file-list devel.file-list
-%endif
+%forgeautosetup -p1
-%check
-%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
-%if ! 0%{?with_bundled}
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%else
-# No dependency directories so far
-
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%endif
-%if ! 0%{?gotest:1}
-%global gotest go test
-%endif
+%install
+# Remove network tests that talk to the live Github API.
+rm -rf test
+%goinstall
-%gotest %{import_path}/github
-%endif
-#define license tag if not already defined
-%{!?_licensedir:%global license %doc}
+%check
+%gochecks
-%if 0%{?with_devel}
%files devel -f devel.file-list
%license LICENSE
-%doc README.md AUTHORS CONTRIBUTING.md
-%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
-%endif
+%doc README.md AUTHORS CONTRIBUTING.md example
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%files unit-test-devel -f unit-test-devel.file-list
-%license LICENSE
-%doc README.md AUTHORS CONTRIBUTING.md
-%endif
%changelog
+* Thu Jul 26 2018 Ed Marshall <esm(a)logic.net> - 15.0.0-5
+- Switch to forge-specific packaging.
+- Fix test failures with go 1.11.
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 15.0.0-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild