[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sssd-devel
Subject:    [SSSD] [PATCHES] Make sssd.spec.in work without libini_config >= 1.1.0
From:       Nikolai Kondrashov <Nikolai.Kondrashov () redhat ! com>
Date:       2014-07-31 9:04:49
Message-ID: 53DA06B1.2090504 () redhat ! com
[Download RAW message or body]

Hi everyone,

Here are three patches which make sssd.spec.in work on distros without
libini_config-devel >= 1.1.0, which basically means all currently released
distros.

This is also done to make CI mock builds work again.

Nick

["0001-build-Don-t-install-ad-and-ipa-man-pages-unnecessari.patch" (text/x-patch)]

From 38c12961dadf68772f06cd18d3d9a03a605e97e6 Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Wed, 30 Jul 2014 21:18:35 +0300
Subject: [PATCH 1/3] build: Don't install ad and ipa man pages unnecessarily

Don't install sssd-ipa and sssd-ad man pages if corresponding providers
weren't built (i.e. --without-samba was specified to configure).
---
 src/man/Makefile.am | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/man/Makefile.am b/src/man/Makefile.am
index 03caef2..546e0ad 100644
--- a/src/man/Makefile.am
+++ b/src/man/Makefile.am
@@ -43,10 +43,14 @@ man_MANS = \
     sss_useradd.8 sss_userdel.8 sss_usermod.8 \
     sss_groupadd.8 sss_groupdel.8 sss_groupmod.8 \
     sssd.8 sssd.conf.5 sssd-ldap.5 \
-    sssd-krb5.5 sssd-ipa.5 sssd-simple.5 sssd-ad.5 \
+    sssd-krb5.5 sssd-simple.5 \
     sssd_krb5_locator_plugin.8 sss_groupshow.8 \
     pam_sss.8 sss_obfuscate.8 sss_cache.8 sss_debuglevel.8 sss_seed.8
 
+if BUILD_SAMBA
+man_MANS += sssd-ipa.5 sssd-ad.5
+endif
+
 if BUILD_SSH
 man_MANS += sss_ssh_authorizedkeys.1 sss_ssh_knownhostsproxy.1
 endif
-- 
2.0.1


["0002-build-Use-only-sed-for-extracting-rhel5_minor.patch" (text/x-patch)]

From 68365089be52d6fcd4f8ededef53e3c76a080888 Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Wed, 30 Jul 2014 17:00:45 +0300
Subject: [PATCH 2/3] build: Use only sed for extracting rhel5_minor

Use only sed for extracting RHEL5 minor version in sssd.spec.in,
avoiding additional grep use and repeating major version number in
patterns.
---
 contrib/sssd.spec.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 82d8e89..feda19b 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -4,7 +4,7 @@
 %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.//')
+%global rhel5_minor %(%{__sed} -n 's/.* 5\.\([0-9]\+\).*/\1/p' /etc/redhat-release)
 
 %if 0%{?is_rhel5} > 0
 # we don't want to provide private python extension libs
-- 
2.0.1


["0003-build-Cater-to-distros-with-older-libini_config.patch" (text/x-patch)]

From 7176ca7bcefd99b330b9be5c5b7bc294462065b8 Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Wed, 30 Jul 2014 21:37:10 +0300
Subject: [PATCH 3/3] build: Cater to distros with older libini_config

Cater to distributions with libini_config-devel < 1.1.0 in sssd.spec.in:
don't require newer libini_config-devel, build with --without-samba,
and don't build "ipa" and "ad" provider packages.
---
 contrib/sssd.spec.in | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index feda19b..c9ea3bd 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -5,6 +5,7 @@
 
 %global is_rhel5 %(%{__grep} -c "release 5" /etc/redhat-release)
 %global rhel5_minor %(%{__sed} -n 's/.* 5\.\([0-9]\+\).*/\1/p' /etc/redhat-release)
+%global rhel7_minor %(%{__sed} -n 's/.* 7\.\([0-9]\+\).*/\1/p' /etc/redhat-release)
 
 %if 0%{?is_rhel5} > 0
 # we don't want to provide private python extension libs
@@ -22,6 +23,14 @@
     %global use_systemd 1
 %endif
 
+%if (0%{?fedora} >= 21 || (0%{?rhel} == 7 && 0%{?rhel7_minor} >= 1) || 0%{?rhel} > 7)
+    %global have_libini_config_1_1 1
+%endif
+
+%if (0%{?have_libini_config_1_1} == 1)
+    %global with_samba 1
+%endif
+
 %if (0%{?use_systemd} == 1)
     %global with_initscript --with-initscript=systemd --with-systemdunitdir=%{_unitdir}
     %global with_syslog --with-syslog=journald
@@ -65,9 +74,11 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 Requires: sssd-common = %{version}-%{release}
 Requires: sssd-ldap = %{version}-%{release}
 Requires: sssd-krb5 = %{version}-%{release}
+%if 0%{?with_samba}
 Requires: sssd-ipa = %{version}-%{release}
-Requires: sssd-common-pac = %{version}-%{release}
 Requires: sssd-ad = %{version}-%{release}
+%endif
+Requires: sssd-common-pac = %{version}-%{release}
 Requires: sssd-proxy = %{version}-%{release}
 Requires: python-sssdconfig = %{version}-%{release}
 
@@ -98,7 +109,11 @@ BuildRequires: libtdb-devel
 BuildRequires: libldb-devel
 BuildRequires: libdhash-devel >= 0.4.2
 BuildRequires: libcollection-devel
+%if 0%{?have_libini_config_1_1}
 BuildRequires: libini_config-devel >= 1.1
+%else
+BuildRequires: libini_config-devel
+%endif
 BuildRequires: dbus-devel
 BuildRequires: dbus-libs
 %if 0%{?rhel5_minor} >= 7
@@ -272,6 +287,8 @@ Provides common files needed by SSSD providers such as IPA and Active Directory
 for handling Kerberos PACs.
 %endif #is_rhel5
 
+%if 0%{?with_samba}
+
 %package ipa
 Summary: The IPA back end of the SSSD
 Group: Applications/System
@@ -307,6 +324,8 @@ Requires: sssd-common-pac = %{version}-%{release}
 Provides the Active Directory back end that the SSSD can utilize to fetch
 identity data from and authenticate against an Active Directory server.
 
+%endif # with_samba
+
 %package proxy
 Summary: The proxy back end of the SSSD
 Group: Applications/System
@@ -459,6 +478,7 @@ autoreconf -ivf
     %{with_initscript} \
     %{?with_syslog} \
     %{?with_cifs_utils_plugin_option} \
+    %{!?with_samba:--without-samba} \
     %{?experimental}
 
 make %{?_smp_mflags} all
@@ -669,6 +689,8 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 
+%if 0%{?with_samba}
+
 %files ipa -f sssd_ipa.lang
 %defattr(-,root,root,-)
 %doc COPYING
@@ -684,6 +706,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_libexecdir}/%{servicename}/gpo_child
 %{_mandir}/man5/sssd-ad.5*
 
+%endif # with_samba
+
 %files proxy
 %defattr(-,root,root,-)
 %doc COPYING
-- 
2.0.1


[Attachment #6 (text/plain)]

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic