3 %define kversion @RELEASE@
4 %define linuxdir @LINUX@
5 %define portalsdir @PORTALS@
6 %define portalslibdir @PORTALSLIB@
7 Release: 0302240920chaos
9 Summary: Lustre Lite File System
13 Group: Utilities/System
14 Requires: lustre-modules, PyXML
15 BuildRoot: /var/tmp/lustre-%{version}-root
16 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
19 The Lustre Lite Cluster File System: kernel drivers for file system,
20 servers and utilities.
22 %package -n lustre-modules
23 Summary: Kernel Lustre drivers for Linux %{kversion}
24 Requires: portals-modules
25 Group: Development/Kernel
27 %description -n lustre-modules
28 Lustre file System, server and network drivers for Linux %{kversion}.
30 %package -n lustre-source
31 Summary: Object-Based Disk storage driver source
32 Group: Development/Kernel
34 %description -n lustre-source
35 Lustre Lite Source for further development
37 %package -n lustre-doc
38 Summary: Documentation and sample configuration files
40 # FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
43 %description -n lustre-doc
44 Documentation and sample configuration files for Lustre
46 %package -n lustre-ldap
47 Summary: Configures openldap server for LDAP Lustre config database
49 Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
51 %description -n lustre-ldap
52 Configures openldap server for LDAP Lustre config database
57 Group: Development/Kernel
59 %description -n liblustre
60 Lustre lib binary package.
64 %setup -qn lustre-%{version}
65 %setup -c -n lustre-%{version}-lib
68 rm -rf $RPM_BUILD_ROOT
70 # Set an explicit path to our Linux tree, if we can.
71 cd $RPM_BUILD_DIR/lustre-%{version}
72 ./configure --with-linux='%{linuxdir}' --with-portals='%{portalsdir}' --with-portalslib='%{portalslibdir}'
76 cd $RPM_BUILD_DIR/lustre-%{version}-lib/lustre-%{version}
77 ./configure --with-lib --with-portals='%{portalsdir}' --with-portalslib='%{portalslibdir}'
82 cd $RPM_BUILD_DIR/lustre-%{version}
83 make install prefix=$RPM_BUILD_ROOT
86 cd $RPM_BUILD_DIR/lustre-%{version}-lib/lustre-%{version}
87 make install prefix=$RPM_BUILD_ROOT
91 # Create the pristine source directory.
92 cd $RPM_BUILD_DIR/lustre-%{version}
93 mkdir -p $RPM_BUILD_ROOT/usr/src
95 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
96 make distdir distdir=lustre-source/lustre-%{version}
98 # ldap database directory
99 mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
102 %attr(-, root, root) /usr/sbin/lmc
103 %attr(-, root, root) /usr/sbin/lctl
104 %attr(-, root, root) /usr/sbin/lconf
105 %attr(-, root, root) /usr/sbin/llanalyze
106 %attr(-, root, root) /usr/sbin/lfind
107 %attr(-, root, root) /usr/sbin/lstripe
108 %attr(-, root, root) /usr/sbin/mcreate
109 %attr(-, root, root) /usr/sbin/mkdirmany
110 %attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
111 %attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
112 %attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
113 %attr(-, root, root) /usr/lib/lustre/examples/local.sh
114 %attr(-, root, root) /usr/lib/lustre/examples/uml.sh
115 %attr(-, root, root) /usr/lib/lustre/examples/lov.sh
116 %attr(-, root, root) /etc/init.d/lustre
119 %attr(-, root, root) %doc COPYING FDL
120 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
121 %attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
122 %attr(-, root, root) %doc tests/client-mount2.cfg
123 %attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
124 %attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
125 %attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
126 %attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
127 %attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
129 %files -n lustre-modules
130 %attr(-, root, root) %doc COPYING
131 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/extN.o
132 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ldlm.o
133 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/llite.o
134 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/mdc.o
135 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/mds.o
136 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/fsfilt_extN.o
137 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdclass.o
138 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdecho.o
139 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdfilter.o
140 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/lov.o
141 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/osc.o
142 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ost.o
143 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ptlrpc.o
145 %files -n lustre-source
146 %attr(-, root, root) /usr/src/lustre-%{version}
150 %attr(-, root, root) /lib/lustre
151 %attr(-, root, root) /lib/lustre/liblov.a
152 %attr(-, root, root) /lib/lustre/liblustreclass.a
153 %attr(-, root, root) /lib/lustre/libptlrpc.a
154 %attr(-, root, root) /lib/lustre/libobdecho.a
155 %attr(-, root, root) /lib/lustre/libldlm.a
156 %attr(-, root, root) /lib/lustre/libosc.a
157 %attr(-, root, root) /usr/sbin/lctl
158 %attr(-, root, root) /usr/sbin/lfind
159 %attr(-, root, root) /usr/sbin/lstripe
160 %attr(-, root, root) /usr/sbin/obdio
161 %attr(-, root, root) /usr/sbin/obdbarrier
162 %attr(-, root, root) /usr/sbin/obdstat
163 %attr(-, root, root) /usr/sbin/lload
164 %attr(-, root, root) /usr/sbin/lconf
165 %attr(-, root, root) /usr/sbin/lmc
166 %attr(-, root, root) /usr/sbin/llanalyze
170 %files -n lustre-ldap
171 %attr(-, root, root) /etc/openldap/slapd-lustre.conf
172 %attr(-, root, root) /etc/openldap/schema/lustre.schema
173 %attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl
174 %attr(-, root, root) /usr/lib/lustre/top.ldif
175 %dir /var/lib/ldap/lustre
176 %attr(700, ldap, ldap) /var/lib/ldap/lustre
179 if [ ! -e /dev/obd ]; then
180 mknod /dev/obd c 10 241
184 grep -q obdclass /etc/modules.conf || \
185 echo 'alias char-major-10-241 obdclass' >> /etc/modules.conf
187 grep -q '/dev/obd' /etc/modules.conf || \
188 echo 'alias /dev/obd obdclass' >> /etc/modules.conf
190 grep -q '/dev/lustre' /etc/modules.conf || \
191 echo 'alias /dev/lustre obdclass' >> /etc/modules.conf
197 if ! grep -q slapd-lustre /etc/openldap/slapd.conf; then
198 echo "include /etc/openldap/slapd-lustre.conf" >> /etc/openldap/slapd.conf
201 %postun -n lustre-ldap
202 slapd=/etc/openldap/slapd.conf
203 if grep -q slapd-lustre $slapd; then
204 tmp=/tmp/lustre-ldap.$$
205 sed "/slapd-lustre/d" $slapd >> $tmp
211 #rm -rf $RPM_BUILD_ROOT