From 7251b5a48cd3caeffbfed5f2d37d2d1abe66e961 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Fri, 21 May 2010 16:32:31 +0200 Subject: [PATCH] Revert "b=21452 support for weak-modules" This reverts commit 84945c742419d63195bf42a6f194576824687a1f. Suspected to cause rpm installation issue. --- build/autoconf/lustre-build-linux.m4 | 2 +- ldiskfs/lustre-ldiskfs.spec.in | 2 +- lustre.spec.in | 62 +++++------------------------------- 3 files changed, 10 insertions(+), 56 deletions(-) diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index c6583d2..8e1025f 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -84,7 +84,7 @@ fi AC_MSG_RESULT([$LINUXRELEASE]) AC_SUBST(LINUXRELEASE) -moduledir='/lib/modules/'$LINUXRELEASE/updates/kernel +moduledir='/lib/modules/'$LINUXRELEASE/kernel AC_SUBST(moduledir) modulefsdir='$(moduledir)/fs/$(PACKAGE)' diff --git a/ldiskfs/lustre-ldiskfs.spec.in b/ldiskfs/lustre-ldiskfs.spec.in index 35a7c24..b76f6d6 100644 --- a/ldiskfs/lustre-ldiskfs.spec.in +++ b/ldiskfs/lustre-ldiskfs.spec.in @@ -45,7 +45,7 @@ make -j $RPM_BUILD_NCPUS -s make install DESTDIR=$RPM_BUILD_ROOT %files -%attr(-, root, root) /lib/modules/%{kversion}/updates/kernel/fs/lustre-ldiskfs +%attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre-ldiskfs %post if [ -f /boot/System.map-%{kversion} ]; then diff --git a/lustre.spec.in b/lustre.spec.in index 6e12b63..5b022b9 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -5,23 +5,10 @@ %{!?lustre_name: %define lustre_name lustre} %{!?build_lustre_tests: %define build_lustre_tests 1} -# on RHEL5, we need to disable the internal dependency generator and let -# the external one be used as it can deal with providing Provides: tags -# for kernel modules -# on SLES10, /usr/lib/rpm/macros already sets this, so no harm (until Suse -# changes their mind) -%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 on the end of %kversion %define krequires %(bash -c "echo %{kversion} | sed -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") - -%if %sles10 -%define flavor %(bash -c "echo %{kversion} | sed -e 's/^.*-//'") -%endif - Summary: Lustre File System Name: %{lustre_name} Version: %{version} @@ -41,11 +28,7 @@ Userspace tools and files for the Lustre file system. %package modules Summary: Kernel Lustre modules for Linux %{kversion} -# for RHEL5 and SLES11, we need nothing here -# for SLES10, we need (where %{flavor} is, i.e. smp): -%if %sles10 -Requires: kernel-%{flavor} -%endif +Requires: modutils >= 2.4.10, kernel = %{krequires} Group: Development/Kernel %description modules @@ -141,14 +124,14 @@ make install DESTDIR=$RPM_BUILD_ROOT # hack to avoid changing the libsysio code for "make install" 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}/updates/kernel/fs/lustre-ldiskfs +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}/updates/kernel/fs/lustre + 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}/updates/kernel/fs/lustre + cp ${llog_base}.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/fs/lustre fi # Create the pristine source directory. @@ -208,7 +191,7 @@ fi %if %{build_lustre_tests} echo '%attr(-, root, root) %{_libdir}/lustre/tests/*' >lustre-tests.files -echo '%attr(-, root, root) /lib/modules/%{kversion}/updates/kernel/fs/lustre/llog_test.*' >>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 @@ -216,7 +199,7 @@ fi %endif pushd $RPM_BUILD_ROOT >/dev/null -find lib/modules/%{kversion}/updates -type f | awk "!/(ZZZZZZZZZZ$modules_excludes)/ {print \"%attr(-, root, root) /\"\$0}" >>$RPM_BUILD_DIR/lustre-%{version}/lustre-modules.files +find lib/modules/%{kversion}/kernel -type f | awk "!/(ZZZZZZZZZZ$modules_excludes)/ {print \"%attr(-, root, root) /\"\$0}" >>$RPM_BUILD_DIR/lustre-%{version}/lustre-modules.files popd >/dev/null %files -f lustre.files @@ -243,22 +226,9 @@ if [ -f /boot/System.map-%{kversion} ]; then else depmod -ae %{kversion} || exit 0 fi - -# "weak modules" support -# Suse -if [ -x /usr/lib/module-init-tools/weak-modules ]; then - rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' | - /usr/lib/module-init-tools/weak-modules --add-modules -fi -# RedHat -if [ -x /sbin/weak-modules ]; then - rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' | - /sbin/weak-modules --add-modules -fi - cat </dev/null 2>&1 && into /etc/modprobe.d/unsupported_modules" fi -%preun modules -rpm -ql %{name}-modules-%{version}-%{release} | grep '\.ko$' > /var/run/%{name}-modules - %postun modules if [ -f /boot/System.map-%{kversion} ]; then depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0 @@ -311,19 +278,6 @@ else depmod -ae %{kversion} || exit 0 fi -# "weak modules" support -# Suse -if [ -x /usr/lib/module-init-tools/weak-modules ]; then - cat /var/run/%{name}-modules | grep '\.ko$' | - /usr/lib/module-init-tools/weak-modules --remove-modules -fi -# RedHat -if [ -x /sbin/weak-modules ]; then - cat /var/run/%{name}-modules | grep '\.ko$' | - /sbin/weak-modules --remove-modules -fi -rm /var/run/%{name}-modules - %if %{build_lustre_tests} %post tests if [ -f /boot/System.map-%{kversion} ]; then -- 1.8.3.1