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
101 BuildRequires: python-docutils
105 Requires: lustre-osd-mount
106 Provides: lustre-client = %{version}-%{fullrelease}
108 # GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
109 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
110 #suse don't support selinux
111 BuildRequires: libselinux-devel
116 Userspace tools and files for the Lustre file system.
118 %if %{with lustre_modules}
120 Summary: Kernel Lustre modules for Linux %{kversion}
121 # for SLES11, we need nothing here
122 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
123 %if %{defined krequires}
124 # for RHEL we need to require the specific kernel still since weak-modules
125 # support on RH is, well, weak, to be punny about it
126 Requires: kernel = %{krequires}
130 BuildRequires: libyaml-devel
133 Group: Development/Kernel
136 Lustre file system, server and network drivers for Linux %{kversion}.
140 Summary: osd-ldiskfs contains both ldiskfs and its osd interface in Lustre.
141 Requires: lustre-modules = %{version}
142 Requires: module-init-tools >= 3.9
143 Requires: ldiskfsprogs >= 1.42.7.wc1
144 Requires: lustre-osd-ldiskfs-mount = %{version}
146 Obsoletes: lustre-ldiskfs
147 Group: Development/Kernel
149 %description osd-ldiskfs
150 The Lustre Object Storage Device (OSD) API is the interface to access and
151 modify data that is supposed to be stored persistently. This API is the interface
152 to code that bridges individual file systems. This specific package provides an
153 implementation of the OSD API for using the Ldiskfs filesystem as the underlying
154 backing store of a Lustre server.
156 %if %{with lustre_utils}
157 %package osd-ldiskfs-mount
158 Summary: osd-ldiskfs-mount contains mount's ldiskfs specific dso.
159 Provides: lustre-osd-mount
160 Group: Development/Kernel
162 %description osd-ldiskfs-mount
163 LDISKFS hooks for mount/mkfs into a dynamic library.
170 Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
171 Requires: lustre-modules = %{version}, zfs-kmod
172 Requires: lustre-osd-zfs-mount = %{version}
174 Group: Development/Kernel
177 The Lustre Object Storage Device (OSD) API is the interface to access and
178 modify data that is supposed to be stored persistently. This API is the interface
179 to code that bridges individual file systems. This specific package provides an
180 implementation of the OSD API for using the ZFS filesystem as the underlying
181 backing store of a Lustre server.
183 %if %{with lustre_utils}
184 %package osd-zfs-mount
185 Summary: osd-zfs-mount contains mount's zfs specific dso.
186 Provides: lustre-osd-mount
187 Group: Development/Kernel
189 %description osd-zfs-mount
190 ZFS hooks for mount/mkfs into a dynamic library.
194 %endif # with lustre_modules
197 Summary: Object-Based Disk storage driver source
198 Group: Development/Kernel
201 Lustre sources for further development
203 # Since the RPMs we ship are to be used on both SLES and RHEL, we
204 # can't include any dependency information (since the package names
205 # are different on the two platforms).
207 # Instead, we can build these empty meta-packages that only include
208 # dependency information. These let people get the correct
209 # dependencies for their platform and lets them use tools like yum and
210 # red carpet to install the correct files.
212 # Unfortunately I have not seen this come up on the lists much, so I
213 # have disabled them (by commenting out their empty files section
214 # below) until it's clear that they resolve more confusion than they
218 Summary: Lustre dependencies meta-package for SLES
219 Group: Utilities/System
220 Provides: lustre-deps = %{version}
221 Requires: %{name} = %{version}, sles-release
222 Conflicts: %{name}-deps-rhel
224 %description deps-sles
225 This package has RPM dependencies appropriate for SLES systems.
228 Summary: Lustre dependencies meta-package for RHEL
229 Group: Utilities/System
230 Provides: lustre-deps = %{version}
231 Requires: %{name} = %{version}, redhat-release
232 Conflicts: %{name}-deps-sles
234 %description deps-rhel
235 This package has RPM dependencies appropriate for RHEL, RHL, and FC
239 Summary: Lustre testing framework
240 Group: Development/Kernel
241 Provides: %{name}-tests = %{version}
242 Requires: %{name} = %{version}, %{name}-modules = %{version}, lustre-iokit
243 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
246 This package contains a set of test binaries and scripts that are intended
247 to be used by the Lustre testing framework.
249 %if %{with lustre_iokit}
250 %package -n lustre-iokit
251 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
252 Group: Applications/System
253 Requires: python > 2.2, sg3_utils
255 %description -n lustre-iokit
256 This package includes five tools:
258 A test of the 'bare metal' performance, bypassing as much of the kernel as we can. Uses the sgp_dd utility.
261 This survey can be run in 3 modes to test disk I/O including the filesystem,
262 network I/O, and disk I/O via the network. The script does sequential I/O
263 with varying numbers of threads and objects (files) by using lctl::test_brw
264 to drive the echo_client connected to local or remote obdfilter instances,
265 or remote obdecho instances.
268 This survey tests the client-to-disk performance of individual OSTs, and
269 ranks then for comparison.
272 This script will collect IO stats on a defined set of nodes.
275 A script to run the IOR benchmark. The latest version can be downloaded from
276 http://www.llnl.gov/asci/purple/benchmarks/limited/ior/
279 This survey tests the local metadata performance using the echo_client to drive
280 the MDD layer to perform operations. It is run with multiple threads (to
281 simulate MDT service threads) locally on the MDS node, and does not need Lustre
282 clients in order to run
285 %if 0%{?suse_version}
289 %setup -qn lustre-%{version}
290 ln lustre/ChangeLog ChangeLog-lustre
291 ln lnet/ChangeLog ChangeLog-lnet
295 # Set an explicit path to our Linux tree, if we can.
296 cd $RPM_BUILD_DIR/lustre-%{version}
297 # override %optflags so that the vendor's overzealous flags don't create
299 %define optflags -g -O2 -Werror
301 CONFIGURE_ARGS="%{?configure_args}"
302 if [ -n "$CONFIGURE_ARGS" ]; then
303 # make sure %%kdir and %%kobjdir are not in the configure arguments
304 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux=[^ ][^ ]* \?//')
305 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-linux-obj=[^ ][^ ]* \?//')
306 # remove --with-kmp-moddir from configure arguments,
307 # it will be set --with-kmp-moddir=%%kmoddir
308 CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* \?//')
311 # we need to eval "configure" because $CONFIGURE_ARGS could have a quoted
312 # string in it which we don't want word splitted by the shell
313 # also remove (build|host|target) options because they will be specified
314 # inside $CONFIGURE_ARGS
315 %define eval_configure %(echo '%configure' | sed -e 's#\./configure#eval ./configure#' -e 's/--\\(build\\|host\\|target\\)=[^ ][^ ]* //g')
317 %eval_configure $CONFIGURE_ARGS \
318 %{?with_lustre_tests:--enable-tests}%{!?with_lustre_tests:--disable-tests} \
319 %{?with_lustre_utils:--enable-utils}%{!?with_lustre_utils:--disable-utils} \
320 %{?with_lustre_modules:--enable-modules}%{!?with_lustre_modules:--disable-modules} \
321 %{!?with_shared:--disable-shared} \
322 %{!?with_static:--disable-static} \
323 %{!?with_lustre_iokit:--disable-iokit} \
324 %{!?with_ldiskfs:--disable-ldiskfs} \
325 %{!?with_servers:--disable-server} \
326 %{!?with_zfs:--without-zfs} \
327 %{!?with_lnet_dlc:--disable-dlc} \
328 %{!?with_manpages:--disable-manpages} \
329 --with-release=%{release} \
330 --with-linux=%{kdir} \
331 --with-linux-obj=%{kobjdir} \
332 --with-kmp-moddir=%{kmoddir}
334 make %{?_smp_mflags} -s %{?make_args}
337 make install DESTDIR=$RPM_BUILD_ROOT
341 %if %{with servers} && %{with lustre_utils}
342 # The .ha_v2 extension identifies the heartbeat resource agent as using
343 # legacy syntax. Install a compatibility symlink to avoid conflicts when
344 # newer-style agents are added.
345 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
346 echo '%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2' >>lustre.files
347 echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files
350 %if %{_vendor}=="redhat"
351 # The following scripts are Red Hat specific
353 echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
354 echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
356 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
357 echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
360 # Create the pristine source directory.
361 cd $RPM_BUILD_DIR/lustre-%{version}
362 mkdir -p $RPM_BUILD_ROOT%{_prefix}/src
364 ln -s $RPM_BUILD_ROOT%{_prefix}/src lustre-source
365 make distdir distdir=lustre-source/lustre-%{version}
366 chmod -R go-w lustre-source/lustre-%{version}
367 # fc18 needs 'x' permission for library files
368 find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
371 rm -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.la
373 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
376 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
377 echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so.*' >>lustre.files
382 echo '%{_libdir}/libiam.a' >>lustre.files
385 if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
386 echo '%{_libdir}/lustre/snmp' >>lustre.files
389 find $RPM_BUILD_ROOT%{_libdir}/@PACKAGE@ \
390 -name \*.la -type f -exec rm -f {} \;
392 %if %{with lustre_tests}
393 echo '%{_libdir}/lustre/tests/*' >>lustre-tests.files
394 echo '%{_bindir}/mcreate' >>lustre-tests.files
395 echo '%{_bindir}/munlink' >>lustre-tests.files
396 echo '%{_bindir}/req_layout' >>lustre-tests.files
397 echo '%{_sbindir}/wirecheck' >>lustre-tests.files
398 echo '%{_sbindir}/wiretest' >>lustre-tests.files
399 %if %{with lustre_modules}
400 echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
404 %files -f lustre.files
405 %defattr(-,root,root)
407 %exclude %{_sbindir}/wirecheck
408 %exclude %{_sbindir}/wiretest
410 %exclude %{_sbindir}/zfsobj2fid
412 %if %{with lustre_utils}
414 %{_libexecdir}/lustre/lc_common
415 %{_libexecdir}/lustre/haconfig
416 %{_bindir}/lustre_req_history
421 %{_bindir}/plot-llstat
424 %{_bindir}/lfs_migrate
426 %{_libdir}/libptlctl.a
427 %{_libdir}/libcfsutil.a
428 %{_libdir}/liblustreapi.a
429 %{_libdir}/liblustreapi.so
433 %{_includedir}/lustre
434 %{_includedir}/libcfs
437 %{_sysconfdir}/udev/rules.d/99-lustre.rules
438 %config(noreplace) %{_sysconfdir}/ldev.conf
439 %config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
441 %if %{with lustre_modules}
443 %defattr(-,root,root)
444 /lib/modules/%{kversion}/%{kmoddir}/*
445 %if %{with lustre_tests}
446 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
449 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
450 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
453 %exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
456 %doc ChangeLog-lustre
461 %defattr(-,root,root)
462 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
463 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
464 %if %{with lustre_utils}
465 %files osd-ldiskfs-mount
466 %defattr(-,root,root)
467 %{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
473 %defattr(-,root,root)
474 /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
475 %{_sbindir}/zfsobj2fid
476 %if %{with lustre_utils}
478 %defattr(-,root,root)
479 %{_libdir}/@PACKAGE@/mount_osd_zfs.so
482 %endif # with lustre_modules
485 %defattr(-,root,root)
486 %{_prefix}/src/lustre-%{version}
488 # uncomment these lines to enable deps packages
492 %if %{with lustre_tests}
493 %files tests -f lustre-tests.files
494 %defattr(-,root,root)
497 %if %{with lustre_iokit}
498 %files -n lustre-iokit
499 %defattr(-, root, root)
500 %{_bindir}/iokit-config
501 %{_bindir}/iokit-gather-stats
502 %{_bindir}/iokit-libecho
503 %{_bindir}/iokit-lstats
504 %{_bindir}/iokit-parse-ior
505 %{_bindir}/iokit-plot-obdfilter
506 %{_bindir}/iokit-plot-ost
507 %{_bindir}/iokit-plot-sgpdd
508 %{_bindir}/ior-survey
509 %{_bindir}/mds-survey
510 %{_bindir}/obdfilter-survey
511 %{_bindir}/ost-survey
512 %{_bindir}/sgpdd-survey
513 %doc lustre-iokit/ior-survey/README.ior-survey
514 %doc lustre-iokit/mds-survey/README.mds-survey
515 %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey
516 %doc lustre-iokit/ost-survey/README.ost-survey
517 %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey
518 %doc lustre-iokit/stats-collect/README.iokit-lstats
521 %if %{with lustre_modules}
523 if [ -f /boot/System.map-%{kversion} ]; then
524 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
526 depmod -ae %{kversion} || exit 0
529 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
530 # "weak modules" support
532 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
533 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
534 /usr/lib/module-init-tools/weak-modules --add-modules
537 if [ -x /sbin/weak-modules ]; then
538 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' |
539 /sbin/weak-modules --add-modules
542 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
543 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
544 # print a warning so that users are aware of this issue.
545 if sysctl kernel.unsupported >/dev/null 2>&1 &&
546 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
547 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
549 warning: the Lustre modules are not supported by Novell. To use Lustre
550 on this system, you should put
552 allow_unsupported_modules 1
554 into /etc/modprobe.d/unsupported_modules"
559 if [ -f /boot/System.map-%{kversion} ]; then
560 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
562 depmod -ae %{kversion} || exit 0
565 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
566 # "weak modules" support
568 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
569 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
570 /usr/lib/module-init-tools/weak-modules --add-modules
573 if [ -x /sbin/weak-modules ]; then
574 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' |
575 /sbin/weak-modules --add-modules
578 # If the kernel was built to reject unsupported modules (e.g. not a Lustre
579 # kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
580 # print a warning so that users are aware of this issue.
581 if sysctl kernel.unsupported >/dev/null 2>&1 &&
582 [ "$(sysctl -n kernel.unsupported 2>/dev/null)" = "0" ] &&
583 ! modprobe -c | grep -q "^allow_unsupported_modules[ \t]1" ; then
585 warning: the Lustre modules are not supported by Novell. To use Lustre
586 on this system, you should put
588 allow_unsupported_modules 1
590 into /etc/modprobe.d/unsupported_modules"
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"
632 MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
633 rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
637 OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
638 rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
643 OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
644 rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
648 if [ -f /boot/System.map-%{kversion} ]; then
649 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
651 depmod -ae %{kversion} || exit 0
654 # "weak modules" support
656 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
657 cat /var/run/%{name}-modules |
658 /usr/lib/module-init-tools/weak-modules --remove-modules
661 if [ -x /sbin/weak-modules ]; then
662 cat /var/run/%{name}-modules |
663 /sbin/weak-modules --remove-modules
665 rm /var/run/%{name}-modules
669 if [ -f /boot/System.map-%{kversion} ]; then
670 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
672 depmod -ae %{kversion} || exit 0
675 # "weak modules" support
677 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
678 cat /var/run/%{name}-osd-ldiskfs |
679 /usr/lib/module-init-tools/weak-modules --remove-modules
682 if [ -x /sbin/weak-modules ]; then
683 cat /var/run/%{name}-osd-ldiskfs |
684 /sbin/weak-modules --remove-modules
686 rm /var/run/%{name}-osd-ldiskfs
691 if [ -f /boot/System.map-%{kversion} ]; then
692 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
694 depmod -ae %{kversion} || exit 0
697 # "weak modules" support
699 if [ -x /usr/lib/module-init-tools/weak-modules ]; then
700 cat /var/run/%{name}-osd-zfs |
701 /usr/lib/module-init-tools/weak-modules --remove-modules
704 if [ -x /sbin/weak-modules ]; then
705 cat /var/run/%{name}-osd-zfs |
706 /sbin/weak-modules --remove-modules
708 rm /var/run/%{name}-osd-zfs
710 %endif # with lustre_modules
712 %if %{with lustre_tests}
713 %if %{with lustre_modules}
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
722 if [ -f /boot/System.map-%{kversion} ]; then
723 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
725 depmod -ae %{kversion} || exit 0
731 rm -rf $RPM_BUILD_ROOT