3 # Declare rpmbuild --with/--without parameters
7 %bcond_without lustre_tests
8 %bcond_without lustre_utils
9 %bcond_without lustre_iokit
10 %bcond_without lustre_modules
12 %bcond_without manpages
16 %if %{without servers}
17 # --without servers overrides --with {ldiskfs|zfs}
18 # so undefine the internal variables set by bcond_*
19 %undefine with_ldiskfs
23 %{!?version: %global version @VERSION@}
24 %{!?kver: %global kver %(uname -r)}
25 %{!?kdir: %global kdir /lib/modules/%{kver}/source}
26 %{!?kobjdir: %global kobjdir %(if [ "%{kdir}" = "/lib/modules/%{kver}/source" ]; then echo "/lib/modules/%{kver}/build"; else echo "%{kdir}"; fi)}
28 # as an alternative to this implementation we could simply "make -C $kdir kernelversion"
29 %{!?kversion: %global kversion %(files="include/generated/utsrelease.h include/linux/utsrelease.h include/linux/version.h"; for f in $files; do if test -r %{kobjdir}/$f && grep UTS_RELEASE %{kobjdir}/$f >/dev/null; then sed -ne '/^#define UTS_RELEASE/s/.*"\\(.*\\)"$/\\1/p' %{kobjdir}/$f; break; fi; done)}
31 %if 0%{?build_src_rpm}
32 %{!?myrelease: %global myrelease 1}
34 %{!?myrelease: %global myrelease %(echo %kversion | tr '-' '_')}
35 # for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
37 %define krequires %(echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/[-.]ppc64$//' -e 's/\.aarch64$//' -e 's/-default$//')
40 %define fullrelease %{myrelease}
42 # in order to get kernel symset and/or kernel module dependencies into
43 # the RPM, in order to support weak-modules, the internal dependency gen-
44 # erator needs to be disabled
45 # this is done with (reduce the double % down to a single %):
47 # %%global _use_internal_dependency_generator 0
49 # on SLES10, /usr/lib/rpm/macros already sets this, so no harm in also
50 # defining it here (until Suse changes their mind)
52 # on RHEL5, however, we do need to explicitly disable the internal dep-
53 # endency generator and allow the external one be used
54 # but since RedHat's kABI is only a subset of the total kernel ABI, it
55 # doesn't include all of the symbols we (or OFED for that matter) need
56 # until RedHat includes all of the symbols we need in their symsets we
57 # cannot support weak-modules
58 # we did e-mail the maintainer of all of this stuff @redhat but got no
60 #%%global _use_internal_dependency_generator 0
62 # Set the package name prefix
63 %if %{undefined lustre_name}
65 %global lustre_name lustre
67 %global lustre_name lustre-client
71 %if %{undefined kmoddir}
72 %if %{defined kernel_module_package_moddir}
73 %global kmoddir %{kernel_module_package_moddir}
75 %if %{defined suse_kernel_module_package}
76 %global kmoddir updates
83 Summary: Lustre File System
86 Release: %{fullrelease}
88 Group: Utilities/System
89 Source: lustre-%{version}.tar.gz
90 URL: https://wiki.hpdd.intel.com/
91 BuildRoot: %{_tmppath}/lustre-%{version}-root
92 Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
93 Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
94 Requires: %{name}-modules = %{version}
95 BuildRequires: libtool
98 Requires: lustre-osd-mount
99 Provides: lustre-client = %{version}-%{fullrelease}
101 # GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
102 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
103 #suse don't support selinux
104 BuildRequires: libselinux-devel
109 Userspace tools and files for the Lustre file system.
111 %if %{with lustre_modules}
113 Summary: Kernel Lustre modules for Linux %{kversion}
114 # for SLES11, we need nothing here
115 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
116 %if %{defined krequires}
117 # for RHEL we need to require the specific kernel still since weak-modules
118 # support on RH is, well, weak, to be punny about it
119 Requires: kernel = %{krequires}
123 BuildRequires: libyaml-devel
126 Group: Development/Kernel
129 Lustre file system, server and network drivers for Linux %{kversion}.
133 Summary: osd-ldiskfs contains both ldiskfs and its osd interface in Lustre.
134 Requires: lustre-modules = %{version}
135 Requires: module-init-tools >= 3.9
136 Requires: ldiskfsprogs >= 1.42.7.wc1
137 Requires: lustre-osd-ldiskfs-mount = %{version}
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.
149 %if %{with lustre_utils}
150 %package osd-ldiskfs-mount
151 Summary: osd-ldiskfs-mount contains mount's ldiskfs specific dso.
152 Provides: lustre-osd-mount
153 Group: Development/Kernel
155 %description osd-ldiskfs-mount
156 LDISKFS hooks for mount/mkfs into a dynamic library.
163 Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
164 Requires: lustre-modules = %{version}, zfs-kmod
165 Requires: lustre-osd-zfs-mount = %{version}
167 Group: Development/Kernel
170 The Lustre Object Storage Device (OSD) API is the interface to access and
171 modify data that is supposed to be stored persistently. This API is the interface
172 to code that bridges individual file systems. This specific package provides an
173 implementation of the OSD API for using the ZFS filesystem as the underlying
174 backing store of a Lustre server.
176 %if %{with lustre_utils}
177 %package osd-zfs-mount
178 Summary: osd-zfs-mount contains mount's zfs specific dso.
179 Provides: lustre-osd-mount
180 Group: Development/Kernel
182 %description osd-zfs-mount
183 ZFS hooks for mount/mkfs into a dynamic library.
187 %endif # with lustre_modules
189 # Since the RPMs we ship are to be used on both SLES and RHEL, we
190 # can't include any dependency information (since the package names
191 # are different on the two platforms).
193 # Instead, we can build these empty meta-packages that only include
194 # dependency information. These let people get the correct
195 # dependencies for their platform and lets them use tools like yum and
196 # red carpet to install the correct files.
198 # Unfortunately I have not seen this come up on the lists much, so I
199 # have disabled them (by commenting out their empty files section
200 # below) until it's clear that they resolve more confusion than they
204 Summary: Lustre dependencies meta-package for SLES
205 Group: Utilities/System
206 Provides: lustre-deps = %{version}
207 Requires: %{name} = %{version}, sles-release
208 Conflicts: %{name}-deps-rhel
210 %description deps-sles
211 This package has RPM dependencies appropriate for SLES systems.
214 Summary: Lustre dependencies meta-package for RHEL
215 Group: Utilities/System
216 Provides: lustre-deps = %{version}
217 Requires: %{name} = %{version}, redhat-release
218 Conflicts: %{name}-deps-sles
220 %description deps-rhel
221 This package has RPM dependencies appropriate for RHEL, RHL, and FC
225 Summary: Lustre testing framework
226 Group: Development/Kernel
227 Provides: %{name}-tests = %{version}
228 Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit
229 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
232 This package contains a set of test binaries and scripts that are intended
233 to be used by the Lustre testing framework.
235 %if %{with lustre_iokit}
236 %package -n lustre-iokit
237 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
238 Group: Applications/System
239 Requires: python > 2.2, sg3_utils
241 %description -n lustre-iokit
242 This package includes five tools:
244 A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility.
247 This survey can be run in 3 modes to test disk I/O including the filesystem,
248 network I/O, and disk I/O via the network. The script does sequential I/O
249 with varying numbers of threads and objects (files) by using lctl::test_brw
250 to drive the echo_client connected to local or remote obdfilter instances,
251 or remote obdecho instances.
254 This survey tests the client-to-disk performance of individual OSTs, and
255 ranks then for comparison.
258 This script will collect IO stats on a defined set of nodes.
261 A script to run the IOR benchmark. The latest version can be downloaded from
262 http://www.llnl.gov/asci/purple/benchmarks/limited/ior/
265 This survey tests the local metadata performance using the echo_client to drive
266 the MDD layer to perform operations. It is run with multiple threads (to
267 simulate MDT service threads) locally on the MDS node, and does not need Lustre
268 clients in order to run
271 %if 0%{?suse_version}
275 %setup -qn lustre-%{version}
276 ln lustre/ChangeLog ChangeLog-lustre
277 ln lnet/ChangeLog ChangeLog-lnet
281 # Set an explicit path to our Linux tree, if we can.
282 cd $RPM_BUILD_DIR/lustre-%{version}
283 # override %optflags so that the vendor's overzealous flags don't create
285 %define optflags -g -O2 -Werror
287 CONFIGURE_ARGS="%{?configure_args}"
288 if [ -n "$CONFIGURE_ARGS" ]; then
289 # make sure %%kdir and %%kobjdir are not in the configure arguments
290 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux=[^ ][^ ]* \?//')
291 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux-obj=[^ ][^ ]* \?//')
292 # remove --with-kmp-moddir from configure arguments,
293 # it will be set --with-kmp-moddir=%%kmoddir
294 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* \?//')
297 # we need to eval "configure" because $CONFIGURE_ARGS could have a quoted
298 # string in it which we don't want word splitted by the shell
299 # also remove (build|host|target) options because they will be specified
300 # inside $CONFIGURE_ARGS
301 %define eval_configure %(echo '%configure' | sed -e 's#\./configure#eval ./configure#' -e 's/--\\(build\\|host\\|target\\)=[^ ][^ ]* //g')
303 %eval_configure $CONFIGURE_ARGS \
304 %{?with_lustre_tests:--enable-tests}%{!?with_lustre_tests:--disable-tests} \
305 %{?with_lustre_utils:--enable-utils}%{!?with_lustre_utils:--disable-utils} \
306 %{?with_lustre_modules:--enable-modules}%{!?with_lustre_modules:--disable-modules} \
307 %{!?with_shared:--disable-shared} \
308 %{!?with_static:--disable-static} \
309 %{!?with_lustre_iokit:--disable-iokit} \
310 %{!?with_ldiskfs:--disable-ldiskfs} \
311 %{!?with_servers:--disable-server} \
312 %{!?with_zfs:--without-zfs} \
313 %{!?with_lnet_dlc:--disable-dlc} \
314 %{!?with_manpages:--disable-manpages} \
315 --with-release=%{release} \
316 --with-linux=%{kdir} \
317 --with-linux-obj=%{kobjdir} \
318 --with-kmp-moddir=%{kmoddir}
320 make %{?_smp_mflags} -s %{?make_args}
323 make install DESTDIR=$RPM_BUILD_ROOT
327 %if %{with servers} && %{with lustre_utils}
328 # The .ha_v2 extension identifies the heartbeat resource agent as using
329 # legacy syntax. Install a compatibility symlink to avoid conflicts when
330 # newer-style agents are added.
331 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
332 echo '%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2' >>lustre.files
333 echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files
336 %if %{_vendor}=="redhat"
337 # The following scripts are Red Hat specific
339 echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
340 echo '%{_sysconfdir}/sysconfig/lsvcgss' >>lustre.files
341 echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
343 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
344 echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
347 # fc18 needs 'x' permission for library files
348 find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
351 rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
353 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
356 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
357 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
362 echo '%{_libdir}/libiam.a' >>lustre.files
365 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
366 echo '%{_libdir}/lustre/snmp' >>lustre.files
369 find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ \
370 -name \*.la -type f -exec rm -f {} \;
372 %if %{with lustre_modules}
373 # mark modules executable for find-debuginfo.sh
374 find $RPM_BUILD_ROOT/lib/modules -name \*.ko -type f -exec chmod u+x {} \;
377 %if %{with lustre_tests}
378 echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
379 echo '%{_bindir}/mcreate' >>lustre-tests.files
380 echo '%{_bindir}/munlink' >>lustre-tests.files
381 echo '%{_bindir}/req_layout' >>lustre-tests.files
382 echo '%{_sbindir}/wirecheck' >>lustre-tests.files
383 echo '%{_sbindir}/wiretest' >>lustre-tests.files
384 %if %{with lustre_modules}
385 echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
389 %files -f lustre.files
390 %defattr(-,root,root)
392 %exclude %{_sbindir}/wirecheck
393 %exclude %{_sbindir}/wiretest
395 %exclude %{_sbindir}/zfsobj2fid
397 %if %{with lustre_utils}
399 %{_libexecdir}/lustre/lc_common
400 %{_libexecdir}/lustre/haconfig
401 %{_bindir}/lustre_req_history
406 %{_bindir}/plot-llstat
409 %{_bindir}/lfs_migrate
411 %{_libdir}/libptlctl.a
412 %{_libdir}/libcfsutil.a
413 %{_libdir}/liblustreapi.a
414 %{_libdir}/liblustreapi.so
418 %{_includedir}/lustre
419 %{_includedir}/libcfs
422 %{_sysconfdir}/udev/rules.d/99-lustre.rules
423 %config(noreplace) %{_sysconfdir}/ldev.conf
424 %config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
426 %if %{with lustre_modules}
428 %defattr(-,root,root)
429 /lib/modules/%{kversion}/%{kmoddir}/*
430 %if %{with lustre_tests}
431 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
434 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
435 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
438 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
441 %doc ChangeLog-lustre
446 %defattr(-,root,root)
447 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
448 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
449 %if %{with lustre_utils}
450 %files osd-ldiskfs-mount
451 %defattr(-,root,root)
452 %{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
458 %defattr(-,root,root)
459 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
460 %{_sbindir}/zfsobj2fid
461 %if %{with lustre_utils}
463 %defattr(-,root,root)
464 %{_libdir}/@PACKAGE@/mount_osd_zfs.so
467 %endif # with lustre_modules
469 # uncomment these lines to enable deps packages
473 %if %{with lustre_tests}
474 %files tests -f lustre-tests.files
475 %defattr(-,root,root)
478 %if %{with lustre_iokit}
479 %files -n lustre-iokit
480 %defattr(-, root, root)
481 %{_bindir}/iokit-config
482 %{_bindir}/iokit-gather-stats
483 %{_bindir}/iokit-libecho
484 %{_bindir}/iokit-lstats
485 %{_bindir}/iokit-parse-ior
486 %{_bindir}/iokit-plot-obdfilter
487 %{_bindir}/iokit-plot-ost
488 %{_bindir}/iokit-plot-sgpdd
489 %{_bindir}/ior-survey
490 %{_bindir}/mds-survey
491 %{_bindir}/obdfilter-survey
492 %{_bindir}/ost-survey
493 %{_bindir}/sgpdd-survey
494 %doc lustre-iokit/ior-survey/README.ior-survey
495 %doc lustre-iokit/mds-survey/README.mds-survey
496 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
497 %doc lustre-iokit/ost-survey/README.ost-survey
498 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
499 %doc lustre-iokit/stats-collect/README.iokit-lstats
502 %if %{with lustre_modules}
504 if [ -f /boot/System.map-%{kversion} ]; then
505 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
507 depmod -ae %{kversion} || exit 0
510 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
511 # "weak modules" support
513 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
514 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
515 /usr/lib/module-init-tools/weak-modules --add-modules
518 if [ -x /sbin/weak-modules ]; then
519 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
520 /sbin/weak-modules --add-modules
523 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
524 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
525 # print a warning so that users are aware of this issue.
526 if sysctl kernel.unsupported >/dev/null 2>&1 &&
527 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
528 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
530 warning: the Lustre modules are not supported by Novell. To use Lustre
531 on this system, you should put
533 allow_unsupported_modules 1
535 into /etc/modprobe.d/unsupported_modules"
540 if [ -f /boot/System.map-%{kversion} ]; then
541 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
543 depmod -ae %{kversion} || exit 0
546 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
547 # "weak modules" support
549 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
550 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
551 /usr/lib/module-init-tools/weak-modules --add-modules
554 if [ -x /sbin/weak-modules ]; then
555 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
556 /sbin/weak-modules --add-modules
559 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
560 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
561 # print a warning so that users are aware of this issue.
562 if sysctl kernel.unsupported >/dev/null 2>&1 &&
563 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
564 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
566 warning: the Lustre modules are not supported by Novell. To use Lustre
567 on this system, you should put
569 allow_unsupported_modules 1
571 into /etc/modprobe.d/unsupported_modules"
577 if [ -f /boot/System.map-%{kversion} ]; then
578 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
580 depmod -ae %{kversion} || exit 0
583 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
584 # "weak modules" support
586 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
587 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
588 /usr/lib/module-init-tools/weak-modules --add-modules
591 if [ -x /sbin/weak-modules ]; then
592 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
593 /sbin/weak-modules --add-modules
596 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
597 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
598 # print a warning so that users are aware of this issue.
599 if sysctl kernel.unsupported >/dev/null 2>&1 &&
600 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
601 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
603 warning: the Lustre modules are not supported by Novell. To use Lustre
604 on this system, you should put
606 allow_unsupported_modules 1
608 into /etc/modprobe.d/unsupported_modules"
613 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
614 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
618 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
619 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
624 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
625 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
629 if [ -f /boot/System.map-%{kversion} ]; then
630 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
632 depmod -ae %{kversion} || exit 0
635 # "weak modules" support
637 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
638 cat /var/run/%{name}-modules |
639 /usr/lib/module-init-tools/weak-modules --remove-modules
642 if [ -x /sbin/weak-modules ]; then
643 cat /var/run/%{name}-modules |
644 /sbin/weak-modules --remove-modules
646 rm /var/run/%{name}-modules
650 if [ -f /boot/System.map-%{kversion} ]; then
651 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
653 depmod -ae %{kversion} || exit 0
656 # "weak modules" support
658 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
659 cat /var/run/%{name}-osd-ldiskfs |
660 /usr/lib/module-init-tools/weak-modules --remove-modules
663 if [ -x /sbin/weak-modules ]; then
664 cat /var/run/%{name}-osd-ldiskfs |
665 /sbin/weak-modules --remove-modules
667 rm /var/run/%{name}-osd-ldiskfs
672 if [ -f /boot/System.map-%{kversion} ]; then
673 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
675 depmod -ae %{kversion} || exit 0
678 # "weak modules" support
680 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
681 cat /var/run/%{name}-osd-zfs |
682 /usr/lib/module-init-tools/weak-modules --remove-modules
685 if [ -x /sbin/weak-modules ]; then
686 cat /var/run/%{name}-osd-zfs |
687 /sbin/weak-modules --remove-modules
689 rm /var/run/%{name}-osd-zfs
691 %endif # with lustre_modules
693 %if %{with lustre_tests}
694 %if %{with lustre_modules}
696 if [ -f /boot/System.map-%{kversion} ]; then
697 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
699 depmod -ae %{kversion} || exit 0
703 if [ -f /boot/System.map-%{kversion} ]; then
704 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
706 depmod -ae %{kversion} || exit 0
712 rm -rf $RPM_BUILD_ROOT