diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2017-04-08 13:56:25 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-05-03 09:53:02 +0200 |
commit | 1cfbec5668a283bf078ac4a8e168e8bd16b74dbf (patch) | |
tree | d918e8de456e3fe3be488f2a0d3c065dc3140df2 /contrib/sssd.spec.in | |
parent | 9055ed29ae58ad2f2123880edd41b1905813a5d7 (diff) | |
download | sssd-1cfbec5668a283bf078ac4a8e168e8bd16b74dbf.tar.gz sssd-1cfbec5668a283bf078ac4a8e168e8bd16b74dbf.tar.xz sssd-1cfbec5668a283bf078ac4a8e168e8bd16b74dbf.zip |
SPEC: Use macro python_provide conditionally
The rpm macro python_provide is defined only in fedora and epel.
This is the reason why we have fallback definition in the beginning of
spec file otherwise build on rhel would fail.
This macro is defined in file /usr/lib/rpm/macros.d/macros.python
provided by package python-rpm-macros.
sh$ rpm -qf /usr/lib/rpm/macros.d/macros.python
python-rpm-macros-3-20.fc26.noarch
sh$ grep python_provide /usr/lib/rpm/macros.d/macros.python
%python_provide() %{lua:
print("%python_provide: ERROR: ")
But this package is not installed in minimal chroot and therefore
build dependencies cannot be extracted from spec file.
sh$ mock --clean --shell 'rpm -q python-rpm-macros' 2>/dev/null
package python-rpm-macros is not installed
sh$ mock --shell 'rpm --eval "%{python_provide python-test}"' 2>/dev/null
%{python_provide python-test}
sh$ mock --resultdir . --rebuild sssd-1.15.3-0.fc26.src.rpm
...
error: line 295: Unknown tag: %{python_provide python2-sssdconfig}
...
This is the reason why it has to be used conditionally in fedora as it is shown
in example common spec file in python fedora packaging guidelines
http://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
sh$ rpm -q --whatrequires python-rpm-macros
python2-devel-2.7.13-5.fc26.x86_64
python3-devel-3.6.0-22.fc26.x86_64
This patch reduce differences between upstream and fedora spec file.
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'contrib/sssd.spec.in')
-rw-r--r-- | contrib/sssd.spec.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 0b774d986..72491cd4e 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -328,7 +328,7 @@ Summary: SSSD and IPA configuration file manipulation classes and functions Group: Applications/System License: GPLv3+ BuildArch: noarch -%{python_provide python2-sssdconfig} +%{?python_provide:%python_provide python2-sssdconfig} %description -n python2-sssdconfig Provides python2 files for manipulation SSSD and IPA configuration files. @@ -339,7 +339,7 @@ Summary: SSSD and IPA configuration file manipulation classes and functions Group: Applications/System License: GPLv3+ BuildArch: noarch -%{python_provide python3-sssdconfig} +%{?python_provide:%python_provide python3-sssdconfig} %description -n python3-sssdconfig Provides python3 files for manipulation SSSD and IPA configuration files. @@ -350,7 +350,7 @@ Summary: Python2 bindings for sssd Group: Development/Libraries License: LGPLv3+ Requires: sssd-common = %{version}-%{release} -%{python_provide python2-sss} +%{?python_provide:%python_provide python2-sss} %description -n python2-sss Provides python2 module for manipulating users, groups, and nested groups in @@ -366,7 +366,7 @@ Summary: Python3 bindings for sssd Group: Development/Libraries License: LGPLv3+ Requires: sssd-common = %{version}-%{release} -%{python_provide python3-sss} +%{?python_provide:%python_provide python3-sss} %description -n python3-sss Provides python3 module for manipulating users, groups, and nested groups in @@ -381,7 +381,7 @@ Also provides several other useful python3 bindings: Summary: Python2 bindings for murmur hash function Group: Development/Libraries License: LGPLv3+ -%{python_provide python2-sss-murmur} +%{?python_provide:%python_provide python2-sss-murmur} %description -n python2-sss-murmur Provides python2 module for calculating the murmur hash version 3 @@ -391,7 +391,7 @@ Provides python2 module for calculating the murmur hash version 3 Summary: Python3 bindings for murmur hash function Group: Development/Libraries License: LGPLv3+ -%{python_provide python3-sss-murmur} +%{?python_provide:%python_provide python3-sss-murmur} %description -n python3-sss-murmur Provides python3 module for calculating the murmur hash version 3 @@ -528,7 +528,7 @@ License: LGPLv3+ Requires: libipa_hbac = %{version}-%{release} Provides: libipa_hbac-python = %{version}-%{release} Obsoletes: libipa_hbac-python < 1.12.90 -%{python_provide python2-libipa_hbac} +%{?python_provide:%python_provide python2-libipa_hbac} %description -n python2-libipa_hbac The python2-libipa_hbac contains the bindings so that libipa_hbac can be @@ -540,7 +540,7 @@ Summary: Python3 bindings for the FreeIPA HBAC Evaluator library Group: Development/Libraries License: LGPLv3+ Requires: libipa_hbac = %{version}-%{release} -%{python_provide python3-libipa_hbac} +%{?python_provide:%python_provide python3-libipa_hbac} %description -n python3-libipa_hbac The python3-libipa_hbac contains the bindings so that libipa_hbac can be @@ -573,7 +573,7 @@ License: LGPLv3+ Requires: libsss_nss_idmap = %{version}-%{release} Provides: libsss_nss_idmap-python = %{version}-%{release} Obsoletes: libsss_nss_idmap-python < 1.12.90 -%{python_provide python2-libsss_nss_idmap} +%{?python_provide:%python_provide python2-libsss_nss_idmap} %description -n python2-libsss_nss_idmap The python2-libsss_nss_idmap contains the bindings so that libsss_nss_idmap can @@ -585,7 +585,7 @@ Summary: Python3 bindings for libsss_nss_idmap Group: Development/Libraries License: LGPLv3+ Requires: libsss_nss_idmap = %{version}-%{release} -%{python_provide python3-libsss_nss_idmap} +%{?python_provide:%python_provide python3-libsss_nss_idmap} %description -n python3-libsss_nss_idmap The python3-libsss_nss_idmap contains the bindings so that libsss_nss_idmap can |