Whamcloud - gitweb
LU-4496 build: enable RPMs build with --disable-modules 06/9306/4
authorDmitry Eremin <dmitry.eremin@intel.com>
Wed, 19 Feb 2014 11:42:38 +0000 (15:42 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Mar 2014 18:48:19 +0000 (18:48 +0000)
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 <dmitry.eremin@intel.com>
Change-Id: I7b26fac928404a75e974b414085bf1a584ad8bb9
Reviewed-on: http://review.whamcloud.com/9306
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build.m4
lustre.spec.in

index 4cea28b..e56bbb1 100644 (file)
@@ -654,8 +654,9 @@ AC_DEFUN([LB_CONFIG_RPMBUILD_OPTIONS],[
                case $arg in
                        --with-release=* ) ;;
                        --with-kmp-moddir=* ) ;;
                case $arg in
                        --with-release=* ) ;;
                        --with-kmp-moddir=* ) ;;
-                       --enable-tests | --disable-tests ) ;;
                        --with-linux=* | --with-linux-obj=* ) ;;
                        --with-linux=* | --with-linux-obj=* ) ;;
+                       --enable-tests | --disable-tests ) ;;
+                       --enable-modules | --disable-modules ) ;;
                        * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
                esac
        done
                        * ) 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
                        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"
        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"
        fi
        if test x$enable_server != xyes ; then
                RPMBINARGS="$RPMBINARGS --without servers"
index 487a08d..d00f609 100644 (file)
@@ -731,8 +731,8 @@ rm /var/run/%{name}-osd-zfs
 %endif # with lustre_modules
 
 %if %{with lustre_tests}
 %endif # with lustre_modules
 
 %if %{with lustre_tests}
-%post tests
 %if %{defined rpm_post_base}
 %if %{defined rpm_post_base}
+%post tests
 if [ -x %{rpm_post_base}-tests.sh ]; then
        %{rpm_post_base}-tests.sh %{cross_path} create
 fi
 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
        %{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
 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
 fi
 %endif
 %endif
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT