2 %define version @VERSION@
3 %define kversion @LINUXRELEASE@
4 %define linuxdir @LINUX@
5 %define enable_doc @ENABLE_DOC@
7 Summary: Lustre Lite File System
12 Group: Utilities/System
13 Requires: lustre-modules, PyXML
14 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
15 BuildRoot: /var/tmp/lustre-%{version}-root
18 The Lustre Lite Cluster File System: kernel drivers for file system,
19 servers and utilities.
21 %package -n lustre-modules
22 Summary: Kernel Lustre drivers for Linux %{kversion}
23 Requires: modutils >= 2.4.10
24 Group: Development/Kernel
26 %description -n lustre-modules
27 Lustre file System, server and network drivers for Linux %{kversion}.
29 %package -n lustre-source
30 Summary: Object-Based Disk storage driver source
31 Group: Development/Kernel
33 %description -n lustre-source
34 Lustre Lite Source for further development
36 %package -n lustre-doc
37 Summary: Documentation and sample configuration files
39 # FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
42 %description -n lustre-doc
43 Documentation and sample configuration files for Lustre
45 %package -n lustre-ldap
46 Summary: Configures openldap server for LDAP Lustre config database
48 Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
50 %description -n lustre-ldap
51 Configures openldap server for LDAP Lustre config database
54 #%package -n liblustre
56 #Group: Development/Kernel
58 #%description -n liblustre
59 #Lustre lib binary package.
62 %setup -qn lustre-%{version}
63 #%setup -c -n lustre-%{version}-lib
65 %define disable_doc ''
67 %define disable_doc --disable-doc
71 # if RPM_BUILD_NCPUS unset, set it
72 if [ -z "$RPM_BUILD_NCPUS" ] ; then
73 RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :)
74 if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
77 if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
82 rm -rf $RPM_BUILD_ROOT
84 # Set an explicit path to our Linux tree, if we can.
85 cd $RPM_BUILD_DIR/lustre-%{version}
86 ./configure --with-linux='%{linuxdir}' %{disable_doc} --disable-liblustre
87 make -j $RPM_BUILD_NCPUS -s
90 cd $RPM_BUILD_DIR/lustre-%{version}
91 make install prefix=$RPM_BUILD_ROOT
97 test -d $linuxdir && conf_flag=--with-linux=$linuxdir
99 ./configure --enable-rtscts-myrinet $conf_flag %{disable_doc}
101 cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
102 cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
105 # Create the pristine source directory.
106 cd $RPM_BUILD_DIR/lustre-%{version}
107 mkdir -p $RPM_BUILD_ROOT/usr/src
109 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
110 make distdir distdir=lustre-source/lustre-%{version}
112 # ldap database directory
113 mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
116 %attr(-, root, root) /sbin/mount.lustre
117 %attr(-, root, root) /usr/sbin/lmc
118 %attr(-, root, root) /usr/sbin/lctl
119 %attr(-, root, root) /usr/sbin/lconf
120 %attr(-, root, root) /usr/sbin/lrun
121 %attr(-, root, root) /usr/sbin/llmount
122 %attr(-, root, root) /usr/sbin/lwizard
123 %attr(-, root, root) /usr/sbin/wiretest
124 %attr(-, root, root) /usr/sbin/lactive
125 %attr(-, root, root) /usr/sbin/llanalyze
126 %attr(-, root, root) /usr/sbin/gmnalnid
127 %attr(-, root, root) /usr/sbin/llstat.pl
128 %attr(-, root, root) /usr/sbin/llobdstat.pl
129 %attr(-, root, root) /usr/sbin/load_ldap.sh
130 %attr(-, root, root) /usr/sbin/acceptor
131 %attr(-, root, root) /usr/sbin/ptlctl
132 %attr(-, root, root) /usr/sbin/debugctl
133 %attr(-, root, root) /usr/sbin/lload
134 %attr(-, root, root) /usr/sbin/obdbarrier
135 %attr(-, root, root) /usr/sbin/obdio
136 %attr(-, root, root) /usr/sbin/routerstat
137 %attr(-, root, root) /usr/sbin/wirecheck
138 %attr(-, root, root) /usr/bin/lfs
139 %attr(-, root, root) /usr/bin/lfind
140 %attr(-, root, root) /usr/bin/lstripe
141 %attr(-, root, root) /usr/bin/mcreate
142 %attr(-, root, root) /usr/bin/munlink
143 %attr(-, root, root) /usr/bin/mkdirmany
144 %attr(-, root, root) /usr/bin/iopentest1
145 %attr(-, root, root) /usr/bin/iopentest2
146 %attr(-, root, root) /usr/lib/lustre/python/*
147 %attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
148 %attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
149 %attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
150 %attr(-, root, root) /usr/lib/lustre/examples/local.sh
151 %attr(-, root, root) /usr/lib/lustre/examples/uml.sh
152 %attr(-, root, root) /usr/lib/lustre/examples/lov.sh
153 %attr(-, root, root) /usr/lib/lustre/examples/echo.sh
154 %attr(-, root, root) /usr/lib/lustre/examples/llechocleanup.sh
156 %attr(-, root, root) /etc/init.d/lustre
157 %attr(-, root, root) /lib/libptlctl.a
158 %attr(-, root, root) /lib/liblustreapi.a
159 %attr(-, root, root) /usr/include/lustre/*.h
160 %attr(-, root, root) /usr/include/linux/lustre_idl.h
163 %attr(-, root, root) /usr/sbin/mcpload
167 %attr(-, root, root) %doc COPYING FDL
169 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
171 #%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
172 #%attr(-, root, root) %doc tests/client-mount2.cfg
173 #%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
174 #%attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
175 #%attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
176 #%attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
177 #%attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
179 %files -n lustre-modules
180 %attr(-, root, root) %doc COPYING
181 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/*.o
183 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre/*.o
185 %files -n lustre-source
186 %attr(-, root, root) /usr/src/lustre-%{version}
190 #%attr(-, root, root) /lib/lustre
191 #%attr(-, root, root) /lib/lustre/liblov.a
192 #%attr(-, root, root) /lib/lustre/liblustreclass.a
193 #%attr(-, root, root) /lib/lustre/libptlrpc.a
194 #%attr(-, root, root) /lib/lustre/libobdecho.a
195 #%attr(-, root, root) /lib/lustre/libldlm.a
196 #%attr(-, root, root) /lib/lustre/libosc.a
197 #%attr(-, root, root) /usr/sbin/lctl
198 #%attr(-, root, root) /usr/sbin/lfind
199 #%attr(-, root, root) /usr/sbin/lstripe
200 #%attr(-, root, root) /usr/sbin/obdio
201 #%attr(-, root, root) /usr/sbin/obdbarrier
202 #%attr(-, root, root) /usr/sbin/obdstat
203 #%attr(-, root, root) /usr/sbin/lload
204 #%attr(-, root, root) /usr/sbin/lconf
205 #%attr(-, root, root) /usr/sbin/lmc
206 #%attr(-, root, root) /usr/sbin/llanalyze
210 %files -n lustre-ldap
211 %attr(-, root, root) /etc/openldap/slapd-lustre.conf
212 %attr(-, root, root) /etc/openldap/schema/lustre.schema
213 %attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl
214 %attr(-, root, root) /usr/lib/lustre/top.ldif
215 #%dir /var/lib/ldap/lustre
216 %attr(700, ldap, ldap) /var/lib/ldap/lustre
218 %post -n lustre-modules
219 if [ ! -e /dev/obd ]; then
220 mknod /dev/obd c 10 241
222 if [ ! -e /dev/portals ]; then
223 mknod /dev/portals c 10 240
227 %postun -n lustre-modules
231 #rm -rf $RPM_BUILD_ROOT