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 %define buildid %(if [ -n "@BUILDID@" ]; then echo "_@BUILDID@"; fi)
33 %if 0%{?build_src_rpm}
34 %{!?myrelease: %global myrelease 1}
36 %{!?downstream_release: %global downstream_release "@DOWNSTREAM_RELEASE@"}
37 %{!?myrelease: %global myrelease %(if [ -n "%downstream_release" ]; then echo -n "%{downstream_release}_"; fi; echo %kversion | tr '-' '_')}
38 # for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
40 %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$//')
43 # always append the buildid, even when the caller defines %release
44 %define fullrelease %{myrelease}%{buildid}
46 # in order to get kernel symset and/or kernel module dependencies into
47 # the RPM, in order to support weak-modules, the internal dependency gen-
48 # erator needs to be disabled
49 # this is done with (reduce the double % down to a single %):
51 # %%global _use_internal_dependency_generator 0
53 # on SLES10, /usr/lib/rpm/macros already sets this, so no harm in also
54 # defining it here (until Suse changes their mind)
56 # on RHEL5, however, we do need to explicitly disable the internal dep-
57 # endency generator and allow the external one be used
58 # but since RedHat's kABI is only a subset of the total kernel ABI, it
59 # doesn't include all of the symbols we (or OFED for that matter) need
60 # until RedHat includes all of the symbols we need in their symsets we
61 # cannot support weak-modules
62 # we did e-mail the maintainer of all of this stuff @redhat but got no
64 #%%global _use_internal_dependency_generator 0
66 # Set the package name prefix
67 %if %{undefined lustre_name}
69 %global lustre_name lustre
71 %global lustre_name lustre-client
75 %if %{undefined kmoddir}
76 %if %{defined kernel_module_package_moddir}
77 %global kmoddir %{kernel_module_package_moddir}
79 %if %{defined suse_kernel_module_package}
80 %global kmoddir updates
87 Summary: Lustre File System
90 Release: %{fullrelease}
92 Group: Utilities/System
93 Source: lustre-%{version}.tar.gz
94 URL: https://wiki.hpdd.intel.com/
95 BuildRoot: %{_tmppath}/lustre-%{version}-root
96 Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
97 Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
98 Requires: %{name}-modules = %{version}
99 BuildRequires: libtool
102 Requires: lustre-osd-mount
103 Provides: lustre-client = %{version}-%{fullrelease}
105 # GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
106 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
107 #suse don't support selinux
108 BuildRequires: libselinux-devel
113 Userspace tools and files for the Lustre file system.
115 %if %{with lustre_modules}
117 Summary: Kernel Lustre modules for Linux %{kversion}
118 # for SLES11, we need nothing here
119 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
120 %if %{defined krequires}
121 # for RHEL we need to require the specific kernel still since weak-modules
122 # support on RH is, well, weak, to be punny about it
123 Requires: kernel = %{krequires}
127 BuildRequires: libyaml-devel
130 Group: Development/Kernel
133 Lustre file system, server and network drivers for Linux %{kversion}.
137 Summary: osd-ldiskfs contains both ldiskfs and its osd interface in Lustre.
138 Requires: lustre-modules = %{version}
139 Requires: module-init-tools >= 3.9
140 Requires: ldiskfsprogs >= 1.42.7.wc1
141 Requires: lustre-osd-ldiskfs-mount = %{version}
143 Obsoletes: lustre-ldiskfs
144 Group: Development/Kernel
146 %description osd-ldiskfs
147 The Lustre Object Storage Device (OSD) API is the interface to access and
148 modify data that is supposed to be stored persistently. This API is the interface
149 to code that bridges individual file systems. This specific package provides an
150 implementation of the OSD API for using the Ldiskfs filesystem as the underlying
151 backing store of a Lustre server.
153 %if %{with lustre_utils}
154 %package osd-ldiskfs-mount
155 Summary: osd-ldiskfs-mount contains mount's ldiskfs specific dso.
156 Provides: lustre-osd-mount
157 Group: Development/Kernel
159 %description osd-ldiskfs-mount
160 LDISKFS hooks for mount/mkfs into a dynamic library.
167 Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
168 Requires: lustre-modules = %{version}, zfs-kmod
169 Requires: lustre-osd-zfs-mount = %{version}
171 Group: Development/Kernel
174 The Lustre Object Storage Device (OSD) API is the interface to access and
175 modify data that is supposed to be stored persistently. This API is the interface
176 to code that bridges individual file systems. This specific package provides an
177 implementation of the OSD API for using the ZFS filesystem as the underlying
178 backing store of a Lustre server.
180 %if %{with lustre_utils}
181 %package osd-zfs-mount
182 Summary: osd-zfs-mount contains mount's zfs specific dso.
183 Provides: lustre-osd-mount
184 Group: Development/Kernel
186 %description osd-zfs-mount
187 ZFS hooks for mount/mkfs into a dynamic library.
191 %endif # with lustre_modules
194 Summary: Object-Based Disk storage driver source
195 Group: Development/Kernel
198 Lustre sources for further development
200 # Since the RPMs we ship are to be used on both SLES and RHEL, we
201 # can't include any dependency information (since the package names
202 # are different on the two platforms).
204 # Instead, we can build these empty meta-packages that only include
205 # dependency information. These let people get the correct
206 # dependencies for their platform and lets them use tools like yum and
207 # red carpet to install the correct files.
209 # Unfortunately I have not seen this come up on the lists much, so I
210 # have disabled them (by commenting out their empty files section
211 # below) until it's clear that they resolve more confusion than they
215 Summary: Lustre dependencies meta-package for SLES
216 Group: Utilities/System
217 Provides: lustre-deps = %{version}
218 Requires: %{name} = %{version}, sles-release
219 Conflicts: %{name}-deps-rhel
221 %description deps-sles
222 This package has RPM dependencies appropriate for SLES systems.
225 Summary: Lustre dependencies meta-package for RHEL
226 Group: Utilities/System
227 Provides: lustre-deps = %{version}
228 Requires: %{name} = %{version}, redhat-release
229 Conflicts: %{name}-deps-sles
231 %description deps-rhel
232 This package has RPM dependencies appropriate for RHEL, RHL, and FC
236 Summary: Lustre testing framework
237 Group: Development/Kernel
238 Provides: %{name}-tests = %{version}
239 Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit
240 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
243 This package contains a set of test binaries and scripts that are intended
244 to be used by the Lustre testing framework.
246 %if %{with lustre_iokit}
247 %package -n lustre-iokit
248 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
249 Group: Applications/System
250 Requires: python > 2.2, sg3_utils
252 %description -n lustre-iokit
253 This package includes five tools:
255 A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility.
258 This survey can be run in 3 modes to test disk I/O including the filesystem,
259 network I/O, and disk I/O via the network. The script does sequential I/O
260 with varying numbers of threads and objects (files) by using lctl::test_brw
261 to drive the echo_client connected to local or remote obdfilter instances,
262 or remote obdecho instances.
265 This survey tests the client-to-disk performance of individual OSTs, and
266 ranks then for comparison.
269 This script will collect IO stats on a defined set of nodes.
272 A script to run the IOR benchmark. The latest version can be downloaded from
273 http://www.llnl.gov/asci/purple/benchmarks/limited/ior/
276 This survey tests the local metadata performance using the echo_client to drive
277 the MDD layer to perform operations. It is run with multiple threads (to
278 simulate MDT service threads) locally on the MDS node, and does not need Lustre
279 clients in order to run
282 %if 0%{?suse_version}
286 %setup -qn lustre-%{version}
287 ln lustre/ChangeLog ChangeLog-lustre
288 ln lnet/ChangeLog ChangeLog-lnet
292 # Set an explicit path to our Linux tree, if we can.
293 cd $RPM_BUILD_DIR/lustre-%{version}
294 # override %optflags so that the vendor's overzealous flags don't create
296 %define optflags -g -O2 -Werror
298 CONFIGURE_ARGS="%{?configure_args}"
299 if [ -n "$CONFIGURE_ARGS" ]; then
300 # make sure %%kdir and %%kobjdir are not in the configure arguments
301 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux=[^ ][^ ]* \?//')
302 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux-obj=[^ ][^ ]* \?//')
303 # remove --with-kmp-moddir from configure arguments,
304 # it will be set --with-kmp-moddir=%%kmoddir
305 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* \?//')
308 # we need to eval "configure" because $CONFIGURE_ARGS could have a quoted
309 # string in it which we don't want word splitted by the shell
310 # also remove (build|host|target) options because they will be specified
311 # inside $CONFIGURE_ARGS
312 %define eval_configure %(echo '%configure' | sed -e 's#\./configure#eval ./configure#' -e 's/--\\(build\\|host\\|target\\)=[^ ][^ ]* //g')
314 %eval_configure $CONFIGURE_ARGS \
315 %{?with_lustre_tests:--enable-tests}%{!?with_lustre_tests:--disable-tests} \
316 %{?with_lustre_utils:--enable-utils}%{!?with_lustre_utils:--disable-utils} \
317 %{?with_lustre_modules:--enable-modules}%{!?with_lustre_modules:--disable-modules} \
318 %{!?with_shared:--disable-shared} \
319 %{!?with_static:--disable-static} \
320 %{!?with_lustre_iokit:--disable-iokit} \
321 %{!?with_ldiskfs:--disable-ldiskfs} \
322 %{!?with_servers:--disable-server} \
323 %{!?with_zfs:--without-zfs} \
324 %{!?with_lnet_dlc:--disable-dlc} \
325 %{!?with_manpages:--disable-manpages} \
326 --with-release=%{release} \
327 --with-linux=%{kdir} \
328 --with-linux-obj=%{kobjdir} \
329 --with-kmp-moddir=%{kmoddir}
331 make %{?_smp_mflags} -s %{?make_args}
334 make install DESTDIR=$RPM_BUILD_ROOT
338 %if %{with servers} && %{with lustre_utils}
339 # The .ha_v2 extension identifies the heartbeat resource agent as using
340 # legacy syntax. Install a compatibility symlink to avoid conflicts when
341 # newer-style agents are added.
342 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
343 echo '%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2' >>lustre.files
344 echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files
347 %if %{_vendor}=="redhat"
348 # The following scripts are Red Hat specific
350 echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
351 echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
353 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
354 echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
357 # Create the pristine source directory.
358 cd $RPM_BUILD_DIR/lustre-%{version}
359 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src
361 ln -s $RPM_BUILD_ROOT%{_prefix}/src lustre-source
362 make distdir distdir=lustre-source/lustre-%{version}
363 chmod -R go-w lustre-source/lustre-%{version}
364 # fc18 needs 'x' permission for library files
365 find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
368 rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
370 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
373 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
374 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
379 echo '%{_libdir}/libiam.a' >>lustre.files
382 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
383 echo '%{_libdir}/lustre/snmp' >>lustre.files
386 find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ \
387 -name \*.la -type f -exec rm -f {} \;
389 %if %{with lustre_tests}
390 echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
391 echo '%{_bindir}/mcreate' >>lustre-tests.files
392 echo '%{_bindir}/munlink' >>lustre-tests.files
393 echo '%{_bindir}/req_layout' >>lustre-tests.files
394 echo '%{_sbindir}/wirecheck' >>lustre-tests.files
395 echo '%{_sbindir}/wiretest' >>lustre-tests.files
396 %if %{with lustre_modules}
397 echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
401 %files -f lustre.files
402 %defattr(-,root,root)
404 %exclude %{_sbindir}/wirecheck
405 %exclude %{_sbindir}/wiretest
407 %exclude %{_sbindir}/zfsobj2fid
409 %if %{with lustre_utils}
411 %{_libexecdir}/lustre/lc_common
412 %{_libexecdir}/lustre/haconfig
413 %{_bindir}/lustre_req_history
418 %{_bindir}/plot-llstat
421 %{_bindir}/lfs_migrate
423 %{_libdir}/libptlctl.a
424 %{_libdir}/libcfsutil.a
425 %{_libdir}/liblustreapi.a
426 %{_libdir}/liblustreapi.so
430 %{_includedir}/lustre
431 %{_includedir}/libcfs
434 %{_sysconfdir}/udev/rules.d/99-lustre.rules
435 %config(noreplace) %{_sysconfdir}/ldev.conf
436 %config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
438 %if %{with lustre_modules}
440 %defattr(-,root,root)
441 /lib/modules/%{kversion}/%{kmoddir}/*
442 %if %{with lustre_tests}
443 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
446 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
447 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
450 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
453 %doc ChangeLog-lustre
458 %defattr(-,root,root)
459 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
460 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
461 %if %{with lustre_utils}
462 %files osd-ldiskfs-mount
463 %defattr(-,root,root)
464 %{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
470 %defattr(-,root,root)
471 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
472 %{_sbindir}/zfsobj2fid
473 %if %{with lustre_utils}
475 %defattr(-,root,root)
476 %{_libdir}/@PACKAGE@/mount_osd_zfs.so
479 %endif # with lustre_modules
482 %defattr(-,root,root)
483 %{_prefix}/src/lustre-%{version}
485 # uncomment these lines to enable deps packages
489 %if %{with lustre_tests}
490 %files tests -f lustre-tests.files
491 %defattr(-,root,root)
494 %if %{with lustre_iokit}
495 %files -n lustre-iokit
496 %defattr(-, root, root)
497 %{_bindir}/iokit-config
498 %{_bindir}/iokit-gather-stats
499 %{_bindir}/iokit-libecho
500 %{_bindir}/iokit-lstats
501 %{_bindir}/iokit-parse-ior
502 %{_bindir}/iokit-plot-obdfilter
503 %{_bindir}/iokit-plot-ost
504 %{_bindir}/iokit-plot-sgpdd
505 %{_bindir}/ior-survey
506 %{_bindir}/mds-survey
507 %{_bindir}/obdfilter-survey
508 %{_bindir}/ost-survey
509 %{_bindir}/sgpdd-survey
510 %doc lustre-iokit/ior-survey/README.ior-survey
511 %doc lustre-iokit/mds-survey/README.mds-survey
512 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
513 %doc lustre-iokit/ost-survey/README.ost-survey
514 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
515 %doc lustre-iokit/stats-collect/README.iokit-lstats
518 %if %{with lustre_modules}
520 if [ -f /boot/System.map-%{kversion} ]; then
521 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
523 depmod -ae %{kversion} || exit 0
526 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
527 # "weak modules" support
529 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
530 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
531 /usr/lib/module-init-tools/weak-modules --add-modules
534 if [ -x /sbin/weak-modules ]; then
535 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
536 /sbin/weak-modules --add-modules
539 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
540 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
541 # print a warning so that users are aware of this issue.
542 if sysctl kernel.unsupported >/dev/null 2>&1 &&
543 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
544 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
546 warning: the Lustre modules are not supported by Novell. To use Lustre
547 on this system, you should put
549 allow_unsupported_modules 1
551 into /etc/modprobe.d/unsupported_modules"
556 if [ -f /boot/System.map-%{kversion} ]; then
557 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
559 depmod -ae %{kversion} || exit 0
562 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
563 # "weak modules" support
565 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
566 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
567 /usr/lib/module-init-tools/weak-modules --add-modules
570 if [ -x /sbin/weak-modules ]; then
571 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
572 /sbin/weak-modules --add-modules
575 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
576 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
577 # print a warning so that users are aware of this issue.
578 if sysctl kernel.unsupported >/dev/null 2>&1 &&
579 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
580 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
582 warning: the Lustre modules are not supported by Novell. To use Lustre
583 on this system, you should put
585 allow_unsupported_modules 1
587 into /etc/modprobe.d/unsupported_modules"
593 if [ -f /boot/System.map-%{kversion} ]; then
594 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
596 depmod -ae %{kversion} || exit 0
599 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
600 # "weak modules" support
602 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
603 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
604 /usr/lib/module-init-tools/weak-modules --add-modules
607 if [ -x /sbin/weak-modules ]; then
608 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' |
609 /sbin/weak-modules --add-modules
612 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
613 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
614 # print a warning so that users are aware of this issue.
615 if sysctl kernel.unsupported >/dev/null 2>&1 &&
616 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
617 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
619 warning: the Lustre modules are not supported by Novell. To use Lustre
620 on this system, you should put
622 allow_unsupported_modules 1
624 into /etc/modprobe.d/unsupported_modules"
629 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
630 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
634 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
635 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
640 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
641 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
645 if [ -f /boot/System.map-%{kversion} ]; then
646 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
648 depmod -ae %{kversion} || exit 0
651 # "weak modules" support
653 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
654 cat /var/run/%{name}-modules |
655 /usr/lib/module-init-tools/weak-modules --remove-modules
658 if [ -x /sbin/weak-modules ]; then
659 cat /var/run/%{name}-modules |
660 /sbin/weak-modules --remove-modules
662 rm /var/run/%{name}-modules
666 if [ -f /boot/System.map-%{kversion} ]; then
667 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
669 depmod -ae %{kversion} || exit 0
672 # "weak modules" support
674 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
675 cat /var/run/%{name}-osd-ldiskfs |
676 /usr/lib/module-init-tools/weak-modules --remove-modules
679 if [ -x /sbin/weak-modules ]; then
680 cat /var/run/%{name}-osd-ldiskfs |
681 /sbin/weak-modules --remove-modules
683 rm /var/run/%{name}-osd-ldiskfs
688 if [ -f /boot/System.map-%{kversion} ]; then
689 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
691 depmod -ae %{kversion} || exit 0
694 # "weak modules" support
696 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
697 cat /var/run/%{name}-osd-zfs |
698 /usr/lib/module-init-tools/weak-modules --remove-modules
701 if [ -x /sbin/weak-modules ]; then
702 cat /var/run/%{name}-osd-zfs |
703 /sbin/weak-modules --remove-modules
705 rm /var/run/%{name}-osd-zfs
707 %endif # with lustre_modules
709 %if %{with lustre_tests}
710 %if %{with lustre_modules}
712 if [ -f /boot/System.map-%{kversion} ]; then
713 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
715 depmod -ae %{kversion} || exit 0
719 if [ -f /boot/System.map-%{kversion} ]; then
720 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
722 depmod -ae %{kversion} || exit 0
728 rm -rf $RPM_BUILD_ROOT