]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
RedHat: Find krb5-config in /usr/bin
authorAndrew Deason <adeason@sinenomine.net>
Wed, 1 Sep 2010 16:18:56 +0000 (11:18 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 14 Dec 2010 18:15:22 +0000 (10:15 -0800)
In RHEL6, krb5-config is no longer in /usr/kerberos/bin/, but is in
just /usr/bin/. So, try to use /usr/bin/krb5-config if we cannot find
/usr/kerberos/bin/krb5-config and krb5config was not specified.

This is a 1.4-only change, as the 'configure' on more modern branches
should have the ability to find krb5-config automatically.

Reviewed-on: http://gerrit.openafs.org/2646
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c2eba9d57adc79b05165fc8aebaf751ea89282f5)
Change-Id: I46c6f0e3d7c2ce427eacfbb82366a7da3156d9bd
Reviewed-on: http://gerrit.openafs.org/3514
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
src/packaging/RedHat/openafs.spec.in

index 2f47d8f6739ed72c90a6b209ab4ec50d48baf890..e57be58e0efd4f49551f9ba7967e9c06e1252645 100644 (file)
 # to distribute aklog and asetkey
 %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
 
-%if %{krb5support}
-%if %{?krb5config:0}%{!?krb5config:1}
-%define krb5config /usr/kerberos/bin/krb5-config
-%endif
-%endif
-
 # Set 'bootkernelsupport' to 1 if you want to build the
 # kernel module for Red Hat BOOT Kernels on x86.
 %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
@@ -862,6 +856,18 @@ fi
 
 CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
 
+%if %{krb5support}
+%if %{?krb5config:0}%{!?krb5config:1}
+if [ -x /usr/kerberos/bin/krb5-config ] ; then
+  KRB5_CONFIG=/usr/kerberos/bin/krb5-config
+else
+  KRB5_CONFIG=/usr/bin/krb5-config
+fi
+%else
+KRB5_CONFIG="%{krb5config}"
+%endif
+%endif
+
 ./configure --with-afs-sysname=${sysname} \
        --prefix=%{_prefix} \
        --libdir=%{_libdir} \
@@ -872,7 +878,7 @@ CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
        --with-linux-kernel-headers=${ksrc} \
 %endif
 %if %{krb5support}
-       --with-krb5-conf=%{krb5config} \
+       --with-krb5-conf="$KRB5_CONFIG" \
 %endif
        $config_opts \
        || exit 1