Lustre can create rpms in two ways. One is with make rpm and the
other is using the actual source rpm that is provided. Their are
several issues with how GSS is handled with rpm packaging.
First problem is that you can ./configure --disable-gss which has
never been handled. Secondly if you do configure with disable-gss
it is still possible to have the option enable-gss-keyring set to
yes. The reason it was never seen before is due to everything
being treated with the keyring option. Now if the user sets
enable-gss to no then enable-gss-keyring will also be set to no
even if the user tries to set it to yes. This was done by properly
setting $enable_gss and $enable_gss_keyring in lustre-core.m4.
In the spec file create the bcond gss to handle the gss only case
and we turn on gss if gss_keyring is true. Move lgssc.conf under
the with_gss_keyring bcond which is only needed for server builds
along side lsvcgss.
It is impossible to know if it can build due to the spec file not
properly handling build dependencies for GSS and not knowing if
the kernel is too new for GSS. So the user has to provide the
options --with gss and / or --with gss-keyring to rpmbuild. If
the user only provides gss-keyring option to rpmbuild make sure
it enables gss as well. That is handled in the spec file.
For the case of make rpms fix it up so if gss-keyring is enabled
then by default the core gss handling is enabled. Also handle the
long ignored enable-gss case.
Test-Parameters: trivial
Change-Id: Ieed9df98a27bd6e77504486762d6e60ddca5a916
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/31757
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if test x$enable_zfs = xyes ; then
RPMBINARGS="$RPMBINARGS --with zfs"
fi
if test x$enable_zfs = xyes ; then
RPMBINARGS="$RPMBINARGS --with zfs"
fi
-if test x$enable_gss_keyring == xno ; then
- RPMBINARGS="$RPMBINARGS --without gss_keyring"
+if test x$enable_gss_keyring = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with gss_keyring --with gss"
+fi
+if test x$enable_gss = xyes ; then
+ RPMBINARGS="$RPMBINARGS --with gss"
fi
if test x$enable_iokit != xyes ; then
RPMBINARGS="$RPMBINARGS --without lustre_iokit"
fi
if test x$enable_iokit != xyes ; then
RPMBINARGS="$RPMBINARGS --without lustre_iokit"
%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with snmp
%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with snmp
-%bcond_without gss_keyring
+%bcond_with gss
+%bcond_with gss_keyring
%bcond_without manpages
%bcond_without shared
%bcond_without static
%bcond_with systemd
%bcond_without manpages
%bcond_without shared
%bcond_without static
%bcond_with systemd
+# By default both gss and gss keyring are disabled.
+# gss keyring requires the gss core. If the builder
+# request gss_keyring we must enable gss core even if
+# the builder attempts to disable gss.
+%if %{with gss_keyring}
+ %define with_gss
+%endif
+
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
# so undefine the internal variables set by bcond_*
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
# so undefine the internal variables set by bcond_*
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_snmp:--disable-snmp} \
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_snmp:--disable-snmp} \
+ %{!?with_gss:--disable-gss} \
%{!?with_gss_keyring:--disable-gss-keyring} \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%{!?with_gss_keyring:--disable-gss-keyring} \
%{!?with_manpages:--disable-manpages} \
%{!?with_systemd:--with-systemdsystemunitdir=no} \
%if %{with gss_keyring}
echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
echo '%{_sysconfdir}/sysconfig/lsvcgss' >>lustre.files
%if %{with gss_keyring}
echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
echo '%{_sysconfdir}/sysconfig/lsvcgss' >>lustre.files
+echo '%config(noreplace) %{_sysconfdir}/request-key.d/lgssc.conf' >>lustre.files
-CONFIGURE_ARGS="%{?configure_args}"
-if [ -z "$(echo $CONFIGURE_ARGS | grep "\-\-disable\-gss\-keyring")" ]; then
- echo '%config(noreplace) %{_sysconfdir}/request-key.d/lgssc.conf' >>lustre.files
-fi
-
%if %{with servers}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/
install -m 0755 contrib/scripts/pacemaker/* $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/
%if %{with servers}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/
install -m 0755 contrib/scripts/pacemaker/* $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/lustre/
AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
enable_gss="yes"
], [
AC_DEFINE([HAVE_GSS], [1], [Define this is if you enable gss])
enable_gss="yes"
], [
+ enable_gss_keyring="no"
enable_gss="no"
])
enable_ssk=$enable_gss
enable_gss="no"
])
enable_ssk=$enable_gss
+], [
+ enable_gss_keyring="no"
sysconfig_DATA = lustre
if GSS_KEYRING
sysconfig_DATA += lsvcgss
sysconfig_DATA = lustre
if GSS_KEYRING
sysconfig_DATA += lsvcgss
+requestkeydir = $(sysconfdir)/request-key.d
+requestkey_DATA = lgssc.conf
endif
endif
endif
modprobedir = $(sysconfdir)/modprobe.d
modprobe_DATA = ko2iblnd.conf
endif
endif
endif
modprobedir = $(sysconfdir)/modprobe.d
modprobe_DATA = ko2iblnd.conf
-
-if GSS_KEYRING
-requestkeydir = $(sysconfdir)/request-key.d
-requestkey_DATA = lgssc.conf
-endif