Browse Source

powerel-rpm-config update all patches

Signed-off-by: basebuilder_pel7ppc64lebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64lebuilder0 4 years ago
parent
commit
eb53a1fe8a
  1. 12
      SOURCES/redhat-rpm-config-9.0.3-latest-kernel.patch
  2. 9
      SOURCES/redhat-rpm-config-9.1.0-Add-_pkgdocdir.patch
  3. 14
      SOURCES/redhat-rpm-config-9.1.0-Fix-stripping-of-binaries.patch
  4. 2
      SOURCES/redhat-rpm-config-9.1.0-aarch64.patch
  5. 10
      SOURCES/redhat-rpm-config-9.1.0-arches-macros.patch
  6. 5
      SOURCES/redhat-rpm-config-9.1.0-arm.patch
  7. 4
      SOURCES/redhat-rpm-config-9.1.0-centos.dist.patch
  8. 16
      SOURCES/redhat-rpm-config-9.1.0-compressed-kmods-support.patch
  9. 4
      SOURCES/redhat-rpm-config-9.1.0-configfoo.patch
  10. 2
      SOURCES/redhat-rpm-config-9.1.0-dwz.patch
  11. 2
      SOURCES/redhat-rpm-config-9.1.0-filtering-spaces-in-filename.patch
  12. 8
      SOURCES/redhat-rpm-config-9.1.0-find-provides.libtool.patch
  13. 5
      SOURCES/redhat-rpm-config-9.1.0-find-requires-fix-detection.patch
  14. 6
      SOURCES/redhat-rpm-config-9.1.0-fix-depmod-path.patch
  15. 10
      SOURCES/redhat-rpm-config-9.1.0-fix-find-provides-modalias-permissions.patch
  16. 12
      SOURCES/redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch
  17. 14
      SOURCES/redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch
  18. 19
      SOURCES/redhat-rpm-config-9.1.0-fix-requires.patch
  19. 4
      SOURCES/redhat-rpm-config-9.1.0-hardened.patch
  20. 12
      SOURCES/redhat-rpm-config-9.1.0-jar-repack-perms.patch
  21. 12
      SOURCES/redhat-rpm-config-9.1.0-java-repack-order.patch
  22. 54
      SOURCES/redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch
  23. 12
      SOURCES/redhat-rpm-config-9.1.0-kernel-source.patch
  24. 16
      SOURCES/redhat-rpm-config-9.1.0-kmod-brew-build.patch
  25. 130
      SOURCES/redhat-rpm-config-9.1.0-kmod-kabi.patch
  26. 12
      SOURCES/redhat-rpm-config-9.1.0-ksym-requires-multifile.patch
  27. 4
      SOURCES/redhat-rpm-config-9.1.0-ksyms-2.patch
  28. 4
      SOURCES/redhat-rpm-config-9.1.0-ksyms.patch
  29. 6
      SOURCES/redhat-rpm-config-9.1.0-minidebuginfo.patch
  30. 8
      SOURCES/redhat-rpm-config-9.1.0-ncpus-max.patch
  31. 2
      SOURCES/redhat-rpm-config-9.1.0-no-strip-note.patch
  32. 4
      SOURCES/redhat-rpm-config-9.1.0-perfbuild.patch
  33. 4
      SOURCES/redhat-rpm-config-9.1.0-pkgconfig-private.patch
  34. 1
      SOURCES/redhat-rpm-config-9.1.0-ppc-no-minimal-toc.patch
  35. 2
      SOURCES/redhat-rpm-config-9.1.0-ppc64le.patch
  36. 4
      SOURCES/redhat-rpm-config-9.1.0-record-switches.patch
  37. 8
      SOURCES/redhat-rpm-config-9.1.0-relro.patch
  38. 24
      SOURCES/redhat-rpm-config-9.1.0-repack-jars.patch
  39. 9
      SOURCES/redhat-rpm-config-9.1.0-rhel7-arch-optflags.patch
  40. 4
      SOURCES/redhat-rpm-config-9.1.0-stackprotector-strong.patch
  41. 2
      SOURCES/redhat-rpm-config-9.1.0-strict-python-bytecompile.patch
  42. 8
      SOURCES/redhat-rpm-config-9.1.0-use-kverrel-for-kmodtool.patch
  43. 5
      SOURCES/redhat-rpm-config-9.1.0-use-prefix-macro.patch
  44. 16
      SOURCES/redhat-rpm-config-9.1.0.Remove-hardcoded-limit-of-16-CPUs.patch

12
SOURCES/redhat-rpm-config-9.0.3-latest-kernel.patch

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
--- redhat-rpm-config-9.0.3/macros.orig 2016-01-05 16:21:18.708529423 +0100
+++ redhat-rpm-config-9.0.3/macros 2016-01-05 16:42:26.023939895 +0100
@@ -202,7 +202,7 @@
%global kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \
%global kmod_version %{-v*}%{!-v:%{version}} \
%global kmod_release %{-r*}%{!-r:%{release}} \
%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) \
+ %global latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\\\n' `rpm -qa | egrep "^kernel(-rt|-aarch64)?-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" \
%{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}} \
%global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null) \
flavors="default" \

9
SOURCES/redhat-rpm-config-9.1.0-Add-_pkgdocdir.patch

@ -14,12 +14,13 @@ index 6994751..3776e60 100644 @@ -14,12 +14,13 @@ index 6994751..3776e60 100644
+++ b/macros
@@ -18,6 +18,8 @@
%_mandir %{_prefix}/share/man

%_defaultdocdir %{_prefix}/share/doc
+%_pkgdocdir %{_docdir}/%{name}-%{version}
+%_docdir_fmt %%{NAME}-%%{VERSION}

%_fmoddir %{_libdir}/gfortran/modules

--
--
2.5.5


14
SOURCES/redhat-rpm-config-9.1.0-Fix-stripping-of-binaries.patch

@ -16,10 +16,10 @@ file will print a "warning" that it only processed up to 256 notes. @@ -16,10 +16,10 @@ file will print a "warning" that it only processed up to 256 notes.
@@ -9,6 +9,6 @@
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep -v ' shared object,' | \
grep -v ' shared object,' | \
- sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p'`; do
$STRIP -g "$f" || :
$STRIP -g "$f" || :
done
--- redhat-rpm-config-9.1.0/brp-strip-comment-note.orig 2010-02-02 10:24:04.000000000 +0100
+++ redhat-rpm-config-9.1.0/brp-strip-comment-note 2016-05-11 14:21:47.846187676 +0200
@ -29,16 +29,16 @@ file will print a "warning" that it only processed up to 256 notes. @@ -29,16 +29,16 @@ file will print a "warning" that it only processed up to 256 notes.
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
- sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'`; do
note="-R .note"
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
grep ALLOC >/dev/null; then
note="-R .note"
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
grep ALLOC >/dev/null; then
--- redhat-rpm-config-9.1.0/brp-strip-shared.orig 2010-02-02 10:24:04.000000000 +0100
+++ redhat-rpm-config-9.1.0/brp-strip-shared 2016-05-11 14:21:47.846187676 +0200
@@ -15,6 +15,6 @@
for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep ' shared object,' | \
grep ' shared object,' | \
- sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p'`; do
$STRIP --strip-unneeded "$f"
$STRIP --strip-unneeded "$f"
done

2
SOURCES/redhat-rpm-config-9.1.0-aarch64.patch

@ -5,7 +5,7 @@ index 9127200..fe2f84b 100644 @@ -5,7 +5,7 @@ index 9127200..fe2f84b 100644
@@ -64,6 +64,8 @@ optflags: hades %{__global_cflags}
optflags: s390 %{__global_cflags} -m31 -march=z9-109 -mtune=z10
optflags: s390x %{__global_cflags} -m64 -march=z9-109 -mtune=z10

+optflags: aarch64 %{__global_cflags}
+
# set build arch to fedora buildarches on hardware capable of running it

10
SOURCES/redhat-rpm-config-9.1.0-arches-macros.patch

@ -40,12 +40,12 @@ diff -uNr redhat-rpm-config-9.1.0-orig/Makefile redhat-rpm-config-9.1.0/Makefile @@ -40,12 +40,12 @@ diff -uNr redhat-rpm-config-9.1.0-orig/Makefile redhat-rpm-config-9.1.0/Makefile
+++ redhat-rpm-config-9.1.0/Makefile 2011-05-27 10:43:34.898205307 -0500
@@ -11,7 +11,10 @@
install:
mkdir -p $(DESTDIR)/usr/lib/rpm/redhat
cp -pr * $(DESTDIR)/usr/lib/rpm/redhat/
mkdir -p $(DESTDIR)/usr/lib/rpm/redhat
cp -pr * $(DESTDIR)/usr/lib/rpm/redhat/
+ mkdir -p $(DESTDIR)/etc/rpm
+ cp -pr macros.* $(DESTDIR)/etc/rpm/
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
+ rm -f $(DESTDIR)/usr/lib/rpm/redhat/macros.*

tag-archive:
@git tag -a $(CVSTAG) -m "$(NAME)-$(VERSION) release"
@git tag -a $(CVSTAG) -m "$(NAME)-$(VERSION) release"

5
SOURCES/redhat-rpm-config-9.1.0-arm.patch

@ -15,13 +15,14 @@ diff -urNp redhat-rpm-config-9.1.0_orig/rpmrc redhat-rpm-config-9.1.0/rpmrc @@ -15,13 +15,14 @@ diff -urNp redhat-rpm-config-9.1.0_orig/rpmrc redhat-rpm-config-9.1.0/rpmrc
+optflags: armv7l %{__global_cflags} -march=armv7-a -mfloat-abi=soft
+optflags: armv7hl %{__global_cflags} -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard
+optflags: armv7hnl %{__global_cflags} -march=armv7-a -mfpu=neon -mfloat-abi=hard

optflags: atarist %{__global_cflags}
optflags: atariste %{__global_cflags}
@@ -76,5 +78,7 @@ buildarchtranslate: sparcv9v: sparcv9

buildarchtranslate: armv5tejl: armv5tel
buildarchtranslate: armv6l: armv5tel
buildarchtranslate: armv7l: armv5tel
+buildarchtranslate: armv7hl: armv7hl
+buildarchtranslate: armv7hnl: armv7hl

4
SOURCES/redhat-rpm-config-9.1.0-centos.dist.patch

@ -3,10 +3,10 @@ diff -uNrp redhat-rpm-config-9.1.0.orig/dist.sh redhat-rpm-config-9.1.0/dist.sh @@ -3,10 +3,10 @@ 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/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 {

16
SOURCES/redhat-rpm-config-9.1.0-compressed-kmods-support.patch

@ -4,7 +4,7 @@ Index: redhat-rpm-config-9.1.0/find-requires @@ -4,7 +4,7 @@ Index: redhat-rpm-config-9.1.0/find-requires
+++ 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') ]
@ -16,7 +16,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -16,7 +16,7 @@ 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
@ -79,23 +79,23 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -79,23 +79,23 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
+ 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') ]
@ -108,9 +108,9 @@ Index: redhat-rpm-config-9.1.0/find-provides.ksyms @@ -108,9 +108,9 @@ 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=""

4
SOURCES/redhat-rpm-config-9.1.0-configfoo.patch

@ -9,5 +9,5 @@ diff -up redhat-rpm-config-9.1.0/macros.configfoo redhat-rpm-config-9.1.0/macros @@ -9,5 +9,5 @@ diff -up redhat-rpm-config-9.1.0/macros.configfoo redhat-rpm-config-9.1.0/macros
+ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
+ done ; \
%{_configure} --build=%{_build} --host=%{_host} \\\
--program-prefix=%{?_program_prefix} \\\
--disable-dependency-tracking \\\
--program-prefix=%{?_program_prefix} \\\
--disable-dependency-tracking \\\

2
SOURCES/redhat-rpm-config-9.1.0-dwz.patch

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
--- redhat-rpm-config-9.1.0/macros.dwz.jj 2012-06-25 13:08:44.854489913 +0200
+++ redhat-rpm-config-9.1.0/macros.dwz 2012-06-25 13:03:55.520112180 +0200
@@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
+# Macros for reducing debug info size using dwz(1) utility.
+
+# The two default values below should result in dwz taking at most

2
SOURCES/redhat-rpm-config-9.1.0-filtering-spaces-in-filename.patch

@ -3,7 +3,7 @@ Index: redhat-rpm-config-9.1.0/macros @@ -3,7 +3,7 @@ Index: redhat-rpm-config-9.1.0/macros
--- redhat-rpm-config-9.1.0.orig/macros
+++ redhat-rpm-config-9.1.0/macros
@@ -262,7 +262,7 @@ kernel_module_package_release 1
# actually set up the filtering bits
# actually set up the filtering bits
%filter_setup %{expand: \
%global _use_internal_dependency_generator 0 \
-%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \

8
SOURCES/redhat-rpm-config-9.1.0-find-provides.libtool.patch

@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
+++ redhat-rpm-config-9.1.0/find-provides.libtool 2016-05-11 14:38:49.404192547 +0200
@@ -2,9 +2,9 @@
while read possible ; do
case "$possible" in
*.la)
case "$possible" in
*.la)
- if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then
- echo "libtool($possible)"
- fi
+ if grep -Eiq '^# Generated by (libtool|ltmain.sh)' "$possible" 2> /dev/null ; then
+ echo "libtool($possible)"
+ fi
;;
esac
;;
esac
done

5
SOURCES/redhat-rpm-config-9.1.0-find-requires-fix-detection.patch

@ -6,9 +6,10 @@ @@ -6,9 +6,10 @@
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
-exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \
+exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script)[, ]" | \
grep ":.*executable" | cut -d: -f1`
grep ":.*executable" | cut -d: -f1`
scriptlist=`echo $filelist | xargs -r file | \
- egrep ":.* (commands|script) " | cut -d: -f1`
+ egrep ":.* (commands|script)[, ]" | cut -d: -f1`
liblist=`echo $filelist | xargs -r file | \
grep ":.*shared object" | cut -d : -f1`
grep ":.*shared object" | cut -d : -f1`

6
SOURCES/redhat-rpm-config-9.1.0-fix-depmod-path.patch

@ -10,7 +10,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -10,7 +10,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+Requires(post): /usr/sbin/depmod
+Requires(postun): /usr/sbin/depmod
EOF

if [ "yes" != "$nobuildreqs" ]
@@ -183,7 +183,7 @@
cat <<EOF
@ -19,7 +19,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -19,7 +19,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
- /sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || :
+ /usr/sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || :
fi

modules=( \$(find /lib/modules/${verrel}${dotvariant}/extra/${kmod_name} | grep '\.ko$') )
@@ -201,7 +201,7 @@
cat <<EOF
@ -28,5 +28,5 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -28,5 +28,5 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
- /sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || :
+ /usr/sbin/depmod -aeF "/boot/System.map-${verrel}${dotvariant}" "${verrel}${dotvariant}" > /dev/null || :
fi

modules=( \$(cat /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules) )

10
SOURCES/redhat-rpm-config-9.1.0-fix-find-provides-modalias-permissions.patch

@ -2,10 +2,10 @@ diff -Nuar redhat-rpm-config-9.1.0_old/Makefile redhat-rpm-config-9.1.0/Makefile @@ -2,10 +2,10 @@ diff -Nuar redhat-rpm-config-9.1.0_old/Makefile redhat-rpm-config-9.1.0/Makefile
--- redhat-rpm-config-9.1.0_old/Makefile 2013-08-26 10:54:34.040834006 +0800
+++ redhat-rpm-config-9.1.0/Makefile 2013-08-26 10:57:03.315833999 +0800
@@ -15,6 +15,7 @@
cp -pr macros.* $(DESTDIR)/etc/rpm/
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
rm -f $(DESTDIR)/usr/lib/rpm/redhat/macros.*
cp -pr macros.* $(DESTDIR)/etc/rpm/
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
rm -f $(DESTDIR)/usr/lib/rpm/redhat/macros.*
+ chmod +x $(DESTDIR)/usr/lib/rpm/redhat/find-provides.d/modalias.prov

tag-archive:
@git tag -a $(CVSTAG) -m "$(NAME)-$(VERSION) release"
@git tag -a $(CVSTAG) -m "$(NAME)-$(VERSION) release"

12
SOURCES/redhat-rpm-config-9.1.0-fix-group-owners-in-jars.patch

@ -1,11 +1,11 @@ @@ -1,11 +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`
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
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

14
SOURCES/redhat-rpm-config-9.1.0-fix-ksym-requires-generation.patch

@ -23,7 +23,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -23,7 +23,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
+ | LC_ALL=C sort -k1,1 -u
fi
}

@@ -36,15 +36,15 @@
/sbin/modprobe --dump-modversions "$module" \
| awk --non-decimal-data '
@ -35,7 +35,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -35,7 +35,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
- | 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 \
@ -46,14 +46,14 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -46,14 +46,14 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
@@ -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 }
@ -61,7 +61,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -61,7 +61,7 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
' \
| 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 }'
@ -69,13 +69,13 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms @@ -69,13 +69,13 @@ Index: redhat-rpm-config-9.1.0/find-requires.ksyms
+ 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 \

19
SOURCES/redhat-rpm-config-9.1.0-fix-requires.patch

@ -14,17 +14,18 @@ index fa5ab95..eb3ee54 100755 @@ -14,17 +14,18 @@ index fa5ab95..eb3ee54 100755
--- a/find-requires
+++ b/find-requires
@@ -106,6 +106,7 @@ for f in $liblist $exelist ; do
print $2 ;
}
}
print $2 ;
}
}
+ (START==2) && /^[A-Za-z]/ { START=3; }
/^Version References:$/ { START=2; }
(START==2) && /required from/ {
sub(/:/, "", $3);
/^Version References:$/ { START=2; }
(START==2) && /required from/ {
sub(/:/, "", $3);
@@ -114,7 +115,6 @@ for f in $liblist $exelist ; do
(START==2) && (LIBNAME!="") && ($4!="") {
print LIBNAME "(" $4 ")'$lib64'";
}
(START==2) && (LIBNAME!="") && ($4!="") {
print LIBNAME "(" $4 ")'$lib64'";
}
- /^[A-Za-z]/ { START=3; }
'
done | sort -u

4
SOURCES/redhat-rpm-config-9.1.0-hardened.patch

@ -4,7 +4,7 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros @@ -4,7 +4,7 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros
@@ -184,8 +184,15 @@ unset DISPLAY\
%__find_provides /usr/lib/rpm/redhat/find-provides
%__find_requires /usr/lib/rpm/redhat/find-requires

-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
-%__global_ldflags -Wl,-z,relro
+%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
@ -16,6 +16,6 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros @@ -16,6 +16,6 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros
+
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
+%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}

# Use these macros to differentiate between RH and other KMP implementation(s).
redhat_kernel_module_package 1

12
SOURCES/redhat-rpm-config-9.1.0-jar-repack-perms.patch

@ -2,13 +2,13 @@ diff -up redhat-rpm-config-9.1.0/brp-java-repack-jars.jar-repack-perms redhat-rp @@ -2,13 +2,13 @@ diff -up redhat-rpm-config-9.1.0/brp-java-repack-jars.jar-repack-perms redhat-rp
--- redhat-rpm-config-9.1.0/brp-java-repack-jars.jar-repack-perms 2013-07-05 13:21:56.548998671 +0300
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars 2013-07-05 13:22:50.962398381 +0300
@@ -35,8 +35,8 @@ if [ ! -z "$JARS" ]; then

pushd "$JTMPDIR" > /dev/null
/usr/bin/unzip -qq -o "$j"
pushd "$JTMPDIR" > /dev/null
/usr/bin/unzip -qq -o "$j"
- find -type d -exec chmod a+rx {} \;
- find -type f -exec chmod a+r {} \;
+ find -type d -exec chmod a+rx,u+w {} \;
+ find -type f -exec chmod a+r,u+w {} \;
rm -f "$j"

# Create the directories first.
rm -f "$j"
# Create the directories first.

12
SOURCES/redhat-rpm-config-9.1.0-java-repack-order.patch

@ -3,14 +3,14 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars @@ -3,14 +3,14 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
--- redhat-rpm-config-9.1.0.orig/brp-java-repack-jars
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars
@@ -79,7 +79,10 @@ if [ ! -z "$JARS" ]; then
pushd $JARDIR > /dev/null

if [ -n "`find -not -name '.'`" ]; then
pushd $JARDIR > /dev/null
if [ -n "`find -not -name '.'`" ]; then
- find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
+ if [ -e META-INF/MANIFEST.MF ]; then
+ /usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
+ fi
+ find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
else
# Put the empty jar back
touch $j
else
# Put the empty jar back
touch $j

54
SOURCES/redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch

@ -3,12 +3,12 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars @@ -3,12 +3,12 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
--- redhat-rpm-config-9.1.0.orig/brp-java-repack-jars
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars
@@ -25,17 +25,19 @@ if [ ! -z "$JARS" ]; then

# unpack every jar, set the date of the files and directories and
# repack the jar
# unpack every jar, set the date of the files and directories and
# repack the jar
+ OLD_IFS="$IFS"
+ IFS=$(printf '\n\t')
for j in $JARS ; do
for j in $JARS ; do
- 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
@ -17,48 +17,48 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars @@ -17,48 +17,48 @@ Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
+ 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
+ TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp "$JARNAME.timeref.XXXXXXXXXX"` || exit 1

- pushd $JTMPDIR > /dev/null
- /usr/bin/unzip -qq -o $j
+ pushd "$JTMPDIR" > /dev/null
+ /usr/bin/unzip -qq -o "$j"
find -type d -exec chmod a+rx {} \;
find -type f -exec chmod a+r {} \;
find -type d -exec chmod a+rx {} \;
find -type f -exec chmod a+r {} \;
- rm -f $j
+ rm -f "$j"

# Create the directories first.
find -type d | LC_ALL=C sort | while read d; do
# Create the directories first.
find -type d | LC_ALL=C sort | while read d; do
@@ -76,24 +78,25 @@ if [ ! -z "$JARS" ]; then
done

# make the jar
done
# make the jar
- pushd $JARDIR > /dev/null
+ pushd "$JARDIR" > /dev/null

if [ -n "`find -not -name '.'`" ]; then
if [ -e META-INF/MANIFEST.MF ]; then
if [ -n "`find -not -name '.'`" ]; then
if [ -e META-INF/MANIFEST.MF ]; then
- /usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
+ /usr/bin/zip -q -X -9 "$j" META-INF/MANIFEST.MF
fi
fi
- find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
+ find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 "$j" -@
else
# Put the empty jar back
else
# Put the empty jar back
- touch $j
+ touch "$j"
fi
popd > /dev/null

# Cleanup.
fi
popd > /dev/null
# Cleanup.
- rm -rf $JTMPDIR
- rm -rf $JARDIR
- rm -f $TIMEREF
+ rm -rf "$JTMPDIR"
+ rm -rf "$JARDIR"
+ rm -f "$TIMEREF"
done
done
+ IFS="$OLD_IFS"

# remove $RPM_BUILD_ROOT/tmp if we created it
if [ $rmtmp -eq 1 ]; then
# remove $RPM_BUILD_ROOT/tmp if we created it
if [ $rmtmp -eq 1 ]; then

12
SOURCES/redhat-rpm-config-9.1.0-kernel-source.patch

@ -3,11 +3,11 @@ Index: redhat-rpm-config-9.1.0/macros @@ -3,11 +3,11 @@ Index: redhat-rpm-config-9.1.0/macros
--- redhat-rpm-config-9.1.0.orig/macros
+++ redhat-rpm-config-9.1.0/macros
@@ -239,7 +239,7 @@ kernel_module_package_release 1
done \
fi \
echo "%%global flavors_to_build ${flavors_to_build:-%%nil}" \
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}.")%_target_cpu" \
if [ ! -z "%{-f*}" ] \
then \
filelist="%{-f*}" \
if [ ! -z "%{-f*}" ] \
then \
filelist="%{-f*}" \

16
SOURCES/redhat-rpm-config-9.1.0-kmod-brew-build.patch

@ -26,7 +26,7 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com> @@ -26,7 +26,7 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com>
@@ -49,9 +50,25 @@ kver=
verrel=
variant=

+get_kernel_release ()
+{
+ if [[ -z $1 ]]; then
@ -49,11 +49,11 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com> @@ -49,11 +49,11 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com>
+ 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)}
@ -70,7 +70,7 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com> @@ -70,7 +70,7 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com>
}
@@ -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}
@ -89,11 +89,11 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com> @@ -89,11 +89,11 @@ Signed-off-by: Jiri Benc <jbenc@redhat.com>
--- a/macros
+++ b/macros
@@ -218,7 +218,7 @@ package or when debugging this package.\
then \
nobuildreqs="yes" \
fi \
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 \
)}

#==============================================================================

130
SOURCES/redhat-rpm-config-9.1.0-kmod-kabi.patch

@ -2,7 +2,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-provides.ksyms redhat-rpm-config-9.1 @@ -2,7 +2,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-provides.ksyms redhat-rpm-config-9.1
--- 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'
@ -16,13 +16,13 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires redhat-rpm-config-9.1.0/fin @@ -16,13 +16,13 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires redhat-rpm-config-9.1.0/fin
@@ -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
@ -34,9 +34,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1 @@ -34,9 +34,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1
+# 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 "$@" \
@ -46,7 +46,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1 @@ -46,7 +46,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1
+ | 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
@ -71,12 +71,12 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1 @@ -71,12 +71,12 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1
+ <(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"
@ -126,7 +126,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1 @@ -126,7 +126,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/find-requires.ksyms redhat-rpm-config-9.1
- /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 \
@ -170,7 +170,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -170,7 +170,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+++ 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
@ -185,7 +185,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -185,7 +185,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
@@ -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
@ -197,7 +197,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -197,7 +197,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+# 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)
@ -207,14 +207,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -207,14 +207,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
verrel=
variant=
-kmp=

get_verrel ()
{
verrel=${1:-$(uname -r)}
- verrel=${verrel%%$knownvariants}
+ verrel=${verrel/%.$knownvariants/}
}

print_verrel ()
@@ -51,7 +65,7 @@
{
@ -224,11 +224,11 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -224,11 +224,11 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ variant=${variant/#$verrel?(.)/}
variant=${variant:-'""'}
}

@@ -61,117 +75,128 @@
echo "${variant}"
}

+get_filelist() {
+ local IFS=$'\n'
+ filelist=($(cat))
@ -253,7 +253,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -253,7 +253,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ echo "/lib/modules/${verrel}${dotvariant}"
+ fi
+}
+
+
+
get_rpmtemplate ()
{
@ -265,40 +265,40 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -265,40 +265,40 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
- *) 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
@ -309,14 +309,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -309,14 +309,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
-#
+ # 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}"
@ -325,7 +325,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -325,7 +325,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ then
+ echo "BuildRequires: kernel${dashvariant}-devel"
+ fi

-if [ "" != "$kmp_override_preamble" ]
-then
- cat "$kmp_override_preamble"
@ -334,7 +334,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -334,7 +334,7 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ 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
@ -357,10 +357,10 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -357,10 +357,10 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ /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
@ -375,15 +375,15 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -375,15 +375,15 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
- > /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
@ -399,9 +399,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -399,9 +399,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
fi
EOF
- fi

echo "%files -n kmod-${kmod_name}${dashvariant}"

-if [ "" == "$kmp_override_filelist" ];
+if [ "" == "$override_filelist" ];
then
@ -414,14 +414,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool @@ -414,14 +414,14 @@ diff -Nuar redhat-rpm-config-9.1.0_old/kmodtool redhat-rpm-config-9.1.0/kmodtool
+ cat "$override_filelist" | get_filelist
fi
}

@@ -216,8 +241,6 @@
- Get variant from uname.
rpmtemplate <mainpgkname> <uname> <variants>
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
version
- Output version number and exit.
EOF
@@ -241,12 +264,6 @@
@ -442,18 +442,18 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros @@ -442,18 +442,18 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros
+++ 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-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}} \
@ -463,9 +463,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros @@ -463,9 +463,9 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros
+ %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" \
%{!?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)\
@ -479,31 +479,31 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros @@ -479,31 +479,31 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros
- flavors="$flavors kdump" \
- fi \
- fi \
if [ -z "%*" ]; then \
flavors_to_build=$flavors \
elif [ -z "%{-x}" ]; then \
flavors_to_build="%*" \
else \
flavors_to_build=" $flavors "\
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}" \
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*}" \
if [ ! -z "%{-f*}" ] \
then \
filelist="%{-f*}" \
@@ -231,7 +218,7 @@
then \
nobuildreqs="yes" \
fi \
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 \
)}

#==============================================================================

12
SOURCES/redhat-rpm-config-9.1.0-ksym-requires-multifile.patch

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
- | LANG=C sort -k2,2 -u
+ | LC_ALL=C sort -k2,2 -u
}

# Filter out requirements fulfilled by the module itself.
mod_requires() {
- module=$1
@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
+ <(all_provides "$@") \
+ | LC_ALL=C sort -k1,1 -u
}

if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then
@@ -89,6 +87,8 @@ check_kabi() {
modules=($(grep -E '/lib/modules/.+\.ko$'))
@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
+
+ # get all that kernel provides
symvers=$(mktemp -t ${0##*/}.XXXXX)

cat /usr/src/kernels/$kernel/Module.symvers | awk '
@@ -96,19 +96,19 @@ if [ ${#modules[@]} -gt 0 ]; then
{ print $2 "\t" $1 }
@ -38,17 +38,17 @@ @@ -38,17 +38,17 @@
| sed -r -e 's:$:\t'"$kernel"':' \
- | LANG=C sort -k1,1 -u > $symvers
+ | LC_ALL=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 \
+ 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 }'

# Symbols from elsewhere get a "ksym" dependency
- LANG=C join -t '\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LANG=C sort -u \
+ 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 }'

# 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 \

4
SOURCES/redhat-rpm-config-9.1.0-ksyms-2.patch

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
--- redhat-rpm-config-9.1.0/find-requires.ksyms.old 2017-11-14 10:18:23.231861697 +0100
+++ redhat-rpm-config-9.1.0/find-requires.ksyms 2017-11-14 10:51:09.064436672 +0100
@@ -9,10 +9,24 @@ IFS=$'\n'

# Extract all of the symbols provided by this module.
all_provides() {
- nm "$@" \
@ -27,5 +27,5 @@ @@ -27,5 +27,5 @@
+ | LC_ALL=C sort -k2,2 -u
+ fi
}

# Extract all of the requirements of this module.

4
SOURCES/redhat-rpm-config-9.1.0-ksyms.patch

@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
@@ -1,10 +1,24 @@
-#! /bin/sh
+#! /bin/bash

IFS=$'\n'

for module in $(grep -E '/lib/modules/.+\.ko$'); do
- nm $module \
- | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \

6
SOURCES/redhat-rpm-config-9.1.0-minidebuginfo.patch

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
--- redhat-rpm-config-9.1.0/macros 2012-06-11 11:48:58.144578684 +0200
+++ redhat-rpm-config-9.1.0/macros.minidebug 2012-06-11 11:49:18.444255286 +0200
@@ -22,6 +22,7 @@
@@ -22,6 +22,7 @@
%_fmoddir %{_libdir}/gfortran/modules

%_enable_debug_packages 1
+%_include_minidebuginfo 1

#==============================================================================
# ---- configure and makeinstall.

8
SOURCES/redhat-rpm-config-9.1.0-ncpus-max.patch

@ -2,18 +2,18 @@ diff -up redhat-rpm-config-9.1.0/macros.ncpus redhat-rpm-config-9.1.0/macros @@ -2,18 +2,18 @@ diff -up redhat-rpm-config-9.1.0/macros.ncpus redhat-rpm-config-9.1.0/macros
--- redhat-rpm-config-9.1.0/macros.ncpus 2013-06-27 09:54:38.663039820 +0300
+++ redhat-rpm-config-9.1.0/macros 2013-06-27 09:54:50.746135882 +0300
@@ -71,10 +71,13 @@
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
install

+# Maximum number of CPU's to use when building, 0 for unlimited.
+%_smp_ncpus_max 16
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
- if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then echo "-j16"; \\\
- elif [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)
+ ncpus_max=%{?_smp_ncpus_max}; \\\
+ if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
+ if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)

#==============================================================================
# ---- Build policy macros.

2
SOURCES/redhat-rpm-config-9.1.0-no-strip-note.patch

@ -12,7 +12,7 @@ index 7721fe0..1ac46d7 100644 @@ -12,7 +12,7 @@ index 7721fe0..1ac46d7 100644
--- a/macros
+++ b/macros
@@ -92,9 +92,11 @@

%__os_install_post \
/usr/lib/rpm/redhat/brp-compress \
- %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \

4
SOURCES/redhat-rpm-config-9.1.0-perfbuild.patch

@ -4,7 +4,7 @@ diff -up redhat-rpm-config-9.1.0/macros.perf_build redhat-rpm-config-9.1.0/macro @@ -4,7 +4,7 @@ diff -up redhat-rpm-config-9.1.0/macros.perf_build redhat-rpm-config-9.1.0/macro
@@ -178,7 +178,14 @@ package or when debugging this package.\
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}

-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
+#%_performance_build 0
+%_performance_cflags %{?_performance_build:%{lua:\
@ -15,5 +15,5 @@ diff -up redhat-rpm-config-9.1.0/macros.perf_build redhat-rpm-config-9.1.0/macro @@ -15,5 +15,5 @@ diff -up redhat-rpm-config-9.1.0/macros.perf_build redhat-rpm-config-9.1.0/macro
+
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags} %{_performance_cflags}
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}

# Use these macros to differentiate between RH and other KMP implementation(s).

4
SOURCES/redhat-rpm-config-9.1.0-pkgconfig-private.patch

@ -6,6 +6,6 @@ @@ -6,6 +6,6 @@
*.pc)
- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
+ $pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
echo "pkgconfig($n)" "$r" "$v"
done
echo "pkgconfig($n)" "$r" "$v"
done
esac

1
SOURCES/redhat-rpm-config-9.1.0-ppc-no-minimal-toc.patch

@ -12,3 +12,4 @@ @@ -12,3 +12,4 @@
+optflags: ppc64pseries %{__global_cflags} -m64
optflags: ppc8260 %{__global_cflags} -m32
optflags: ppc8560 %{__global_cflags} -m32

2
SOURCES/redhat-rpm-config-9.1.0-ppc64le.patch

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
@@ -24,6 +24,10 @@
%_enable_debug_packages 1
%_include_minidebuginfo 1

+# Set to enforce patching libtool.m4 and associated configure files
+# to handle ppc64le.
+%_libtool_ppc64le_fix 1

4
SOURCES/redhat-rpm-config-9.1.0-record-switches.patch

@ -4,9 +4,9 @@ diff -up redhat-rpm-config-9.1.0/macros.record-switches redhat-rpm-config-9.1.0/ @@ -4,9 +4,9 @@ diff -up redhat-rpm-config-9.1.0/macros.record-switches redhat-rpm-config-9.1.0/
@@ -171,7 +171,7 @@ package or when debugging this package.\
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}

-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}

# Use these macros to differentiate between RH and other KMP implementation(s).

8
SOURCES/redhat-rpm-config-9.1.0-relro.patch

@ -7,13 +7,13 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros @@ -7,13 +7,13 @@ diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
+ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \
%{_configure} --build=%{_build} --host=%{_host} \\\
--program-prefix=%{?_program_prefix} \\\
--disable-dependency-tracking \\\
--program-prefix=%{?_program_prefix} \\\
--disable-dependency-tracking \\\
@@ -184,6 +185,7 @@ unset DISPLAY\
%__find_requires /usr/lib/rpm/redhat/find-requires

%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
+%__global_ldflags -Wl,-z,relro

# Use these macros to differentiate between RH and other KMP implementation(s).
redhat_kernel_module_package 1

24
SOURCES/redhat-rpm-config-9.1.0-repack-jars.patch

@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
--- redhat-rpm-config-9.1.0/brp-java-repack-jars.orig 2016-05-11 16:19:41.026993150 +0200
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars 2016-05-11 16:22:14.621444942 +0200
@@ -28,6 +28,8 @@
OLD_IFS="$IFS"
IFS=$(printf '\n\t')
for j in $JARS ; do
OLD_IFS="$IFS"
IFS=$(printf '\n\t')
for j in $JARS ; do
+ JAROWN=`ls -l $j | cut -d' ' -f3`
+ JARGRP=`ls -l $j | cut -d' ' -f4`
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
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
@@ -91,6 +93,9 @@
fi
popd > /dev/null

fi
popd > /dev/null
+ chown $JAROWN $j
+ chgrp $JARGRP $j
+
# Cleanup.
rm -rf "$JTMPDIR"
rm -rf "$JARDIR"
# Cleanup.
rm -rf "$JTMPDIR"
rm -rf "$JARDIR"

9
SOURCES/redhat-rpm-config-9.1.0-rhel7-arch-optflags.patch

@ -11,9 +11,9 @@ diff -up redhat-rpm-config-9.1.0/rpmrc.arch-optflags redhat-rpm-config-9.1.0/rpm @@ -11,9 +11,9 @@ diff -up redhat-rpm-config-9.1.0/rpmrc.arch-optflags redhat-rpm-config-9.1.0/rpm
optflags: ia64 %{__global_cflags}
optflags: x86_64 %{__global_cflags} -m64 -mtune=generic
@@ -24,10 +24,10 @@ optflags: sparc64v %{__global_cflags} -m

optflags: m68k %{__global_cflags}

-optflags: ppc %{__global_cflags} -m32
+optflags: ppc %{__global_cflags} -m32 -mcpu=power7 -mtune=power7
optflags: ppciseries %{__global_cflags} -m32
@ -26,10 +26,11 @@ diff -up redhat-rpm-config-9.1.0/rpmrc.arch-optflags redhat-rpm-config-9.1.0/rpm @@ -26,10 +26,11 @@ diff -up redhat-rpm-config-9.1.0/rpmrc.arch-optflags redhat-rpm-config-9.1.0/rpm
@@ -61,8 +61,8 @@ optflags: atariclone %{__global_cflags}
optflags: milan %{__global_cflags}
optflags: hades %{__global_cflags}

-optflags: s390 %{__global_cflags} -m31 -march=z9-109 -mtune=z10
-optflags: s390x %{__global_cflags} -m64 -march=z9-109 -mtune=z10
+optflags: s390 %{__global_cflags} -m31 -march=z196 -mtune=zEC12
+optflags: s390x %{__global_cflags} -m64 -march=z196 -mtune=zEC12

optflags: aarch64 %{__global_cflags}

4
SOURCES/redhat-rpm-config-9.1.0-stackprotector-strong.patch

@ -4,9 +4,9 @@ diff -up redhat-rpm-config-9.1.0/macros.stackprotector-strong redhat-rpm-config- @@ -4,9 +4,9 @@ diff -up redhat-rpm-config-9.1.0/macros.stackprotector-strong redhat-rpm-config-
@@ -178,7 +178,7 @@ package or when debugging this package.\
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}

-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}

# Use these macros to differentiate between RH and other KMP implementation(s).

2
SOURCES/redhat-rpm-config-9.1.0-strict-python-bytecompile.patch

@ -26,7 +26,7 @@ index 77844f0..7721fe0 100644 @@ -26,7 +26,7 @@ index 77844f0..7721fe0 100644
@@ -167,6 +167,10 @@ unset DISPLAY\
# Should unpackaged files in a build root terminate a build?
%_unpackaged_files_terminate_build 1

+#
+## Should python bytecompilation errors terminate a build?
+%_python_bytecompile_errors_terminate_build 1

8
SOURCES/redhat-rpm-config-9.1.0-use-kverrel-for-kmodtool.patch

@ -2,11 +2,11 @@ diff -Nuar redhat-rpm-config-9.1.0_old/macros redhat-rpm-config-9.1.0/macros @@ -2,11 +2,11 @@ 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 2014-01-15 15:29:28.259001613 +0800
+++ redhat-rpm-config-9.1.0/macros 2014-01-15 15:30:16.044001574 +0800
@@ -232,7 +232,7 @@
then \
nobuildreqs="yes" \
fi \
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} %{kernel_version} $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 \
)}

#==============================================================================

5
SOURCES/redhat-rpm-config-9.1.0-use-prefix-macro.patch

@ -10,8 +10,9 @@ Index: redhat-rpm-config-9.1.0/macros @@ -10,8 +10,9 @@ Index: redhat-rpm-config-9.1.0/macros
-%_mandir /usr/share/man
+%_infodir %{_prefix}/share/info
+%_mandir %{_prefix}/share/man

-%_defaultdocdir %{_usr}/share/doc
+%_defaultdocdir %{_prefix}/share/doc

%_fmoddir %{_libdir}/gfortran/modules

16
SOURCES/redhat-rpm-config-9.1.0.Remove-hardcoded-limit-of-16-CPUs.patch

@ -2,15 +2,15 @@ @@ -2,15 +2,15 @@
+++ current/macros 2017-10-11 13:34:44.519416133 +0200
@@ -74,7 +74,12 @@
install

# Maximum number of CPU's to use when building, 0 for unlimited.
-%_smp_ncpus_max 16
+#
+# This was for some time capped at 16. Please see
+# https://bugzilla.redhat.com/show_bug.cgi?id=669638 and
+# https://bugzilla.redhat.com/show_bug.cgi?id=1384938 for the situation
+# surrounding this.
+#%_smp_ncpus_max 0
+#
+# This was for some time capped at 16. Please see
+# https://bugzilla.redhat.com/show_bug.cgi?id=669638 and
+# https://bugzilla.redhat.com/show_bug.cgi?id=1384938 for the situation
+# surrounding this.
+#%_smp_ncpus_max 0
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
ncpus_max=%{?_smp_ncpus_max}; \\\

Loading…
Cancel
Save