diff --git a/SOURCES/redhat-rpm-config-9.1.0-centos.dist.patch b/SOURCES/redhat-rpm-config-9.1.0-centos.dist.patch deleted file mode 100644 index bdb0ee2..0000000 --- a/SOURCES/redhat-rpm-config-9.1.0-centos.dist.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNrp redhat-rpm-config-9.1.0.orig/dist.sh redhat-rpm-config-9.1.0/dist.sh ---- redhat-rpm-config-9.1.0.orig/dist.sh 2010-02-02 03:24:04.000000000 -0600 -+++ redhat-rpm-config-9.1.0/dist.sh 2014-06-19 09:29:04.064790458 -0500 -@@ -25,7 +25,7 @@ function check_rhl { - } - - function check_rhel { -- egrep -q "(Enterprise|Advanced)" $RELEASEFILE && echo $DISTNUM -+ egrep -q "(Enterprise|Advanced|CentOS)" $RELEASEFILE && echo $DISTNUM - } - - function check_fedora { diff --git a/SOURCES/redhat-rpm-config-9.1.0-compressed-kmods-support.patch b/SOURCES/redhat-rpm-config-9.1.0-compressed-kmods-support.patch new file mode 100644 index 0000000..480384e --- /dev/null +++ b/SOURCES/redhat-rpm-config-9.1.0-compressed-kmods-support.patch @@ -0,0 +1,147 @@ +Index: redhat-rpm-config-9.1.0/find-requires +=================================================================== +--- redhat-rpm-config-9.1.0.orig/find-requires 2018-08-24 09:58:45.437193389 +0200 ++++ redhat-rpm-config-9.1.0/find-requires 2018-08-24 09:59:31.902739176 +0200 +@@ -143,7 +143,7 @@ + unset is_kmod + + for f in $filelist; do +- if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ] ++ if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*)\.ko(\.gz|\.bz2|\.xz)?$:\2:p') ] + then + is_kmod=1; + elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] +Index: redhat-rpm-config-9.1.0/find-requires.ksyms +=================================================================== +--- redhat-rpm-config-9.1.0.orig/find-requires.ksyms 2018-08-24 09:55:19.122210171 +0200 ++++ redhat-rpm-config-9.1.0/find-requires.ksyms 2018-08-24 10:01:02.895849695 +0200 +@@ -9,24 +9,49 @@ + + # Extract all of the symbols provided by this module. + all_provides() { +- if [[ -n $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then +- nm "$@" \ +- | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \ +- | awk --non-decimal-data '{printf("%s:0x%08x\n", $2, $1)}' \ +- | LC_ALL=C sort -k1,1 -u +- else +- ELFRODATA=$(readelf -R .rodata "$@" | awk '/0x/{printf $2$3$4$5}') +- if [[ -n $(readelf -h "$@" | grep "little endian") ]]; then +- RODATA=$(echo $ELFRODATA | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/g') ++ for module in "$@"; do ++ tmpfile="" ++ if [ "x${module%.ko}" = "x${module}" ]; then ++ tmpfile=$(mktemp -t ${0##*/}.XXXXXX.ko) ++ proc_bin= ++ case "${module##*.}" in ++ xz) ++ proc_bin=xz ++ ;; ++ bz2) ++ proc_bin=bzip2 ++ ;; ++ gz) ++ proc_bin=gzip ++ ;; ++ esac ++ ++ [ -n "$proc_bin" ] || continue ++ ++ "$proc_bin" -d -c - < "$module" > "$tmpfile" ++ module="$tmpfile" ++ fi ++ ++ if [[ -n $(nm "$module" | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then ++ nm "$module" \ ++ | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \ ++ | awk --non-decimal-data '{printf("%s:0x%08x\n", $2, $1)}' + else +- RODATA=$ELFRODATA ++ ELFRODATA=$(readelf -R .rodata "$module" | awk '/0x/{printf $2$3$4$5}') ++ if [[ -n $(readelf -h "$module" | grep "little endian") ]]; then ++ RODATA=$(echo $ELFRODATA | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/g') ++ else ++ RODATA=$ELFRODATA ++ fi ++ for sym in $(nm "$module" | sed -r -ne 's:^0*([0-9a-f]+) R __crc_(.+):0x\1 \2:p'); do ++ echo $sym $RODATA ++ done \ ++ | awk --non-decimal-data '{printf("%s:0x%08s\n", $2, substr($3,($1*2)+1,8))}' + fi +- for sym in $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) R __crc_(.+):0x\1 \2:p'); do +- echo $sym $RODATA +- done \ +- | awk --non-decimal-data '{printf("%s:0x%08s\n", $2, substr($3,($1*2)+1,8))}' \ +- | LC_ALL=C sort -k1,1 -u +- fi ++ ++ [ -z "$tmpfile" ] || rm -f -- "$tmpfile" ++ done \ ++ | LC_ALL=C sort -k1,1 -u + } + + # Extract all of the requirements of this module. +@@ -100,7 +125,7 @@ + fi + } + +-modules=($(grep -E '/lib/modules/.+\.ko$')) ++modules=($(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz)?$')) + if [ ${#modules[@]} -gt 0 ]; then + kernel=$(/sbin/modinfo -F vermagic "${modules[0]}" | sed -e 's: .*::' -e q) + +Index: redhat-rpm-config-9.1.0/find-provides +=================================================================== +--- redhat-rpm-config-9.1.0.orig/find-provides 2010-02-02 10:24:04.000000000 +0100 ++++ redhat-rpm-config-9.1.0/find-provides 2018-08-24 10:02:26.666030820 +0200 +@@ -92,7 +92,7 @@ + + is_kmod=1 + for f in $filelist; do +- if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ] ++ if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*)\.ko(\.gz|\.bz2|\.xz)?$:\2:p') ] + then + is_kernel=1; + fi +Index: redhat-rpm-config-9.1.0/find-provides.ksyms +=================================================================== +--- redhat-rpm-config-9.1.0.orig/find-provides.ksyms 2018-08-24 09:55:19.065210728 +0200 ++++ redhat-rpm-config-9.1.0/find-provides.ksyms 2018-08-24 10:03:17.727531681 +0200 +@@ -2,7 +2,29 @@ + + IFS=$'\n' + +-for module in $(grep -E '/lib/modules/.+\.ko$'); do ++for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz)?$'); do ++ tmpfile="" ++ if [ "x${module%.ko}" = "x${module}" ]; then ++ tmpfile=$(mktemp -t ${0##*/}.XXXXXX.ko) ++ proc_bin= ++ case "${module##*.}" in ++ xz) ++ proc_bin=xz ++ ;; ++ bz2) ++ proc_bin=bzip2 ++ ;; ++ gz) ++ proc_bin=gzip ++ ;; ++ esac ++ ++ [ -n "$proc_bin" ] || continue ++ ++ "$proc_bin" -d -c - < "$module" > "$tmpfile" ++ module="$tmpfile" ++ fi ++ + if [[ -n $(nm $module | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then + nm $module \ + | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \ +@@ -21,4 +43,6 @@ + | awk --non-decimal-data '{printf("ksym(%s) = 0x%08s\n", $2, substr($3,($1*2)+1,8))}' \ + | LC_ALL=C sort -u + fi ++ ++ [ -z "$tmpfile" ] || rm -f -- "$tmpfile" + done diff --git a/SOURCES/redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch b/SOURCES/redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch new file mode 100644 index 0000000..18d529e --- /dev/null +++ b/SOURCES/redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch @@ -0,0 +1,11 @@ +--- redhat-rpm-config-9.1.0/brp-java-repack-jars.old 2018-04-23 11:17:21.121577268 +0200 ++++ redhat-rpm-config-9.1.0/brp-java-repack-jars 2018-05-09 12:54:52.018083468 +0200 +@@ -29,7 +29,7 @@ + IFS=$(printf '\n\t') + for j in $JARS ; do + JAROWN=`ls -l $j | cut -d' ' -f3` +- JARGRP=`ls -l $j | cut -d' ' -f4` ++ JARGRP=`stat $j --printf="%G"` + JARNAME=`basename "$j"` + JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.tmpdir.XXXXXXXXXX"` || exit 1 + JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.jardir.XXXXXXXXXX"` || exit 1 diff --git a/SOURCES/redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch b/SOURCES/redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch new file mode 100644 index 0000000..d9c9c55 --- /dev/null +++ b/SOURCES/redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch @@ -0,0 +1,86 @@ +Index: redhat-rpm-config-9.1.0/find-requires.ksyms +=================================================================== +--- redhat-rpm-config-9.1.0.orig/find-requires.ksyms 2018-08-24 09:55:19.094210445 +0200 ++++ redhat-rpm-config-9.1.0/find-requires.ksyms 2018-09-14 12:40:34.744601952 +0200 +@@ -12,8 +12,8 @@ + if [[ -n $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then + nm "$@" \ + | 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)}' \ +- | LC_ALL=C sort -k2,2 -u ++ | awk --non-decimal-data '{printf("%s:0x%08x\n", $2, $1)}' \ ++ | LC_ALL=C sort -k1,1 -u + else + ELFRODATA=$(readelf -R .rodata "$@" | awk '/0x/{printf $2$3$4$5}') + if [[ -n $(readelf -h "$@" | grep "little endian") ]]; then +@@ -24,8 +24,8 @@ + for sym in $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) R __crc_(.+):0x\1 \2:p'); do + echo $sym $RODATA + done \ +- | awk --non-decimal-data '{printf("0x%08s\t%s\n", substr($3,($1*2)+1,8), $2)}' \ +- | LC_ALL=C sort -k2,2 -u ++ | awk --non-decimal-data '{printf("%s:0x%08s\n", $2, substr($3,($1*2)+1,8))}' \ ++ | LC_ALL=C sort -k1,1 -u + fi + } + +@@ -36,15 +36,15 @@ + /sbin/modprobe --dump-modversions "$module" \ + | awk --non-decimal-data ' + BEGIN { FS = "\t" ; OFS = "\t" } +- {printf("0x%08x\t%s\n", $1, $2)}' \ ++ {printf("%s:0x%08x\n", $2, $1)}' \ + | sed -r -e 's:$:\t'"$1"':' + done \ +- | LC_ALL=C sort -k2,2 -u ++ | LC_ALL=C sort -k1,1 -u + } + + # Filter out requirements fulfilled by the module itself. + mod_requires() { +- LC_ALL=C join -t $'\t' -j 2 -v 1 \ ++ LC_ALL=C join -t $'\t' -j 1 -v 1 \ + <(all_requires "$@") \ + <(all_provides "$@") \ + | LC_ALL=C sort -k1,1 -u +@@ -55,6 +55,8 @@ + exit 0 + fi + ++export LC_ALL=C ++ + check_kabi() { + arch=$(uname -m) + kabi_file="/lib/modules/kabi-current/kabi_whitelist_$arch" +@@ -107,22 +109,24 @@ + + cat /usr/src/kernels/$kernel/Module.symvers | awk ' + BEGIN { FS = "\t" ; OFS = "\t" } +- { print $2 "\t" $1 } ++ { print $2 ":" $1 } + ' \ + | sed -r -e 's:$:\t'"$kernel"':' \ + | LC_ALL=C sort -k1,1 -u > $symvers + + # Symbols matching with the kernel get a "kernel" dependency +- LC_ALL=C join -t $'\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \ +- | awk '{ FS = "\t" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }' ++ mod_req=$(mktemp -t mod_req.XXXXX) ++ mod_requires "${modules[@]}" > "$mod_req" ++ LC_ALL=C join -t $'\t' -j 1 $symvers "$mod_req" | LC_ALL=C sort -u \ ++ | awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }' + + # Symbols from elsewhere get a "ksym" dependency +- LC_ALL=C join -t $'\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \ +- | awk '{ FS = "\t" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }' ++ LC_ALL=C join -t $'\t' -j 1 -v 2 $symvers "$mod_req" | LC_ALL=C sort -u \ ++ | awk 'BEGIN { 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=($(LC_ALL=C join -t $'\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \ +- | awk '{ FS = "\t" ; OFS = "\t" } { print $1 }')) ++ kabi_check_symbols=($(LC_ALL=C join -t $'\t' -j 1 $symvers "$mod_req" | LC_ALL=C sort -u \ ++ | awk 'BEGIN { FS = "[\t:]" ; OFS = "\t" } { print $1 }')) + check_kabi "${kabi_check_symbols[@]}" + fi diff --git a/SOURCES/redhat-rpm-config-9.1.0-mono-ppc64le-aarch64-support.patch b/SOURCES/redhat-rpm-config-9.1.0-mono-ppc64le-aarch64-support.patch new file mode 100644 index 0000000..84c7141 --- /dev/null +++ b/SOURCES/redhat-rpm-config-9.1.0-mono-ppc64le-aarch64-support.patch @@ -0,0 +1,6 @@ +--- redhat-rpm-config-9.1.0/macros.mono-srpm.old 2018-04-23 11:17:21.066577176 +0200 ++++ redhat-rpm-config-9.1.0/macros.mono-srpm 2018-04-23 11:19:05.557896608 +0200 +@@ -1,2 +1,2 @@ + # arches that mono builds on +-%mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64 ++%mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64 alpha s390x ppc ppc64 ppc64le diff --git a/SPECS/redhat-rpm-config.spec b/SPECS/redhat-rpm-config.spec index 0fcf8d1..fbd2248 100644 --- a/SPECS/redhat-rpm-config.spec +++ b/SPECS/redhat-rpm-config.spec @@ -1,11 +1,11 @@ -Summary: CentOS specific rpm configuration files +Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config Version: 9.1.0 -Release: 80%{?dist} +Release: 87%{?dist} # No version specified. License: GPL+ Group: Development/System -URL: http://git.fedorahosted.org/git/redhat-rpm-config +URL: https://src.fedoraproject.org/rpms/redhat-rpm-config Source: redhat-rpm-config-%{version}.tar.bz2 # gcc specs files for hardened builds @@ -105,10 +105,17 @@ Patch41: redhat-rpm-config-9.1.0.Remove-hardcoded-limit-of-16-CPUs.patch Patch42: redhat-rpm-config-9.1.0-ksyms-2.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1467319 Patch43: redhat-rpm-config-9.1.0-ksym-requires-multifile.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1445632 +Patch44: redhat-rpm-config-9.1.0-mono-ppc64le-aarch64-support.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1460628 +Patch45: redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1619235 +Patch46: redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1619891 +Patch47: redhat-rpm-config-9.1.0-compressed-kmods-support.patch # ppc64 little endian support Patch99: redhat-rpm-config-9.1.0-ppc64le.patch -Patch100: redhat-rpm-config-9.1.0-centos.dist.patch BuildArch: noarch @@ -120,7 +127,7 @@ Requires: zip Provides: system-rpm-config = %{version}-%{release} %description -CentOS specific rpm configuration files. +Red Hat specific rpm configuration files. %prep %setup -q @@ -168,9 +175,12 @@ CentOS specific rpm configuration files. %patch41 -p1 %patch42 -p1 %patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +%patch47 -p1 %patch99 -p2 -%patch100 -p1 %build @@ -199,8 +209,32 @@ rm -rf ${RPM_BUILD_ROOT} %{_sysconfdir}/rpm/* %changelog -* Tue Apr 10 2018 CentOS Sources - 9.1.0-80.el7.centos -- update check_rhl function in dist.sh +* Fri Sep 14 2018 Eugene Syromiatnikov - 9.1.0-87 +- Revert to usage of join instead of comm in find-requires.ksym:mod_requires() + as generated "Requires:" and "Provides:" lists have different format + and unsuitable for processing with comm (#1619235) + +* Fri Aug 24 2018 Eugene Syromiatnikov - 9.1.0-86 +- Add support for compressed kernel modules to find-provides, + find-provides.ksyms, find-requires, find-requires.ksyms (#1619891) + +* Fri Aug 24 2018 Eugene Syromiatnikov - 9.1.0-85 +- Fix generation of kernel module versioned symbol dependencies for the case + when module depends on a symbol with the same name as the one present + in kernel but with a different version (#1619235) + +* Wed May 9 2018 Pavlina Moravcova Varekova - 9.1.0-84 +- Revert dropping brp-java-repack-jars +- fix generating group owner name when processing a jar file (#1460628) + +* Fri May 4 2018 Pavlina Moravcova Varekova - 9.1.0-83 +- Drop brp-java-repack-jars (#1460628) + +* Mon Apr 30 2018 Pavlina Moravcova Varekova - 9.1.0-82 +- Add mono support for ppc64le and aarch64 (#1445632) + +* Mon Apr 23 2018 Pavlina Moravcova Varekova - 9.1.0-81 +- Upgrade URL tag (#1502411) * Thu Nov 30 2017 Florian Festi - 9.1.0-80 - More support for CONFIG_MODULE_REL_CRCS style kernel symbols (#1494262)