2016-05-19 09:27:54 +00:00
|
|
|
%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 1.1.9}
|
2015-04-30 10:11:23 +00:00
|
|
|
%{?!dnf_not_compatible: %global dnf_not_compatible 2.0}
|
2015-09-22 10:54:54 +00:00
|
|
|
%global hawkey_version 0.6.1
|
2014-01-13 08:53:53 +00:00
|
|
|
|
2016-05-19 09:27:54 +00:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
|
%bcond_with python3
|
|
|
|
%else
|
|
|
|
%bcond_without python3
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: dnf-plugins-core
|
|
|
|
Version: 0.1.21
|
2016-08-18 14:48:19 +00:00
|
|
|
Release: 4%{?dist}
|
2016-05-19 09:27:54 +00:00
|
|
|
Summary: Core Plugins for DNF
|
|
|
|
License: GPLv2+
|
|
|
|
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
|
|
|
Source0: %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
|
2016-08-18 14:46:10 +00:00
|
|
|
Patch0001: 0001-Change-name-of-def-valid.patch
|
2016-05-19 09:27:54 +00:00
|
|
|
BuildArch: noarch
|
2015-03-06 12:45:38 +00:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gettext
|
2016-05-19 09:27:54 +00:00
|
|
|
%if %{with python3}
|
|
|
|
Requires: python3-%{name} = %{version}-%{release}
|
2015-02-23 21:14:42 +00:00
|
|
|
%else
|
2016-05-19 09:27:54 +00:00
|
|
|
Requires: python2-%{name} = %{version}-%{release}
|
2015-02-23 20:18:01 +00:00
|
|
|
%endif
|
2016-05-19 09:27:54 +00:00
|
|
|
Provides: dnf-command(builddep)
|
|
|
|
Provides: dnf-command(config-manager)
|
|
|
|
Provides: dnf-command(copr)
|
|
|
|
Provides: dnf-command(debuginfo-install)
|
|
|
|
Provides: dnf-command(download)
|
|
|
|
Provides: dnf-command(repoquery)
|
|
|
|
Provides: dnf-command(reposync)
|
|
|
|
|
2014-01-13 08:53:53 +00:00
|
|
|
%description
|
2015-12-18 17:16:47 +00:00
|
|
|
Core Plugins for DNF. This package enhances DNF with builddep, config-manager,
|
2015-03-06 12:45:38 +00:00
|
|
|
copr, debuginfo-install, download, needs-restarting, repoquery and
|
2015-02-23 21:14:42 +00:00
|
|
|
reposync commands. Additionally provides generate_completion_cache, noroot and
|
|
|
|
protected_packages passive plugins.
|
|
|
|
|
2016-05-19 09:27:54 +00:00
|
|
|
%package -n python2-%{name}
|
|
|
|
Summary: Core Plugins for DNF
|
|
|
|
%{?python_provide:%python_provide python2-%{name}}
|
2015-09-22 14:33:07 +00:00
|
|
|
BuildRequires: python2-dnf >= %{dnf_lowest_compatible}
|
|
|
|
BuildRequires: python2-dnf < %{dnf_not_compatible}
|
2016-05-19 09:27:54 +00:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
2015-02-23 21:14:42 +00:00
|
|
|
BuildRequires: python-nose
|
2016-03-22 10:27:09 +00:00
|
|
|
%else
|
2016-05-19 09:27:54 +00:00
|
|
|
BuildRequires: python2-nose
|
2016-03-22 10:27:09 +00:00
|
|
|
%endif
|
2016-05-19 09:27:54 +00:00
|
|
|
BuildRequires: python-sphinx
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
Requires: python2-dnf >= %{dnf_lowest_compatible}
|
|
|
|
Requires: python2-dnf < %{dnf_not_compatible}
|
|
|
|
Requires: python-hawkey >= %{hawkey_version}
|
|
|
|
Conflicts: %{name} <= 0.1.5
|
2015-12-18 17:16:47 +00:00
|
|
|
# let the both python plugin versions be updated simultaneously
|
2016-05-19 09:27:54 +00:00
|
|
|
Conflicts: python3-%{name} < %{version}-%{release}
|
2016-05-27 11:31:03 +00:00
|
|
|
Conflicts: python-%{name} < %{version}-%{release}
|
2016-05-19 09:27:54 +00:00
|
|
|
|
|
|
|
%description -n python2-%{name}
|
2015-12-18 17:16:47 +00:00
|
|
|
Core Plugins for DNF, Python 2 interface. This package enhances DNF with builddep, copr,
|
2015-10-14 14:42:33 +00:00
|
|
|
config-manager, debuginfo-install, download, needs-restarting, repoquery and
|
2014-12-08 15:30:09 +00:00
|
|
|
reposync commands. Additionally provides generate_completion_cache, noroot and
|
|
|
|
protected_packages passive plugins.
|
2014-01-13 08:53:53 +00:00
|
|
|
|
2016-05-19 09:27:54 +00:00
|
|
|
%if %{with python3}
|
|
|
|
%package -n python3-%{name}
|
2015-02-23 21:14:42 +00:00
|
|
|
Summary: Core Plugins for DNF
|
2016-05-19 09:27:54 +00:00
|
|
|
%{?python_provide:%python_provide python3-%{name}}
|
2015-02-23 21:14:42 +00:00
|
|
|
BuildRequires: python3-devel
|
2015-04-30 10:11:23 +00:00
|
|
|
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
|
|
|
|
BuildRequires: python3-dnf < %{dnf_not_compatible}
|
2015-02-23 21:14:42 +00:00
|
|
|
BuildRequires: python3-nose
|
|
|
|
BuildRequires: python3-sphinx
|
2016-05-19 09:27:54 +00:00
|
|
|
Requires: python3-dnf >= %{dnf_lowest_compatible}
|
|
|
|
Requires: python3-dnf < %{dnf_not_compatible}
|
|
|
|
Requires: python3-hawkey >= %{hawkey_version}
|
|
|
|
Conflicts: %{name} <= 0.1.5
|
2015-12-18 17:16:47 +00:00
|
|
|
# let the both python plugin versions be updated simultaneously
|
2016-05-19 09:27:54 +00:00
|
|
|
Conflicts: python2-%{name} < %{version}-%{release}
|
2016-05-27 11:31:03 +00:00
|
|
|
Conflicts: python-%{name} < %{version}-%{release}
|
2016-05-19 09:27:54 +00:00
|
|
|
|
|
|
|
%description -n python3-%{name}
|
2015-12-18 17:16:47 +00:00
|
|
|
Core Plugins for DNF, Python 3 interface. This package enhances DNF with builddep, copr,
|
2015-03-06 12:45:38 +00:00
|
|
|
config-manager, debuginfo-install, download, needs-restarting, repoquery and
|
2014-12-08 15:30:09 +00:00
|
|
|
reposync commands. Additionally provides generate_completion_cache, noroot and
|
|
|
|
protected_packages passive plugins.
|
2016-05-19 09:27:54 +00:00
|
|
|
%endif
|
2014-01-13 08:53:53 +00:00
|
|
|
|
|
|
|
%prep
|
2016-08-18 14:46:10 +00:00
|
|
|
%autosetup -p1
|
2016-05-19 09:27:54 +00:00
|
|
|
mkdir build-py2
|
|
|
|
%if %{with python3}
|
|
|
|
mkdir build-py3
|
|
|
|
%endif
|
2014-04-23 12:53:49 +00:00
|
|
|
|
|
|
|
%build
|
2016-05-19 09:27:54 +00:00
|
|
|
pushd build-py2
|
|
|
|
%cmake ../
|
|
|
|
%make_build
|
|
|
|
make doc-man
|
|
|
|
popd
|
|
|
|
%if %{with python3}
|
|
|
|
pushd build-py3
|
|
|
|
%cmake ../ -DPYTHON_DESIRED:str=3
|
|
|
|
%make_build
|
|
|
|
make doc-man
|
2014-04-23 12:53:49 +00:00
|
|
|
popd
|
2016-05-19 09:27:54 +00:00
|
|
|
%endif
|
2014-01-13 08:53:53 +00:00
|
|
|
|
|
|
|
%install
|
2016-05-19 09:27:54 +00:00
|
|
|
pushd build-py2
|
|
|
|
%make_install
|
2014-04-23 12:53:49 +00:00
|
|
|
popd
|
2016-05-19 09:27:54 +00:00
|
|
|
%if %{with python3}
|
|
|
|
pushd build-py3
|
|
|
|
%make_install
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
%find_lang %{name}
|
2014-01-13 08:53:53 +00:00
|
|
|
|
|
|
|
%check
|
2016-05-19 09:27:54 +00:00
|
|
|
PYTHONPATH=./plugins nosetests-%{python2_version} -s tests/
|
|
|
|
%if %{with python3}
|
|
|
|
PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
|
|
|
|
%endif
|
2014-01-13 08:53:53 +00:00
|
|
|
|
2015-03-10 16:57:37 +00:00
|
|
|
%files
|
|
|
|
%{_mandir}/man8/dnf.plugin.*
|
|
|
|
|
2016-05-19 09:27:54 +00:00
|
|
|
%files -n python2-%{name} -f %{name}.lang
|
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS README.rst
|
2014-07-03 07:59:31 +00:00
|
|
|
%dir %{_sysconfdir}/dnf/protected.d
|
2014-12-08 15:30:09 +00:00
|
|
|
%ghost %{_var}/cache/dnf/packages.db
|
2016-02-25 12:57:14 +00:00
|
|
|
%config %{_sysconfdir}/dnf/plugins/*
|
2016-05-19 09:27:54 +00:00
|
|
|
%{python2_sitelib}/dnf-plugins/*
|
|
|
|
%{python2_sitelib}/dnfpluginscore/
|
2014-01-13 08:53:53 +00:00
|
|
|
|
2016-05-19 09:27:54 +00:00
|
|
|
%if %{with python3}
|
|
|
|
%files -n python3-%{name} -f %{name}.lang
|
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS README.rst
|
2014-07-03 07:59:31 +00:00
|
|
|
%dir %{_sysconfdir}/dnf/protected.d
|
2014-12-08 15:30:09 +00:00
|
|
|
%ghost %{_var}/cache/dnf/packages.db
|
2016-02-25 12:57:14 +00:00
|
|
|
%config %{_sysconfdir}/dnf/plugins/*
|
2015-02-09 11:05:05 +00:00
|
|
|
%exclude %{python3_sitelib}/dnf-plugins/__pycache__/
|
2015-02-23 20:18:01 +00:00
|
|
|
%exclude %{python3_sitelib}/dnf-plugins/kickstart.py
|
2014-04-23 12:53:49 +00:00
|
|
|
%{python3_sitelib}/dnf-plugins/*
|
2015-02-09 11:05:05 +00:00
|
|
|
%{python3_sitelib}/dnf-plugins/__pycache__/*
|
2014-04-23 12:53:49 +00:00
|
|
|
%{python3_sitelib}/dnfpluginscore/
|
2016-05-19 09:27:54 +00:00
|
|
|
%endif
|
2014-01-13 08:53:53 +00:00
|
|
|
|
|
|
|
%changelog
|
2016-08-18 14:48:19 +00:00
|
|
|
* Thu Aug 18 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.21-4
|
2016-08-18 14:46:10 +00:00
|
|
|
- Backport patch for copr for guessing chroot
|
|
|
|
- Trim changelog
|
|
|
|
|
2016-07-19 06:57:38 +00:00
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.21-3
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
|
2016-08-18 14:46:10 +00:00
|
|
|
* Fri May 27 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.21-2
|
|
|
|
- spec: explicitly conflict with python-%%{name} with different version
|
2014-01-13 08:53:53 +00:00
|
|
|
|
2016-08-18 14:46:10 +00:00
|
|
|
* Thu May 19 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.21-1
|
|
|
|
- update to 0.1.21
|