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}/init.d/lustre' >>lustre.files
342 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
343 echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
346 # fc18 needs 'x' permission for library files
347 find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
350 rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
352 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
355 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
356 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
361 echo '%{_libdir}/libiam.a' >>lustre.files
364 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
365 echo '%{_libdir}/lustre/snmp' >>lustre.files
368 find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ \
369 -name \*.la -type f -exec rm -f {} \;
371 %if %{with lustre_modules}
372 # mark modules executable for find-debuginfo.sh
373 find $RPM_BUILD_ROOT/lib/modules -name \*.ko -type f -exec chmod u+x {} \;
376 %if %{with lustre_tests}
377 echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
378 echo '%{_bindir}/mcreate' >>lustre-tests.files
379 echo '%{_bindir}/munlink' >>lustre-tests.files
380 echo '%{_bindir}/req_layout' >>lustre-tests.files
381 echo '%{_sbindir}/wirecheck' >>lustre-tests.files
382 echo '%{_sbindir}/wiretest' >>lustre-tests.files
383 %if %{with lustre_modules}
384 echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
388 %files -f lustre.files
389 %defattr(-,root,root)
391 %exclude %{_sbindir}/wirecheck
392 %exclude %{_sbindir}/wiretest
394 %exclude %{_sbindir}/zfsobj2fid
396 %if %{with lustre_utils}
398 %{_libexecdir}/lustre/lc_common
399 %{_libexecdir}/lustre/haconfig
400 %{_bindir}/lustre_req_history
405 %{_bindir}/plot-llstat
408 %{_bindir}/lfs_migrate
410 %{_libdir}/libptlctl.a
411 %{_libdir}/libcfsutil.a
412 %{_libdir}/liblustreapi.a
413 %{_libdir}/liblustreapi.so
417 %{_includedir}/lustre
418 %{_includedir}/libcfs
421 %{_sysconfdir}/udev/rules.d/99-lustre.rules
422 %config(noreplace) %{_sysconfdir}/ldev.conf
423 %config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
425 %if %{with lustre_modules}
427 %defattr(-,root,root)
428 /lib/modules/%{kversion}/%{kmoddir}/*
429 %if %{with lustre_tests}
430 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
433 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
434 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
437 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
440 %doc ChangeLog-lustre
445 %defattr(-,root,root)
446 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
447 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
448 %if %{with lustre_utils}
449 %files osd-ldiskfs-mount
450 %defattr(-,root,root)
451 %{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
457 %defattr(-,root,root)
458 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
459 %{_sbindir}/zfsobj2fid
460 %if %{with lustre_utils}
462 %defattr(-,root,root)
463 %{_libdir}/@PACKAGE@/mount_osd_zfs.so
466 %endif # with lustre_modules
468 # uncomment these lines to enable deps packages
472 %if %{with lustre_tests}
473 %files tests -f lustre-tests.files
474 %defattr(-,root,root)
477 %if %{with lustre_iokit}
478 %files -n lustre-iokit
479 %defattr(-, root, root)
480 %{_bindir}/iokit-config
481 %{_bindir}/iokit-gather-stats
482 %{_bindir}/iokit-libecho
483 %{_bindir}/iokit-lstats
484 %{_bindir}/iokit-parse-ior
485 %{_bindir}/iokit-plot-obdfilter
486 %{_bindir}/iokit-plot-ost
487 %{_bindir}/iokit-plot-sgpdd
488 %{_bindir}/ior-survey
489 %{_bindir}/mds-survey
490 %{_bindir}/obdfilter-survey
491 %{_bindir}/ost-survey
492 %{_bindir}/sgpdd-survey
493 %doc lustre-iokit/ior-survey/README.ior-survey
494 %doc lustre-iokit/mds-survey/README.mds-survey
495 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
496 %doc lustre-iokit/ost-survey/README.ost-survey
497 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
498 %doc lustre-iokit/stats-collect/README.iokit-lstats
501 %if %{with lustre_modules}
503 if [ -f /boot/System.map-%{kversion} ]; then
504 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
506 depmod -ae %{kversion} || exit 0
509 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
510 # "weak modules" support
512 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
513 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
514 /usr/lib/module-init-tools/weak-modules --add-modules
517 if [ -x /sbin/weak-modules ]; then
518 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
519 /sbin/weak-modules --add-modules
522 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
523 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
524 # print a warning so that users are aware of this issue.
525 if sysctl kernel.unsupported >/dev/null 2>&1 &&
526 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
527 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
529 warning: the Lustre modules are not supported by Novell. To use Lustre
530 on this system, you should put
532 allow_unsupported_modules 1
534 into /etc/modprobe.d/unsupported_modules"
539 if [ -f /boot/System.map-%{kversion} ]; then
540 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
542 depmod -ae %{kversion} || exit 0
545 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
546 # "weak modules" support
548 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
549 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
550 /usr/lib/module-init-tools/weak-modules --add-modules
553 if [ -x /sbin/weak-modules ]; then
554 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
555 /sbin/weak-modules --add-modules
558 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
559 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
560 # print a warning so that users are aware of this issue.
561 if sysctl kernel.unsupported >/dev/null 2>&1 &&
562 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
563 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
565 warning: the Lustre modules are not supported by Novell. To use Lustre
566 on this system, you should put
568 allow_unsupported_modules 1
570 into /etc/modprobe.d/unsupported_modules"
576 if [ -f /boot/System.map-%{kversion} ]; then
577 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
579 depmod -ae %{kversion} || exit 0
582 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
583 # "weak modules" support
585 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
586 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
587 /usr/lib/module-init-tools/weak-modules --add-modules
590 if [ -x /sbin/weak-modules ]; then
591 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
592 /sbin/weak-modules --add-modules
595 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
596 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
597 # print a warning so that users are aware of this issue.
598 if sysctl kernel.unsupported >/dev/null 2>&1 &&
599 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
600 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
602 warning: the Lustre modules are not supported by Novell. To use Lustre
603 on this system, you should put
605 allow_unsupported_modules 1
607 into /etc/modprobe.d/unsupported_modules"
612 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
613 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
617 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
618 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
623 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
624 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
628 if [ -f /boot/System.map-%{kversion} ]; then
629 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
631 depmod -ae %{kversion} || exit 0
634 # "weak modules" support
636 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
637 cat /var/run/%{name}-modules |
638 /usr/lib/module-init-tools/weak-modules --remove-modules
641 if [ -x /sbin/weak-modules ]; then
642 cat /var/run/%{name}-modules |
643 /sbin/weak-modules --remove-modules
645 rm /var/run/%{name}-modules
649 if [ -f /boot/System.map-%{kversion} ]; then
650 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
652 depmod -ae %{kversion} || exit 0
655 # "weak modules" support
657 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
658 cat /var/run/%{name}-osd-ldiskfs |
659 /usr/lib/module-init-tools/weak-modules --remove-modules
662 if [ -x /sbin/weak-modules ]; then
663 cat /var/run/%{name}-osd-ldiskfs |
664 /sbin/weak-modules --remove-modules
666 rm /var/run/%{name}-osd-ldiskfs
671 if [ -f /boot/System.map-%{kversion} ]; then
672 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
674 depmod -ae %{kversion} || exit 0
677 # "weak modules" support
679 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
680 cat /var/run/%{name}-osd-zfs |
681 /usr/lib/module-init-tools/weak-modules --remove-modules
684 if [ -x /sbin/weak-modules ]; then
685 cat /var/run/%{name}-osd-zfs |
686 /sbin/weak-modules --remove-modules
688 rm /var/run/%{name}-osd-zfs
690 %endif # with lustre_modules
692 %if %{with lustre_tests}
693 %if %{with lustre_modules}
695 if [ -f /boot/System.map-%{kversion} ]; then
696 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
698 depmod -ae %{kversion} || exit 0
702 if [ -f /boot/System.map-%{kversion} ]; then
703 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
705 depmod -ae %{kversion} || exit 0
711 rm -rf $RPM_BUILD_ROOT