[SSSD] [PATCH] Try to build PAC responder only if all dependencies are available
Sumit Bose
sbose at redhat.com
Thu Jun 21 21:04:13 UTC 2012
Hi,
as Stephen found out the provided spec file cannot be used to build sssd
with the PAC responder on RHEL5, because samba4 is not available here.
This patch takes care that samba4 is not required on RHEL5 and the PAC
responder only builds if all dependencies are met, even with
--enable-all-experimental-features or similar set.
bye,
Sumit
-------------- next part --------------
From 7ea7827a133dbf55726a37657d2ca0998efb59bf Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Thu, 21 Jun 2012 22:12:55 +0200
Subject: [PATCH] Try to build PAC responder only if all dependencies are
available
---
contrib/sssd.spec.in | 10 ++++++++++
src/external/pac_responder.m4 | 13 ++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 8aa258270d0cbb74f3a66cee0608583147036d7d..777de90f9cd3c27180b8a28af775548a51cae4c3 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -112,8 +112,11 @@ BuildRequires: gettext-devel
BuildRequires: pkgconfig
BuildRequires: findutils
%if (0%{?enable_experimental} == 1)
+# RHEL 5 is too old to support samba4 and the PAC responder
+%if !0%{?is_rhel5}
BuildRequires: samba4-devel
%endif
+%endif
%if 0%{?is_rhel5} > 0
BuildRequires: glib2-devel
@@ -329,9 +332,14 @@ rm -rf $RPM_BUILD_ROOT
%{_libexecdir}/%{servicename}/sssd_autofs
%{_libexecdir}/%{servicename}/sssd_ssh
%{_libexecdir}/%{servicename}/sssd_sudo
+
+# RHEL 5 is too old to support the PAC responder
+%if !0%{?is_rhel5}
%{_libexecdir}/%{servicename}/sssd_pac
%endif
+%endif
+
%{_libdir}/%{name}/libsss_ipa.so
%{_libdir}/%{name}/libsss_krb5.so
%{_libdir}/%{name}/libsss_ldap.so
@@ -377,8 +385,10 @@ rm -rf $RPM_BUILD_ROOT
/%{_lib}/security/pam_sss.so
%{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so
%if (0%{?enable_experimental} == 1)
+%if !0%{?is_rhel5}
%{_libdir}/krb5/plugins/authdata/sssd_pac_plugin.so
%endif
+%endif
%{_mandir}/man8/pam_sss.8*
%{_mandir}/man8/sssd_krb5_locator_plugin.8*
diff --git a/src/external/pac_responder.m4 b/src/external/pac_responder.m4
index f2841924ba7ca3cd6e85cc14031ceb20ac112557..8c960f713487a98801f30ba40a56ec309e56fd13 100644
--- a/src/external/pac_responder.m4
+++ b/src/external/pac_responder.m4
@@ -12,10 +12,12 @@ then
build_pac_responder=yes
fi
+ndr_krb5pac_ok=no
+krb5_version_ok=no
if test x$build_pac_responder == xyes
then
- PKG_CHECK_MODULES(NDR_KRB5PAC, ndr_krb5pac,,
- AC_MSG_ERROR([Cannot build pac responder without libndr_krb5pac]))
+ PKG_CHECK_MODULES(NDR_KRB5PAC, ndr_krb5pac, ndr_krb5pac_ok=yes,
+ AC_MSG_WARN([Cannot build pac responder without libndr_krb5pac]))
AC_PATH_PROG(KRB5_CONFIG, krb5-config)
AC_MSG_CHECKING(for supported MIT krb5 version)
@@ -23,12 +25,13 @@ then
case $KRB5_VERSION in
Kerberos\ 5\ release\ 1.9* | \
Kerberos\ 5\ release\ 1.10*)
+ krb5_version_ok=yes
AC_MSG_RESULT(yes)
;;
*)
- AC_MSG_ERROR([Cannot build authdata plugin with this version of
- MIT Kerberos, please use 1.9.x or 1.10.x])
+ AC_MSG_WARN([Cannot build authdata plugin with this version of
+ MIT Kerberos, please use 1.9.x or 1.10.x])
esac
fi
-AM_CONDITIONAL([BUILD_PAC_RESPONDER], [test x$build_pac_responder = xyes ])
+AM_CONDITIONAL([BUILD_PAC_RESPONDER], [test x$build_pac_responder = xyes -a x$ndr_krb5pac_ok = xyes -a x$krb5_version_ok = xyes ])
--
1.7.10.2
More information about the sssd-devel
mailing list