diff -Nur rpm-4.11.1/fileattrs/kmod.attr rpm-4.11.1.new/fileattrs/kmod.attr --- rpm-4.11.1/fileattrs/kmod.attr 1969-12-31 19:00:00.000000000 -0500 +++ rpm-4.11.1.new/fileattrs/kmod.attr 2013-10-31 16:33:57.919845171 -0400 @@ -0,0 +1,2 @@ +%__kmod_provides %{_rpmconfigdir}/kmod.prov +%__kmod_path ^/lib/modules/.*$ diff -Nur rpm-4.11.1/fileattrs/Makefile.am rpm-4.11.1.new/fileattrs/Makefile.am --- rpm-4.11.1/fileattrs/Makefile.am 2012-11-18 03:21:06.000000000 -0500 +++ rpm-4.11.1.new/fileattrs/Makefile.am 2013-10-31 16:35:16.443641444 -0400 @@ -6,6 +6,6 @@ fattrs_DATA = \ desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \ - pkgconfig.attr python.attr ocaml.attr script.attr mono.attr + pkgconfig.attr python.attr ocaml.attr script.attr mono.attr kmod.attr EXTRA_DIST = $(fattrs_DATA) diff -Nur rpm-4.11.1/scripts/kmod.prov rpm-4.11.1.new/scripts/kmod.prov --- rpm-4.11.1/scripts/kmod.prov 1969-12-31 19:00:00.000000000 -0500 +++ rpm-4.11.1.new/scripts/kmod.prov 2013-10-31 16:33:57.919845171 -0400 @@ -0,0 +1,17 @@ +#!/bin/sh +x + +IFS=$'\n' + +for i in $(grep -E '(/lib/modules/.*\.ko|/lib/modules/.*/modules.builtin)'); +do + kmod=$(basename $i); + + if [ $kmod == "modules.builtin" ]; then + for j in $(cat $i); do + j=$(basename $j); + echo "kmod($j)" + done + else + echo "kmod($kmod)" + fi +done diff -Nur rpm-4.11.1/scripts/Makefile.am rpm-4.11.1.new/scripts/Makefile.am --- rpm-4.11.1/scripts/Makefile.am 2012-11-18 03:21:06.000000000 -0500 +++ rpm-4.11.1.new/scripts/Makefile.am 2013-10-31 16:35:53.990543808 -0400 @@ -20,7 +20,7 @@ ocaml-find-requires.sh ocaml-find-provides.sh \ pkgconfigdeps.sh libtooldeps.sh \ fontconfig.prov desktop-file.prov script.req \ - macros.perl macros.php macros.python + macros.perl macros.php macros.python kmod.prov rpmconfig_SCRIPTS = \ brp-compress brp-python-bytecompile brp-java-gcjcompile \ @@ -34,7 +34,7 @@ pkgconfigdeps.sh libtooldeps.sh \ ocaml-find-requires.sh ocaml-find-provides.sh \ fontconfig.prov desktop-file.prov script.req \ - rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg + rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg kmod.prov rpmconfig_DATA = \ rpm.daily rpm.log rpm.supp \