#%%global _use_internal_dependency_generator 0
%define is_client %(bash -c "if [[ %{lustre_name} = *-client ]]; then echo -n '1'; else echo -n '0'; fi")
+# for those uses that don't want the -smp/-bigsmp (or the .arch) on the end
+# of %kversion
+%define krequires %(bash -c "echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/-ppc64$//' -e 's/-default$//'")
%define sles10 %(bash -c "if [ "%sles_version" = "10" ]; then echo -n '1'; else echo -n '0'; fi")
%package modules
Summary: Kernel Lustre modules for Linux %{kversion}
-# for RHEL5 and SLES11, we need nothing here
+# for SLES11, we need nothing here
# for SLES10, we need (where %{flavor} is, i.e. smp):
%if %sles10
Requires: kernel-%{flavor}
+%else
+%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
+# 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
+%endif
+%if ! %{is_client}
+Requires: lustre-backend-fs
%endif
Group: Development/Kernel
/sbin/weak-modules --add-modules
fi
-# 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
-
# If the kernel was built to reject unsupported modules (e.g. not a Lustre
# kernel), and this hasn't been overridden in /etc/modprobe.d yet, then
# print a warning so that users are aware of this issue.