Whamcloud - gitweb
LU-10752 build: fix rpm packaging issues for gss
[fs/lustre-release.git] / lustre.spec.in
index 1ce962b..6cf311d 100644 (file)
@@ -9,12 +9,21 @@
 %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
 
+# 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_*
@@ -313,6 +322,7 @@ fi
        %{!?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} \
@@ -374,6 +384,7 @@ 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
 
@@ -382,11 +393,6 @@ echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
 %endif
 %endif
 
-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/