2 %define version b_devel
3 %define kversion @LINUXRELEASE@
4 %define linuxdir @LINUX@
6 Summary: Lustre Lite File System
11 Group: Utilities/System
12 Requires: lustre-modules, PyXML
13 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
14 BuildRoot: /var/tmp/lustre-%{version}-root
17 The Lustre Lite Cluster File System: kernel drivers for file system,
18 servers and utilities.
20 %package -n lustre-modules
21 Summary: Kernel Lustre drivers for Linux %{kversion}
22 Requires: modutils >= 2.4.10
23 Group: Development/Kernel
25 %description -n lustre-modules
26 Lustre file System, server and network drivers for Linux %{kversion}.
28 %package -n lustre-source
29 Summary: Object-Based Disk storage driver source
30 Group: Development/Kernel
32 %description -n lustre-source
33 Lustre Lite Source for further development
35 %package -n lustre-doc
36 Summary: Documentation and sample configuration files
38 # FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
41 %description -n lustre-doc
42 Documentation and sample configuration files for Lustre
44 %package -n lustre-ldap
45 Summary: Configures openldap server for LDAP Lustre config database
47 Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
49 %description -n lustre-ldap
50 Configures openldap server for LDAP Lustre config database
53 #%package -n liblustre
55 #Group: Development/Kernel
57 #%description -n liblustre
58 #Lustre lib binary package.
61 %setup -qn lustre-%{version}
62 #%setup -c -n lustre-%{version}-lib
65 rm -rf $RPM_BUILD_ROOT
67 # Set an explicit path to our Linux tree, if we can.
68 cd $RPM_BUILD_DIR/lustre-%{version}
69 ./configure --with-linux='%{linuxdir}'
73 cd $RPM_BUILD_DIR/lustre-%{version}
74 make install prefix=$RPM_BUILD_ROOT
80 test -d $linuxdir && conf_flag=--with-linux=$linuxdir
82 ./configure --enable-rtscts-myrinet $conf_flag
84 cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
85 cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
88 # Create the pristine source directory.
89 cd $RPM_BUILD_DIR/lustre-%{version}
90 mkdir -p $RPM_BUILD_ROOT/usr/src
92 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
93 make distdir distdir=lustre-source/lustre-%{version}
95 # ldap database directory
96 mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
99 %attr(-, root, root) /sbin/mount.lustre
100 %attr(-, root, root) /usr/sbin/lmc
101 %attr(-, root, root) /usr/sbin/lctl
102 %attr(-, root, root) /usr/sbin/lconf
103 %attr(-, root, root) /usr/sbin/lwizard
104 %attr(-, root, root) /usr/sbin/wiretest
105 %attr(-, root, root) /usr/sbin/lactive
106 %attr(-, root, root) /usr/sbin/llanalyze
107 %attr(-, root, root) /usr/sbin/lfs
108 %attr(-, root, root) /usr/sbin/gmnalnid
109 %attr(-, root, root) /usr/bin/lfind
110 %attr(-, root, root) /usr/bin/lstripe
111 %attr(-, root, root) /usr/bin/mcreate
112 %attr(-, root, root) /usr/bin/munlink
113 %attr(-, root, root) /usr/bin/mkdirmany
114 %attr(-, root, root) /usr/sbin/llstat.pl
115 %attr(-, root, root) /usr/sbin/llobdstat.pl
116 %attr(-, root, root) /usr/sbin/load_ldap.sh
117 %attr(-, root, root) /usr/lib/lustre/python/*
118 %attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
119 %attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
120 %attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
121 %attr(-, root, root) /usr/lib/lustre/examples/local.sh
122 %attr(-, root, root) /usr/lib/lustre/examples/uml.sh
123 %attr(-, root, root) /usr/lib/lustre/examples/lov.sh
124 %attr(-, root, root) /usr/lib/lustre/examples/echo.sh
125 %attr(-, root, root) /usr/lib/lustre/examples/llechocleanup.sh
127 %attr(-, root, root) /etc/init.d/lustre
128 %attr(-, root, root) /usr/sbin/acceptor
129 %attr(-, root, root) /usr/sbin/ptlctl
130 %attr(-, root, root) /usr/sbin/debugctl
131 %attr(-, root, root) /lib/libportals.a
132 %attr(-, root, root) /lib/libptlctl.a
133 %attr(-, root, root) /lib/libtcpnal.a
134 %attr(-, root, root) /lib/liblustreapi.a
135 %attr(-, root, root) /usr/include/lustre/*.h
136 %attr(-, root, root) /usr/sbin/lload
137 %attr(-, root, root) /usr/sbin/obdbarrier
138 %attr(-, root, root) /usr/sbin/obdio
139 %attr(-, root, root) /usr/sbin/routerstat
140 %attr(-, root, root) /usr/sbin/wirecheck
143 %attr(-, root, root) /usr/sbin/mcpload
147 %attr(-, root, root) %doc COPYING FDL
148 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
149 #%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
150 #%attr(-, root, root) %doc tests/client-mount2.cfg
151 #%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
152 #%attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
153 #%attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
154 #%attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
155 #%attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
157 %files -n lustre-modules
158 %attr(-, root, root) %doc COPYING
159 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/*.o
161 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre/*.o
163 %files -n lustre-source
164 %attr(-, root, root) /usr/src/lustre-%{version}
168 #%attr(-, root, root) /lib/lustre
169 #%attr(-, root, root) /lib/lustre/liblov.a
170 #%attr(-, root, root) /lib/lustre/liblustreclass.a
171 #%attr(-, root, root) /lib/lustre/libptlrpc.a
172 #%attr(-, root, root) /lib/lustre/libobdecho.a
173 #%attr(-, root, root) /lib/lustre/libldlm.a
174 #%attr(-, root, root) /lib/lustre/libosc.a
175 #%attr(-, root, root) /usr/sbin/lctl
176 #%attr(-, root, root) /usr/sbin/lfind
177 #%attr(-, root, root) /usr/sbin/lstripe
178 #%attr(-, root, root) /usr/sbin/obdio
179 #%attr(-, root, root) /usr/sbin/obdbarrier
180 #%attr(-, root, root) /usr/sbin/obdstat
181 #%attr(-, root, root) /usr/sbin/lload
182 #%attr(-, root, root) /usr/sbin/lconf
183 #%attr(-, root, root) /usr/sbin/lmc
184 #%attr(-, root, root) /usr/sbin/llanalyze
188 %files -n lustre-ldap
189 %attr(-, root, root) /etc/openldap/slapd-lustre.conf
190 %attr(-, root, root) /etc/openldap/schema/lustre.schema
191 %attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl
192 %attr(-, root, root) /usr/lib/lustre/top.ldif
193 #%dir /var/lib/ldap/lustre
194 %attr(700, ldap, ldap) /var/lib/ldap/lustre
197 if [ ! -e /dev/obd ]; then
198 mknod /dev/obd c 10 241
200 if [ ! -e /dev/portals ]; then
201 mknod /dev/portals c 10 240
205 #grep -q obdclass /etc/modules.conf || \
206 # echo 'alias char-major-10-241 obdclass' >> /etc/modules.conf
208 #grep -q '/dev/obd' /etc/modules.conf || \
209 # echo 'alias /dev/obd obdclass' >> /etc/modules.conf
211 #grep -q '/dev/lustre' /etc/modules.conf || \
212 # echo 'alias /dev/lustre obdclass' >> /etc/modules.conf
214 #grep -q portals /etc/modules.conf || \
215 # echo 'alias char-major-10-240 portals' >> /etc/modules.conf
217 #grep -q '/dev/portals' /etc/modules.conf || \
218 # echo 'alias /dev/portals portals' >> /etc/modules.conf
224 if ! grep -q slapd-lustre /etc/openldap/slapd.conf; then
225 echo "include /etc/openldap/slapd-lustre.conf" >> /etc/openldap/slapd.conf
228 %postun -n lustre-ldap
229 slapd=/etc/openldap/slapd.conf
230 if grep -q slapd-lustre $slapd; then
231 tmp=/tmp/lustre-ldap.$$
232 sed "/slapd-lustre/d" $slapd >> $tmp
238 #rm -rf $RPM_BUILD_ROOT