Hello community, here is the log from the commit of package rpm checked in at Wed Nov 15 16:38:40 CET 2006. -------- --- rpm/rpm.changes 2006-10-20 17:56:09.000000000 +0200 +++ /mounts/work_src_done/STABLE/rpm/rpm.changes 2006-11-14 16:56:12.000000000 +0100 @@ -1,0 +2,17 @@ +Tue Nov 14 16:51:26 CET 2006 - agruen@suse.de + +- Add %supplements_kernel_module macro for use in firmware and + similar packages which are related to modules in a + kernel-$flavor package: RPM then extracts the modaliases from + the specified module(s) and adds them as Supplements: + modalias(...) tags, so that the package magaer will add + such packages automatically when the respective hardware is + present. + +------------------------------------------------------------------- +Wed Nov 8 15:29:47 CET 2006 - agruen@suse.de + +- Move the Kernel Module specific macros into the kernel-source + package. + +------------------------------------------------------------------- Old: ---- rpm-suse-kernel-module-subpackage New: ---- modalias-kernel_module.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpm-python.spec ++++++ --- /var/tmp/diff_new_pack.CxxH4i/_old 2006-11-15 16:37:57.000000000 +0100 +++ /var/tmp/diff_new_pack.CxxH4i/_new 2006-11-15 16:37:57.000000000 +0100 @@ -12,11 +12,11 @@ Name: rpm-python BuildRequires: python-devel -License: Other License(s), see package +License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 63 +Release: 71 Requires: rpm = %{version} %py_requires ++++++ rpm.spec ++++++ --- /var/tmp/diff_new_pack.CxxH4i/_old 2006-11-15 16:37:57.000000000 +0100 +++ /var/tmp/diff_new_pack.CxxH4i/_new 2006-11-15 16:37:57.000000000 +0100 @@ -11,7 +11,7 @@ # norootforbuild Name: rpm -License: GNU General Public License (GPL) - all versions +License: GNU General Public License (GPL) Group: System/Packages Provides: rpminst Requires: build-key @@ -20,7 +20,7 @@ Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 65 +Release: 71 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -32,7 +32,6 @@ Source9: sysconfig.services-rpm Source10: elfutils-0.97.tar.bz2 Source11: beecrypt-4.1.2.tar.bz2 -Source13: rpm-suse-kernel-module-subpackage Patch1: elfutils-0.97.diff Patch2: beecrypt-4.1.2.diff Patch3: db.diff @@ -115,6 +114,7 @@ Patch85: rpmqpack.diff Patch86: convertdb1static.diff Patch87: build.diff +Patch88: modalias-kernel_module.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -136,7 +136,7 @@ %package devel Summary: Include Files and Libraries mandatory for Development. -License: Other License(s), see package +License: GNU General Public License (GPL) Group: System/Packages Requires: rpm = %{version} Requires: popt-devel @@ -183,7 +183,7 @@ %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 +%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -247,7 +247,6 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm -cp -a %{SOURCE13} $RPM_BUILD_ROOT/usr/lib/rpm rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc mkdir -p $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm @@ -310,7 +309,7 @@ License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package Group: System/Libraries Version: 1.7 -Release: 293 +Release: 299 # %description -n popt @@ -330,10 +329,10 @@ %package -n popt-devel Summary: C Library for Parsing Command Line Parameters -License: Other License(s), see package +License: GNU Library General Public License v. 2.0 and 2.1 (LGPL), Other License(s), see package Group: System/Libraries Version: 1.7 -Release: 293 +Release: 299 Requires: popt = 1.7 Requires: glibc-devel @@ -371,6 +370,17 @@ %doc %{_mandir}/man3/popt.3* %changelog -n rpm +* Tue Nov 14 2006 - agruen@suse.de +- Add %%supplements_kernel_module macro for use in firmware and + similar packages which are related to modules in a + kernel-$flavor package: RPM then extracts the modaliases from + the specified module(s) and adds them as Supplements: + modalias(...) tags, so that the package magaer will add + such packages automatically when the respective hardware is + present. +* Wed Nov 08 2006 - agruen@suse.de +- Move the Kernel Module specific macros into the kernel-source + package. * Fri Oct 20 2006 - agruen@suse.de - Support the distribution-independent macros %%kernel_module_package_buildreq, %%kernel_module_package, and ++++++ modalias-kernel_module.diff ++++++ Index: scripts/find-supplements.ksyms =================================================================== --- scripts/find-supplements.ksyms +++ scripts/find-supplements.ksyms @@ -1,5 +1,6 @@ #! /bin/sh +RPM_SOURCE_DIR=/usr/src/packages/SOURCES IFS=$'\n' case "$1" in @@ -46,11 +47,43 @@ combine_modaliases() { print_modaliases "$class" "$variants" "$pos" } -for module in $(grep -E '/lib/modules/.+\.ko$'); do - vermagic=$(/sbin/modinfo -F vermagic "$module") - krel=${vermagic%% *} - /sbin/modinfo -F alias "$module" \ - | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" -done \ +aliases_of_filelist() { + for module in $(grep -E '/lib/modules/.+\.ko$'); do + vermagic=$(/sbin/modinfo -F vermagic "$module") + krel=${vermagic%% *} + /sbin/modinfo -F alias "$module" \ + | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p" + done +} + +aliases_of_specfile_macro() { + declare regex + + regex=$( + set -o noglob + set -- $(sed -ne 's:^%supplements_kernel_module[ \t]::p' \ + $RPM_SOURCE_DIR/$1.spec) + while [ $# -ge 1 ]; do + regex=$(echo "$1" \ + | sed -e 's:[.]:\\.:g' \ + -e 's:?:.:g' \ + -e 's:\*:.*:g' \ + -e 's:\\:\\\\:g') + echo -n "^$regex\$" + [ $# -ge 2 ] && echo -n "|" + shift + done + ) + + if [ -n "$regex" ]; then + awk ' + $1 == "alias" && $3 ~ regex { print $2 } + ' regex="$regex" /lib/modules/*/modules.alias + fi +} + +( aliases_of_filelist + aliases_of_specfile_macro "$1" +) \ | sort -u \ | combine_modaliases ++++++ rpm-suse_macros ++++++ --- rpm/rpm-suse_macros 2006-10-20 17:57:22.000000000 +0200 +++ /mounts/work_src_done/STABLE/rpm/rpm-suse_macros 2006-11-14 16:45:02.000000000 +0100 @@ -445,48 +445,6 @@ fi ; \ fi ; -# Defines %flavors_to_build and %kernel_source() as a side effect. -%_kernel_module_package(n:v:r:s:f:Xp:) \ -%{expand:%( \ - subpkg=%{-s*}%{!-s:/usr/lib/rpm/rpm-suse-kernel-module-subpackage} \ - echo "%%define _suse_kernel_module_subpackage(n:v:r:f:p:) %%{expand:%%(cd %_sourcedir; cat $subpkg; echo %%%%nil)}" \ - flavors="%{!-X:%*}%{-X:$(ls /usr/src/linux-obj/%_target_cpu 2>/dev/null)}" \ - flavors_to_build= \ - kver=$(rpm -q --qf '%{VERSION}-%{RELEASE}' kernel-source) \ - for flavor in $flavors; do \ - if [ -n "%{-X}" ]; then \ - case " %* " in \ - (*" $flavor "*) \ - continue ;; \ - esac \ - fi \ - krel=$(make -s -C /usr/src/linux-obj/%_target_cpu/$flavor kernelrelease) \ - [ -e /boot/symsets-$krel.tar.gz ] || continue \ - flavors_to_build="$flavors_to_build $flavor" \ - echo "%%_suse_kernel_module_subpackage -n %{-n*}%{!-n:%name}-kmp -v %{-v*}%{!-v:%version} -r %{-r*}%{!-r:%release} %{-p} $flavor $krel $kver" \ - done \ - echo "%%global flavors_to_build${flavors_to_build:-%%nil}" \ - echo "%%global kernel_source() /usr/src/linux-obj/%_target_cpu/%%%%{1}" \ - \ - echo "%package -n %{-n*}%{!-n:%name}-kmp-_dummy_" \ - echo "Version: %version" \ - echo "Summary: %summary" \ - echo "Group: %group" \ - echo "%description -n %{-n*}%{!-n:%name}-kmp-_dummy_" \ - )} - -# kernel_module_package: simply pass on all options and arguments. -%kernel_module_package(n:v:r:s:f:xp:) \ - %{expand:%%_kernel_module_package %{-x:-X} %{-n} %{-v} %{-r} %{-s} %{-f} %{-p} %*} - -%kernel_module_package_buildreq kernel-source kernel-syms - -# suse_kernel_module_package: invert the meaning of the -x flag. (You are not -# supposed to understand why a simple %{-x:}%{!-x:-x} won't work.) -%suse_kernel_module_package(n:v:r:s:f:xp:) \ - %{expand:%%_kernel_module_package %{-x: }%{!-x:-X} %{-n} %{-v} %{-r} %{-s} %{-f} %{-p} %*} - - %suse_version 901 %sles_version 0 %ul_version 0 @@ -496,3 +454,6 @@ %cflags_profile_generate -fprofile-arcs %cflags_profile_feedback -fbranch-probabilities +# find-supplements.ksyms parses this macro directly out of the spec file: +%supplements_kernel_module() \ + %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org