From dc8230ffa8608625618e578924f2943f0f8e0af07171f9f33f7964e4c6150bbd Mon Sep 17 00:00:00 2001
From: OBS User unknown <null@suse.de>
Date: Mon, 17 Nov 2008 15:33:54 +0000
Subject: [PATCH] OBS-URL:
 https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=60

---
 findksyms.diff  | 7 +++++--
 rpm-python.spec | 2 +-
 rpm.changes     | 6 ++++++
 rpm.spec        | 9 ++++++---
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/findksyms.diff b/findksyms.diff
index b804b3b..f8554e5 100644
--- a/findksyms.diff
+++ b/findksyms.diff
@@ -4,7 +4,7 @@ Index: scripts/find-provides.ksyms
 ===================================================================
 --- /dev/null
 +++ scripts/find-provides.ksyms
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,23 @@
 +#! /bin/sh
 +
 +IFS=$'\n'
@@ -21,8 +21,11 @@ Index: scripts/find-provides.ksyms
 +fi
 +
 +for module in $(grep -E '/lib/modules/.+\.ko$'); do
++    flavor=$(/sbin/modinfo -F vermagic "$module")
++    flavor=${flavor%% *}
++    flavor=${flavor##*-}
 +    nm "$module" \
-+    | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):ksym(\2) = \1:p'
++    | sed -r -ne "s:^0*([0-9a-f]+) A __crc_(.+):ksym($flavor:\\2) = \\1:p"
 +done \
 +| sort -u
 Index: scripts/find-requires.ksyms
diff --git a/rpm-python.spec b/rpm-python.spec
index 41101c2..5557180 100644
--- a/rpm-python.spec
+++ b/rpm-python.spec
@@ -24,7 +24,7 @@ License:        GPL v2 or later
 Group:          System/Packages
 Summary:        Python Bindings for Manipulating RPM Packages
 Version:        4.4.2.3
-Release:        11
+Release:        12
 Requires:       rpm = %{version}
 %py_requires
 Source99:       rpm.spec
diff --git a/rpm.changes b/rpm.changes
index ea0f55c..7888b5b 100644
--- a/rpm.changes
+++ b/rpm.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Nov 13 18:16:14 CET 2008 - agruen@suse.de
+
+- Fix the ksym(...) provides to also include the kernel flavor
+  (bnc#444698).
+
 -------------------------------------------------------------------
 Fri Nov  7 15:03:25 CET 2008 - ro@suse.de
 
diff --git a/rpm.spec b/rpm.spec
index bcd6090..5236bde 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -27,7 +27,7 @@ PreReq:         %insserv_prereq %fillup_prereq permissions
 AutoReqProv:    on
 Summary:        The RPM Package Manager
 Version:        4.4.2.3
-Release:        11
+Release:        12
 Source:         rpm-%{version}.tar.bz2
 Source1:        RPM-HOWTO.tar.bz2
 Source2:        RPM-Tips.html.tar.bz2
@@ -324,7 +324,7 @@ Summary:        A C library for parsing command line parameters
 License:        LGPL v2.1 or later
 Group:          System/Libraries
 Version:        1.7
-Release:        459
+Release:        460
 #
 
 %description -n popt
@@ -347,7 +347,7 @@ Summary:        C Library for Parsing Command Line Parameters
 License:        LGPL v2.1 or later
 Group:          System/Libraries
 Version:        1.7
-Release:        459
+Release:        460
 Requires:       popt = 1.7
 Requires:       glibc-devel
 
@@ -382,6 +382,9 @@ Authors:
 %doc	%{_mandir}/man3/popt.3*
 
 %changelog
+* Thu Nov 13 2008 agruen@suse.de
+- Fix the ksym(...) provides to also include the kernel flavor
+  (bnc#444698).
 * Fri Nov 07 2008 ro@suse.de
 - update gcc flags to current set
 * Fri Oct 31 2008 coolo@suse.de