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
190 Summary: Object-Based Disk storage driver source
191 Group: Development/Kernel
194 Lustre sources for further development
196 # Since the RPMs we ship are to be used on both SLES and RHEL, we
197 # can't include any dependency information (since the package names
198 # are different on the two platforms).
200 # Instead, we can build these empty meta-packages that only include
201 # dependency information. These let people get the correct
202 # dependencies for their platform and lets them use tools like yum and
203 # red carpet to install the correct files.
205 # Unfortunately I have not seen this come up on the lists much, so I
206 # have disabled them (by commenting out their empty files section
207 # below) until it's clear that they resolve more confusion than they
211 Summary: Lustre dependencies meta-package for SLES
212 Group: Utilities/System
213 Provides: lustre-deps = %{version}
214 Requires: %{name} = %{version}, sles-release
215 Conflicts: %{name}-deps-rhel
217 %description deps-sles
218 This package has RPM dependencies appropriate for SLES systems.
221 Summary: Lustre dependencies meta-package for RHEL
222 Group: Utilities/System
223 Provides: lustre-deps = %{version}
224 Requires: %{name} = %{version}, redhat-release
225 Conflicts: %{name}-deps-sles
227 %description deps-rhel
228 This package has RPM dependencies appropriate for RHEL, RHL, and FC
232 Summary: Lustre testing framework
233 Group: Development/Kernel
234 Provides: %{name}-tests = %{version}
235 Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit
236 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
239 This package contains a set of test binaries and scripts that are intended
240 to be used by the Lustre testing framework.
242 %if %{with lustre_iokit}
243 %package -n lustre-iokit
244 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
245 Group: Applications/System
246 Requires: python > 2.2, sg3_utils
248 %description -n lustre-iokit
249 This package includes five tools:
251 A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility.
254 This survey can be run in 3 modes to test disk I/O including the filesystem,
255 network I/O, and disk I/O via the network. The script does sequential I/O
256 with varying numbers of threads and objects (files) by using lctl::test_brw
257 to drive the echo_client connected to local or remote obdfilter instances,
258 or remote obdecho instances.
261 This survey tests the client-to-disk performance of individual OSTs, and
262 ranks then for comparison.
265 This script will collect IO stats on a defined set of nodes.
268 A script to run the IOR benchmark. The latest version can be downloaded from
269 http://www.llnl.gov/asci/purple/benchmarks/limited/ior/
272 This survey tests the local metadata performance using the echo_client to drive
273 the MDD layer to perform operations. It is run with multiple threads (to
274 simulate MDT service threads) locally on the MDS node, and does not need Lustre
275 clients in order to run
278 %if 0%{?suse_version}
282 %setup -qn lustre-%{version}
283 ln lustre/ChangeLog ChangeLog-lustre
284 ln lnet/ChangeLog ChangeLog-lnet
288 # Set an explicit path to our Linux tree, if we can.
289 cd $RPM_BUILD_DIR/lustre-%{version}
290 # override %optflags so that the vendor's overzealous flags don't create
292 %define optflags -g -O2 -Werror
294 CONFIGURE_ARGS="%{?configure_args}"
295 if [ -n "$CONFIGURE_ARGS" ]; then
296 # make sure %%kdir and %%kobjdir are not in the configure arguments
297 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux=[^ ][^ ]* \?//')
298 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux-obj=[^ ][^ ]* \?//')
299 # remove --with-kmp-moddir from configure arguments,
300 # it will be set --with-kmp-moddir=%%kmoddir
301 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* \?//')
304 # we need to eval "configure" because $CONFIGURE_ARGS could have a quoted
305 # string in it which we don't want word splitted by the shell
306 # also remove (build|host|target) options because they will be specified
307 # inside $CONFIGURE_ARGS
308 %define eval_configure %(echo '%configure' | sed -e 's#\./configure#eval ./configure#' -e 's/--\\(build\\|host\\|target\\)=[^ ][^ ]* //g')
310 %eval_configure $CONFIGURE_ARGS \
311 %{?with_lustre_tests:--enable-tests}%{!?with_lustre_tests:--disable-tests} \
312 %{?with_lustre_utils:--enable-utils}%{!?with_lustre_utils:--disable-utils} \
313 %{?with_lustre_modules:--enable-modules}%{!?with_lustre_modules:--disable-modules} \
314 %{!?with_shared:--disable-shared} \
315 %{!?with_static:--disable-static} \
316 %{!?with_lustre_iokit:--disable-iokit} \
317 %{!?with_ldiskfs:--disable-ldiskfs} \
318 %{!?with_servers:--disable-server} \
319 %{!?with_zfs:--without-zfs} \
320 %{!?with_lnet_dlc:--disable-dlc} \
321 %{!?with_manpages:--disable-manpages} \
322 --with-release=%{release} \
323 --with-linux=%{kdir} \
324 --with-linux-obj=%{kobjdir} \
325 --with-kmp-moddir=%{kmoddir}
327 make %{?_smp_mflags} -s %{?make_args}
330 make install DESTDIR=$RPM_BUILD_ROOT
334 %if %{with servers} && %{with lustre_utils}
335 # The .ha_v2 extension identifies the heartbeat resource agent as using
336 # legacy syntax. Install a compatibility symlink to avoid conflicts when
337 # newer-style agents are added.
338 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
339 echo '%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2' >>lustre.files
340 echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files
343 %if %{_vendor}=="redhat"
344 # The following scripts are Red Hat specific
346 echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
347 echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
349 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
350 echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
353 # Create the pristine source directory.
354 cd $RPM_BUILD_DIR/lustre-%{version}
355 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src
357 ln -s $RPM_BUILD_ROOT%{_prefix}/src lustre-source
358 make distdir distdir=lustre-source/lustre-%{version}
359 chmod -R go-w lustre-source/lustre-%{version}
360 # fc18 needs 'x' permission for library files
361 find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
364 rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
366 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
369 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
370 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
375 echo '%{_libdir}/libiam.a' >>lustre.files
378 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
379 echo '%{_libdir}/lustre/snmp' >>lustre.files
382 find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ \
383 -name \*.la -type f -exec rm -f {} \;
385 %if %{with lustre_tests}
386 echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
387 echo '%{_bindir}/mcreate' >>lustre-tests.files
388 echo '%{_bindir}/munlink' >>lustre-tests.files
389 echo '%{_bindir}/req_layout' >>lustre-tests.files
390 echo '%{_sbindir}/wirecheck' >>lustre-tests.files
391 echo '%{_sbindir}/wiretest' >>lustre-tests.files
392 %if %{with lustre_modules}
393 echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
397 %files -f lustre.files
398 %defattr(-,root,root)
400 %exclude %{_sbindir}/wirecheck
401 %exclude %{_sbindir}/wiretest
403 %exclude %{_sbindir}/zfsobj2fid
405 %if %{with lustre_utils}
407 %{_libexecdir}/lustre/lc_common
408 %{_libexecdir}/lustre/haconfig
409 %{_bindir}/lustre_req_history
414 %{_bindir}/plot-llstat
417 %{_bindir}/lfs_migrate
419 %{_libdir}/libptlctl.a
420 %{_libdir}/libcfsutil.a
421 %{_libdir}/liblustreapi.a
422 %{_libdir}/liblustreapi.so
426 %{_includedir}/lustre
427 %{_includedir}/libcfs
430 %{_sysconfdir}/udev/rules.d/99-lustre.rules
431 %config(noreplace) %{_sysconfdir}/ldev.conf
432 %config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
434 %if %{with lustre_modules}
436 %defattr(-,root,root)
437 /lib/modules/%{kversion}/%{kmoddir}/*
438 %if %{with lustre_tests}
439 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
442 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
443 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
446 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
449 %doc ChangeLog-lustre
454 %defattr(-,root,root)
455 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
456 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
457 %if %{with lustre_utils}
458 %files osd-ldiskfs-mount
459 %defattr(-,root,root)
460 %{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
466 %defattr(-,root,root)
467 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
468 %{_sbindir}/zfsobj2fid
469 %if %{with lustre_utils}
471 %defattr(-,root,root)
472 %{_libdir}/@PACKAGE@/mount_osd_zfs.so
475 %endif # with lustre_modules
478 %defattr(-,root,root)
479 %{_prefix}/src/lustre-%{version}
481 # uncomment these lines to enable deps packages
485 %if %{with lustre_tests}
486 %files tests -f lustre-tests.files
487 %defattr(-,root,root)
490 %if %{with lustre_iokit}
491 %files -n lustre-iokit
492 %defattr(-, root, root)
493 %{_bindir}/iokit-config
494 %{_bindir}/iokit-gather-stats
495 %{_bindir}/iokit-libecho
496 %{_bindir}/iokit-lstats
497 %{_bindir}/iokit-parse-ior
498 %{_bindir}/iokit-plot-obdfilter
499 %{_bindir}/iokit-plot-ost
500 %{_bindir}/iokit-plot-sgpdd
501 %{_bindir}/ior-survey
502 %{_bindir}/mds-survey
503 %{_bindir}/obdfilter-survey
504 %{_bindir}/ost-survey
505 %{_bindir}/sgpdd-survey
506 %doc lustre-iokit/ior-survey/README.ior-survey
507 %doc lustre-iokit/mds-survey/README.mds-survey
508 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
509 %doc lustre-iokit/ost-survey/README.ost-survey
510 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
511 %doc lustre-iokit/stats-collect/README.iokit-lstats
514 %if %{with lustre_modules}
516 if [ -f /boot/System.map-%{kversion} ]; then
517 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
519 depmod -ae %{kversion} || exit 0
522 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
523 # "weak modules" support
525 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
526 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
527 /usr/lib/module-init-tools/weak-modules --add-modules
530 if [ -x /sbin/weak-modules ]; then
531 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
532 /sbin/weak-modules --add-modules
535 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
536 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
537 # print a warning so that users are aware of this issue.
538 if sysctl kernel.unsupported >/dev/null 2>&1 &&
539 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
540 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
542 warning: the Lustre modules are not supported by Novell. To use Lustre
543 on this system, you should put
545 allow_unsupported_modules 1
547 into /etc/modprobe.d/unsupported_modules"
552 if [ -f /boot/System.map-%{kversion} ]; then
553 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
555 depmod -ae %{kversion} || exit 0
558 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
559 # "weak modules" support
561 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
562 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
563 /usr/lib/module-init-tools/weak-modules --add-modules
566 if [ -x /sbin/weak-modules ]; then
567 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
568 /sbin/weak-modules --add-modules
571 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
572 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
573 # print a warning so that users are aware of this issue.
574 if sysctl kernel.unsupported >/dev/null 2>&1 &&
575 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
576 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
578 warning: the Lustre modules are not supported by Novell. To use Lustre
579 on this system, you should put
581 allow_unsupported_modules 1
583 into /etc/modprobe.d/unsupported_modules"
589 if [ -f /boot/System.map-%{kversion} ]; then
590 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
592 depmod -ae %{kversion} || exit 0
595 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
596 # "weak modules" support
598 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
599 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
600 /usr/lib/module-init-tools/weak-modules --add-modules
603 if [ -x /sbin/weak-modules ]; then
604 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
605 /sbin/weak-modules --add-modules
608 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
609 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
610 # print a warning so that users are aware of this issue.
611 if sysctl kernel.unsupported >/dev/null 2>&1 &&
612 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
613 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
615 warning: the Lustre modules are not supported by Novell. To use Lustre
616 on this system, you should put
618 allow_unsupported_modules 1
620 into /etc/modprobe.d/unsupported_modules"
625 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
626 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
630 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
631 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
636 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
637 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
641 if [ -f /boot/System.map-%{kversion} ]; then
642 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
644 depmod -ae %{kversion} || exit 0
647 # "weak modules" support
649 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
650 cat /var/run/%{name}-modules |
651 /usr/lib/module-init-tools/weak-modules --remove-modules
654 if [ -x /sbin/weak-modules ]; then
655 cat /var/run/%{name}-modules |
656 /sbin/weak-modules --remove-modules
658 rm /var/run/%{name}-modules
662 if [ -f /boot/System.map-%{kversion} ]; then
663 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
665 depmod -ae %{kversion} || exit 0
668 # "weak modules" support
670 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
671 cat /var/run/%{name}-osd-ldiskfs |
672 /usr/lib/module-init-tools/weak-modules --remove-modules
675 if [ -x /sbin/weak-modules ]; then
676 cat /var/run/%{name}-osd-ldiskfs |
677 /sbin/weak-modules --remove-modules
679 rm /var/run/%{name}-osd-ldiskfs
684 if [ -f /boot/System.map-%{kversion} ]; then
685 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
687 depmod -ae %{kversion} || exit 0
690 # "weak modules" support
692 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
693 cat /var/run/%{name}-osd-zfs |
694 /usr/lib/module-init-tools/weak-modules --remove-modules
697 if [ -x /sbin/weak-modules ]; then
698 cat /var/run/%{name}-osd-zfs |
699 /sbin/weak-modules --remove-modules
701 rm /var/run/%{name}-osd-zfs
703 %endif # with lustre_modules
705 %if %{with lustre_tests}
706 %if %{with lustre_modules}
708 if [ -f /boot/System.map-%{kversion} ]; then
709 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
711 depmod -ae %{kversion} || exit 0
715 if [ -f /boot/System.map-%{kversion} ]; then
716 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
718 depmod -ae %{kversion} || exit 0
724 rm -rf $RPM_BUILD_ROOT