Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

%define compdir %(pkg-config --variable=completionsdir bash-completion)
%if "%{compdir}" == ""
%define compdir "/etc/bash_completion.d"
%endif

Name:           fedpkg
Version:        1.29
Release:        5%{?dist}
Summary:        Fedora utility for working with dist-git

Group:          Applications/System
License:        GPLv2+
URL:            https://pagure.io/fedpkg
Source0:        https://pagure.io/releases/fedpkg/%{name}-%{version}.tar.bz2
Patch0:         0001-Get-correct-build-target-for-rawhide-containers.patch
Patch1:         0002-Fix-container-build-target.patch

BuildArch:      noarch

BuildRequires:  pkgconfig
BuildRequires:  python2-devel
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires:  python-setuptools
%else
BuildRequires:  python2-setuptools
%endif
# We br these things for man page generation due to imports
BuildRequires:  pyrpkg >= 1.50
BuildRequires:  fedora-cert
BuildRequires:  bash-completion
# This until fedora-cert gets fixed
BuildRequires:  python2-fedora
# For testing
BuildRequires:  git
BuildRequires:  python2-mock
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires:  python-nose
%else
BuildRequires:  python2-nose
%endif

Requires:       bodhi-client
Requires:       fedora-cert
Requires:       fedora-packager
Requires:       koji
Requires:       pyrpkg >= 1.50
Requires:       python2-fedora
Requires:       python2-pycurl
Requires:       redhat-rpm-config


%description
Provides the fedpkg command for working with dist-git

%package        -n fedpkg-stage
Summary:        Fedora utility for working with dist-git
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    -n fedpkg-stage
Provides the fedpkg command for working with dist-git

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%{__python} setup.py build
%{__python} doc/fedpkg_man_page.py > fedpkg.1


%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%{__install} -d $RPM_BUILD_ROOT%{_mandir}/man1
%{__install} -p -m 0644 fedpkg.1 $RPM_BUILD_ROOT%{_mandir}/man1
%if 0%{?rhel} && 0%{?rhel} == 7
# The completion file must be named similarly to the command.
mv $RPM_BUILD_ROOT%{compdir}/fedpkg.bash $RPM_BUILD_ROOT%{compdir}/fedpkg
%endif


%check
nosetests


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING README CHANGELOG.rst
%config(noreplace) %{_sysconfdir}/rpkg/fedpkg.conf
%(dirname %{compdir})
%{_bindir}/%{name}
%{_mandir}/*/*
# For noarch packages: sitelib
%{python_sitelib}/*
# zsh completion
%{_datadir}/zsh/site-functions/_%{name}

%files  stage
%defattr(-,root,root,-)
%{_bindir}/%{name}-stage
%config(noreplace) %{_sysconfdir}/rpkg/fedpkg-stage.conf


%changelog
* Fri Sep 15 2017 Lubomír Sedlář <lsedlar@redhat.com> - 1.29-5
- Use correct build target for containers

* Mon Sep 04 2017 Chenxiong Qi <cqi@redhat.com> - 1.29-4
- Fix fedpkg N-V-R dependency in fedpkg-stage subpackage

* Fri Sep 01 2017 Chenxiong Qi <cqi@redhat.com> - 1.29-3
- Fix: work properly with koji prod and stg profile

* Fri Aug 18 2017 Chenxiong Qi <cqi@redhat.com> - 1.29-2
- python2-rpkg-1.50 is minimum version required

* Thu Aug 17 2017 Chenxiong Qi <cqi@redhat.com> - 1.29-1
- Remove unused variable in Commands.retire (cqi)
- No more pkgdb. (rbean)
- Add --arches to build completions (ville.skytta)
- Add ppc64le to arch completions (ville.skytta)
- Explain how to write a note in multiple lines in update template - #123 (cqi)
- Remove code that handles secondary arch (cqi)
- Simplify passing arguments when creating Command object - #14 (cqi)
- Set koji profile for secondary arch immediately (cqi)
- Use profile to load Koji configuration - #97 (cqi)
- Remove push.default from clone_default - #109 (cqi)
- remove special handling of s390 specific packages (dan)
- Replace fedorahosted.org with pagure.io in manpage - #113 (cqi)
- Remove tracbaseurl from conf file - #112 (cqi)
- Set disttag properly (cqi)
- koji stage config moved, update fedpkg defaults (maxamillion)
- Specific help of --release for fedpkg - rhbz#1054440 (cqi)

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.28-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Feb 27 2017 Chenxiong Qi <cqi@redhat.com> - 1.28-1
- Restore anonymous clone link - rhbz#1425913 (cqi)

* Wed Feb 22 2017 Chenxiong Qi <cqi@redhat.com> - 1.27-2
- Rebuilt with updated tarball

* Wed Feb 22 2017 Chenxiong Qi <cqi@redhat.com> - 1.27-1
- Python 3.6 invalid escape sequence deprecation fixes (ville.skytta)
- Disable tag inheritance check - #98 (cqi)
- Enable the fix to allow anonymous clone via https

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.26-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 01 2017 Lubomír Sedlář <lsedlar@redhat.com> - 1.26-5
- Disable tag inheritance check

* Thu Dec 15 2016 Chenxiong Qi <cqi@redhat.com> - 1.26-4
- Fix handle unicode chars in git log - BZ#1404724 (cqi)
- Fix: make fedpkg workable with bodhi 2 CLI - #87 (cqi)
- Fix --dist/--release option for 'master' %dist detection (praiskup)

* Mon Dec 12 2016 Lubomír Sedlář <lsedlar@redhat.com> - 1.26-3
- sha512 should be also used in fedpkg-stage (cqi)
- conf: s/kerberos_realm/kerberos_realms/ (i.gnatenko.brain)

* Fri Dec 09 2016 Chenxiong Qi <cqi@redhat.com> - 1.26-2
- Split fedpkg-stage into a separate package

* Fri Dec 02 2016 Chenxiong Qi <cqi@redhat.com> - 1.26-1
- New release of 1.26

* Thu Sep 01 2016 Chenxiong Qi <cqi@redhat.com> - 1.25-1
- update project URL (mattdm)
- Allow fedpkg to be compatible with both bodhi 1 and bodhi 2. (randy)
- Modify the bodhi cli usage for `fedpkg update`. (lmacken)
- Add nosetest configuration (cqi)
- replace gitbuildurl with gitbuildhash (cqi)

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Jul 08 2016 Chenxiong Qi <cqi@redhat.com> - 1.24-3
- Depends on pyrpkg 1.45

* Mon Jun 27 2016 Chenxiong Qi <cqi@redhat.com> - 1.24-1
- Add a guide for releasing new version (lsedlar)
- Merge #10 `Python 3 compatibility fixes` (lubomir.sedlar)
- Add ZSH completion by Alexey I. Froloff (lsedlar)
- Merge #28 `fix broken when non-ASCII in path` (lubomir.sedlar)
- fix broken when non-ASCII in path (cqi)
- Fix tests for retire with new rpkg (lsedlar)
- use setup.cfg to make bztar as the default format for sdist (cqi)
- Configure git user for tests (lsedlar)
- Fix tests on Python 2.6 (lsedlar)
- Python 3 compatibility fixes (ville.skytta)

* Wed Jun 08 2016 Lubomír Sedlář <lsedlar@redhat.com> - 1.23-3
- Rename bash completion on EPEL

* Thu Jun 02 2016 Lubomír Sedlář <lsedlar@redhat.com> - 1.23-2
- Add build dep on bash-completion

* Thu Mar 31 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1.23-1
- Fix fedpkg retire with namespace
- Enable test suite during build

* Sun Mar 20 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1.22-3
- Bump dependency on rpkg

* Wed Mar 16 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1.22-2
- Bump version

* Mon Mar 14 2016 Lubomír Sedlář <lubomir.sedlar@gmail.com> - 1.22-1
- Update upstream URL (lsedlar)
- Fix bash completion. (lsedlar)
- add container-build bash completion and enable distgit namepacing (provided
  by pyrpkg) (maxamillion)
- Install bash completion to where bash-completion.pc says (ville.skytta)
- flake8 fixes (ville.skytta)
- Python 3 compatibility fixes (ville.skytta)

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Oct 23 2015 Pavol Babincak <pbabinca@redhat.com> - 1.21-1
- Use rpkg's backwards compatible clone_config (pbabinca)
- Merge #7 `Fix Deprecation warning during fedpkg update run`
  (kumarpraveen.nitdgp)
- Fix Deprecation Warning - /usr/lib/python2.7/site-packages/fedpkg/cli.py:1:
  DeprecationWarning:   Commands._hash_file is deprecated and will be removed
  eventually (kumarpraveen.nitdgp)
- Merge #3 `Add post-clone bz and sendemail config, requires rpkg > 1.36`
  (ville.skytta)
- Add post-clone bz and sendemail config, requires rpkg > 1.36 (ville.skytta)
- lookaside: Use our new download path (bochecha)
- Simplify handling of our custom certificates (bochecha)
- Drop obsolete functions (bochecha)
- Release 1.20 (pbabinca)
- Bash completion for mockbuild --no-clean* options (pbabinca)
- Hijack load_kojisession to catch auth problems (pbabinca)
- Upload source files with our preferred hash (bochecha)
- pass keyword args as keyword args (mikeb)
- For rawhide use fedora-rawhide-* mock config instead of fedora-devel-*
  (pbabinca)

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Apr 14 2015 Pavol Babincak <pbabinca@redhat.com> - 1.20-1
- Bash completion for mockbuild --no-clean* options (pbabinca)
- Hijack load_kojisession to catch auth problems (pbabinca)
- Upload source files with our preferred hash (bochecha)
- pass keyword args as keyword args (mikeb)
- For rawhide use fedora-rawhide-* mock config instead of fedora-devel-*
  (pbabinca)

* Thu Dec 18 2014 Pavol Babincak <pbabinca@redhat.com> - 1.19-2
- Remove python-offtrac from {build,}requires (rhbz#1157793)

* Fri Sep 26 2014 Pavol Babincak - 1.19-1
- Explicitly define fedpkg name for man pages (pbabinca)
- Remove (pbabinca)
- Revert "refactor: PEP 8 compliance of __init__.py" (pbabinca)
- refactor: PEP 8 compliance of __init__.py (pbabinca)
- refactor: PEP 8 compliance (pbabinca)
- retire: Ask for password only when required (opensource)
- fedpkg: Show full exception if verbose (opensource)
- add new s390 only packages (dan)
- add new ppc only packages (dan)

* Tue Jul 29 2014 Pavol Babincak <pbabinca@redhat.com> - 1.18-1
- Remove spec file again (pbabinca)
- Remove fedpkg-fixbranches as it isn't needed anymore (pbabinca)
- Remove offtrac module as we don't use Trac for buildroot override (pbabinca)
- Default name of executable if isn't possible to determine it (pbabinca)
- Allow executable name to be used as key for configuration (pbabinca)
- completion: Add mockbuild --root completion (ville.skytta)
- completion: Assume fedpkg is installed if the completion is, no need to test
  (ville.skytta)
- fix date in 1.11-2 changelog

* Tue Jul 29 2014 Dennis Gilmore <dennis@ausil.us> 1.17-3
- add missing Requires

* Fri Jul 04 2014 Pavol Babincak <pbabinca@redhat.com> - 1.17-2
- Use tar.bz2 archive which spec expects instead of tar.gz

* Fri Jul 04 2014 Pavol Babincak <pbabinca@redhat.com> - 1.17-1
- Removed spec as fedpkg is now in dist-git (pbabinca)
- Fix retirement (bochecha)

* Tue Jun 24 2014 Dennis Gilmore <dennis@ausil.us> - 1.16-1
- retire: Make retirement message/reason mandatory (opensource)
- retire: Use pkgdb2 API (opensource)
- Don't check for the config file if the user is asking for help (bochecha)

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Dec 16 2013 <dennis@ausil.us> - 1.15-1
- remove tag-request we no longer use that work flow, the process is managed
  via blocker bugs now (dennis)
- use the rpm changelog as default update template patch from
  https://bugzilla.redhat.com/show_bug.cgi?id=1023915 (dennis)
- allow epel branches to be epel<release> clean up overrides (dennis)
- Fix log message (bochecha)

* Mon Aug 26 2013 Dennis Gilmore <dennis@ausil.us> - 1.14-1
- clean up arches in fedpkg bash completeion - drop sparc - add i686 - add arm
  variants - add ppc64p7 (dennis)
- Add arm7hl to bash completion arches (opensource)
- Add more ppc64-only packages (opensource)
- remove --push from retire command in bash completion (opensource)
- undefine macros rather than define as nil (dennis)

* Sat Aug 24 2013 Dennis Gilmore <dennis@ausil.us> - 1.13-1
- Rework --retire (opensource)

* Sat Aug 24 2013 Dennis Gilmore <dennis@ausil.us> - 1.12-1
- update ppc secondary arch packages, remove sparc, point to new seconary arch
  config location (dennis)
- retire packages in packagedb as well (opensource)
- Move fedpkg to own module (opensource)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jan 06 2013 Tom Callaway <spot@fedoraproject.org> - 1.11-2
- use --eval '%%undefine to unset dist values instead of nil (bz876308)

* Tue Nov 06 2012 Jesse Keating <jkeating@redhat.com> - 1.11-1
- Unset runtime disttag (spot)
- use nil to unset dist values. (spot)

* Tue Oct 09 2012 Jesse Keating <jkeating@redhat.com> - 1.10-1
- Force invalid dist values to 0 (spot) (jkeating)
- Fix a traceback in fixbranches (#817478) (jkeating)

* Mon Mar 12 2012 Jesse Keating <jkeating@redhat.com> - 1.9-1
- Wrap the prune command in a try (rhbz#785820) (jkeating)
- Use koji if we have it to get master details (rhbz#785234) (jkeating)
- Always send builds from master to 'rawhide' (rhbz#785234) (jkeating)
- Handle fedpkg calls not from a git repo (rhbz#785776) (jkeating)

* Thu Mar 01 2012 Jesse Keating <jkeating@redhat.com> - 1.8-1
- More completion fixes (jkeating)
- Add mock-config and mockbuild completion (jkeating)
- Simplify test for fedpkg availability. (ville.skytta)
- Fix ~/... path completion. (ville.skytta)
- Add --raw to bash completion (jkeating)
- Make things quiet when possible (jkeating)
- Fix property variables (jkeating)

* Sat Jan 14 2012 Jesse Keating <jkeating@redhat.com> - 1.7-1
- Adapt property overloading to new-style class. (bochecha)
- Use super(), now that rpkg uses new-style classes everywhere (bochecha)
- Add gitbuildurl to the bash completion. (jkeating)
- Handle koji config with unknown module name (jkeating)

* Mon Nov 21 2011 Jesse Keating <jkeating@redhat.com> - 1.6-1
- Replace -c with -C for the --config option (jkeating)
- Package up fedpkg-fixbranches (#751507) (jkeating)
- Use old style of super class calls (jkeating)

* Mon Nov 07 2011 Jesse Keating <jkeating@redhat.com> - 1.5-1
- Pass along the return value from import_srpm (jkeating)
- Whitespace cleanup (jkeating)

* Mon Nov 07 2011 Jesse Keating <jkeating@redhat.com> - 1.4-1
- Use the GPLv2 content for COPYING to match intent. (jkeating)

* Thu Nov 03 2011 Jesse Keating <jkeating@redhat.com> - 1.3-1
- Fix buildrequires (jkeating)
- Don't register a nonexestant target (jkeating)
- Drop koji-rhel.conf file (jkeating)
- Fix up the setup.py (jkeating)

* Thu Nov 03 2011 Jesse Keating <jkeating@redhat.com> - 1.2-1
- Catch raises in the libraries (jkeating)
- Fix the fixbranches script for new module name (jkeating)
- srpm takes arguments, pass them along (jkeating)
- Get error output from user detection failures (jkeating)
- Get the user name from the Fedora SSL certificate. (bochecha)
- Fix crash when detecting Rawhide. (bochecha)

* Fri Oct 28 2011 Jesse Keating <jkeating@redhat.com> - 1.1-1
- Overload curl stuff (jkeating)
- Hardcode fedpkg version requires (jkeating)
- Fix up changelog date (jkeating)