From: Dmitry Eremin Date: Wed, 19 Feb 2014 11:42:38 +0000 (+0400) Subject: LU-4496 build: enable RPMs build with --disable-modules X-Git-Tag: 2.5.58~69 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=87aa590c64c0e3d54926538b54079aa6fb9d3635 LU-4496 build: enable RPMs build with --disable-modules Enable the following RPMs build: ./configure --disable-modules make rpms Addition to commit c92afbcd4a8234994affa444d59645b80fa19ec5 (Reviewed-on: http://review.whamcloud.com/6020) Signed-off-by: Dmitry Eremin Change-Id: I7b26fac928404a75e974b414085bf1a584ad8bb9 Reviewed-on: http://review.whamcloud.com/9306 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Christopher J. Morrone Reviewed-by: Oleg Drokin --- diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 4cea28b..e56bbb1 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -654,8 +654,9 @@ AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS],[ case $arg in --with-release=* ) ;; --with-kmp-moddir=* ) ;; - --enable-tests | --disable-tests ) ;; --with-linux=* | --with-linux-obj=* ) ;; + --enable-tests | --disable-tests ) ;; + --enable-modules | --disable-modules ) ;; * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;; esac done @@ -689,9 +690,12 @@ AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS],[ RPMBINARGS="$RPMBINARGS --define \"cross_requires intel-mic-gpl\"" fi fi + if test x$enable_modules != xyes ; then + RPMBINARGS="$RPMBINARGS --without lustre_modules" + fi if test x$enable_tests != xyes ; then RPMBINARGS="$RPMBINARGS --without lustre_tests" - RPMSRCARGS="$RPMSRCARGS --without lustre_tests"; + RPMSRCARGS="$RPMSRCARGS --without lustre_tests" fi if test x$enable_server != xyes ; then RPMBINARGS="$RPMBINARGS --without servers" diff --git a/lustre.spec.in b/lustre.spec.in index 487a08d..d00f609 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -731,8 +731,8 @@ rm /var/run/%{name}-osd-zfs %endif # with lustre_modules %if %{with lustre_tests} -%post tests %if %{defined rpm_post_base} +%post tests if [ -x %{rpm_post_base}-tests.sh ]; then %{rpm_post_base}-tests.sh %{cross_path} create fi @@ -742,6 +742,8 @@ if [ -x %{rpm_post_base}-tests.sh ]; then %{rpm_post_base}-tests.sh %{cross_path} remove fi %else +%if %{with lustre_modules} +%post tests if [ -f /boot/System.map-%{kversion} ]; then depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 else @@ -756,6 +758,7 @@ else fi %endif %endif +%endif %clean rm -rf $RPM_BUILD_ROOT