%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with lnet_dlc
+%bcond_without manpages
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
%else
%{!?downstream_release: %global downstream_release "@DOWNSTREAM_RELEASE@"}
%{!?myrelease: %global myrelease %(if [ -n "%downstream_release" ]; then echo -n "%{downstream_release}_"; fi; echo %kversion | tr '-' '_')}
+ # for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
+ # of %kversion
+ %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$//')
%endif
# always append the buildid, even when the caller defines %release
# response from them
#%%global _use_internal_dependency_generator 0
-# for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
-# of %kversion
-%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/-default$//')
-
# Set the package name prefix
%if %{undefined lustre_name}
%if %{with servers}
Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
Requires: %{name}-modules = %{version}
BuildRequires: libtool
+%if %{with manpages}
+BuildRequires: python-docutils
+%endif
%if %{with servers}
Requires: lustre-osd
Requires: lustre-osd-mount
%else
# for SLES11, we need nothing here
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
+%if %{defined krequires}
# for RHEL we need to require the specific kernel still since weak-modules
# support on RH is, well, weak, to be punny about it
Requires: kernel = %{krequires}
+%endif
%if %{with lnet_dlc}
Requires: libyaml
BuildRequires: libyaml-devel
Requires: lustre-modules = %{version}
Requires: module-init-tools >= 3.9
Requires: ldiskfsprogs >= 1.42.7.wc1
-Requires: lustre-osd-ldiskfs-mount
+Requires: lustre-osd-ldiskfs-mount = %{version}
Provides: lustre-osd
Obsoletes: lustre-ldiskfs
Group: Development/Kernel
%package osd-zfs
Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
Requires: lustre-modules = %{version}, zfs-kmod
-Requires: lustre-osd-zfs-mount
+Requires: lustre-osd-zfs-mount = %{version}
Provides: lustre-osd
Group: Development/Kernel
%if %{with lustre_utils}
%package osd-zfs-mount
-Summary: osd-zfs-mount contains mount's ldiskfs specific dso.
+Summary: osd-zfs-mount contains mount's zfs specific dso.
Provides: lustre-osd-mount
Group: Development/Kernel
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_lnet_dlc:--disable-dlc} \
+ %{!?with_manpages:--disable-manpages} \
--with-release=%{release} \
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
%files -f lustre.files
%defattr(-,root,root)
%{_sbindir}/*
+%exclude %{_sbindir}/wirecheck
+%exclude %{_sbindir}/wiretest
+%if %{with zfs}
+%exclude %{_sbindir}/zfsobj2fid
+%endif
%if %{with lustre_utils}
%if %{with servers}
%{_libexecdir}/lustre/lc_common
%{_libdir}/libcfsutil.a
%{_libdir}/liblustreapi.a
%{_libdir}/liblustreapi.so
+%if %{with manpages}
%{_mandir}/man?/*
+%endif
%{_includedir}/lustre
%{_includedir}/libcfs
%endif
%{_datadir}/lustre
%{_sysconfdir}/udev/rules.d/99-lustre.rules
%config(noreplace) %{_sysconfdir}/ldev.conf
+%config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
%if %{with lustre_modules}
%files modules
%files osd-zfs
%defattr(-,root,root)
%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
+%{_sbindir}/zfsobj2fid
%if %{defined rpm_post_base}
%attr(0555, root, root) %{rpm_post_base}-osd-zfs.sh
%endif