Whamcloud - gitweb
Landing b_smallfix onto HEAD (20040210_1202)
[fs/lustre-release.git] / lustre / scripts / lustre.spec.in
index 367b53c..08a4345 100644 (file)
@@ -1,18 +1,18 @@
 # lustre.spec
-%define version 0.3.2.1
-%define kversion @RELEASE@
+%define version HEAD 
+%define kversion @LINUXRELEASE@
 %define linuxdir @LINUX@
-%define portalsdir @PORTALS@
-Release: 2
+%define enable_doc @ENABLE_DOC@
 
 Summary: Lustre Lite File System
 Name: lustre-lite
 Version: %{version}
+Release: @RELEASE@
 Copyright: GPL
 Group: Utilities/System
-Requires: lustre-modules, libxml2
-BuildRoot: /var/tmp/lustre-%{version}-root
+Requires: lustre-modules, PyXML
 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
+BuildRoot: /var/tmp/lustre-%{version}-root
 
 %description
 The Lustre Lite Cluster File System: kernel drivers for file system,
@@ -20,7 +20,7 @@ servers and utilities.
 
 %package -n lustre-modules
 Summary: Kernel Lustre drivers for Linux %{kversion}
-Requires: portals-modules
+Requires: modutils >= 2.4.10
 Group: Development/Kernel
 
 %description -n lustre-modules
@@ -33,70 +33,188 @@ Group: Development/Kernel
 %description -n lustre-source
 Lustre Lite Source for further development
 
+%package -n lustre-doc
+Summary: Documentation and sample configuration files
+Group: Documentation
+# FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
+#BuildArch: noarch
+
+%description -n lustre-doc
+Documentation and sample configuration files for Lustre
+
+%package -n lustre-ldap
+Summary: Configures openldap server for LDAP Lustre config database
+Group: Configuration
+Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
+
+%description -n lustre-ldap
+Configures openldap server for LDAP Lustre config database
+
+
+#%package -n liblustre
+#Summary: Lustre Lib
+#Group: Development/Kernel
+
+#%description -n liblustre
+#Lustre lib binary package.
+
 %prep
-%setup -n lustre-%{version}
+%setup -qn lustre-%{version}
+#%setup -c -n lustre-%{version}-lib
+%if %{enable_doc}
+  %define disable_doc ''
+%else
+  %define disable_doc --disable-doc
+%endif
 
 %build
 rm -rf $RPM_BUILD_ROOT
 
 # Set an explicit path to our Linux tree, if we can.
-./configure --enable-linuxdir=%{linuxdir} --enable-portalsdir=%{portalsdir}
-make clean
+cd $RPM_BUILD_DIR/lustre-%{version}
+./configure --with-linux='%{linuxdir}' %{disable_doc}
 make
 
 %install
+cd $RPM_BUILD_DIR/lustre-%{version}
 make install prefix=$RPM_BUILD_ROOT
 
+%ifarch alpha
+# this hurts me
+  conf_flag=
+  linuxdir=%{linuxdir}
+  test -d $linuxdir && conf_flag=--with-linux=$linuxdir
+  make clean
+  ./configure --enable-rtscts-myrinet $conf_flag %{disable_doc}
+  make
+  cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
+  cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
+%endif
+
 # Create the pristine source directory.
-make distclean
-mkdir -p $RPM_BUILD_ROOT/usr/src/lustre-%{version}
-find . -print | cpio -ap  $RPM_BUILD_ROOT/usr/src/lustre-%{version}
+cd $RPM_BUILD_DIR/lustre-%{version}
+mkdir -p $RPM_BUILD_ROOT/usr/src
+rm -f lustre-source
+ln -s $RPM_BUILD_ROOT/usr/src lustre-source
+make distdir distdir=lustre-source/lustre-%{version}
 
+# ldap database directory
+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/bin/mkdirmany
+%attr(-, root, root) /usr/bin/iopentest1
+%attr(-, root, root) /usr/bin/iopentest2
+%attr(-, root, root) /usr/lib/lustre/python/*
+%attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
+%attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
+%attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
+%attr(-, root, root) /usr/lib/lustre/examples/local.sh
+%attr(-, root, root) /usr/lib/lustre/examples/uml.sh
+%attr(-, root, root) /usr/lib/lustre/examples/lov.sh
+%attr(-, root, root) /usr/lib/lustre/examples/echo.sh
+%attr(-, root, root) /usr/lib/lustre/examples/llechocleanup.sh
+
+%attr(-, root, root) /etc/init.d/lustre
+%attr(-, root, root) /lib/libportals.a
+%attr(-, root, root) /lib/libptlctl.a
+%attr(-, root, root) /lib/libtcpnal.a
+%attr(-, root, root) /lib/liblustreapi.a
+%attr(-, root, root) /usr/include/lustre/*.h
+
+%ifarch alpha
+%attr(-, root, root) /usr/sbin/mcpload
+%endif
+
+%files -n lustre-doc
 %attr(-, root, root) %doc COPYING FDL
+%if %{enable_doc}
 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
-%attr(-, root, root) /usr/sbin/obdctl
-%attr(-, root, root) /usr/sbin/lctl
-%attr(-, root, root) /usr/sbin/llsetup.sh
-%attr(-, root, root) /usr/sbin/llrsetup.sh
-%attr(-, root, root) /usr/sbin/llcleanup.sh
-%attr(-, root, root) /lib/lustre/common.sh
-%attr(-, root, root) /etc/lustre/lustre.cfg
+%endif
+#%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
+#%attr(-, root, root) %doc tests/client-mount2.cfg
+#%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
+#%attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
+#%attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
+#%attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
+#%attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
 
 %files -n lustre-modules
 %attr(-, root, root) %doc COPYING
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/extN.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/ldlm.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/llite.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/mdc.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/mds.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/mds_extN.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/obdclass.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/obdecho.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/obdfilter.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/obdfs.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/osc.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/ost.o
-%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/ptlrpc.o
+%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/*.o
+#portals modules
+%attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre/*.o
 
 %files -n lustre-source
 %attr(-, root, root) /usr/src/lustre-%{version}
 
-%post
+#%ifarch i386
+#%files -n liblustre
+#%attr(-, root, root) /lib/lustre
+#%attr(-, root, root) /lib/lustre/liblov.a
+#%attr(-, root, root) /lib/lustre/liblustreclass.a
+#%attr(-, root, root) /lib/lustre/libptlrpc.a
+#%attr(-, root, root) /lib/lustre/libobdecho.a
+#%attr(-, root, root) /lib/lustre/libldlm.a
+#%attr(-, root, root) /lib/lustre/libosc.a
+#%attr(-, root, root) /usr/sbin/lctl
+#%attr(-, root, root) /usr/sbin/lfind
+#%attr(-, root, root) /usr/sbin/lstripe
+#%attr(-, root, root) /usr/sbin/obdio
+#%attr(-, root, root) /usr/sbin/obdbarrier
+#%attr(-, root, root) /usr/sbin/obdstat
+#%attr(-, root, root) /usr/sbin/lload
+#%attr(-, root, root) /usr/sbin/lconf
+#%attr(-, root, root) /usr/sbin/lmc
+#%attr(-, root, root) /usr/sbin/llanalyze
+#%endif
+
+
+%files -n lustre-ldap
+%attr(-, root, root) /etc/openldap/slapd-lustre.conf
+%attr(-, root, root) /etc/openldap/schema/lustre.schema
+%attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl
+%attr(-, root, root) /usr/lib/lustre/top.ldif
+#%dir /var/lib/ldap/lustre
+%attr(700, ldap, ldap) /var/lib/ldap/lustre
+
+%post -n lustre-modules
 if [ ! -e /dev/obd ]; then
    mknod /dev/obd c 10 241
 fi
+if [ ! -e /dev/portals ]; then
+   mknod /dev/portals c 10 240
+fi
 depmod -ae || exit 0
 
-#
-# Modify /etc/modules.conf to add lusre rules
-# lustre_lite depends on llite.o
-# /dev/obd obdclass.o
-# obdclass depends on portals
-#  the rest should be loaded by kerneld automatically
-
-%postun
+%postun -n lustre-modules
 depmod -ae || exit 0
 
 %clean