diff --git a/SOURCES/weak-modules b/SOURCES/weak-modules index e242527..fe5050c 100644 --- a/SOURCES/weak-modules +++ b/SOURCES/weak-modules @@ -196,12 +196,23 @@ module_is_compatible() { if [ ! -e "$tmpdir/all-symvers-$krel-$module_krel" ]; then # Symbols exported by the "new" kernel if [ ! -e $tmpdir/symvers-$krel ]; then + # Accept '.' in the symbol name to handle the .TOC. symbol on ppc if [ -e /boot/symvers-$krel.gz ]; then zcat /boot/symvers-$krel.gz \ - | sed -r -ne 's:^(0x[0]*[0-9a-f]{8}\t[0-9a-zA-Z_]+)\t.*:\1:p' + | sed -r -ne 's:^(0x[0]*[0-9a-f]{8}\t[0-9a-zA-Z_.]+)\t.*:\1:p' fi > $tmpdir/symvers-$krel fi + # Symbols exported by the add-on modules of the "new" kernel + if [ ! -e "$tmpdir/addon-symvers-$krel" ]; then + if [ -e /lib/modules/$krel/extra ] && \ + [ -n "`find /lib/modules/$krel/extra -type f`" ]; then + find /lib/modules/$krel/extra -name '*.ko' \ + | xargs nm \ + | sed -nre 's:^[0]*([0-9a-f]{8}) A __crc_(.*):0x\1 \2:p' + fi > $tmpdir/addon-symvers-$krel + fi + # Symbols that other add-on modules of the "old" kernel export # (and that this module may require) if [ ! -e "$tmpdir/extra-symvers-$module_krel" ]; then @@ -213,7 +224,9 @@ module_is_compatible() { fi > $tmpdir/extra-symvers-$module_krel fi - sort -u $tmpdir/symvers-$krel $tmpdir/extra-symvers-$module_krel \ + sort -u $tmpdir/symvers-$krel \ + $tmpdir/extra-symvers-$module_krel \ + $tmpdir/addon-symvers-$krel \ > "$tmpdir/all-symvers-$krel-$module_krel" fi diff --git a/SPECS/kmod.spec b/SPECS/kmod.spec index 5f35c3a..bd1148d 100644 --- a/SPECS/kmod.spec +++ b/SPECS/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 20 -Release: 5%{?dist} +Release: 8%{?dist} Summary: Linux kernel module management utilities Group: System Environment/Kernel @@ -120,6 +120,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/libkmod.so %changelog +* Tue Aug 30 2016 Tony Camuso - 20-8 +- Patch weak-modules to correctly handle powerpc TOC. symbol + Resolves: rhbz#1367662 + * Wed Jun 3 2015 David Shea - 20-5 - Check for changes in non-module files that affect that initramfs Resolves: rhbz#1108166