From a170a5787df625caec0cdac637a8dedd2e18bbd8 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Thu, 8 Nov 2018 18:35:11 -0500 Subject: [PATCH] LU-11635 gss: proper gss build for client-only Fix gss build system for both rpms and debs in case of client-only build. Fix consists in passing along '--{enable,disable}-gss' option, and including lgssc.conf file in case of client-only build. Test-Parameters: trivial Signed-off-by: Sebastien Buisson Change-Id: Id884d282e312177c262b1f4725b8f19e2c14fd37 Reviewed-on: https://review.whamcloud.com/33608 Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin --- autoMakefile.am | 5 +++++ config/lustre-build.m4 | 4 ++++ debian/rules | 7 ++++++- lustre.spec.in | 4 +++- lustre/conf/Makefile.am | 6 ++++-- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/autoMakefile.am b/autoMakefile.am index 4cddecb..7e1bef3 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -254,6 +254,11 @@ debs: undef.h echo "SPL: $${SPL_SRC}"; \ echo "ZFS: $${ZFS_SRC}"; \ fi; \ + if test "x@ENABLE_GSS@" = "xyes"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} gss"; \ + elif test "x@ENABLE_GSS@" = "xno"; then \ + export DEB_BUILD_PROFILES="$${DEB_BUILD_PROFILES} nogss"; \ + fi; \ export KERNEL_CFG="$(LINUX_CONFIG)"; \ export KERNEL_SRC="$(LINUX)"; \ echo "Enabled Build Profiles: $${DEB_BUILD_PROFILES}"; \ diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index ae95aec..c2da79e 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -534,6 +534,10 @@ if test x$enable_gss_keyring = xyes ; then fi if test x$enable_gss = xyes ; then RPMBINARGS="$RPMBINARGS --with gss" + AC_SUBST(ENABLE_GSS, yes) +elif test x$enable_gss = xno ; then + RPMBINARGS="$RPMBINARGS --without gss" + AC_SUBST(ENABLE_GSS, no) fi if test x$enable_iokit != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_iokit" diff --git a/debian/rules b/debian/rules index eeb32e0..216d766 100755 --- a/debian/rules +++ b/debian/rules @@ -159,7 +159,7 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in if echo "$${DEB_BUILD_PROFILES}" | grep -q "server"; then \ export EXTRAFLAGS="--enable-server"; \ else \ - export EXTRAFLAGS="--disable-server --disable-modules"; \ + export EXTRAFLAGS="--disable-server"; \ fi; \ if echo "$${DEB_BUILD_PROFILES}" | grep -q "zfs"; then \ export EXTRAFLAGS="$${EXTRAFLAGS} --with-zfs=$${ZFS_SRC} --with-spl=$${SPL_SRC}"; \ @@ -172,6 +172,11 @@ configure-stamp: autogen-stamp debian/control.main debian/control.modules.in else \ export EXTRAFLAGS="$${EXTRAFLAGS} --disable-ldiskfs"; \ fi; \ + if echo "$${DEB_BUILD_PROFILES}" | grep -qw "gss"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --enable-gss"; \ + elif echo "$${DEB_BUILD_PROFILES}" | grep -qw "nogss"; then \ + export EXTRAFLAGS="$${EXTRAFLAGS} --disable-gss"; \ + fi; \ echo "Final value of EXTRAFLAGS: $${EXTRAFLAGS}"; \ ( cd $(BUILDDIR) && \ $(SRCDIR)/configure --disable-dependency-tracking \ diff --git a/lustre.spec.in b/lustre.spec.in index 322c0fa..7fe7e9f 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -384,7 +384,6 @@ echo '%{_sysconfdir}/sysconfig/lustre' >>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 %endif %endif @@ -392,6 +391,9 @@ echo '%config(noreplace) %{_sysconfdir}/request-key.d/lgssc.conf' >>lustre.files echo '%{_sysconfdir}/init.d/lnet' >>lustre.files %endif %endif +%if %{with gss_keyring} +echo '%config(noreplace) %{_sysconfdir}/request-key.d/lgssc.conf' >>lustre.files +%endif # fc18 needs 'x' permission for library files find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \; diff --git a/lustre/conf/Makefile.am b/lustre/conf/Makefile.am index b6d2730..a5ae94c 100644 --- a/lustre/conf/Makefile.am +++ b/lustre/conf/Makefile.am @@ -59,11 +59,13 @@ sysconfigdir = $(sysconfdir)/sysconfig sysconfig_DATA = lustre if GSS_KEYRING sysconfig_DATA += lsvcgss -requestkeydir = $(sysconfdir)/request-key.d -requestkey_DATA = lgssc.conf endif endif endif +if GSS_KEYRING +requestkeydir = $(sysconfdir)/request-key.d +requestkey_DATA = lgssc.conf +endif modprobedir = $(sysconfdir)/modprobe.d modprobe_DATA = ko2iblnd.conf -- 1.8.3.1