Whamcloud - gitweb
Replace /usr/sbin and /usr/bin filelists with wildcards.
[fs/lustre-release.git] / build / lustre.spec.in
index eeeae23..da2a1c5 100644 (file)
@@ -4,6 +4,7 @@
 %define linuxdir @LINUX@
 %define enable_doc @ENABLE_DOC@
 %define enable_init_scripts @ENABLE_INIT_SCRIPTS@
+%define enable_gm @ENABLE_GM@
 
 Summary: Lustre Lite File System
 Name: lustre-lite
@@ -22,7 +23,6 @@ servers and utilities.
 %package -n lustre-modules
 Summary: Kernel Lustre drivers for Linux %{kversion}
 Requires: modutils >= 2.4.10
-Requires: /boot/System.map-%{kversion}
 Group: Development/Kernel
 
 %description -n lustre-modules
@@ -73,7 +73,7 @@ Configures openldap server for LDAP Lustre config database
 %build
 # if RPM_BUILD_NCPUS unset, set it
 if [ -z "$RPM_BUILD_NCPUS" ] ; then
-    RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :)
+    RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :)
     if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
         RPM_BUILD_NCPUS=1
     fi
@@ -87,6 +87,7 @@ rm -rf $RPM_BUILD_ROOT
 # Set an explicit path to our Linux tree, if we can.
 cd $RPM_BUILD_DIR/lustre-%{version}
 ./configure \
+       --enable-smfs \
        --with-linux='%{linuxdir}' \
        --with-linux-obj='@LINUX_OBJ@' \
        --with-linux-config=@LINUX_CONFIG@ \
@@ -126,32 +127,8 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
 
 %files
 %attr(-, root, root) /sbin/mount.lustre
-%attr(-, root, root) /usr/sbin/lmc
-%attr(-, root, root) /usr/sbin/lctl
-%attr(-, root, root) /usr/sbin/lconf
-%attr(-, root, root) /usr/sbin/lrun
-%attr(-, root, root) /usr/sbin/llmount
-%attr(-, root, root) /usr/sbin/lwizard
-%attr(-, root, root) /usr/sbin/wiretest
-%attr(-, root, root) /usr/sbin/lactive
-%attr(-, root, root) /usr/sbin/llanalyze
-%attr(-, root, root) /usr/sbin/gmnalnid
-%attr(-, root, root) /usr/sbin/llstat.pl
-%attr(-, root, root) /usr/sbin/llobdstat.pl
-%attr(-, root, root) /usr/sbin/load_ldap.sh
-%attr(-, root, root) /usr/sbin/acceptor
-%attr(-, root, root) /usr/sbin/ptlctl
-%attr(-, root, root) /usr/sbin/debugctl
-%attr(-, root, root) /usr/sbin/lload
-%attr(-, root, root) /usr/sbin/obdbarrier
-%attr(-, root, root) /usr/sbin/obdio
-%attr(-, root, root) /usr/sbin/routerstat
-%attr(-, root, root) /usr/sbin/wirecheck
-%attr(-, root, root) /usr/bin/lfs
-%attr(-, root, root) /usr/bin/lfind
-%attr(-, root, root) /usr/bin/lstripe
-%attr(-, root, root) /usr/bin/mcreate
-%attr(-, root, root) /usr/bin/munlink
+%attr(-, root, root) /usr/sbin/*
+%attr(-, root, root) /usr/bin/*
 %attr(-, root, root) %{_libdir}/lustre/python
 %attr(-, root, root) /usr/share/lustre/examples
 
@@ -236,10 +213,18 @@ fi
 if [ ! -e /dev/portals ]; then
    mknod /dev/portals c 10 240
 fi
-depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+if [ -f /boot/System.map-%{kversion} ]; then
+       depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+else
+       depmod -ae %{kversion} || exit 0
+fi
 
 %postun -n lustre-modules
-depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+if [ -f /boot/System.map-%{kversion} ]; then
+       depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+else
+       depmod -ae %{kversion} || exit 0
+fi
 
 %clean
 #rm -rf $RPM_BUILD_ROOT