Name: lustre
Version: %{version}
Release: @RELEASE@
-Copyright: GPL
+License: GPL
Group: Utilities/System
Source: lustre-%{version}.tar.gz
URL: http://clusterfs.com/
-BuildRoot: /var/tmp/lustre-%{version}-root
-Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap
-Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}, lustre-ldap = %{version}
+BuildRoot: %{_tmppath}/lustre-%{version}-root
+Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
+Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
+# GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
%description
Userspace tools and files for the Lustre file system.
Summary: Lustre dependencies meta-package for SLES
Group: Utilities/System
Provides: lustre-deps = %{version}
-Requires: lustre = %{version}, sles-release, python-xml
+Requires: lustre = %{version}, sles-release
Conflicts: lustre-deps-rhel
%description deps-sles
Summary: Lustre dependencies meta-package for RHEL
Group: Utilities/System
Provides: lustre-deps = %{version}
-Requires: lustre = %{version}, redhat-release, PyXML
+Requires: lustre = %{version}, redhat-release
Conflicts: lustre-deps-sles
%description deps-rhel
# Set an explicit path to our Linux tree, if we can.
cd $RPM_BUILD_DIR/lustre-%{version}
-./configure @ac_configure_args@ \
+./configure @ac_configure_args@ %{?configure_flags:configure_flags} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \
--libdir=%{_libdir}
%attr(-, root, root) /sbin/mount.lustre
%attr(-, root, root) /usr/sbin/*
%attr(-, root, root) /usr/bin/*
-%attr(-, root, root) %{_libdir}/lustre/python
-%attr(-, root, root) /usr/share/lustre/*
-%attr(-, root, root) /etc/init.d/lustre
-%attr(-, root, root) /etc/init.d/lustrefs
+%attr(-, root, root) /usr/share/lustre/*
%attr(-, root, root) %{_libdir}/libptlctl.a
%attr(-, root, root) %{_libdir}/liblustreapi.a
%attr(-, root, root) /usr/include/lustre
-%attr(-, root, root) /usr/include/linux/lustre_idl.h
%attr(-, root, root) %{_mandir}/man?/*
-%attr(-, root, root) /etc/openldap/slapd-lustre.conf
-%attr(-, root, root) /etc/openldap/schema/lustre.schema
+%attr(-, root, root) %{_libdir}/lustre/lc_common.sh
EOF
+
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
fi
+if [ -f $RPM_BUILD_DIR/lustre-%{version}/lustre/utils/libiam.c ] ; then
+ echo '%attr(-, root, root) %{_libdir}/libiam.a' >>lustre.files
+fi
+
if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
echo '%attr(-, root, root) %{_libdir}/lustre/snmp' >>lustre.files
echo '%attr(-, root, root) %{_datadir}/lustre/snmp/mibs' >>lustre.files
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/lustre/lustre_idl.h' >>lustre.files
+ 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
+
%files -f lustre.files
%files modules
# %files deps-sles
# %files deps-rhel
-%post
-if [ -f /etc/init.d/lustre ] ; then
- /sbin/chkconfig --add lustre
- /sbin/chkconfig --add lustrefs
-fi
-
-%preun
-if [ $1 = 0 -a -f /etc/init.d/lustre ] ; then
- /sbin/chkconfig --del lustre
- /sbin/chkconfig --del lustrefs
-fi
-rm -f %{_libdir}/lustre/python/Lustre/*.pyc
-
%post modules
-if [ ! -e /dev/obd ]; then
- mknod /dev/obd c 10 241
-fi
-if [ ! -e /dev/portals ]; then
- mknod /dev/portals c 10 240
-fi
if [ -f /boot/System.map-%{kversion} ]; then
depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
else
depmod -ae %{kversion} || exit 0
fi
-for ext in .local "" ; do
- f=/etc/modprobe.conf$ext
- if [ -f $f ] && ! grep llite $f >/dev/null 2>/dev/null ; then
- cat >> $f <<EOF
-install kptlrouter modprobe portals ; modprobe --ignore-install kptlrouter
-install ptlrpc modprobe ksocknal ; modprobe --ignore-install ptlrpc
-install llite modprobe lov osc ; modprobe --ignore-install llite
-alias lustre llite
-EOF
- break
+
+# for update from < v1.4.6
+
+for f in /etc/modules.conf /etc/modprobe.conf /etc/modprobe.conf.local ;
+do
+ if [ -f $f ]; then
+ if grep 'lustre llite' $f >/dev/null 2>/dev/null ; then
+ [ ! -f $f.rpmsave ] && cp $f $f.rpmsave
+ TMPFILE=`mktemp $f.XXXXXX` && \
+ rm -f $TMPFILE && touch $TMPFILE && \
+ grep -v 'lustre llite' $f >> $TMPFILE && \
+ mv $TMPFILE $f
+ fi
+ if egrep "^[^#]*(add below|install) ptlrpc" $f ; then
+ [ ! -f $f.rpmsave ] && cp $f $f.rpmsave
+ TMPFILE=`mktemp $f.XXXXXX` && \
+ rm -f $TMPFILE && touch $TMPFILE && \
+ sed -e "s/^[^#]*\(add below\|install\) ptlrpc.*/#&/" $f >> $TMPFILE && \
+ mv $TMPFILE $f
+ fi
fi
done
-f=/etc/modules.conf
-if [ -f $f ] && ! grep llite $f >/dev/null 2>/dev/null ; then
- cat >> $f <<EOF
-add below kptlrouter portals
-add below ptlrpc ksocknal
-add below llite lov osc
-alias lustre llite
-EOF
-fi
+
%postun modules
if [ -f /boot/System.map-%{kversion} ]; then