[Freeipa-devel] [PATCH] 0101 specfile: detect Kerberos DAL driver ABI change from installed krb5-devel package

Alexander Bokovoy abokovoy at redhat.com
Thu Apr 4 17:07:10 UTC 2013


On Thu, 04 Apr 2013, Alexander Bokovoy wrote:
>Find out Kerberos middle version to infer ABI changes in DAL driver.
>
>We cannot load DAL driver into KDC with wrong ABI. This is also needed
>to support ipa-devel repository where krb5 1.11 is available for Fedora 18.
>
>Right now krb5 1.11 is in ipa-devel repo for Fedora 18 and FreeIPA git
>master packages built against it but bear wrong Requires, resulting in
>inability to install FreeIPA on Fedora 18.

After discussing with Simo, now discover real DAL ABI version:

3 is Kerberos 1.10
4 is Kerberos 1.11

so far.

I'm using 'cpp -dM' to extract list of defined macros instead of
grepping /usr/include/kdb.h directly to avoid breakage if kdb.h would be
split out at some point (if any).

-- 
/ Alexander Bokovoy
-------------- next part --------------
>From 3cdde9b8441434ee80bbcba8c0e6a687c057a19a Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy at redhat.com>
Date: Thu, 4 Apr 2013 18:20:25 +0300
Subject: [PATCH] spec: detect Kerberos DAL driver ABI change from installed
 krb5-devel

Find out Kerberos middle version to infer ABI changes in DAL driver.

We cannot load DAL driver into KDC with wrong ABI. This is also needed to
support ipa-devel repository where krb5 1.11 is available for Fedora 18.
---
 freeipa.spec.in | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 5e84453..3461e06 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -74,6 +74,11 @@ BuildRequires:  check
 BuildRequires:  libsss_idmap-devel
 BuildRequires:  java-1.7.0-openjdk
 
+# Find out Kerberos middle version to infer ABI changes in DAL driver
+# We cannot load DAL driver into KDC with wrong ABI.
+# This is also needed to support ipa-devel repository where krb5 1.11 is available for F18
+%global krb5_dal_version %{expand:%(echo "#include <kdb.h>"|cpp -dM|grep KRB5_KDB_DAL_MAJOR_VERSION|cut -d' ' -f3)}
+
 %description
 IPA is an integrated solution to provide centrally managed Identity (machine,
 user, virtual machines, groups, authentication credentials), Policy
@@ -92,10 +97,10 @@ Requires: 389-ds-base >= 1.3.0.5
 Requires: openldap-clients
 Requires: nss
 Requires: nss-tools
-%if 0%{?fedora} >= 19
+%if 0%{?krb5_dal_version} >= 4
 Requires: krb5-server >= 1.11
 %else
-%if 0%{?fedora} == 18
+%if 0%{krb5_dal_version} == 3
 # krb5 1.11 bumped DAL interface major version, a rebuild is needed
 Requires: krb5-server < 1.11
 Requires: krb5-server >= 1.10
@@ -783,6 +788,9 @@ fi
 %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
 
 %changelog
+* Thu Apr  4 2013 Alexander Bokovoy <abokovoy at redhat.com> - 3.1.99-3
+- Make sure build against Krb5 1.11 in Fedora 18 environment creates proper dependencies
+
 * Tue Apr  2 2013 Martin Kosek <mkosek at redhat.com> - 3.1.99-2
 - Require 389-base-base >= 1.3.0.5 to pull the following fixes:
   - upgrade deadlock caused by DNA plugin reconfiguration
-- 
1.8.1.4



More information about the Freeipa-devel mailing list