3 # Declare rpmbuild --with/--without parameters
7 %bcond_without lustre_tests
8 %bcond_without lustre_iokit
10 %if %{without servers}
11 # --without servers overrides --with {ldiskfs|zfs}
12 # so undefine the internal variables set by bcond_*
13 %undefine with_ldiskfs
17 %{!?version: %global version @VERSION@}
18 %{!?kver: %global kver ""}
19 %{!?kdir: %global kdir %(dir=$(echo "%configure_args" | sed -ne 's/.*--with-linux=\\([^ ][^ ]*\\).*$/\\1/p'); if [ -n "$dir" ]; then echo "$dir"; else if [ -n "%kver" ]; then kversion="%kver"; else kversion="$(uname -r)"; fi; echo "/lib/modules/$kversion/source"; fi)}
21 %{!?kobjdir: %global kobjdir %(dir=$(echo "%configure_args" | sed -ne 's/.*--with-linux-obj=\\([^ ][^ ]*\\).*$/\\1/p'); if [ -n "$dir" ]; then echo "$dir"; else if [ -n "%kver" ]; then kversion="%kver"; else kversion="$(uname -r)"; fi; if [ "%kdir" = "/lib/modules/$kversion/source" ]; then echo "/lib/modules/$kversion/build"; else echo "%kdir"; fi; fi)}
23 # as an alternative to this implementation we could simply "make -C $kdir kernelversion"
24 %{!?kversion: %global kversion %(if test -s %kobjdir/include/generated/utsrelease.h ; then LINUXRELEASEHEADER=%kobjdir/include/generated/utsrelease.h ; elif test -s %kobjdir/include/linux/utsrelease.h ; then LINUXRELEASEHEADER=%kobjdir/include/linux/utsrelease.h ; else LINUXRELEASEHEADER=%kobjdir/include/linux/version.h; fi; sed -ne '/^#define UTS_RELEASE/s/.*"\\(.*\\)"$/\\1/p' $LINUXRELEASEHEADER)}
26 %{!?downstream_release: %global downstream_release "@DOWNSTREAM_RELEASE@"}
28 %define buildid %(if [ -n "@BUILDID@" ]; then echo "_@BUILDID@"; fi)
30 %{!?myrelease: %global myrelease %(if [ -n "%downstream_release" ]; then echo -n "%{downstream_release}_"; fi; echo %kversion | tr '-' '_')}
32 # always append the buildid, even when the caller defines %release
33 %define fullrelease %{myrelease}%{buildid}
35 # in order to get kernel symset and/or kernel module dependencies into
36 # the RPM, in order to support weak-modules, the internal dependency gen-
37 # erator needs to be disabled
38 # this is done with (reduce the double % down to a single %):
40 # %%global _use_internal_dependency_generator 0
42 # on SLES10, /usr/lib/rpm/macros already sets this, so no harm in also
43 # defining it here (until Suse changes their mind)
45 # on RHEL5, however, we do need to explicitly disable the internal dep-
46 # endency generator and allow the external one be used
47 # but since RedHat's kABI is only a subset of the total kernel ABI, it
48 # doesn't include all of the symbols we (or OFED for that matter) need
49 # until RedHat includes all of the symbols we need in their symsets we
50 # cannot support weak-modules
51 # we did e-mail the maintainer of all of this stuff @redhat but got no
53 #%%global _use_internal_dependency_generator 0
55 # for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
57 %define krequires %(bash -c "echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/-ppc64$//' -e 's/-default$//'")
59 # Set the package name prefix
60 %if %{undefined lustre_name}
62 %global lustre_name lustre
64 %global lustre_name lustre-client
68 %if %{undefined kmoddir}
69 %if %{defined kernel_module_package_moddir}
70 %global kmoddir %{kernel_module_package_moddir}
72 %if %{defined suse_kernel_module_package}
73 %global kmoddir updates
80 %if %{defined cross_path} && %{defined post_script}
81 %define rpm_post_base %(echo $(dirname %{cross_path})/%{lustre_name})
84 Summary: Lustre File System
87 Release: %{fullrelease}
89 Group: Utilities/System
90 Source: lustre-%{version}.tar.gz
91 URL: http://wiki.whamcloud.com/
92 BuildRoot: %{_tmppath}/lustre-%{version}-root
93 Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
94 Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
95 Requires: %{name}-modules = %{version}
99 %if %{defined cross_requires}
100 Requires: %{cross_requires}
103 # GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
104 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
105 #suse don't support selinux
106 BuildRequires: libselinux-devel
112 Userspace tools and files for the Lustre file system.
115 Summary: Kernel Lustre modules for Linux %{kversion}
116 %if %{defined cross_requires}
117 Requires: %{cross_requires}
120 # for SLES11, we need nothing here
121 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
122 # for RHEL we need to require the specific kernel still since weak-modules
123 # support on RH is, well, weak, to be punny about it
124 Requires: kernel = %{krequires}
127 Group: Development/Kernel
130 Lustre file system, server and network drivers for Linux %{kversion}.
134 Summary: osd-ldiskfs contains both ldiskfs and its osd interface in Lustre.
135 Requires: lustre-modules = %{version}
136 Requires: modutils >= 2.4.10
137 Requires: ldiskfsprogs >= 1.42.7.wc1
139 Obsoletes: lustre-ldiskfs
140 Group: Development/Kernel
142 %description osd-ldiskfs
143 The Lustre Object Storage Device (OSD) API is the interface to access and
144 modify data that is supposed to be stored persistently. This API is the interface
145 to code that bridges individual file systems. This specific package provides an
146 implementation of the OSD API for using the Ldiskfs filesystem as the underlying
147 backing store of a Lustre server.
152 Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
153 Requires: lustre-modules = %{version}, zfs-kmod
155 Group: Development/Kernel
158 The Lustre Object Storage Device (OSD) API is the interface to access and
159 modify data that is supposed to be stored persistently. This API is the interface
160 to code that bridges individual file systems. This specific package provides an
161 implementation of the OSD API for using the ZFS filesystem as the underlying
162 backing store of a Lustre server.
166 Summary: Object-Based Disk storage driver source
167 Group: Development/Kernel
170 Lustre sources for further development
172 # Since the RPMs we ship are to be used on both SLES and RHEL, we
173 # can't include any dependency information (since the package names
174 # are different on the two platforms).
176 # Instead, we can build these empty meta-packages that only include
177 # dependency information. These let people get the correct
178 # dependencies for their platform and lets them use tools like yum and
179 # red carpet to install the correct files.
181 # Unfortunately I have not seen this come up on the lists much, so I
182 # have disabled them (by commenting out their empty files section
183 # below) until it's clear that they resolve more confusion than they
187 Summary: Lustre dependencies meta-package for SLES
188 Group: Utilities/System
189 Provides: lustre-deps = %{version}
190 Requires: %{name} = %{version}, sles-release
191 Conflicts: %{name}-deps-rhel
193 %description deps-sles
194 This package has RPM dependencies appropriate for SLES systems.
197 Summary: Lustre dependencies meta-package for RHEL
198 Group: Utilities/System
199 Provides: lustre-deps = %{version}
200 Requires: %{name} = %{version}, redhat-release
201 Conflicts: %{name}-deps-sles
203 %description deps-rhel
204 This package has RPM dependencies appropriate for RHEL, RHL, and FC
208 Summary: Lustre testing framework
209 Group: Development/Kernel
210 Provides: %{name}-tests = %{version}
211 Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit
214 This package contains a set of test binaries and scripts that are intended
215 to be used by the Lustre testing framework.
217 %if %{with lustre_iokit}
218 %package -n lustre-iokit
219 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
220 Group: Applications/System
221 Requires: python > 2.2, sg3_utils
223 %description -n lustre-iokit
224 This package includes five tools:
226 A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility.
229 This survey can be run in 3 modes to test disk I/O including the filesystem,
230 network I/O, and disk I/O via the network. The script does sequential I/O
231 with varying numbers of threads and objects (files) by using lctl::test_brw
232 to drive the echo_client connected to local or remote obdfilter instances,
233 or remote obdecho instances.
236 This survey tests the client-to-disk performance of individual OSTs, and
237 ranks then for comparison.
240 This script will collect IO stats on a defined set of nodes.
243 A script to run the IOR benchmark. The latest version can be downloaded from
244 http://www.llnl.gov/asci/purple/benchmarks/limited/ior/
247 This survey tests the local metadata performance using the echo_client to drive
248 the MDD layer to perform operations. It is run with multiple threads (to
249 simulate MDT service threads) locally on the MDS node, and does not need Lustre
250 clients in order to run
253 %if 0%{?suse_version}
257 %setup -qn lustre-%{version}
258 ln lustre/ChangeLog ChangeLog-lustre
259 ln lnet/ChangeLog ChangeLog-lnet
263 # Set an explicit path to our Linux tree, if we can.
264 cd $RPM_BUILD_DIR/lustre-%{version}
265 # override %optflags so that the vendor's overzealous flags don't create
267 %define optflags -g -O2 -Werror
268 CONFIGURE_ARGS="%{?configure_args} --with-release=%release"
269 %if %{with lustre_tests}
270 CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-tests --enable-liblustre-tests"
272 CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-tests --disable-liblustre-tests"
274 %if %{without lustre_iokit}
275 CONFIGURE_ARGS="$CONFIGURE_ARGS --disable-iokit"
278 # if %%kdir was given, make sure it's not in the configure arguments
279 if [ -n "%kdir" ]; then
280 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux=[^ ][^ ]* \?//')
282 # ditto for %%kobjdir
283 if [ -n "%kobjdir" ]; then
284 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux-obj=[^ ][^ ]* \?//')
286 # remove --with-kmp-moddir from configure arguments,
287 # it will be set --with-kmp-moddir=%%kmoddir
288 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* \?//')
290 # we need to eval "configure" because $CONFIGURE_ARGS could have a quoted
291 # string in it which we don't want word splitted by the shell
292 # also remove (build|host|target) options because they will be specified
293 # inside $CONFIGURE_ARGS
294 %define eval_configure %(echo '%configure' | sed -e 's#\./configure#eval ./configure#' -e 's/--\\(build\\|host\\|target\\)=[^ ][^ ]* //g')
297 %{?kdir: --with-linux=%kdir} %{?kobjdir: --with-linux-obj=%kobjdir} \
298 $CONFIGURE_ARGS --with-kmp-moddir=%{kmoddir}
299 make %{?_smp_mflags} -s %{?make_args}
302 make install DESTDIR=$RPM_BUILD_ROOT
303 # hack to avoid changing the libsysio code for "make install"
304 rm -f $RPM_BUILD_ROOT%{_libdir}/libsysio.a
306 # The .ha_v2 extension identifies the heartbeat resource agent as using
307 # legacy syntax. Install a compatibility symlink to avoid conflicts when
308 # newer-style agents are added.
309 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
311 # Create the pristine source directory.
312 cd $RPM_BUILD_DIR/lustre-%{version}
313 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src
315 ln -s $RPM_BUILD_ROOT%{_prefix}/src lustre-source
316 make distdir distdir=lustre-source/lustre-%{version}
317 chmod -R go-w lustre-source/lustre-%{version}
318 # fc18 needs 'x' permission for library files
319 find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x
321 cat >lustre.files <<EOF
322 %{?rootdir}/sbin/mount.lustre
325 %{_bindir}/lfs_migrate
329 %{_bindir}/lustre_req_history
330 %{_bindir}/plot-llstat
331 %{_bindir}/req_layout
332 %{_libdir}/libptlctl.a
333 %{_libdir}/liblustreapi.a
334 %{_libdir}/liblustreapi.so
337 %{_includedir}/lustre
338 %{_includedir}/libcfs
339 %{_libexecdir}/lustre/lc_common
340 %{_sysconfdir}/udev/rules.d/99-lustre.rules
341 %{_sysconfdir}/init.d/lnet
342 %{_sysconfdir}/init.d/lustre
343 %config(noreplace) %{_sysconfdir}/ldev.conf
344 %{_sysconfdir}/sysconfig/lustre
345 %{_libexecdir}/lustre/haconfig
346 %{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2
347 %{_sysconfdir}/ha.d/resource.d/Lustre
350 if [ -f $RPM_BUILD_ROOT%{_libdir}/libcfsutil.a ] ; then
351 echo '%{_libdir}/libcfsutil.a' >>lustre.files
354 if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then
355 echo '%{_libdir}/liblustre.a' >>lustre.files
356 echo '%{_libdir}/liblustre.so' >>lustre.files
359 if [ -f $RPM_BUILD_ROOT%{_libdir}/libiam.a ] ; then
360 echo '%{_libdir}/libiam.a' >>lustre.files
363 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
364 echo '%{_libdir}/lustre/snmp' >>lustre.files
365 echo '%{_datadir}/lustre/snmp/mibs' >>lustre.files
368 # Have universal lustre headers
369 if [ -f $RPM_BUILD_DIR/lustre-%{version}/lustre/include/lustre/lustre_idl.h ] ; then
370 echo '%{_includedir}/linux/lustre_user.h' >>lustre.files
372 echo '%{_includedir}/linux/lustre_idl.h' >>lustre.files
375 if [ -f $RPM_BUILD_DIR/lustre-%{version}/lustre/include/linux/lustre_types.h ] ; then
376 echo '%{_includedir}/linux/lustre_types.h' >>lustre.files
379 %if %{with lustre_tests}
380 echo '%{_libdir}/lustre/tests/*' >lustre-tests.files
381 echo '%{_bindir}/mcreate' >>lustre-tests.files
382 echo '%{_bindir}/munlink' >>lustre-tests.files
383 echo '%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
384 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/liblustre/tests ] ; then
385 echo '%{_libdir}/lustre/liblustre/tests/*' >>lustre-tests.files
389 %if %{defined cross_path}
390 %if %{defined rpm_post_base}
391 POST_SCRIPT=$RPM_BUILD_DIR/lustre-%{version}/%{post_script}
392 if [ -f $POST_SCRIPT ]; then
393 cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}.sh
394 echo '%attr(0555, root, root) %{rpm_post_base}.sh' >>lustre.files
395 cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-modules.sh
397 cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-ldiskfs.sh
400 cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-zfs.sh
402 %if %{with lustre_tests}
403 cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-tests.sh
404 echo '%attr(0555, root, root) %{rpm_post_base}-tests.sh' >>lustre-tests.files
409 # mark modules executable for find-debuginfo.sh
410 find $RPM_BUILD_ROOT%{?rootdir}/lib/modules/%{kversion}/%{kmoddir} -name "*.ko" -type f | \
411 xargs --no-run-if-empty chmod u+x
414 %files -f lustre.files
415 %defattr(-,root,root)
418 %defattr(-,root,root)
419 %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/*
420 %if %{with lustre_tests}
421 %exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
424 %exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
425 %exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
428 %exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
430 %if %{defined rpm_post_base}
431 %attr(0555, root, root) %{rpm_post_base}-modules.sh
434 %doc ChangeLog-lustre
439 %defattr(-,root,root)
440 %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
441 %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
442 %if %{defined rpm_post_base}
443 %attr(0555, root, root) %{rpm_post_base}-osd-ldiskfs.sh
449 %defattr(-,root,root)
450 %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
451 %if %{defined rpm_post_base}
452 %attr(0555, root, root) %{rpm_post_base}-osd-zfs.sh
457 %defattr(-,root,root)
458 %{_prefix}/src/lustre-%{version}
460 # uncomment these lines to enable deps packages
464 %if %{with lustre_tests}
465 %files tests -f lustre-tests.files
466 %defattr(-,root,root)
469 %if %{with lustre_iokit}
470 %files -n lustre-iokit
471 %defattr(-, root, root)
472 %{_bindir}/ior-survey
475 %{_bindir}/obdfilter-survey
476 %{_bindir}/plot-obdfilter
478 %{_bindir}/ost-survey
479 %{_bindir}/sgpdd-survey
480 %{_bindir}/plot-sgpdd
482 %{_bindir}/gather_stats_everywhere.sh
484 %{_bindir}/mds-survey
485 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
486 %doc lustre-iokit/ior-survey/README.ior-survey
487 %doc lustre-iokit/ost-survey/README.ost-survey
488 %doc lustre-iokit/mds-survey/README.mds-survey
489 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
490 %doc lustre-iokit/stats-collect/README.lstats.sh
493 %if %{defined rpm_post_base}
495 if [ -x %{rpm_post_base}.sh ]; then
496 %{rpm_post_base}.sh %{cross_path} create
500 if [ -x %{rpm_post_base}.sh ]; then
501 %{rpm_post_base}.sh %{cross_path} remove
506 %if %{defined rpm_post_base}
507 if [ -x %{rpm_post_base}-modules.sh ]; then
508 %{rpm_post_base}-modules.sh %{cross_path} create
511 if [ -f /boot/System.map-%{kversion} ]; then
512 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
514 depmod -ae %{kversion} || exit 0
517 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
518 # "weak modules" support
520 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
521 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
522 /usr/lib/module-init-tools/weak-modules --add-modules
525 if [ -x /sbin/weak-modules ]; then
526 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
527 /sbin/weak-modules --add-modules
530 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
531 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
532 # print a warning so that users are aware of this issue.
533 if sysctl kernel.unsupported >/dev/null 2>&1 &&
534 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
535 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
537 warning: the Lustre modules are not supported by Novell. To use Lustre
538 on this system, you should put
540 allow_unsupported_modules 1
542 into /etc/modprobe.d/unsupported_modules"
548 %if %{defined rpm_post_base}
549 if [ -x %{rpm_post_base}-osd-ldiskfs.sh ]; then
550 %{rpm_post_base}-osd-ldiskfs.sh %{cross_path} create
553 if [ -f /boot/System.map-%{kversion} ]; then
554 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
556 depmod -ae %{kversion} || exit 0
559 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
560 # "weak modules" support
562 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
563 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
564 /usr/lib/module-init-tools/weak-modules --add-modules
567 if [ -x /sbin/weak-modules ]; then
568 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
569 /sbin/weak-modules --add-modules
572 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
573 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
574 # print a warning so that users are aware of this issue.
575 if sysctl kernel.unsupported >/dev/null 2>&1 &&
576 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
577 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
579 warning: the Lustre modules are not supported by Novell. To use Lustre
580 on this system, you should put
582 allow_unsupported_modules 1
584 into /etc/modprobe.d/unsupported_modules"
591 %if %{defined rpm_post_base}
592 if [ -x %{rpm_post_base}-osd-zfs.sh ]; then
593 %{rpm_post_base}-osd-zfs.sh %{cross_path} create
596 if [ -f /boot/System.map-%{kversion} ]; then
597 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
599 depmod -ae %{kversion} || exit 0
602 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
603 # "weak modules" support
605 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
606 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
607 /usr/lib/module-init-tools/weak-modules --add-modules
610 if [ -x /sbin/weak-modules ]; then
611 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
612 /sbin/weak-modules --add-modules
615 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
616 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
617 # print a warning so that users are aware of this issue.
618 if sysctl kernel.unsupported >/dev/null 2>&1 &&
619 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
620 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
622 warning: the Lustre modules are not supported by Novell. To use Lustre
623 on this system, you should put
625 allow_unsupported_modules 1
627 into /etc/modprobe.d/unsupported_modules"
633 %if %{defined rpm_post_base}
634 if [ -x %{rpm_post_base}-modules.sh ]; then
635 %{rpm_post_base}-modules.sh %{cross_path} remove
638 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
639 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
644 %if %{defined rpm_post_base}
645 if [ -x %{rpm_post_base}-osd-ldiskfs.sh ]; then
646 %{rpm_post_base}-osd-ldiskfs.sh %{cross_path} remove
649 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
650 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
656 %if %{defined rpm_post_base}
657 if [ -x %{rpm_post_base}-osd-zfs.sh ]; then
658 %{rpm_post_base}-osd-zfs.sh %{cross_path} remove
661 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
662 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
666 %if %{undefined cross_path}
668 if [ -f /boot/System.map-%{kversion} ]; then
669 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
671 depmod -ae %{kversion} || exit 0
674 # "weak modules" support
676 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
677 cat /var/run/%{name}-modules |
678 /usr/lib/module-init-tools/weak-modules --remove-modules
681 if [ -x /sbin/weak-modules ]; then
682 cat /var/run/%{name}-modules |
683 /sbin/weak-modules --remove-modules
685 rm /var/run/%{name}-modules
689 if [ -f /boot/System.map-%{kversion} ]; then
690 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
692 depmod -ae %{kversion} || exit 0
695 # "weak modules" support
697 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
698 cat /var/run/%{name}-osd-ldiskfs |
699 /usr/lib/module-init-tools/weak-modules --remove-modules
702 if [ -x /sbin/weak-modules ]; then
703 cat /var/run/%{name}-osd-ldiskfs |
704 /sbin/weak-modules --remove-modules
706 rm /var/run/%{name}-osd-ldiskfs
711 if [ -f /boot/System.map-%{kversion} ]; then
712 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
714 depmod -ae %{kversion} || exit 0
717 # "weak modules" support
719 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
720 cat /var/run/%{name}-osd-zfs |
721 /usr/lib/module-init-tools/weak-modules --remove-modules
724 if [ -x /sbin/weak-modules ]; then
725 cat /var/run/%{name}-osd-zfs |
726 /sbin/weak-modules --remove-modules
728 rm /var/run/%{name}-osd-zfs
732 %if %{with lustre_tests}
734 %if %{defined rpm_post_base}
735 if [ -x %{rpm_post_base}-tests.sh ]; then
736 %{rpm_post_base}-tests.sh %{cross_path} create
740 if [ -x %{rpm_post_base}-tests.sh ]; then
741 %{rpm_post_base}-tests.sh %{cross_path} remove
744 if [ -f /boot/System.map-%{kversion} ]; then
745 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
747 depmod -ae %{kversion} || exit 0
751 if [ -f /boot/System.map-%{kversion} ]; then
752 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
754 depmod -ae %{kversion} || exit 0
760 rm -rf $RPM_BUILD_ROOT