diff --git a/SOURCES/weak-modules b/SOURCES/weak-modules index 52cd59e..0a79562 100644 --- a/SOURCES/weak-modules +++ b/SOURCES/weak-modules @@ -65,7 +65,7 @@ read_modules_list() { module_krels[n]=$(krel_of_module ${modules[n]}) else # Try to extract the kernel release from the path - set -- "${modules[n]#/lib/modules/}" + set -- "${modules[n]#*/lib/modules/}" module_krels[n]=${1%%/*} fi done @@ -351,7 +351,7 @@ add_modules() { # kernel. We need to create symlinks for compatible kernels # under /lib/modules and rerun depmod/dracut for those. - subpath=`echo $module | sed -nre "s:/lib/modules/$module_krel/([^/]*)/(.*):\2:p"` + subpath=`echo $module | sed -nre "s:(/usr)?/lib/modules/$module_krel/([^/]*)/(.*):\3:p"` weak_module="/lib/modules/$krel/weak-updates/${subpath#/}" if [ -r "$weak_module" ]; then weak_krel=$(krel_of_module "$weak_module") @@ -400,7 +400,7 @@ remove_modules() { # Module is going to be removed, update initramfs. module_has_changed $module $krel - subpath="${module#/lib/modules/$module_krel/extra}" + subpath="${module#*/lib/modules/$module_krel/extra}" weak_module="/lib/modules/$krel/weak-updates/${subpath#/}" if [ "$module" == "`readlink $weak_module`" ]; then [ -n "$verbose" ] && echo \ @@ -440,7 +440,7 @@ add_kernel() { [ "$add_krel" = "$krel" ] && continue [ -d /lib/modules/$krel/extra ] || continue for module in $(find /lib/modules/$krel/extra -name '*.ko'); do - subpath="${module#/lib/modules/$krel/extra}" + subpath="${module#*/lib/modules/$krel/extra}" weak_module="/lib/modules/$add_krel/weak-updates/${subpath#/}" [ -e "$weak_module" ] && continue if module_is_compatible $module $add_krel; then diff --git a/SPECS/kmod.spec b/SPECS/kmod.spec index 9c393a4..10f87d3 100644 --- a/SPECS/kmod.spec +++ b/SPECS/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 14 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Linux kernel module management utilities Group: System Environment/Kernel @@ -119,6 +119,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Tue Jan 14 2015 David Shea - 14-10 +- Allow module paths to start with /usr + Resolves: rhbz#1177266 + * Tue Apr 1 2014 David Shea - 14-9 - Support initramfs files with early_cpio Resolves: rhbz#1070035