The package rpms/hub.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/hub.git/commit/?id=d4c069366466aa0bb....
Change: -ExclusiveArch: %{go_arches}
Thanks.
Full change: ============
commit d4c069366466aa0bbc5716d8c7fccc7cf878d08b Author: Stephen Gallagher sgallagh@redhat.com Date: Tue Jun 18 13:24:39 2019 -0400
Rework packaging for new F31+ golang guidelines
Signed-off-by: Stephen Gallagher sgallagh@redhat.com
diff --git a/hub.spec b/hub.spec index d560be4..ccfb6a8 100644 --- a/hub.spec +++ b/hub.spec @@ -1,149 +1,110 @@ -%global provider github -%global provider_tld com -%global project github -%global repo hub -%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} -%global import_path %{provider_prefix} +# Generated by go2rpm +%bcond_without check
-%global stable_release 1 -# Run ./hub-latest.sh to automatically update this to the latest git HEAD +# https://github.com/github/hub +%global goipath github.com/github/hub +Version: 2.12.0
-# https://fedoraproject.org/wiki/Packaging:SourceURL#Github -# For a number of reasons (immutability, availability, uniqueness), you must -# use the full commit revision hash when referring to the sources. -%global commit a9a497c53cbbcead28b45114de5ca07c0acec66c -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%gometa
+%global common_description %{expand: +Hub is a command line tool that wraps git in order to extend it with extra +features and commands that make working with GitHub easier.
-Summary: A command-line wrapper for git with github shortcuts -Name: hub -Version: 2.12.0 -Release: 1%{?dist} -License: MIT -URL: http://hub.github.com/ - -# https://fedoraproject.org/wiki/Packaging:SourceURL#Github -# Keep in mind that github tarballs are generated on-demand, so their -# modification dates will vary and cause checksum tests to fail. Reviewers will -# need to use diff -r to verify the tarballs. -%if 0%{?stable_release} -Source0: https://%%7Bprovider_prefix%7D/archive/v%%7Bversion%7D/%%7Brepo%7D-%%7Bversi... -%else -Source0: https://%%7Bprovider_prefix%7D/archive/%%7Bcommit%7D/%%7Brepo%7D-%%7Bversion... -%endif - -ExclusiveArch: %{go_arches} -BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} + $ hub clone rtomayko/tilt
-BuildRequires: git-core -BuildRequires: rubygem-cucumber -BuildRequires: vim-filesystem -BuildRequires: groff-base + # expands to: + $ git clone git://github.com/rtomayko/tilt.git}
-BuildRequires: golang(gopkg.in/yaml.v1) -BuildRequires: golang(github.com/bmizerany/assert) -BuildRequires: golang(github.com/BurntSushi/toml) -BuildRequires: golang(github.com/kballard/go-shellquote) -BuildRequires: golang(github.com/mitchellh/go-homedir) +%global golicenses LICENSE +%global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
-Requires: git-core -Requires: vim-filesystem +Name: hub +Release: 100%{?dist} +Summary: Command-line tool that makes git easier to use with GitHub
-Provides: bundled(golang(github.com/inconshreveable/go-update)) -Provides: bundled(golang(github.com/mattn/go-colorable)) -Provides: bundled(golang(github.com/mattn/go-isatty)) -Provides: bundled(golang(github.com/octokit/go-octokit)) -Provides: bundled(golang(github.com/ogier/pflag)) +License: MIT +URL: %{gourl} +Source0: %{gosource}
# Fedora: use system cucumber -Patch0001: 0001-Use-system-cucumber.patch - -# Fedora: Use distro compiler settings. Many of these have been set manually -# because there isn't an easy way to get the RPM values inserted, so check -# regularly that this is not out of date. -Patch0002: 0002-Use-Fedora-compiler-settings.patch - -# Fedora: don't trim out the source paths. They are needed for debuginfo -# generation -Patch0003: 0003-Don-t-trim-source-paths.patch - -# Upstream patches to deal with `git mod` -# Can be dropped in 2.12.1+ -Patch0004: 0004-build-pass-mod-vendoring-flag-on-newer-versions-of-g.patch -Patch0005: 0005-build-unexport-GOPATH-when-module-vendoring-is-used.patch +Patch0: 0001-Use-system-cucumber.patch + +BuildRequires: golang(github.com/atotto/clipboard) +BuildRequires: golang(github.com/BurntSushi/toml) +BuildRequires: golang(github.com/kballard/go-shellquote) +BuildRequires: golang(github.com/mattn/go-colorable) +BuildRequires: golang(github.com/mattn/go-isatty) +BuildRequires: golang(github.com/mitchellh/go-homedir) +BuildRequires: golang(github.com/russross/blackfriday) +BuildRequires: golang(golang.org/x/crypto/ssh/terminal) +BuildRequires: golang(gopkg.in/yaml.v2) +BuildRequires: git-core +BuildRequires: rubygem-cucumber +BuildRequires: vim-filesystem +BuildRequires: groff-base + +Requires: git-core +Requires: vim-filesystem + +%if %{with check} +# Tests +BuildRequires: golang(github.com/bmizerany/assert) +%endif
%description -hub is a command line tool that wraps `git` in order to extend it with extra -features and commands that make working with GitHub easier. - - $ hub clone rtomayko/tilt - - # expands to: - $ git clone git://github.com/rtomayko/tilt.git +%{common_description}
%prep -%if 0%{?stable_release} -%autosetup -p1 -%else -%autosetup -p1 -n %{name}-%{commit} -%endif - - -mkdir -p src/github.com/github/ -ln -s `pwd` src/github.com/github/hub - -rm -rf vendor/gopkg.in/yaml.v1 \ - vendor/github.com/bmizerany/assert \ - vendor/github.com/BurntSushi/toml \ - vendor/github.com/kballard/go-shellquote \ - vendor/github.com/mitchellh/go-homedir - -ln -s /usr/share/gocode/src/gopkg.in/yaml.v1 \ - vendor/gopkg.in/yaml.v1 -ln -s /usr/share/gocode/src/github.com/bmizerany/assert \ - vendor/github.com/bmizerany/assert -ln -s /usr/share/gocode/src/github.com/BurntSushi/toml \ - vendor/github.com/BurntSushi/toml -ln -s /usr/share/gocode/src/github.com/kballard/go-shellquote \ - vendor/github.com/kballard/go-shellquote -ln -s /usr/share/gocode/src/github.com/mitchellh/go-homedir \ - vendor/github.com/mitchellh/go-homedir +%goprep
%build -LDFLAGS="%{__global_ldflags} %{?__golang_extldflags}" GOPATH=`pwd` %make_build +export LDFLAGS="-X github.com/github/hub/version.Version=%{version} " +%gobuild -o %{gobuilddir}/bin/hub %{goipath} + +export GO111MODULE=off +export LC_ALL=C.UTF-8 +export GOPATH=%{gopath}:$(pwd)/_build +mkdir bin && ln -s %{gobuilddir}/bin/hub bin/hub +%make_build man-pages
%install -LDFLAGS="%{__global_ldflags} %{?__golang_extldflags}" LC_ALL=C.UTF-8 GOPATH=`pwd` %make_install PREFIX=%{_prefix} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +# Install man and vim files +for src in share/man/*/*.1 share/vim/vimfiles/*/*.vim; do + dest="%{buildroot}%{_prefix}/${src}" + mkdir -p "${dest%/*}" + install -pm 0644 "$src" "$dest" +done
# Bash-completion -install -d -m 755 %{buildroot}%{_datarootdir}/bash-completion/completions/ -cp -p etc/hub.bash_completion.sh %{buildroot}%{_datarootdir}/bash-completion/completions/hub +install -dm 755 %{buildroot}%{_datadir}/bash-completion/completions/ +cp -p etc/hub.bash_completion.sh %{buildroot}%{_datadir}/bash-completion/completions/hub
# ZSH-completion -install -d -m 755 %{buildroot}%{_datarootdir}/zsh/site-functions/ -cp -p etc/hub.zsh_completion %{buildroot}%{_datarootdir}/zsh/site-functions/_hub +install -dm 755 %{buildroot}%{_datadir}/zsh/site-functions/ +cp -p etc/hub.zsh_completion %{buildroot}%{_datadir}/zsh/site-functions/_hub
+%if %{with check} %check -export MOD_VENDOR_ARG=$(go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') - -find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' | \ - cut -d/ -f2 | sort -u | grep -v '.go$' | sed 's!^!github.com/github/hub/!' | \ - xargs go test $MOD_VENDOR_ARG -v - +%gocheck +%endif
%files %license LICENSE -%doc README.md CONTRIBUTING.md +%doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_bindir}/hub %{_mandir}/man1/* -%{_datarootdir}/bash-completion/completions/hub -%{_datarootdir}/zsh/site-functions/_hub -%{_datarootdir}/vim/vimfiles/ftdetect/pullrequest.vim -%{_datarootdir}/vim/vimfiles/syntax/pullrequest.vim - +%{_datadir}/zsh/site-functions/_hub +%{_datadir}/bash-completion/completions/hub +%{_datadir}/vim/vimfiles/ftdetect/pullrequest.vim +%{_datadir}/vim/vimfiles/syntax/pullrequest.vim
%changelog -* Mon Jun 17 2019 Stephen Gallagher sgallagh@redhat.com - 2.12.0-1 +* Mon Jun 17 2019 Robert-Andr Mauchin zebob.m@gmail.com - 2.12.0-100 +- Rework packaging for new F31+ golang guidelines - Update to 2.12.0 - Features * Add hub api --paginate option to automatically fetch all pages of results @@ -351,3 +312,4 @@ find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' | \
* Mon Mar 31 2014 Ralph Bean rbean@redhat.com - 1.12.0-1 - Initial packaging for Fedora +
commit f8ba1e0e6c8cab7175c40e780952611f51ec7e17 Author: Stephen Gallagher sgallagh@redhat.com Date: Mon Jun 17 08:33:32 2019 -0400
Update to 2.12.0
- Features * Add hub api --paginate option to automatically fetch all pages of results * Add hub pr show [<number>] command to open a pull request in the browser * Add hub pull-request --no-maintainer-edits flag to disallow project maintainers being able to push to your branch * Abort hub pull-request with a helpful error message if the current branch wasn't pushed to a git remote * hub issue -M now accepts milestone names instead of just numbers * Drop support for legacy hub.http-clone git config value
- Fixes * Fix querying git configuration when GIT_TRACE is used * Support detached HEAD if hub pull-request --head was passed * Fix newline in hub create error message * Ensure HTTP connection reuse across API calls
Signed-off-by: Stephen Gallagher sgallagh@redhat.com
diff --git a/.gitignore b/.gitignore index 6a956a0..6e1673c 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ /hub-2.10.1.tar.gz /hub-2.11.1.tar.gz /hub-2.11.2.tar.gz +/hub-2.12.0.tar.gz diff --git a/0001-Use-system-cucumber.patch b/0001-Use-system-cucumber.patch index 537cd26..c866280 100644 --- a/0001-Use-system-cucumber.patch +++ b/0001-Use-system-cucumber.patch @@ -1,7 +1,7 @@ -From 613ec5555ac22febe53e1114ed5a5b01516e51b3 Mon Sep 17 00:00:00 2001 +From 2b7bc89e0c757900799efadbbeba5bb997d605cf Mon Sep 17 00:00:00 2001 From: Stephen Gallagher sgallagh@redhat.com Date: Wed, 23 Jan 2019 03:08:52 -0500 -Subject: [PATCH 1/3] Use system cucumber +Subject: [PATCH 1/5] Use system cucumber
Signed-off-by: Stephen Gallagher sgallagh@redhat.com --- diff --git a/0002-Use-Fedora-compiler-settings.patch b/0002-Use-Fedora-compiler-settings.patch index c927724..92a2666 100644 --- a/0002-Use-Fedora-compiler-settings.patch +++ b/0002-Use-Fedora-compiler-settings.patch @@ -1,7 +1,7 @@ -From 53945abd50f194470014a9c7f1b96ed12e1031e6 Mon Sep 17 00:00:00 2001 +From 24ad876eaf3574add7465d3274b08382e6f05c1c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher sgallagh@redhat.com Date: Mon, 16 Jul 2018 11:41:25 -0400 -Subject: [PATCH 2/3] Use Fedora compiler settings +Subject: [PATCH 2/5] Use Fedora compiler settings
Make sure we are using the same compiler flags as teh rest of the distro. diff --git a/0003-Don-t-trim-source-paths.patch b/0003-Don-t-trim-source-paths.patch index 7ba437e..a43081c 100644 --- a/0003-Don-t-trim-source-paths.patch +++ b/0003-Don-t-trim-source-paths.patch @@ -1,7 +1,7 @@ -From b9bda46911920b0390a185d3ccc9a1f630ca16c4 Mon Sep 17 00:00:00 2001 +From f2177412a016f577fe07eb28c34a1d8b76c5b023 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher sgallagh@redhat.com Date: Mon, 11 Feb 2019 10:59:48 -0500 -Subject: [PATCH 3/3] Don't trim source paths +Subject: [PATCH 3/5] Don't trim source paths
This causes debuginfo generation to fail.
diff --git a/0004-build-pass-mod-vendoring-flag-on-newer-versions-of-g.patch b/0004-build-pass-mod-vendoring-flag-on-newer-versions-of-g.patch new file mode 100644 index 0000000..adccb37 --- /dev/null +++ b/0004-build-pass-mod-vendoring-flag-on-newer-versions-of-g.patch @@ -0,0 +1,67 @@ +From 18776c3c93335fc4a8ef98631d65f7ebd44296ec Mon Sep 17 00:00:00 2001 +From: Eli Schwartz eschwartz@archlinux.org +Date: Tue, 21 May 2019 12:49:38 -0400 +Subject: [PATCH 4/5] build: pass mod vendoring flag on newer versions of go + +When go autodetects that it is being run as a go mod, and that there is +a vendor directory, it will still try to redownload all sources over the +network, unless you use -mod=vendor to tell it to use that. Additionally, +when using -mod=vendor the compiler will nicely avoid messing with +$GOPATH at all, since it can operate in a completely self-contained +manner. + +Take advantage of this, when the detected go version is at least 1.11 +(when the -mod flag was introduced). +--- + Makefile | 3 ++- + script/build | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index edb7065f34c15ad24b860e66628c83a0d899b9be..c422ef2490bbf85cc2b340330a0666fbff6373bd 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,11 @@ + SOURCES = $(shell script/build files) + SOURCE_DATE_EPOCH ?= $(shell date +%s) + BUILD_DATE = $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" '+%d %b %Y' 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" '+%d %b %Y') + HUB_VERSION = $(shell bin/hub version | tail -1) + FLAGS_ALL = $(shell go version | grep -q 'go1.[89]' || echo 'all=') ++export MOD_VENDOR_ARG := $(shell go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') + export LDFLAGS := -extldflags '$(LDFLAGS)' + export GCFLAGS := $(FLAGS_ALL) + export ASMFLAGS := $(FLAGS_ALL) + + MIN_COVERAGE = 89.4 +@@ -44,11 +45,11 @@ TEXT_WIDTH = 87 + + bin/hub: $(SOURCES) + script/build -o $@ + + bin/md2roff: $(SOURCES) +- go build -o $@ github.com/github/hub/md2roff-bin ++ go build $(MOD_VENDOR_ARG) -o $@ github.com/github/hub/md2roff-bin + + test: + go test ./... + + test-all: bin/cucumber +diff --git a/script/build b/script/build +index 55782a74502e30b015e4321524a9694810c5fede..9c85da95f4e17e28c2021024fa6e9102d9adc9b6 100755 +--- a/script/build ++++ b/script/build +@@ -20,10 +20,11 @@ find_source_files() { + } + + build_hub() { + mkdir -p "$(dirname "$1")" + go build \ ++ $MOD_VENDOR_ARG \ + $COMPILEPIE \ + -compiler gc \ + -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X github.com/github/hub/version.Version=`./script/version` $LDFLAGS" \ + -gcflags "$GCFLAGS" \ + -asmflags "$ASMFLAGS" \ +-- +2.21.0 + diff --git a/0005-build-unexport-GOPATH-when-module-vendoring-is-used.patch b/0005-build-unexport-GOPATH-when-module-vendoring-is-used.patch new file mode 100644 index 0000000..cb6c4c3 --- /dev/null +++ b/0005-build-unexport-GOPATH-when-module-vendoring-is-used.patch @@ -0,0 +1,34 @@ +From a06043902614314106a259b28546bc8882f2c7e4 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz eschwartz@archlinux.org +Date: Sun, 16 Jun 2019 23:46:31 -0400 +Subject: [PATCH 5/5] build: unexport GOPATH when module vendoring is used + +The go compiler doesn't like it when you mix the two, and Travis CI does +exactly that. Take advantage of the opportunity to disable it everywhere +else as well. +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index c422ef2490bbf85cc2b340330a0666fbff6373bd..679d253946b7ec0048e422d27a16d90b89b32dd2 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,10 +6,14 @@ FLAGS_ALL = $(shell go version | grep -q 'go1.[89]' || echo 'all=') + export MOD_VENDOR_ARG := $(shell go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') + export LDFLAGS := -extldflags '$(LDFLAGS)' + export GCFLAGS := $(FLAGS_ALL) + export ASMFLAGS := $(FLAGS_ALL) + ++ifneq ($(MOD_VENDOR_ARG),) ++ unexport GOPATH ++endif ++ + MIN_COVERAGE = 89.4 + + HELP_CMD = \ + share/man/man1/hub-alias.1 \ + share/man/man1/hub-api.1 \ +-- +2.21.0 + diff --git a/hub.spec b/hub.spec index 45649ca..d560be4 100644 --- a/hub.spec +++ b/hub.spec @@ -17,7 +17,7 @@
Summary: A command-line wrapper for git with github shortcuts Name: hub -Version: 2.11.2 +Version: 2.12.0 Release: 1%{?dist} License: MIT URL: http://hub.github.com/ @@ -67,6 +67,11 @@ Patch0002: 0002-Use-Fedora-compiler-settings.patch # generation Patch0003: 0003-Don-t-trim-source-paths.patch
+# Upstream patches to deal with `git mod` +# Can be dropped in 2.12.1+ +Patch0004: 0004-build-pass-mod-vendoring-flag-on-newer-versions-of-g.patch +Patch0005: 0005-build-unexport-GOPATH-when-module-vendoring-is-used.patch + %description hub is a command line tool that wraps `git` in order to extend it with extra features and commands that make working with GitHub easier. @@ -119,11 +124,11 @@ install -d -m 755 %{buildroot}%{_datarootdir}/zsh/site-functions/ cp -p etc/hub.zsh_completion %{buildroot}%{_datarootdir}/zsh/site-functions/_hub
%check -export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath} +export MOD_VENDOR_ARG=$(go version | grep -q 'go1.1[^0]' && echo '-mod=vendor')
find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' | \ cut -d/ -f2 | sort -u | grep -v '.go$' | sed 's!^!github.com/github/hub/!' | \ - xargs go test -v + xargs go test $MOD_VENDOR_ARG -v
%files @@ -138,6 +143,23 @@ find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' | \
%changelog +* Mon Jun 17 2019 Stephen Gallagher sgallagh@redhat.com - 2.12.0-1 +- Update to 2.12.0 +- Features + * Add hub api --paginate option to automatically fetch all pages of results + * Add hub pr show [<number>] command to open a pull request in the browser + * Add hub pull-request --no-maintainer-edits flag to disallow project + maintainers being able to push to your branch + * Abort hub pull-request with a helpful error message if the current branch + wasn't pushed to a git remote + * hub issue -M now accepts milestone names instead of just numbers + * Drop support for legacy hub.http-clone git config value +- Fixes + * Fix querying git configuration when GIT_TRACE is used + * Support detached HEAD if hub pull-request --head was passed + * Fix newline in hub create error message + * Ensure HTTP connection reuse across API calls + * Mon Apr 22 2019 Stephen Gallagher sgallagh@redhat.com - 2.11.2-1 - Update to 2.11.2 - Avoid crash in hub remote argument parsing diff --git a/sources b/sources index 75e87d1..d024306 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hub-2.11.2.tar.gz) = 3b8230d1ee6619c2fe502cd3a7ad04aeab4ca77a6251c4d50c87addad3e3cbb043c8c102b080cb7a528e1d72f1ac6a59d8ca1c024f15601aa35b74961590420d +SHA512 (hub-2.12.0.tar.gz) = 5246070238e3c021b57e334989f01bde2b48c51a3a1bd8f419ea3e0bb9697048d1c8f58e2bfdac17ef3ed8996d6f1cd41a09f3d93c641c6eb404e0fcae9bae11
arch-excludes@lists.fedoraproject.org