%bcond_without lustre_utils
%bcond_without lustre_iokit
%bcond_without lustre_modules
+%bcond_with lnet_dlc
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
BuildRequires: libtool
%if %{with servers}
Requires: lustre-osd
+Requires: lustre-osd-mount
%endif
%if %{defined cross_requires}
Requires: %{cross_requires}
# 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}
+%if %{with lnet_dlc}
+Requires: libyaml
+BuildRequires: libyaml-devel
+%endif
%endif
%endif
Group: Development/Kernel
Requires: lustre-modules = %{version}
Requires: module-init-tools >= 3.9
Requires: ldiskfsprogs >= 1.42.7.wc1
+Requires: lustre-osd-ldiskfs-mount
Provides: lustre-osd
Obsoletes: lustre-ldiskfs
Group: Development/Kernel
to code that bridges individual file systems. This specific package provides an
implementation of the OSD API for using the Ldiskfs filesystem as the underlying
backing store of a Lustre server.
+
+%if %{with lustre_utils}
+%package osd-ldiskfs-mount
+Summary: osd-ldiskfs-mount contains mount's ldiskfs specific dso.
+Provides: lustre-osd-mount
+Group: Development/Kernel
+
+%description osd-ldiskfs-mount
+LDISKFS hooks for mount/mkfs into a dynamic library.
+
+%endif
%endif
%if %{with zfs}
%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
Provides: lustre-osd
Group: Development/Kernel
to code that bridges individual file systems. This specific package provides an
implementation of the OSD API for using the ZFS filesystem as the underlying
backing store of a Lustre server.
+
+%if %{with lustre_utils}
+%package osd-zfs-mount
+Summary: osd-zfs-mount contains mount's ldiskfs specific dso.
+Provides: lustre-osd-mount
+Group: Development/Kernel
+
+%description osd-zfs-mount
+ZFS hooks for mount/mkfs into a dynamic library.
+
+%endif
%endif
%endif # with lustre_modules
# fc18 needs 'x' permission for library files
find $RPM_BUILD_ROOT -name \*.so -type f -exec chmod +x {} \;
+if [ -f $RPM_BUILD_ROOT%{_libdir}/liblnetconfig.a ] ; then
+ echo '%attr(-, root, root) %{_libdir}/liblnetconfig.a' >>lustre.files
+ echo '%attr(-, root, root) %{_libdir}/liblnetconfig.so' >>lustre.files
+fi
+
+if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then
+ echo '%{_libdir}/liblustre.a' >>lustre.files
+ echo '%{_libdir}/liblustre.so' >>lustre.files
+fi
+
if [ -f $RPM_BUILD_ROOT%{_libdir}/libiam.a ] ; then
echo '%{_libdir}/libiam.a' >>lustre.files
fi
echo '%{_bindir}/req_layout' >>lustre-tests.files
echo '%{_sbindir}/wirecheck' >>lustre-tests.files
echo '%{_sbindir}/wiretest' >>lustre-tests.files
-echo '%{_sbindir}/loadgen' >>lustre-tests.files
%if %{with lustre_modules}
echo '%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
%endif
cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-modules.sh
%if %{with ldiskfs}
cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-ldiskfs.sh
+%if %{with lustre_utils}
+ cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-mount-osd-ldiskfs.sh
+%endif
%endif
%if %{with zfs}
cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-zfs.sh
+%if %{with lustre_utils}
+ cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-mount-osd-zfs.sh
+%endif
%endif
%if %{with lustre_tests}
cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-tests.sh
%defattr(-,root,root)
%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
+%if %{defined rpm_post_base}
+%attr(0555, root, root) %{rpm_post_base}-osd-ldiskfs.sh
+%endif
%if %{with lustre_utils}
+%files osd-ldiskfs-mount
+%defattr(-,root,root)
%{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
-%endif
%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-osd-ldiskfs.sh
+%attr(0555, root, root) %{rpm_post_base}-mount-osd-ldiskfs.sh
+%endif
%endif
%endif
%files osd-zfs
%defattr(-,root,root)
%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
+%if %{defined rpm_post_base}
+%attr(0555, root, root) %{rpm_post_base}-osd-zfs.sh
+%endif
%if %{with lustre_utils}
+%files osd-zfs-mount
+%defattr(-,root,root)
%{_libdir}/@PACKAGE@/mount_osd_zfs.so
-%endif
%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-osd-zfs.sh
+%attr(0555, root, root) %{rpm_post_base}-mount-osd-zfs.sh
+%endif
%endif
%endif
%endif # with lustre_modules
into /etc/modprobe.d/unsupported_modules"
fi
%endif
+%if %{with lustre_utils} && %{defined rpm_post_base}
+%post osd-ldiskfs-mount
+if [ -x %{rpm_post_base}-mount-osd-ldiskfs.sh ]; then
+ %{rpm_post_base}-mount-osd-ldiskfs.sh %{cross_path} create
+fi
+%endif
%endif
%if %{with zfs}
into /etc/modprobe.d/unsupported_modules"
fi
%endif
+%if %{with lustre_utils} && %{defined rpm_post_base}
+%post osd-zfs-mount
+if [ -x %{rpm_post_base}-mount-osd-zfs.sh ]; then
+ %{rpm_post_base}-mount-osd-zfs.sh %{cross_path} create
+fi
+%endif
%endif
%preun modules
OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
%endif
+%if %{with lustre_utils} && %{defined rpm_post_base}
+%preun osd-ldiskfs-mount
+if [ -x %{rpm_post_base}-mount-osd-ldiskfs.sh ]; then
+ %{rpm_post_base}-mount-osd-ldiskfs.sh %{cross_path} remove
+fi
+%endif
%endif
%if %{with zfs}
OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
%endif
+%if %{with lustre_utils} && %{defined rpm_post_base}
+%preun osd-zfs-mount
+if [ -x %{rpm_post_base}-mount-osd-zfs.sh ]; then
+ %{rpm_post_base}-mount-osd-zfs.sh %{cross_path} remove
+fi
+%endif
%endif
%if %{undefined cross_path}