[SSSD] [PATCH] SPEC: Drop rhel5 conditions in spec file.

Lukas Slebodnik lslebodn at redhat.com
Fri Jun 6 12:29:43 UTC 2014


On (23/05/14 17:50), Lukas Slebodnik wrote:
>On (23/05/14 17:47), Lukas Slebodnik wrote:
>>ehlo,
>>
>>In theory, it could be possible to build current master without samba
>>on rhel5, but the spec file would be very complicated.
>>It is better to simplify spec file.
>>
>>Patch is attached.
>>1 file changed, 43 deletions(-) :-)
>>
>>LS
>The patch lost somewhere.
>
>One more time
>
>LS

I found out there is already similar ticket.
Attached patch also get rid of Fedora 17 and older conditionals
    1 file changed, 6 insertions(+), 76 deletions(-) :-)

LS

PS: With recent patches[1][2][3][4], it is possible to build sssd on rhel5.
(without samba and without python bindings). The spec file would be very
complicated. I have a modified spec in my private branch. If we want we can
have spec file for epel5 in contrib directory.

[1] b3007e32fa5d6b722f3aaaf9fe7593103cb443c3
[2] 1ecb16023779f912ba1c4e9e418acb59296ce8bc
[3] 18647db9e275e7aa3e002551237abae756a2afb9
[4] a2e417f38c57ed87c956ddcecf4dafca93842b65
-------------- next part --------------
>From 4d356c54245a320f91f7b62a6cde1bfcb7ceaa50 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Fri, 23 May 2014 17:33:40 +0200
Subject: [PATCH] SPEC: Drop old OS conditions from spec file.

It can be possible to build current master without samba
on rhel5, but the spec file would be very complicated.
It is better to simplify spec file.

Resolves:
https://fedorahosted.org/sssd/ticket/1974
---
 contrib/sssd.spec.in | 82 ++++------------------------------------------------
 1 file changed, 6 insertions(+), 76 deletions(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index b5e7903713ccc6944fbed4f84c2f0413a257b760..22c21a7074b0eb059a68e3c2496fffab5b30d28e 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -1,24 +1,8 @@
-%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%endif
-
-%global is_rhel5 %(%{__grep} -c "release 5" /etc/redhat-release)
-%global rhel5_minor %(%{__grep} -o "5.[0-9]*" /etc/redhat-release |%{__sed} -s 's/5.//')
-
-%if 0%{?is_rhel5} > 0
-# we don't want to provide private python extension libs
-%{?filter_setup:
-%filter_provides_in %{python_sitearch}/.*\.so$
-%filter_setup
-}
-%else
 # Fedora and RHEL 6+
 # we don't want to provide private python extension libs
 %define __provides_exclude_from %{python_sitearch}/.*\.so$
-%endif
 
-%if (0%{?fedora} >= 16 || 0%{?rhel} >= 7)
+%if (0%{?fedora} || 0%{?rhel} >= 7)
     %global use_systemd 1
 %endif
 
@@ -38,11 +22,11 @@
 # Determine the location of the LDB modules directory
 %global ldb_modulesdir %(pkg-config --variable=modulesdir ldb)
 
-%if (0%{?fedora} > 15 || 0%{?rhel} >= 7)
+%if (0%{?fedora} || 0%{?rhel} >= 7)
 %define _hardened_build 1
 %endif
 
-%if (0%{?fedora} >= 17 || 0%{?rhel} >= 7)
+%if (0%{?fedora} || 0%{?rhel} >= 7)
     %global with_cifs_utils_plugin 1
 %else
     %global with_cifs_utils_plugin_option --disable-cifs-idmap-plugin
@@ -84,13 +68,7 @@ BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libtool
 BuildRequires: m4
-%{?fedora:BuildRequires: popt-devel}
-%if 0%{?is_rhel5} > 0
-BuildRequires: popt
-%endif
-%if 0%{?rhel} >= 6
 BuildRequires: popt-devel
-%endif
 BuildRequires: libtalloc-devel
 BuildRequires: libtevent-devel
 BuildRequires: libtdb-devel
@@ -100,11 +78,7 @@ BuildRequires: libcollection-devel
 BuildRequires: libini_config-devel
 BuildRequires: dbus-devel
 BuildRequires: dbus-libs
-%if 0%{?rhel5_minor} >= 7
-BuildRequires: openldap24-libs-devel
-%else
 BuildRequires: openldap-devel
-%endif
 BuildRequires: pam-devel
 BuildRequires: nss-devel
 BuildRequires: nspr-devel
@@ -126,8 +100,10 @@ BuildRequires: pkgconfig
 BuildRequires: findutils
 BuildRequires: glib2-devel
 BuildRequires: selinux-policy-targeted
-%if (0%{?fedora} >= 18)
+%if 0%{?fedora}
 BuildRequires: libcmocka-devel
+%endif
+%if (0%{?fedora} || 0%{?rhel} >= 7)
 BuildRequires: libnl3-devel
 %else
 BuildRequires: libnl-devel
@@ -139,10 +115,7 @@ BuildRequires: systemd-devel
 BuildRequires: cifs-utils-devel
 %endif
 
-# RHEL 5 is too old to support samba4 and the PAC responder
-%if !0%{?is_rhel5}
 BuildRequires: samba4-devel
-%endif
 BuildRequires: libsmbclient-devel
 
 %description
@@ -258,8 +231,6 @@ Requires: sssd-krb5-common = %{version}-%{release}
 Provides the Kerberos back end that the SSSD can utilize authenticate
 against a Kerberos server.
 
-# RHEL 5 is too old to support the PAC responder
-%if !0%{?is_rhel5}
 %package common-pac
 Summary: Common files needed for supporting PAC processing
 Group: Applications/System
@@ -269,7 +240,6 @@ Requires: sssd-common = %{version}-%{release}
 %description common-pac
 Provides common files needed by SSSD providers such as IPA and Active Directory
 for handling Kerberos PACs.
-%endif #is_rhel5
 
 %package ipa
 Summary: The IPA back end of the SSSD
@@ -280,10 +250,7 @@ Requires: sssd-common = %{version}-%{release}
 Requires: sssd-krb5-common = %{version}-%{release}
 Requires: libipa_hbac = %{version}-%{release}
 Requires: bind-utils
-# RHEL 5 is too old to support the PAC responder
-%if !0%{?is_rhel5}
 Requires: sssd-common-pac = %{version}-%{release}
-%endif
 
 %description ipa
 Provides the IPA back end that the SSSD can utilize to fetch identity data
@@ -297,10 +264,7 @@ Conflicts: sssd < %{version}-%{release}
 Requires: sssd-common = %{version}-%{release}
 Requires: sssd-krb5-common = %{version}-%{release}
 Requires: bind-utils
-# RHEL 5 is too old to support the PAC responder
-%if !0%{?is_rhel5}
 Requires: sssd-common-pac = %{version}-%{release}
-%endif
 
 %description ad
 Provides the Active Directory back end that the SSSD can utilize to fetch
@@ -461,16 +425,7 @@ autoreconf -ivf
 
 make %{?_smp_mflags} all
 
-
-# Only build docs on recent distros
-%if 0%{?fedora}
 make %{?_smp_mflags} docs
-%endif
-
-%if 0%{?rhel} >= 6
-make %{?_smp_mflags} docs
-%endif
-
 
 %check
 export CK_TIMEOUT_MULTIPLIER=10
@@ -656,13 +611,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/libsss_krb5.so
 %{_mandir}/man5/sssd-krb5.5*
 
-# RHEL 5 is too old to support the PAC responder
-%if !0%{?is_rhel5}
 %files common-pac
 %defattr(-,root,root,-)
 %doc COPYING
 %{_libexecdir}/%{servicename}/sssd_pac
-%endif
 
 
 %files ipa -f sssd_ipa.lang
@@ -700,12 +652,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n libsss_simpleifp-devel
 %defattr(-,root,root,-)
-%if 0%{?fedora}
 %doc sss_simpleifp_doc/html
-%endif
-%if 0%{?rhel} >= 6
-%doc sss_simpleifp_doc/html
-%endif
 %{_includedir}/sss_sifp.h
 %{_includedir}/sss_sifp_dbus.h
 %{_libdir}/libsss_simpleifp.so
@@ -717,9 +664,7 @@ rm -rf $RPM_BUILD_ROOT
 /%{_lib}/libnss_sss.so.2
 /%{_lib}/security/pam_sss.so
 %{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so
-%if !0%{?is_rhel5}
 %{_libdir}/krb5/plugins/authdata/sssd_pac_plugin.so
-%endif
 %if (0%{?with_cifs_utils_plugin} == 1)
 %{_libdir}/cifs-utils/cifs_idmap_sss.so
 %ghost %{_sysconfdir}/cifs-utils/idmap-plugin
@@ -763,12 +708,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n libsss_idmap-devel
 %defattr(-,root,root,-)
-%if 0%{?fedora}
 %doc idmap_doc/html
-%endif
-%if 0%{?rhel} >= 6
-%doc idmap_doc/html
-%endif
 %{_includedir}/sss_idmap.h
 %{_libdir}/libsss_idmap.so
 %{_libdir}/pkgconfig/sss_idmap.pc
@@ -780,12 +720,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n libipa_hbac-devel
 %defattr(-,root,root,-)
-%if 0%{?fedora}
 %doc hbac_doc/html
-%endif
-%if 0%{?rhel} >= 6
-%doc hbac_doc/html
-%endif
 %{_includedir}/ipa_hbac.h
 %{_libdir}/libipa_hbac.so
 %{_libdir}/pkgconfig/ipa_hbac.pc
@@ -797,12 +732,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n libsss_nss_idmap-devel
 %defattr(-,root,root,-)
-%if 0%{?fedora}
 %doc nss_idmap_doc/html
-%endif
-%if 0%{?rhel} >= 6
-%doc nss_idmap_doc/html
-%endif
 %{_includedir}/sss_nss_idmap.h
 %{_libdir}/libsss_nss_idmap.so
 %{_libdir}/pkgconfig/sss_nss_idmap.pc
-- 
1.9.3



More information about the sssd-devel mailing list