Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 717414 Details for
Bug 928599
DUP patch for redhat-rpm-config on rhel7
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
DUP patch for redhat-rpm-config on rhel7
rhel7-redhat-rpm-config-v2.patch (text/plain), 24.06 KB, created by
Weiping Pan
on 2013-03-28 02:59:47 UTC
(
hide
)
Description:
DUP patch for redhat-rpm-config on rhel7
Filename:
MIME Type:
Creator:
Weiping Pan
Created:
2013-03-28 02:59:47 UTC
Size:
24.06 KB
patch
obsolete
>diff -Nuar redhat-rpm-config/redhat-rpm-config-9.1.0-kmod-brew-build.patch redhat-rpm-config_new2/redhat-rpm-config-9.1.0-kmod-brew-build.patch >--- redhat-rpm-config/redhat-rpm-config-9.1.0-kmod-brew-build.patch 1970-01-01 08:00:00.000000000 +0800 >+++ redhat-rpm-config_new2/redhat-rpm-config-9.1.0-kmod-brew-build.patch 2013-03-22 10:57:31.010063602 +0800 >@@ -0,0 +1,99 @@ >+From: Jiri Benc <jbenc@redhat.com> >+Subject: Build correctly with z-stream kernels >+ >+In brew, there's usually a newer kernel installed than the one used for >+installation. Handle this situation correctly by allowing the spec file to >+define kernel_version to be used in rpm dependencies, while building against >+a compatible newer (z-stream) kernel. >+ >+Signed-off-by: Jiri Benc <jbenc@redhat.com> >+ >+--- >+ kmodtool | 31 ++++++++++++++++++++++++++++--- >+ macros | 2 +- >+ 2 files changed, 29 insertions(+), 4 deletions(-) >+ >+--- a/kmodtool >++++ b/kmodtool >+@@ -9,6 +9,7 @@ >+ # Copyright (c) 2003-2010 Ville Skyttä <ville.skytta@iki.fi>, >+ # Thorsten Leemhuis <fedora@leemhuis.info> >+ # Jon Masters <jcm@redhat.com> >++# Copyright (c) 2012-2013 Jiri Benc <jbenc@redhat.com> >+ # >+ # Permission is hereby granted, free of charge, to any person obtaining >+ # a copy of this software and associated documentation files (the >+@@ -49,9 +50,25 @@ kver= >+ verrel= >+ variant= >+ >++get_kernel_release () >++{ >++ if [[ -z $1 ]]; then >++ uname -r >++ return >++ fi >++ local arch=$(arch) >++ local verrel=${1%.$arch} >++ local verprefix=${verrel%.*} >++ local versuffix=${verrel#$verprefix} >++ verrel=$(ls -Ud /usr/src/kernels/$verprefix*$versuffix.$arch | sort -V | tail -n 1) >++ verrel=${verrel##*/} >++ [[ -z $verrel ]] && verrel=$1.$arch >++ echo "$verrel" >++} >++ >+ get_verrel () >+ { >+- verrel=${1:-$(uname -r)} >++ verrel=$(get_kernel_release "$1") >+ verrel=${verrel/%.$knownvariants/} >+ } >+ >+@@ -61,10 +78,16 @@ print_verrel () >+ echo "${verrel}" >+ } >+ >++get_verrel_for_deps () >++{ >++ verrel_dep=${1:-$(uname -r)} >++ verrel_dep=${verrel_dep/%.$knownvariants/} >++} >++ >+ get_variant () >+ { >+ get_verrel $@ >+- variant=${1:-$(uname -r)} >++ variant=$(get_kernel_release "$1") >+ variant=${variant/#$verrel?(.)/} >+ variant=${variant:-'""'} >+ } >+@@ -129,7 +152,7 @@ get_rpmtemplate () >+ echo "%global _use_internal_dependency_generator 0" >+ >+ cat <<EOF >+-Provides: kernel-modules >= ${verrel}${dotvariant} >++Provides: kernel-modules >= ${verrel_dep}${dotvariant} >+ Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} >+ Requires(post): /sbin/depmod >+ Requires(postun): /sbin/depmod >+@@ -206,6 +229,8 @@ print_rpmtemplate () >+ shift >+ kver="${1}" >+ get_verrel "${1}" >++ get_verrel_for_deps "${1}" >++ [[ -z $kver ]] && kver=$verrel >+ shift >+ if [ -z "${kmod_name}" ] ; then >+ echo "Please provide the kmodule-name as first parameter." >&2 >+--- a/macros >++++ b/macros >+@@ -218,7 +218,7 @@ package or when debugging this package.\ >+ then \ >+ nobuildreqs="yes" \ >+ fi \ >+- override_filelist="$filelist" override_preamble="$preamble" nobuildreqs="$nobuildreqs" kmod_version=%kmod_version kmod_release=%kmod_release %{kmodtool} rpmtemplate %{-n*}%{!-n:%name} %{kverrel} $flavors_to_build 2>/dev/null \ >++ override_filelist="$filelist" override_preamble="$preamble" nobuildreqs="$nobuildreqs" kmod_version=%kmod_version kmod_release=%kmod_release %{kmodtool} rpmtemplate %{-n*}%{!-n:%name} %{kernel_version} $flavors_to_build 2>/dev/null \ >+ )} >+ >+ #============================================================================== >diff -Nuar redhat-rpm-config/redhat-rpm-config-9.1.0-kmod-kabi.patch redhat-rpm-config_new2/redhat-rpm-config-9.1.0-kmod-kabi.patch >--- redhat-rpm-config/redhat-rpm-config-9.1.0-kmod-kabi.patch 1970-01-01 08:00:00.000000000 +0800 >+++ redhat-rpm-config_new2/redhat-rpm-config-9.1.0-kmod-kabi.patch 2013-03-22 10:57:54.232071172 +0800 >@@ -0,0 +1,509 @@ >+diff -Nuar redhat-rpm-config-9.1.0_old/find-provides.ksyms redhat-rpm-config-9.1.0/find-provides.ksyms >+--- redhat-rpm-config-9.1.0_old/find-provides.ksyms 2013-03-22 10:48:56.344881194 +0800 >++++ redhat-rpm-config-9.1.0/find-provides.ksyms 2013-03-22 10:49:31.727892674 +0800 >+@@ -4,6 +4,7 @@ >+ >+ for module in $(grep -E '/lib/modules/.+\.ko$'); do >+ 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_(.+):0x\1 \2:p' \ >++ | awk --non-decimal-data '{printf("ksym(%s) = 0x%08x\n", $2, $1)}' >+ done \ >+ | sort -u >+diff -Nuar redhat-rpm-config-9.1.0_old/find-requires redhat-rpm-config-9.1.0/find-requires >+--- redhat-rpm-config-9.1.0_old/find-requires 2013-03-22 10:48:56.343881193 +0800 >++++ redhat-rpm-config-9.1.0/find-requires 2013-03-22 10:49:31.727892674 +0800 >+@@ -153,8 +153,7 @@ >+ fi >+ done >+ >+-# Disabling for now while the Fedora kernel doesn't produce kABI deps. >+-#[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] && >+-# printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms >++[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] && >++ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms >+ >+ exit 0 >+diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1.0/find-requires.ksyms >+--- redhat-rpm-config-9.1.0_old/find-requires.ksyms 2013-03-22 10:48:56.343881193 +0800 >++++ redhat-rpm-config-9.1.0/find-requires.ksyms 2013-03-22 10:49:31.728892676 +0800 >+@@ -1,20 +1,41 @@ >+ #! /bin/bash >++# >++# This script is called during external module building to create dependencies >++# both upon the RHEL kernel, and on additional external modules. Symbols that >++# cannot be reconciled against those provided by the kernel are assumed to be >++# provided by an external module and "ksym" replaces th regular "kernel" dep. >+ >+ IFS=$'\n' >+ >++# Extract all of the symbols provided by this module. >+ all_provides() { >+ nm "$@" \ >+- | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):\1\t\2:p' \ >+- | sort -k2 -u >++ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \ >++ | awk --non-decimal-data '{printf("0x%08x\t%s\n", $1, $2)}' \ >++ | LANG=C sort -k2,2 -u >+ } >+ >++# Extract all of the requirements of this module. >+ all_requires() { >+ for module in "$@"; do >+ set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q) >+ /sbin/modprobe --dump-modversions "$module" \ >+- | sed -r -e 's:^0x0*::' -e 's:$:\t'"$1"':' >++ | awk --non-decimal-data ' >++ BEGIN { FS = "\t" ; OFS = "\t" } >++ {printf("0x%08x\t%s\n", $1, $2)}' \ >++ | sed -r -e 's:$:\t'"$1"':' >+ done \ >+- | sort -k2 -u >++ | LANG=C sort -k2,2 -u >++} >++ >++# Filter out requirements fulfilled by the module itself. >++mod_requires() { >++ module=$1 >++ >++ LANG=C join -t $'\t' -j 2 -v 1 \ >++ <(all_requires "$module") \ >++ <(all_provides "$module") \ >++ | LANG=C sort -k1,1 -u >+ } >+ >+ if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then >+@@ -22,27 +43,72 @@ >+ exit 0 >+ fi >+ >++check_kabi() { >++ arch=$(uname -m) >++ kabi_file="/lib/modules/kabi/kabi_whitelist_$arch" >++ >++ # If not installed, output a warning and return (continue) >++ if [ ! -f "$kabi_file" ]; then >++ echo "" >&2 >++ echo "********************************************************************************" >&2 >++ echo "*********************** KERNEL ABI COMPATIBILITY WARNING ***********************" >&2 >++ echo "********************************************************************************" >&2 >++ echo "The kernel ABI reference files (provided by "kabi-whitelists") were not found." >&2 >++ echo "No compatibility check was performed. Please install the kABI reference files" >&2 >++ echo "and rebuild if you would like to verify compatibility with kernel ABI." >&2 >++ echo "" >&2 >++ return >++ fi >++ >++ unset non_kabi >++ for symbol in "$@"; do >++ if ! egrep "^[[:space:]]$symbol\$" $kabi_file >/dev/null; then >++ non_kabi=("${non_kabi[@]}" "$symbol") >++ fi >++ done >++ >++ if [ ${#non_kabi[@]} -gt 0 ]; then >++ echo "" >&2 >++ echo "********************************************************************************" >&2 >++ echo "*********************** KERNEL ABI COMPATIBILITY WARNING ***********************" >&2 >++ echo "********************************************************************************" >&2 >++ echo "The following kernel symbols are not guaranteed to remain compatible with" >&2 >++ echo "future kernel updates to this RHEL release:" >&2 >++ echo "" >&2 >++ for symbol in "${non_kabi[@]}"; do >++ printf "\t$symbol\n" >&2 >++ done >++ echo "" >&2 >++ echo "Red Hat recommends that you consider using only official kernel ABI symbols" >&2 >++ echo "where possible. Requests for additions to the kernel ABI can be filed with" >&2 >++ echo "your partner or customer representative (component: driver-update-program)." >&2 >++ echo "" >&2 >++ fi >++} >++ >+ modules=($(grep -E '/lib/modules/.+\.ko$')) >+ if [ ${#modules[@]} -gt 0 ]; then >+- symset_table=$(mktemp -t ${0##*/}.XXXXX) >+- /usr/lib/rpm/redhat/symset-table | sort > $symset_table >++ kernel=$(/sbin/modinfo -F vermagic "${modules[0]}" | sed -e 's: .*::' -e q) >++ symvers=$(mktemp -t ${0##*/}.XXXXX) >+ >+- join -t $'\t' -j 1 -a 2 $symset_table <( >+- # Filter out requirements that we fulfill ourself. >+- join -t $'\t' -j 2 -v 1 \ >+- <(all_requires "${modules[@]}") \ >+- <(all_provides "${modules[@]}") \ >+- | awk ' >++ cat /usr/src/kernels/$kernel/Module.symvers | awk ' >+ BEGIN { FS = "\t" ; OFS = "\t" } >+- { print $3 "/" $2 "/" $1 } >+- ' \ >+- | sort -u) \ >+- | sort -u \ >+- | awk ' >+- { FS = "\t" ; OFS = "\t" } >+- NF == 3 { print "kernel(" $2 ") = " $3 >+- next } >+- { split($1, arr, "/") >+- print "ksym(" arr[3] ") = " arr[2] } >+- ' >++ { print $2 "\t" $1 } >++ ' \ >++ | sed -r -e 's:$:\t'"$kernel"':' \ >++ | LANG=C sort -k1,1 -u > $symvers >++ >++ # Symbols matching with the kernel get a "kernel" dependency >++ LANG=C join -t '\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \ >++ | awk '{ FS = "\t" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }' >++ >++ # Symbols from elsewhere get a "ksym" dependency >++ LANG=C join -t '\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \ >++ | awk '{ FS = "\t" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }' >++ >++ # Check kABI if the kabi-whitelists package is installed >++ # Do this last so we can try to output this error at the end >++ kabi_check_symbols=($(LANG=C join -t '\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \ >++ | awk '{ FS = "\t" ; OFS = "\t" } { print $1 }')) >++ check_kabi "${kabi_check_symbols[@]}" >+ fi >+diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool >+--- redhat-rpm-config-9.1.0_old/kmodtool 2013-03-22 10:48:56.344881194 +0800 >++++ redhat-rpm-config-9.1.0/kmodtool 2013-03-22 10:49:58.453903908 +0800 >+@@ -1,7 +1,12 @@ >+ #!/bin/bash >+ >+ # kmodtool - Helper script for building kernel module RPMs >+-# Copyright (c) 2003-2006 Ville Skyttä <ville.skytta@iki.fi>, >++# An original version appeared in Fedora. This version is >++# generally called only by the %kernel_module_package RPM macro >++# during the process of building Driver Update Packages (which >++# are also known as "kmods" in the Fedora community). >++# >++# Copyright (c) 2003-2010 Ville Skyttä <ville.skytta@iki.fi>, >+ # Thorsten Leemhuis <fedora@leemhuis.info> >+ # Jon Masters <jcm@redhat.com> >+ # >+@@ -24,21 +29,30 @@ >+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION >+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. >+ >++# Changelog: >++# >++# 2010/07/28 - Add fixes for filelists in line with LF standard >++# - Remove now defunct "framepointer" kernel variant >++# - Change version to "rhel6-rh2" as a consequence. >++# >++# 2010/01/10 - Simplified for RHEL6. We are working on upstream >++# moving to a newer format and in any case do not >++# need to retain support for really old systems. >++ >+ shopt -s extglob >+ >+ myprog="kmodtool" >+ myver="0.10.10_kmp2" >+-knownvariants=@(BOOT|PAE|@(big|huge)mem|debug|enterprise|kdump|?(large)smp|uml|xen[0U]?(-PAE)|xen) >++knownvariants=@(debug|kdump) >+ kmod_name= >+ kver= >+ verrel= >+ variant= >+-kmp= >+ >+ get_verrel () >+ { >+ verrel=${1:-$(uname -r)} >+- verrel=${verrel%%$knownvariants} >++ verrel=${verrel/%.$knownvariants/} >+ } >+ >+ print_verrel () >+@@ -51,7 +65,7 @@ >+ { >+ get_verrel $@ >+ variant=${1:-$(uname -r)} >+- variant=${variant##$verrel} >++ variant=${variant/#$verrel?(.)/} >+ variant=${variant:-'""'} >+ } >+ >+@@ -61,117 +75,128 @@ >+ echo "${variant}" >+ } >+ >++get_filelist() { >++ local IFS=$'\n' >++ filelist=($(cat)) >++ >++ if [ ${#filelist[@]} -gt 0 ]; >++ then >++ for ((n = 0; n < ${#filelist[@]}; n++)); >++ do >++ line="${filelist[n]}" >++ line=$(echo "$line" \ >++ | sed -e "s/%verrel/$verrel/g" \ >++ | sed -e "s/%variant/$variant/g" \ >++ | sed -e "s/%dashvariant/$dashvariant/g" \ >++ | sed -e "s/%dotvariant/$dotvariant/g" \ >++ | sed -e "s/\.%1/$dotvariant/g" \ >++ | sed -e "s/\-%1/$dotvariant/g" \ >++ | sed -e "s/%2/$verrel/g") >++ echo "$line" >++ done >++ else >++ echo "%defattr(644,root,root,755)" >++ echo "/lib/modules/${verrel}${dotvariant}" >++ fi >++} >++ >++ >+ get_rpmtemplate () >+ { >+ local variant="${1}" >+ local dashvariant="${variant:+-${variant}}" >+- case "$verrel" in >+- *.el*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;; >+- *.EL*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;; >+- *) kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;; >+- esac >++ local dotvariant="${variant:+.${variant}}" >+ >+ echo "%package -n kmod-${kmod_name}${dashvariant}" >+ >+- if [ -z "$kmp_provides_summary" ]; then >++ if [ -z "$kmod_provides_summary" ]; then >+ echo "Summary: ${kmod_name} kernel module(s)" >+ fi >+ >+- if [ -z "$kmp_provides_group" ]; then >++ if [ -z "$kmod_provides_group" ]; then >+ echo "Group: System Environment/Kernel" >+ fi >+ >+- if [ ! -z "$kmp_version" ]; then >+- echo "Version: %{kmp_version}" >++ if [ ! -z "$kmod_version" ]; then >++ echo "Version: %{kmod_version}" >+ fi >+ >+- if [ ! -z "$kmp_release" ]; then >+- echo "Release: %{kmp_release}" >++ if [ ! -z "$kmod_release" ]; then >++ echo "Release: %{kmod_release}" >+ fi >+ >+- if [ ! -z "$kmp" ]; then >+- echo "%global _use_internal_dependency_generator 0" >+- fi >+- >+- cat <<EOF >+-Provides: kernel-modules = ${verrel}${variant} >+-Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} >+-EOF >+- >+- if [ -z "$kmp" ]; then >+- echo "Requires: ${kdep}" >+- fi >+- >+-# >+-# RHEL5 - Remove common package requirement on general kmod packages. >+-# Requires: ${kmod_name}-kmod-common >= %{?epoch:%{epoch}:}%{version} >+-# >++ # Turn of the internal dep generator so we will use the kmod scripts. >++ echo "%global _use_internal_dependency_generator 0" >+ >+ cat <<EOF >++Provides: kernel-modules >= ${verrel}${dotvariant} >++Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} >+ Requires(post): /sbin/depmod >+ Requires(postun): /sbin/depmod >+ EOF >+ >+-if [ "no" != "$kmp_nobuildreqs" ] >+-then >+- echo "BuildRequires: kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}" >+-fi >++ if [ "yes" != "$nobuildreqs" ] >++ then >++ echo "BuildRequires: kernel${dashvariant}-devel" >++ fi >+ >+-if [ "" != "$kmp_override_preamble" ] >+-then >+- cat "$kmp_override_preamble" >+-fi >++ if [ "" != "$override_preamble" ] >++ then >++ cat "$override_preamble" >++ fi >+ >+ cat <<EOF >+ %description -n kmod-${kmod_name}${dashvariant} >+-This package provides the ${kmod_name} kernel modules built for the Linux >+-kernel ${verrel}${variant} for the %{_target_cpu} family of processors. >++This package provides the ${kmod_name} kernel modules built for >++the Linux kernel ${verrel}${dotvariant} for the %{_target_cpu} >++family of processors. >++EOF >++ >++############################################################################## >++## The following are not part of this script directly, they are scripts ## >++## that will be executed by RPM during various stages of package processing ## >++############################################################################## >++ >++cat <<EOF >+ %post -n kmod-${kmod_name}${dashvariant} >+-if [ -e "/boot/System.map-${verrel}${variant}" ]; then >+- /sbin/depmod -aeF "/boot/System.map-${verrel}${variant}" "${verrel}${variant}" > /dev/null || : >++if [ -e "/boot/System.map-${verrel}${dotvariant}" ]; then >++ /sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || : >+ fi >+-EOF >+- >+- if [ ! -z "$kmp" ]; then >+- cat <<EOF >+ >+-modules=( \$(find /lib/modules/${verrel}${variant}/extra/${kmod_name}) ) >++modules=( \$(find /lib/modules/${verrel}${dotvariant}/extra/${kmod_name} | grep '\.ko$') ) >+ if [ -x "/sbin/weak-modules" ]; then >+ printf '%s\n' "\${modules[@]}" \ >+ | /sbin/weak-modules --add-modules >+ fi >++EOF >++ >++cat <<EOF >+ %preun -n kmod-${kmod_name}${dashvariant} >+-rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$' \ >+- > /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules >++rpm -ql kmod-${kmod_name}${dashvariant}-%{kmod_version}-%{kmod_release}.$(arch) | grep '\.ko$' > /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules >+ EOF >+ >+- fi >+- >+- cat <<EOF >++cat <<EOF >+ %postun -n kmod-${kmod_name}${dashvariant} >+-/sbin/depmod -aF /boot/System.map-${verrel}${variant} ${verrel}${variant} &> /dev/null || : >+-EOF >+- >+- if [ ! -z "$kmp" ]; then >+- cat <<EOF >++if [ -e "/boot/System.map-${verrel}${dotvariant}" ]; then >++ /sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || : >++fi >++ >+ modules=( \$(cat /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules) ) >+-#rm /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules >++rm /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules >+ if [ -x "/sbin/weak-modules" ]; then >+ printf '%s\n' "\${modules[@]}" \ >+ | /sbin/weak-modules --remove-modules >+ fi >+ EOF >+- fi >+ >+ echo "%files -n kmod-${kmod_name}${dashvariant}" >+ >+-if [ "" == "$kmp_override_filelist" ]; >++if [ "" == "$override_filelist" ]; >+ then >+ echo "%defattr(644,root,root,755)" >+- echo "/lib/modules/${verrel}${variant}/" >+- echo "/lib/firmware/" >++ echo "/lib/modules/${verrel}${dotvariant}" >+ else >+- cat "$kmp_override_filelist" >++ cat "$override_filelist" | get_filelist >+ fi >+ } >+ >+@@ -216,8 +241,6 @@ >+ - Get variant from uname. >+ rpmtemplate <mainpgkname> <uname> <variants> >+ - Return a template for use in a source RPM >+- rpmtemplate_kmp <mainpgkname> <uname> <variants> >+- - Return a template for use in a source RPM with KMP dependencies >+ version >+ - Output version number and exit. >+ EOF >+@@ -241,12 +264,6 @@ >+ print_rpmtemplate "$@" >+ exit $? >+ ;; >+- rpmtemplate_kmp) >+- shift >+- kmp=1 >+- print_rpmtemplate "$@" >+- exit $? >+- ;; >+ version) >+ echo "${myprog} ${myver}" >+ exit 0 >+diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros >+--- redhat-rpm-config-9.1.0_old/macros 2013-03-22 10:48:56.344881194 +0800 >++++ redhat-rpm-config-9.1.0/macros 2013-03-22 10:49:31.730892680 +0800 >+@@ -175,8 +175,8 @@ >+ %__global_ldflags -Wl,-z,relro %{_hardened_ldflags} >+ >+ # Use these macros to differentiate between RH and other KMP implementation(s). >+-redhat_kernel_module_package 1 >+-kernel_module_package_release 1 >++%global redhat_kernel_module_package 1 >++%global kernel_module_package_release 1 >+ >+ #kernel_module_package [ -n name ] [ -v version ] [ -r release ] [ -s script ] >+ # [ -f filelist] [ -x ] [ -p preamble ] flavor flavor ... >+@@ -185,40 +185,27 @@ >+ kernel-devel >+ >+ %kernel_module_package(n:v:r:s:f:xp:) %{expand:%( \ >+- %define kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \ >+- %define kmp_version %{-v*}%{!-v:%{version}} \ >+- %define kmp_release %{-r*}%{!-r:%{release}} \ >+- %define latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}\\\\n' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) \ >++ %global kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \ >++ %global kmod_version %{-v*}%{!-v:%{version}} \ >++ %global kmod_release %{-r*}%{!-r:%{release}} \ >++ %global latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\\\n' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) \ >+ %{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}} \ >+ %global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null) \ >+ flavors="default" \ >+- if [ "i686" == "%{_target_cpu}" ] || [ "x86_64" == "%{_target_cpu}" ] \ >+- then \ >+- xenver=$(rpm -q kernel-xen-devel-%{kverrel}|head -n 1)\ >+- kdver=$(rpm -q kernel-kdump-devel-%{kverrel}|head -n 1)\ >+- if [ "kernel-xen-devel-%{kverrel}" == "$xenver" ] \ >+- then \ >+- flavors="$flavors xen" \ >+- fi \ >+- if [ "kernel-kdump-devel-%{kverrel}" == "$kdver" ] \ >+- then \ >+- flavors="$flavors kdump" \ >+- fi \ >+- fi \ >+ if [ -z "%*" ]; then \ >+ flavors_to_build=$flavors \ >+ elif [ -z "%{-x}" ]; then \ >+ flavors_to_build="%*" \ >+ else \ >+ flavors_to_build=" $flavors "\ >+- echo "[$flavors_to_build]" >/tmp/tmp.txt >+ for i in %* \ >+ do \ >+ flavors_to_build=${flavors_to_build//$i /} >+ done \ >+ fi \ >+ echo "%%global flavors_to_build ${flavors_to_build:-%%nil}" \ >+- echo "%%global kernel_source() /usr/src/kernels/%kverrel-\\\$([ %%%%{1} = default ] || echo "%%%%{1}.")%_target_cpu" \ >++ echo "%%global kernel_source() /usr/src/kernels/%kverrel\\\$([ %%%%{1} = default ] || echo ".%%%%{1}")" \ >++ echo "%%global kernel_module_package_moddir() extra" \ >+ if [ ! -z "%{-f*}" ] \ >+ then \ >+ filelist="%{-f*}" \ >+@@ -231,7 +218,7 @@ >+ then \ >+ nobuildreqs="yes" \ >+ fi \ >+- kmp_override_filelist="$filelist" kmp_override_preamble="$preamble" kmp_nobuildreqs="$buildreqs" %{kmodtool} rpmtemplate_kmp %{-n*}%{!-n:%name} %{kverrel} $flavors_to_build 2>/dev/null \ >++ override_filelist="$filelist" override_preamble="$preamble" nobuildreqs="$nobuildreqs" kmod_version=%kmod_version kmod_release=%kmod_release %{kmodtool} rpmtemplate %{-n*}%{!-n:%name} %{kverrel} $flavors_to_build 2>/dev/null \ >+ )} >+ >+ #============================================================================== >diff -Nuar redhat-rpm-config/redhat-rpm-config.spec redhat-rpm-config_new2/redhat-rpm-config.spec >--- redhat-rpm-config/redhat-rpm-config.spec 2013-03-21 17:41:55.210364042 +0800 >+++ redhat-rpm-config_new2/redhat-rpm-config.spec 2013-03-22 10:58:19.144079482 +0800 >@@ -1,7 +1,7 @@ > Summary: Red Hat specific rpm configuration files > Name: redhat-rpm-config > Version: 9.1.0 >-Release: 39%{?dist} >+Release: 40%{?dist} > # No version specified. > License: GPL+ > Group: Development/System >@@ -45,6 +45,8 @@ > Patch16: redhat-rpm-config-9.1.0-filtering-spaces-in-filename.patch > # https://bugzilla.redhat.com/show_bug.cgi?id=872737 > Patch17: redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch >+Patch18: redhat-rpm-config-9.1.0-kmod-kabi.patch >+Patch19: redhat-rpm-config-9.1.0-kmod-brew-build.patch > BuildArch: noarch > Requires: coreutils > Requires: perl-srpm-macros >@@ -76,6 +78,8 @@ > %patch15 -p1 > %patch16 -p1 > %patch17 -p1 >+%patch18 -p1 >+%patch19 -p1 > > %build > >@@ -97,6 +101,10 @@ > %{_sysconfdir}/rpm/* > > %changelog >+* Thu Mar 20 2013 Weiping Pan <wpan@redhat.com> - 9.1.0-40 >+- "Re-add various kABI-related bits" by Jon Masters >+- Allow kmod building against z-stream kernels form Jiri Benc. >+ > * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.0-39 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 928599
: 717414