X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre.spec.in;h=fda6602344adbf024ba6ebb139aa56ec33afb9d0;hp=39886fdec59d7e5084426328c390793838699eba;hb=605817db843fdd8e433751180e516d6497323956;hpb=de2309f2e3b3118eee89a2a9342c1074da00aba1 diff --git a/lustre.spec.in b/lustre.spec.in index 39886fd..fda6602 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -9,7 +9,7 @@ Release: @RELEASE@ License: GPL Group: Utilities/System Source: lustre-%{version}.tar.gz -URL: http://clusterfs.com/ +URL: http://www.sun.com/software/products/lustre/index.xml BuildRoot: %{_tmppath}/lustre-%{version}-root Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre Provides: lustre-lite = %{version}, lustre-lite-utils = %{version} @@ -110,12 +110,21 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libsysio.a # Remove ldiskfs module(s) - they are packaged by the ldiskfs .spec. rm -rf $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/fs/lustre-ldiskfs +# hack to include the llog_test module in lustre-tests +llog_base=$RPM_BUILD_DIR/lustre-%{version}/lustre/obdclass/llog_test +if [ -e ${llog_base}.ko ]; then + cp ${llog_base}.ko $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/fs/lustre +elif [ -e ${llog_base}.o ]; then + cp ${llog_base}.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/fs/lustre +fi + # Create the pristine source directory. cd $RPM_BUILD_DIR/lustre-%{version} mkdir -p $RPM_BUILD_ROOT/usr/src rm -f lustre-source ln -s $RPM_BUILD_ROOT/usr/src lustre-source make distdir distdir=lustre-source/lustre-%{version} +chmod -R go-w lustre-source/lustre-%{version} cat >lustre.files <lustre.files <>lustre.files +fi + if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then echo '%attr(-, root, root) %{_libdir}/liblustre.a' >>lustre.files echo '%attr(-, root, root) %{_libdir}/liblustre.so' >>lustre.files @@ -149,18 +162,30 @@ fi # Have universal lustre headers if [ -f $RPM_BUILD_DIR/lustre-%{version}/lustre/include/lustre/lustre_idl.h ] ; then - echo '%attr(-, root, root) /usr/include/linux/lustre_types.h' >>lustre.files echo '%attr(-, root, root) /usr/include/linux/lustre_user.h' >>lustre.files else echo '%attr(-, root, root) /usr/include/linux/lustre_idl.h' >>lustre.files fi +if [ -f $RPM_BUILD_DIR/lustre-%{version}/lustre/include/linux/lustre_types.h ] ; then + echo '%attr(-, root, root) /usr/include/linux/lustre_types.h' >>lustre.files +fi + +echo '%attr(-, root, root) %{_libdir}/lustre/tests/*' >lustre-tests.files +echo '%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/llog_test.*' >>lustre-tests.files +modules_excludes="llog_test" +if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/liblustre/tests ] ; then + echo '%attr(-, root, root) %{_libdir}/lustre/liblustre/tests/*' >>lustre-tests.files +fi + +pushd $RPM_BUILD_ROOT >/dev/null +find lib/modules/%{kversion}/kernel -type f | awk "!/($modules_excludes)/ {print \"/\"\$0}" >>$RPM_BUILD_DIR/lustre-%{version}/lustre-modules.files +popd >/dev/null + %files -f lustre.files -%files modules +%files modules -f lustre-modules.files %attr(-, root, root) %doc COPYING -%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre -%attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre %files source %attr(-, root, root) /usr/src/lustre-%{version} @@ -169,8 +194,7 @@ fi # %files deps-sles # %files deps-rhel -%files tests -%attr(-, root, root) %{_libdir}/lustre/tests/* +%files tests -f lustre-tests.files %post modules if [ -f /boot/System.map-%{kversion} ]; then @@ -201,7 +225,6 @@ do fi done - %postun modules if [ -f /boot/System.map-%{kversion} ]; then depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 @@ -209,5 +232,19 @@ else depmod -ae %{kversion} || exit 0 fi +%post tests +if [ -f /boot/System.map-%{kversion} ]; then + depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +else + depmod -ae %{kversion} || exit 0 +fi + +%postun tests +if [ -f /boot/System.map-%{kversion} ]; then + depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 +else + depmod -ae %{kversion} || exit 0 +fi + %clean rm -rf $RPM_BUILD_ROOT