From a34ba90453b8bb8de9bcdf949f8afc4c2a43f393 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 5 Mar 2018 12:15:16 -0500 Subject: [PATCH] LU-10752 build: properly package lsvcgss for rpm builds On some platforms rpm building will failure with the following errors: RPM build errors: Installed (but unpackaged) file(s) found: /etc/init.d/lsvcgss Technically lsvcgss is a server only file so we can just include it for server builds and only if GSS_KEYRING is set. Test-Parameters: trivial Change-Id: I2525916cd10ddea0b99337e1ff4ff967bd9f7f9a Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/31485 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- config/lustre-build.m4 | 3 +++ lustre.spec.in | 9 ++++++--- lustre/conf/Makefile.am | 5 ++++- lustre/scripts/Makefile.am | 5 ++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 189f735..81d7e6f 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -530,6 +530,9 @@ 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" +fi if test x$enable_iokit != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_iokit" fi diff --git a/lustre.spec.in b/lustre.spec.in index f228a4e..9723eb8 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -9,6 +9,7 @@ %bcond_without lustre_iokit %bcond_without lustre_modules %bcond_with snmp +%bcond_without gss_keyring %bcond_without manpages %bcond_without shared %bcond_without static @@ -309,6 +310,7 @@ fi %{!?with_servers:--disable-server} \ %{!?with_zfs:--without-zfs} \ %{!?with_snmp:--disable-snmp} \ + %{!?with_gss_keyring:--disable-gss-keyring} \ %{!?with_manpages:--disable-manpages} \ %{!?with_systemd:--with-systemdsystemunitdir=no} \ %{?with_systemd:--with-systemdsystemunitdir=%{_unitdir}} \ @@ -364,16 +366,17 @@ echo '%{_unitdir}/lnet.service' >>lustre.files %if %{_vendor}=="redhat" # The following scripts are Red Hat specific %if %{with servers} +echo '%{_sysconfdir}/init.d/lustre' >>lustre.files echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files +%if %{with gss_keyring} +echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files echo '%{_sysconfdir}/sysconfig/lsvcgss' >>lustre.files -echo '%{_sysconfdir}/init.d/lustre' >>lustre.files +%endif %endif %if %{without systemd} echo '%{_sysconfdir}/init.d/lnet' >>lustre.files %endif - -echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files %endif %if %{with servers} diff --git a/lustre/conf/Makefile.am b/lustre/conf/Makefile.am index c3626ba..59b1005 100644 --- a/lustre/conf/Makefile.am +++ b/lustre/conf/Makefile.am @@ -54,7 +54,10 @@ sysconf_DATA += ldev.conf endif if RHEL sysconfigdir = $(sysconfdir)/sysconfig -sysconfig_DATA = lustre lsvcgss +sysconfig_DATA = lustre +if GSS_KEYRING +sysconfig_DATA += lsvcgss +endif endif endif diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 8b52188..f834235 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -41,7 +41,7 @@ sbin_SCRIPTS = lustre_rmmod ko2iblnd-probe if RHEL initdir = $(sysconfdir)/init.d -init_SCRIPTS = lsvcgss +init_SCRIPTS = if !HAVE_SYSTEMD init_SCRIPTS += lnet @@ -49,6 +49,9 @@ endif if SERVER init_SCRIPTS += lustre +if GSS_KEYRING +init_SCRIPTS += lsvcgss +endif endif endif -- 1.8.3.1