Skip to content

Instantly share code, notes, and snippets.

@aymanbagabas
Created May 23, 2026 18:43
Show Gist options
  • Select an option

  • Save aymanbagabas/ef33b07d0f2a13ce7de918adc104b69c to your computer and use it in GitHub Desktop.

Select an option

Save aymanbagabas/ef33b07d0f2a13ce7de918adc104b69c to your computer and use it in GitHub Desktop.
Fedora golang-github-hub (hub) unretire — spec for 2.14.2-19 with bundled vendored deps
# Generated by go2rpm 1.3
# The UI Tests fail upstream...
%bcond_with check
%undefine _missing_build_ids_terminate_build
# https://github.com/github/hub
%global goipath github.com/github/hub
Version: 2.14.2
%gometa
%global common_description %{expand:
A command-line tool that makes git easier to use with GitHub}
%global golicenses LICENSE
%global godocs CONTRIBUTING.md CODE_OF_CONDUCT.md README.md\\\
etc/README.md share/man/man1/hub.1.md\\\
script/changelog features/README.md
Name: %{goname}
Release: 19%{?dist}
Summary: A command-line tool that makes git easier to use with GitHub
License: MIT
URL: %{gourl}
Source0: %{gosource}
BuildRequires: golang >= 1.18
BuildRequires: git-core
BuildRequires: vim-filesystem
BuildRequires: groff-base
Requires: git-core
Requires: vim-filesystem
Provides: bundled(golang(github.com/BurntSushi/toml)) = 0.3.0
Provides: bundled(golang(github.com/atotto/clipboard)) = 0.0.0-20171229224153.gitbc5958e1c833
Provides: bundled(golang(github.com/kballard/go-shellquote)) = 0.0.0-20170619183022.gitcd60e84ee657
Provides: bundled(golang(github.com/mattn/go-colorable)) = 0.0.9
Provides: bundled(golang(github.com/mattn/go-isatty)) = 0.0.3
Provides: bundled(golang(github.com/mitchellh/go-homedir)) = 0.0.0-20161203194507.gitb8bc1bf76747
Provides: bundled(golang(github.com/russross/blackfriday)) = 0.0.0-20180526075726.git670777b536d3
Provides: bundled(golang(github.com/shurcooL/sanitized_anchor_name)) = 0.0.0-20170918181015.git86672fcb3f95
Provides: bundled(golang(golang.org/x/crypto)) = 0.0.0-20190308221718.gitc2843e01d9a2
Provides: bundled(golang(golang.org/x/net)) = 0.0.0-20191002035440.git2ec189313ef0
Provides: bundled(golang(golang.org/x/sys)) = 0.0.0-20190531175056.git4c3a928424d2
Provides: bundled(golang(golang.org/x/text)) = 0.3.0
Provides: bundled(golang(gopkg.in/yaml.v2)) = 2.0.0-20190319135612.git7b8349ac747c
%if %{with check}
Provides: bundled(golang(github.com/bmizerany/assert)) = 0.0.0-20160611221934.gitb7ed37b82869
%endif
%description
%{common_description}
%package -n hub
Summary: A command-line tool that makes git easier to use with GitHub
%description -n hub
%{common_description}
%prep
%goprep -k
rm -rf bundle/
%build
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
# make man-pages uses bin/hub and if its not there, it'll try
# to make it...
if ! [ -e bin/hub ]; then
ln -s %{gobuilddir}/bin/hub bin/hub
fi
# Make sure that `col` can handle UTF8 chars
export LC_ALL=C.UTF-8
export GOPATH=%{gopath}:$(pwd)/_build
%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
mv etc/README.md README-completion.md
mv features/README.md README-features.md
# 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 -n hub
%license LICENSE
%doc CONTRIBUTING.md CODE_OF_CONDUCT.md README.md README-completion.md
%doc share/man/man1/hub.1.md script/changelog README-features.md
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%dir %{_datadir}/fish
%dir %{_datadir}/fish/completions
%dir %{_datadir}/vim
%dir %{_datadir}/vim/vimfiles
%dir %{_datadir}/vim/vimfiles/ftdetect
%dir %{_datadir}/vim/vimfiles/syntax
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/bash-completion/completions/hub
%{_datadir}/zsh/site-functions/_hub
%{_datadir}/fish/completions/hub.fish
%{_datadir}/vim/vimfiles/ftdetect/pullrequest.vim
%{_datadir}/vim/vimfiles/syntax/pullrequest.vim
%changelog
* Sat May 23 2026 Ayman Bagabas <ayman.bagabas@gmail.com> - 2.14.2-19
- Unretire package; take over maintenance
- Switch to bundled vendored dependencies (system blackfriday-2 and
cucumber-gherkin chain were retired in releng ticket #13259)
- Drop unused patches
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Feb 11 2024 Maxwell G <maxwell@gtmx.me> - 2.14.2-15
- Rebuild for golang 1.22.0
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 2.14.2-9
- Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in
golang
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun Mar 07 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-6
- properly declare dirs with macro
* Sun Mar 07 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-5
- fix source - bad tarball was being uploaded
- own directories
- nuke vendor and bundle in prep
* Fri Mar 05 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-4
- pull in fixes from abandoned package
- add manpages, vim files, and tab completion
- drop unnecessary subpackages
* Thu Mar 04 05:51:41 UTC 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-3
- Fix patch that fixes blackfriday imports (/v2 vs .v2)
* Sun Feb 28 05:51:41 UTC 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-2
- Fix blackfriday imports
* Sun Feb 28 05:51:41 UTC 2021 Phil Dibowitz <phil@ipom.com> - 2.14.2-1
- Initial package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment