# Generated by go2rpm
%bcond_without check
# https://github.com/github/hub
%global goipath github.com/github/hub
Version: 2.14.2
%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.
$ hub clone rtomayko/tilt
# expands to:
$ git clone git://github.com/rtomayko/tilt.git}
%global golicenses LICENSE
%global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
Name: hub
Release: 3%{?dist}
Summary: Command-line tool that makes git easier to use with GitHub
License: MIT
URL: %{gourl}
Source0: %{gosource}
# Fedora: use system cucumber
Patch0001: 0001-Use-system-cucumber.patch
# Use blackfriday.v2
Patch0002: 0002-Use-blackfriday.v2.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(golang.org/x/crypto/ssh/terminal)
BuildRequires: golang(golang.org/x/net/http/httpproxy)
BuildRequires: golang(gopkg.in/russross/blackfriday.v2)
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
%{common_description}
%prep
%goprep
%patch0001 -p1
%patch0002 -p1
%build
mkdir -p bin
export LDFLAGS="-X github.com/github/hub/version.Version=%{version} "
%gobuild -o %{gobuilddir}/bin/hub %{goipath}
%gobuild -o bin/md2roff github.com/github/hub/md2roff-bin
export GO111MODULE=off
export LC_ALL=C.UTF-8
export GOPATH=%{gopath}:$(pwd)/_build
ln -s %{gobuilddir}/bin/hub bin/hub
%make_build man-pages
%install
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 -dm 755 %{buildroot}%{_datadir}/bash-completion/completions/
cp -p etc/hub.bash_completion.sh %{buildroot}%{_datadir}/bash-completion/completions/hub
# ZSH-completion
install -dm 755 %{buildroot}%{_datadir}/zsh/site-functions/
cp -p etc/hub.zsh_completion %{buildroot}%{_datadir}/zsh/site-functions/_hub
# FISH-completion
install -dm 755 %{buildroot}%{_datadir}/fish/completions/
cp -p etc/hub.fish_completion %{buildroot}%{_datadir}/fish/completions/hub.fish
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
%{_bindir}/hub
%{_mandir}/man1/*
%{_datadir}/zsh/site-functions/_hub
%{_datadir}/bash-completion/completions/hub
%{_datadir}/fish/completions/hub.fish
%{_datadir}/vim/vimfiles/ftdetect/pullrequest.vim
%{_datadir}/vim/vimfiles/syntax/pullrequest.vim
%changelog
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Mar 16 2020 Stephen Gallagher <sgallagh@redhat.com> - 2.14.2-1
- Update to 2.14.2
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Jan 21 2020 Stephen Gallagher <sgallagh@redhat.com> - 2.14.0-1
- Update to 2.14.0
* Wed Nov 06 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.13.0-1
- Update to 2.13.0
* Thu Oct 03 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.12.8-1
- Update to 2.12.8
* Mon Sep 23 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.12.7-1
- Update to 2.12.7
- Add support for fish shell completion
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Jul 19 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.12.3-1
- Update to 2.12.3
* Wed Jul 17 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.12.2-1
- Update to 2.12.2
* 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
* 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
- Fix `hub -C mydir merge <URL>` by propagating global git arguments to
Before/After chains
- Preserve tilde ~ character in man pages
* Fri Mar 29 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.11.1-1
- Update to 2.11.1
- Fix compatibility with git when run with no arguments: hub --git-dir=.git
- Fix issue/PR --format %L output in no-color mode
- Create draft pull requests with hub pull-request --draft
- Fix non-draft pull requests for certain repositories
* Thu Mar 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.10.1-1
- Update to 2.10.1
- Fix writing over existing cache files in hub api
- Allow repository names that start with a - character
- List api among custom hub commands in help
* Thu Feb 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.10.0-2
- Install bash-completion into the correct path (BZ #1683866)
* Mon Feb 25 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.10.0-1
- Update to 2.10.0
- Features
* New hub pr --format fields %pS and %pC for PR state and color
%pS: "open", "draft", "merged", or "closed"
%pC: green, gray, purple, or red
* Have commands with rich output respect the --color flag
default: --color=auto
--color is equivalent to --color=always
--color=never disables color for TTYs
- Fixes
* Make man pages parseable with whatis
* Make hub checkout work independently of remote refspec
* Wed Feb 13 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.9.0-1
- Update to 2.9.0
- Features
* Add support for hub ci-status --format <FORMAT> string
* Add hub create --remote-name <REMOTE> flag
* Allow passing in a raw request body via hub api --input <FILE>
* Cache HTTP 4xx (except 403) server responses in hub api --cache
- Fixes
* Ensure consistent ordering of hub ci-status -v results
* Avoid crashing on invalid GitHub hostname
* Fix parsing empty string within command-line arguments
* Mon Feb 11 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.8.4-1
- Update to 2.8.4
- Drop DWARF decompression patch
- Use Fedora compiler and linker flags
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 23 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.7.1-1
- Update to 2.7.1
- https://github.com/github/hub/releases/tag/v2.7.1
- https://github.com/github/hub/releases/tag/v2.7.0
* Thu Nov 01 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.6.0-1
- Update to 2.6.0
- https://github.com/github/hub/releases/tag/v2.6.0
- Features
* Use "scissors" line to delineate comments in editable messages instead of
stripping away lines that start with #
* New command `hub issue show <NUMBER>`
* Add `hub release show --format=<FORMAT>` functionality
* `hub pr list --format=%rs` lists requested reviewers
* Add support for communicating with GitHub Enterprise over Unix socket
- Fixes
* Prevent `hub create` setting a public upstream when creating a private repo
* Fix `hub release create/edit/delete` when there are multiple git remotes
* Auto-detect private/pushable repos in `hub remote add`
* Fix `hub ci-status` exit code when there is only Checks
* Allow `hub compare <RANGE>` even if not on any branch
* Ensure consistent sort direction when listing issues, PRs
* Match requested team names by slug instead of name in
`hub pull-request -r <TEAM>`
* Fri Sep 28 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.5.1-1
- Update to 2.5.1
- hub issue create: ignore the .github/ISSUE_TEMPLATE directory instead of
crashing
- hub pull-request: avoid re-requesting reviewers in case of CODEOWNERS
- hub ci-status: handle cases when Checks API is unavailable, like older
GitHub Enterprise
- Handle HTTP 422 message format from server response
- Ignore crash for malformed ~/.config/hub file
- Clarify hub init -g documentation that it doesn't imply hub create
- hub clone: add more documentation about git protocol used
* Tue Jul 17 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.5.0-2
- Fix generation of debuginfo for F29
* Mon Jul 16 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.5.0-1
- Update to 2.5.0
- Features
* Have ci-status also query Checks API
- Fixes
* Do not pass '--cmd' to vi editor to ensure compatibility with older vi
* Simplify cherry-picking commits from pull request URLs
* Allow single-character branches/tag names in hub compare
* Fix hub compare for Enterprise when <USER> is specified
* Support remote add -t BRANCH argument
* Bash shell completion fixes for git 2.18
* Documentation fixes
* Thu Jun 14 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.4.0-2
- Don't own manpage directory
* Wed Jun 13 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.4.0-1
- Release hub 2.4.0
- https://github.com/github/hub/releases/tag/v2.4.0
* Fri Jun 01 2018 Stephen Gallagher <sgallagh@redhat.com> - 2.3.0-1
- Release hub 2.3.0
- https://github.com/github/hub/releases/tag/v2.3.0
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Mar 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 2.2.9-3
- Rebuild for golang bug that caused segfaults
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Nov 17 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.2.9-1
- Update to latest stable release 2.2.9
* Wed Sep 28 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.2.5-3
- Really fix location of ZSH completion script
* Tue Sep 13 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.2.5-2
- Fix location of ZSH completion script
* Wed Aug 31 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.2.5-1
- Update to new (and latest) major release of hub
- Include ZSH completion script
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Sep 11 2015 Ralph Bean <rbean@redhat.com> - 1.12.4-5
- Adjust ownership of bash_completion file/dir.
* Fri Sep 11 2015 Ralph Bean <rbean@redhat.com> - 1.12.4-4
- Ship bash completion file.
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed May 27 2015 Ralph Bean <rbean@redhat.com> - 1.12.4-2
- Require ruby (for ruby-mri. jruby and hub don't get along.)
https://bugzilla.redhat.com/show_bug.cgi?id=1225254
* Wed Apr 22 2015 Ralph Bean <rbean@redhat.com> - 1.12.4-1
- New version
- Stop building with rdoc for now because its being so squirrely.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 28 2014 Ralph Bean <rbean@redhat.com> - 1.12.1-1
- Latest upstream.
* Thu May 22 2014 Ralph Bean <rbean@redhat.com> - 1.12.0-4
- Add -doc subpackage with rdoc product.
- Add check section, but left it commented out due to dep issues.
- Remove spurious man files.
- Remove weirdly nested docs from rdoc.
* Wed Apr 02 2014 Ralph Bean <rbean@redhat.com> - 1.12.0-3
- Update Source0 URL to use the github guidelines.
- Replace weird %%prep %%setup stuff with something more familiar.
* Wed Apr 02 2014 Ralph Bean <rbean@redhat.com> - 1.12.0-2
- Remove version from the doc directory.
- Replace install macro with just "install".
* Mon Mar 31 2014 Ralph Bean <rbean@redhat.com> - 1.12.0-1
- Initial packaging for Fedora