From: Andrew Deason Date: Wed, 1 Sep 2010 16:18:56 +0000 (-0500) Subject: RedHat: Find krb5-config in /usr/bin X-Git-Tag: openafs-stable-1_4_13~12 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=933a87b37c2d9ee07e0a56172613120df7416b1a;p=packages%2Fo%2Fopenafs.git RedHat: Find krb5-config in /usr/bin 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 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c2eba9d57adc79b05165fc8aebaf751ea89282f5) Change-Id: I46c6f0e3d7c2ce427eacfbb82366a7da3156d9bd Reviewed-on: http://gerrit.openafs.org/3514 Reviewed-by: Simon Wilkinson --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 2f47d8f67..e57be58e0 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -102,12 +102,6 @@ # 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