From b05fe2fe4bd665063c2a2ac64cd4b0a9f6a8e0f8 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Mar 16 2018 14:49:22 +0000 Subject: Issue 49603 - 389-ds-base package rebuilt on EPEL can't be installed due to missing dependencies Bug Description: On EPEL python3 packages are not built, but still mentioned in Requires. This prevents 389-ds-base from being installed. Fix Description: Require python3-lib389 only on Fedora and EPEL > 7. Additionally fix conditionals according to packaging guidelines. https://pagure.io/389-ds-base/issue/49603 Reviewed by: mreynolds (Thanks!) --- diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index ebe1bcd..bc66ae2 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -121,7 +121,9 @@ BuildRequires: gperftools-devel # Now, attach the requires only to the package that needs them. # -libs has most of our runtime libs Requires: %{name}-libs = %{version}-%{release} +%if 0%{?rhel} > 7 || 0%{?fedora} Requires: python%{python3_pkgversion}-lib389 = %{version}-%{release} +%endif # Attach to -base our script deps %if %{use_tcmalloc} Requires: gperftools-libs @@ -315,7 +317,7 @@ autoreconf -fiv $NSSARGS $TCMALLOC_FLAGS $ASAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \ --enable-cmocka -%if 0%{?rhel} >= 8 || 0%{?fedora} +%if 0%{?rhel} > 7 || 0%{?fedora} make setup.py # lib389 @@ -341,7 +343,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install # Copy in our docs from doxygen. cp -r %{_builddir}/%{name}-%{version}%{?prerel}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3 -%if 0%{?rhel} >= 8 || 0%{?fedora} +%if 0%{?rhel} > 7 || 0%{?fedora} # lib389 pushd src/lib389 %py3_install @@ -504,7 +506,7 @@ fi %{_bindir}/* # We have to seperate this from being a glob to ensure the caps are applied. %caps(CAP_NET_BIND_SERVICE=pe) %{_sbindir}/ns-slapd -%if 0%{?rhel} >= 8 || 0%{?fedora} +%if 0%{?rhel} > 7 || 0%{?fedora} %{_sbindir}/dsconf %{_sbindir}/dscreate %{_sbindir}/dsctl @@ -610,14 +612,14 @@ fi %{_mandir}/man1/ldap-agent.1.gz %{_unitdir}/%{pkgname}-snmp.service -%if 0%{?rhel} >= 8 || 0%{?fedora} +%if 0%{?rhel} > 7 || 0%{?fedora} %files -n python%{python3_pkgversion}-lib389 %defattr(-,root,root,-) %doc LICENSE LICENSE.GPLv3+ %{python3_sitelib}/lib389* %endif -%if 0%{?rhel} >= 8 || 0%{?fedora} +%if 0%{?rhel} > 7 || 0%{?fedora} %files -n python%{python3_pkgversion}-%{srcname}-tests %defattr(-,root,root,-) %doc LICENSE LICENSE.GPLv3+