RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Per Øyvind Karlsen Root: /v/rpm/cvs Email: pkarl...@rpm5.org Module: rpm Date: 10-Apr-2011 12:54:20 Branch: rpm-5_4 Handle: 2011041010541802 Added files: (Branch: rpm-5_4) rpm/macros kernel.in rpm/scripts kmod-deps.sh Modified files: (Branch: rpm-5_4) rpm CHANGES Makefile.am configure.ac rpm/scripts Makefile.am Log: rpmfc: add internel dep generator helper for kernel modules. kmod-deps.sh: add dependency extractor from mandriva. Summary: Revision Changes Path 1.3501.2.107+2 -0 rpm/CHANGES 2.263.2.3 +3 -3 rpm/Makefile.am 2.472.2.14 +4 -3 rpm/configure.ac 1.1.2.2 +12 -0 rpm/macros/kernel.in 1.75.2.4 +1 -1 rpm/scripts/Makefile.am 1.1.2.2 +61 -0 rpm/scripts/kmod-deps.sh ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.106 -r1.3501.2.107 CHANGES --- rpm/CHANGES 10 Apr 2011 05:23:51 -0000 1.3501.2.106 +++ rpm/CHANGES 10 Apr 2011 10:54:19 -0000 1.3501.2.107 @@ -1,4 +1,6 @@ 5.4.0 -> 5.4.1: + - proyvind: rpmfc: add internel dep generator helper for kernel modules. + - provyind: kmod-deps.sh: add dependency extractor from mandriva. - proyvind: rpmds: implement devel(libfoo) symlink dependencies from Mandriva, but with proper ELF SONAME checking. - jbj: mongo: stub-in a /usr/lib/rpm/bin mongo shell wrapper. @@ . patch -p0 <<'@@ .' Index: rpm/Makefile.am ============================================================================ $ cvs diff -u -r2.263.2.2 -r2.263.2.3 Makefile.am --- rpm/Makefile.am 1 Apr 2011 05:16:19 -0000 2.263.2.2 +++ rpm/Makefile.am 10 Apr 2011 10:54:19 -0000 2.263.2.3 @@ -112,9 +112,9 @@ pkgcfgdir = $(pkglibdir)/macros.d pkgcfg_DATA = \ - macros/cmake macros/gstreamer macros/java macros/libtool macros/mandriva \ - macros/mono macros/perl macros/pkgconfig macros/php macros/python macros/ruby \ - macros/selinux macros/tcl + macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \ + macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php \ + macros/python macros/ruby macros/selinux macros/tcl noinst_HEADERS = build.h debug.h system.h @@ . patch -p0 <<'@@ .' Index: rpm/configure.ac ============================================================================ $ cvs diff -u -r2.472.2.13 -r2.472.2.14 configure.ac --- rpm/configure.ac 3 Apr 2011 19:14:07 -0000 2.472.2.13 +++ rpm/configure.ac 10 Apr 2011 10:54:19 -0000 2.472.2.14 @@ -521,6 +521,7 @@ AC_PATH_PROG(__MAKE, make, %{_bindir}/make, $MYPATH) AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH) AC_PATH_PROG(__MONGO, mongo, %{_bindir}/mongo, $MYPATH) +AC_PATH_PROG(__MODINFO, modinfo, /sbin/modinfo, $MYPATH) AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH) AC_PATH_PROG(__PATCH, patch, %{_bindir}/patch, $MYPATH) AC_PATH_PROG(__PAX, pax, %{_bindir}/pax, $MYPATH) @@ -2317,9 +2318,9 @@ scripts/Makefile rpmdb/DB_CONFIG macros/macros macros/macros.rpmbuild - macros/cmake macros/gstreamer macros/java macros/libtool macros/mandriva - macros/mono macros/perl macros/pkgconfig macros/php macros/python macros/ruby - macros/selinux macros/tcl + macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool + macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php + macros/python macros/ruby macros/selinux macros/tcl doc/Makefile doc/manual/Makefile doc/fr/Makefile doc/ja/Makefile doc/ko/Makefile doc/pl/Makefile doc/ru/Makefile doc/sk/Makefile @@ . patch -p0 <<'@@ .' Index: rpm/macros/kernel.in ============================================================================ $ cvs diff -u -r0 -r1.1.2.2 kernel.in --- /dev/null 2011-04-10 12:51:36.000000000 +0200 +++ kernel.in 2011-04-10 12:54:19.022393676 +0200 @@ -0,0 +1,12 @@ +# Kernel specific macro definitions. +# To make use of these macros insert the following line into your spec file: +# %{load:%{_usrlibrpm}/macros.d/kernel} + +%__modinfo @__MODINFO + +# Path to scripts to autogenerate gstreamer package dependencies, +# +# Note: Used if _use_internal_dependency_generator is non-zero. The +# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. +%__kernel_provides %{_rpmhome}/kmod-deps.sh --provides --modinfo %__modinfo +#%__kernel_requires %{_rpmhome}/kmod-deps.sh --requires --modinfo %__modinfo @@ . patch -p0 <<'@@ .' Index: rpm/scripts/Makefile.am ============================================================================ $ cvs diff -u -r1.75.2.3 -r1.75.2.4 Makefile.am --- rpm/scripts/Makefile.am 8 Apr 2011 16:13:15 -0000 1.75.2.3 +++ rpm/scripts/Makefile.am 10 Apr 2011 10:54:20 -0000 1.75.2.4 @@ -15,7 +15,7 @@ deb_control deb_md5sums deb_postinst deb_postrm deb_preinst deb_prerm \ executabledeps.sh \ find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \ - find-provides.ksyms find-requires.ksyms kmodtool \ + find-provides.ksyms find-requires.ksyms kmod-deps.sh kmodtool \ cpanflute cpanflute2 Specfile.pm \ find-provides.perl find-requires.perl \ find-provides.php find-requires.php \ @@ . patch -p0 <<'@@ .' Index: rpm/scripts/kmod-deps.sh ============================================================================ $ cvs diff -u -r0 -r1.1.2.2 kmod-deps.sh --- /dev/null 2011-04-10 12:51:36.000000000 +0200 +++ kmod-deps.sh 2011-04-10 12:54:20.272450912 +0200 @@ -0,0 +1,61 @@ +#!/bin/sh + +# Kernel module dependency extractor. +# +# Author(s): Danny Tholen <obi...@mandriva.org> +# Olivier Blin <bl...@mandriva.org> +# Per Ãyvind Karlsen <peroyv...@mandriva.org> +# + +provides=0 +requires=0 +modinfo=/sbin/modinfo + +while [ "$#" -ne 0 ]; do + case $1 in + -P|--provides) + provides=1 + ;; + -R|--requires) + requires=1 + ;; + --modinfo) + shift + modinfo=$1 + ;; + esac + shift +done + +if [ $requires -eq 1 ]; then + echo "--requires not implemented!" 1>&2 + exit 1 +fi + +if [ $provides -eq 1 ]; then + provideslist=`sed "s/['\"]/\\\&/g"` + modulelist=$(echo "$provideslist" | egrep '^.*(/lib/modules/|/var/lib/dkms/).*\.ko(\.gz)?$') + echo $modulelist | xargs -r $modinfo | \ + perl -lne ' + $name = $1 if m!^filename:\s*(?:.*/)?([^/]+)\.k?o!; + $ver = $1 if /^version:\s*[a-zA-Z]{0,6}\-?(\d+[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*[\.\:\-\[\]]?\d*-?[a-zA-Z]{0,6}\d?).*/; + $ver =~ s/(\:|-)/_/; + if (/^vermagic:/) { + print "kmod\($name\)" . ($ver ? " = $ver" : "") if $name; + undef $name; undef $ver; + } + ' + dkmslist=$(echo "$provideslist" | egrep '(/var/lib/dkms-binary/[^/]+/[^/]+|/usr/src)/[^/]+/dkms.conf$') + [ -n "$dkmslist" ] && for d in $dkmslist; do + VERSION=`sed -rne 's/^PACKAGE_VERSION="?([^"]+)"?$/\1/;T;p' $d` + [ -z "$VERSION" ] && continue + PACKAGE_NAME=`sed -rne 's/^PACKAGE_NAME="?([^"]+)"?$/\1/;T;p' $d` + MODULES=`sed -rne 's/^DEST_MODULE_NAME\[[0-9]+\]="?([^"]+)"?$/\1/;T;p' $d` + [ -z "$MODULES" ] && MODULES=`sed -rne 's/^BUILT_MODULE_NAME\[[0-9]+\]="?([^"]+)"?$/\1/;T;p' $d` + # default on PACKAGE_NAME if no BUILT_MODULE_NAME is specified + [ -z "$MODULES" ] && MODULES=$PACKAGE_NAME + echo "$MODULES" | sed -re "s/\\\$PACKAGE_NAME/$PACKAGE_NAME/" | while read m; do + echo "kmod($m) = $VERSION" + done + done +fi @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org