From f843bf828aa37707bf2d5faf2cae81bcc74abc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 11 Mar 2018 14:52:31 +0100 Subject: [PATCH 01/12] Drop Group tag and period from Summary --- redhat-rpm-config.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 4281954..6a6673f 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -10,7 +10,6 @@ Version: 106 Release: 1%{?dist} # No version specified. License: GPL+ -Group: Development/System URL: https://src.fedoraproject.org/rpms/redhat-rpm-config # Core rpm settings @@ -116,7 +115,7 @@ Provides: system-rpm-config = %{version}-%{release} Red Hat specific rpm configuration files. %package -n kernel-rpm-macros -Summary: Macros and scripts for building kernel module packages. +Summary: Macros and scripts for building kernel module packages Requires: redhat-rpm-config >= 13 %description -n kernel-rpm-macros From 8c5d5de24a177928e5177362532cc22aa604858d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 11 Mar 2018 15:15:30 +0100 Subject: [PATCH 02/12] Trim changelog entries older than two years Inspired by http://gitweb.mageia.org/software/rpm/rpm-setup/tree/macros.in#n22 but changed to two years (3+ releases of Fedora). --- macros | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macros b/macros index 87b6815..62f320a 100644 --- a/macros +++ b/macros @@ -214,6 +214,9 @@ %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags} +# Automatically trim changelog entries after 2 years +%_changelog_trimtime %{lua:print(os.time() - 2 * 365 * 86400)} + #============================================================================== # ---- Generic auto req/prov filtering macros # From c7d6417a3bea252aa2ec9f338c15937ce2e2dc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 14:23:48 +0200 Subject: [PATCH 03/12] Add a possibility to opt-out form automagic Python bytecompilation That is, outside of Python specific directories. More at https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation --- macros | 4 +++- redhat-rpm-config.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/macros b/macros index 548c52e..6a81518 100644 --- a/macros +++ b/macros @@ -141,7 +141,7 @@ %__brp_strip /usr/lib/rpm/brp-strip %{__strip} %__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} %__brp_strip_static_archive /usr/lib/rpm/brp-strip-static-archive %{__strip} -%__brp_python_bytecompile /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} +%__brp_python_bytecompile /usr/lib/rpm/brp-python-bytecompile "%{__python}" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}" %__brp_python_hardlink /usr/lib/rpm/brp-python-hardlink # __brp_mangle_shebangs_exclude - shebangs to exclude # __brp_mangle_shebangs_exclude_file - file from which to get shebangs to exclude @@ -183,6 +183,8 @@ # ## Should python bytecompilation errors terminate a build? %_python_bytecompile_errors_terminate_build 1 +## Should python bytecompilation compile outisde python specific directories? +%_python_bytecompile_extra 1 # Use SHA-256 for FILEDIGESTS instead of default MD5 %_source_filedigest_algorithm 8 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 955f866..f5c614d 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 111 +Version: 112 Release: 1%{?dist} # No version specified. License: GPL+ @@ -184,6 +184,10 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon May 28 2018 Miro Hrončok - 112-1 +- Add a possibility to opt-out form automagic Python bytecompilation + https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation + * Wed May 02 2018 Peter Jones - 111-1 - brp-mangle-shebangs: add %%{__brp_mangle_shebangs_exclude_file} and %%{__brp_mangle_shebangs_exclude_from_file} to allow you to specify files From 4e17da5386845aab4c2c0e0f8be5570f6e9c5b41 Mon Sep 17 00:00:00 2001 From: Petr Oros Date: Mon, 4 Jun 2018 08:43:45 +0200 Subject: [PATCH 04/12] Fix kernel ABI related scripts find-provides.ksyms and find-requires.ksyms contain macros for generate external kernel module symbol dependency table. These scripts are broken in fedora for long time. Patch fix both and make it useable again. -Petr Signed-off-by: Petr Oros --- find-provides.ksyms | 25 ++++++++++++--- find-requires.ksyms | 74 ++++++++++++++++++++++++++++++--------------- 2 files changed, 70 insertions(+), 29 deletions(-) diff --git a/find-provides.ksyms b/find-provides.ksyms index 4616710..0526cd7 100755 --- a/find-provides.ksyms +++ b/find-provides.ksyms @@ -1,9 +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_(.+):ksym(\2) = \1:p' -done \ -| sort -u + 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("ksym(%s) = 0x%08x\n", $2, $1)}' \ + | LC_ALL=C sort -u + else + 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("ksym(%s) = 0x%08s\n", $2, substr($3,($1*2)+1,8))}' \ + | LC_ALL=C sort -u + fi +done diff --git a/find-requires.ksyms b/find-requires.ksyms index 73525b7..b11c7bb 100755 --- a/find-requires.ksyms +++ b/find-requires.ksyms @@ -2,19 +2,47 @@ 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 + 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 + 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') + else + RODATA=$ELFRODATA + 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("0x%08s\t%s\n", substr($3,($1*2)+1,8), $2)}' \ + | LC_ALL=C sort -k2,2 -u + fi } +# 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 + | LC_ALL=C sort -k2,2 -u +} + +# Filter out requirements fulfilled by the module itself. +mod_requires() { + LC_ALL=C join -t $'\t' -j 2 -v 1 \ + <(all_requires "$@") \ + <(all_provides "$@") \ + | LC_ALL=C sort -k1,1 -u } if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then @@ -24,25 +52,23 @@ 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) - 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 ' + # get all that kernel provides + symvers=$(mktemp -t ${0##*/}.XXXXX) + + 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"':' \ + | 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 }' + + # 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 }' fi From a5c98437e2aabe7a75fc13099a41ed3306587401 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 18 Jun 2018 11:48:31 +0200 Subject: [PATCH 05/12] Build flags: Require SSE2 on i686 (#1592212) --- buildflags.md | 14 ++++++++++---- redhat-rpm-config.spec | 5 ++++- rpmrc | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/buildflags.md b/buildflags.md index b279bbb..db0e7db 100644 --- a/buildflags.md +++ b/buildflags.md @@ -276,10 +276,16 @@ tuning in the `gcc` package. These settings are: with other ARMv7-A implementations). `-mabi=aapcs-linux` switches to the AAPCS ABI for GNU/Linux. * **i686**: `-march=i686` is used to select a minmum support CPU level - of i686 (corresponding to the Pentium Pro). `-mtune=generic` activates - tuning for a current blend of CPUs (under the assumption that most - users of i686 packages obtain them through an x86_64 installation - on current hardware). + of i686 (corresponding to the Pentium Pro). SSE2 support is + enabled with `-msse2` (so only CPUs with SSE2 support can run the + compiled code; SSE2 was introduced first with the Pentium 4). + `-mtune=generic` activates tuning for a current blend of CPUs + (under the assumption that most users of i686 packages obtain them + through an x86_64 installation on current hardware). + `-mfpmath=sse` instructs GCC to use the SSE2 unit for floating + point math to avoid excess precision issues. `-mstackrealign` + avoids relying on the stack alignment guaranteed by the current + version of the i386 ABI. * **ppc64le**: `-mcpu=power8 -mtune=power8` selects a minimum supported CPU level of POWER8 (the first CPU with ppc64le support) and tunes for POWER8. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index f5c614d..f18eecd 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 112 +Version: 113 Release: 1%{?dist} # No version specified. License: GPL+ @@ -184,6 +184,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon Jun 18 2018 Florian Weimer - 113-1 +- Build flags: Require SSE2 on i686 (#1592212) + * Mon May 28 2018 Miro Hrončok - 112-1 - Add a possibility to opt-out form automagic Python bytecompilation https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation diff --git a/rpmrc b/rpmrc index 015004a..630c8c0 100644 --- a/rpmrc +++ b/rpmrc @@ -3,7 +3,7 @@ include: /usr/lib/rpm/rpmrc optflags: i386 %{__global_compiler_flags} -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection optflags: i486 %{__global_compiler_flags} -m32 -march=i486 -fasynchronous-unwind-tables -fstack-clash-protection optflags: i586 %{__global_compiler_flags} -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection +optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection optflags: ia64 %{__global_compiler_flags} optflags: x86_64 %{__global_compiler_flags} -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection From a62764b8e8f64faaa08ca9f3ec51a057bb7a9806 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 26 Jun 2018 13:44:59 +0300 Subject: [PATCH 06/12] =?UTF-8?q?-=20Fix=20kernel=20ABI=20related=20string?= =?UTF-8?q?s=20(Peter=20Oros,=20#26)=20-=20Automatically=20trim=20changelo?= =?UTF-8?q?g=20to=20two=20years=20(Zbigniew=20J=C4=99drzejewski-Szmek,=20#?= =?UTF-8?q?22)=20-=20Cosmetics=20cleanups=20(Zbigniew=20J=C4=99drzejewski-?= =?UTF-8?q?Szmek,=20#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- redhat-rpm-config.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index a025a0e..b30455c 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 113 +Version: 114 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,11 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Tue Jun 26 2018 Panu Matilainen - 114-1 +- Fix kernel ABI related strings (Peter Oros, #26) +- Automatically trim changelog to two years (Zbigniew Jędrzejewski-Szmek, #22) +- Cosmetics cleanups (Zbigniew Jędrzejewski-Szmek, #22) + * Mon Jun 18 2018 Florian Weimer - 113-1 - Build flags: Require SSE2 on i686 (#1592212) From 9a15f27f343d369bca3f1aad333a8c86784a6aca Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 9 Jul 2018 12:24:57 +0200 Subject: [PATCH 07/12] Disable non-functional ppc64 support for ldc packages Sadly, ldc ppc64 support has detoriated so much that it no longer works with any current llvm version. I'll keep an eye on things and re-enable it once it's fixed, but right now it's just broken and upstream is suggesting to disable the support for now. https://github.com/ldc-developers/ldc/issues/2356 --- macros.ldc-srpm | 2 +- redhat-rpm-config.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macros.ldc-srpm b/macros.ldc-srpm index 5718d0c..2ee111e 100644 --- a/macros.ldc-srpm +++ b/macros.ldc-srpm @@ -1,2 +1,2 @@ # arches that ldc builds on -%ldc_arches %{ix86} x86_64 %{arm} %{power64} +%ldc_arches %{ix86} x86_64 %{arm} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b30455c..3af2e60 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 114 +Version: 115 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon Jul 09 2018 Kalev Lember - 115-1 +- Disable non-functional ppc64 support for ldc packages + * Tue Jun 26 2018 Panu Matilainen - 114-1 - Fix kernel ABI related strings (Peter Oros, #26) - Automatically trim changelog to two years (Zbigniew Jędrzejewski-Szmek, #22) From 68e4ff270c81e4412af3f24a528ea6634cab076d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 10 Jul 2018 16:23:36 +0200 Subject: [PATCH 08/12] rename _strict_symbol_defs_build to _ld_strict_symbol_defs It says more where to look and what it is supposed to do. Acked-by: Florian Festi Signed-off-by: Igor Gnatenko --- macros | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macros b/macros index 7146f9a..cd32c84 100644 --- a/macros +++ b/macros @@ -214,9 +214,9 @@ # Fail linking if there are undefined symbols. Required for proper # ELF symbol versioning support. Disabled by default. -# Use "%define _strict_symbol_defs_build 1" to enable. -#%_strict_symbol_defs_build 1 -%_ld_symbols_flags %{?_strict_symbol_defs_build:-Wl,-z,defs} +# Use "%define _ld_strict_symbol_defs 1" to enable. +#%_ld_strict_symbol_defs 1 +%_ld_symbols_flags %{?_ld_strict_symbol_defs:-Wl,-z,defs} %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags} From 85e473f982a92204832d57fc13bdd5bccc27078d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 2 Jul 2018 22:27:51 +0100 Subject: [PATCH 09/12] Add option to add -Wl,--as-needed into LDFLAGS Signed-off-by: Igor Gnatenko --- macros | 7 ++++++- redhat-rpm-config.spec | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/macros b/macros index cd32c84..b900503 100644 --- a/macros +++ b/macros @@ -44,7 +44,7 @@ # the flags, while intended for ld, are still passed through the gcc # compiler driver. At the beginning of %%build, the environment # variable RPM_LD_FLAGS to this value. -%build_ldflags -Wl,-z,relro %{_ld_symbols_flags} %{_hardened_ldflags} +%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} # Expands to shell code to seot the compiler/linker environment # variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have @@ -218,6 +218,11 @@ #%_ld_strict_symbol_defs 1 %_ld_symbols_flags %{?_ld_strict_symbol_defs:-Wl,-z,defs} +# https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking +# use "%define _ld_as_needed 1" to enable. +#%_ld_as_needed 1 +%_ld_as_needed_flags %{?_as_needed_build:-Wl,--as-needed} + %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags} # Automatically trim changelog entries after 2 years diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 3af2e60..b495529 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 115 +Version: 116 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Tue Jul 10 2018 Igor Gnatenko - 116-1 +- Add option to add -Wl,--as-needed into LDFLAGS + * Mon Jul 09 2018 Kalev Lember - 115-1 - Disable non-functional ppc64 support for ldc packages From ce50624ff0efc3d41e86814312483403a7e3afec Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 10 Jul 2018 16:45:19 +0200 Subject: [PATCH 10/12] fix type from previous commit Signed-off-by: Igor Gnatenko --- macros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros b/macros index b900503..a6d89de 100644 --- a/macros +++ b/macros @@ -221,7 +221,7 @@ # https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking # use "%define _ld_as_needed 1" to enable. #%_ld_as_needed 1 -%_ld_as_needed_flags %{?_as_needed_build:-Wl,--as-needed} +%_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed} %__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags} From 521c1a9dd5d276e28b4b5f2167b326d56e1da318 Mon Sep 17 00:00:00 2001 From: David Hugh Malcolm Date: Wed, 11 Jul 2018 13:43:53 +0000 Subject: [PATCH 11/12] buildflags.md: fix typo --- buildflags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildflags.md b/buildflags.md index db0e7db..06b41e6 100644 --- a/buildflags.md +++ b/buildflags.md @@ -70,7 +70,7 @@ For other considerations involving shared objects, see: It is possible to set RPM macros to change some aspects of the compiler flags. Changing these flags should be used as a last -recourse if other workarunds are not available. +recourse if other workarounds are not available. ### Lazy binding From 973e5c7052e27bcce9a38cf2e2fc56caaf4cc1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 16 Jul 2018 10:48:54 +0200 Subject: [PATCH 12/12] Mangle /bin shebangs to /usr/bin ones (#1581757) --- brp-mangle-shebangs | 4 ++++ redhat-rpm-config.spec | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/brp-mangle-shebangs b/brp-mangle-shebangs index 6d65a82..4fa8daa 100755 --- a/brp-mangle-shebangs +++ b/brp-mangle-shebangs @@ -121,6 +121,10 @@ while IFS= read -r -d $'\0' f; do # /whatsoever/env foo → /whatsoever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@') + # If the shebang now starts with /bin, change it to /usr/bin + # https://bugzilla.redhat.com/show_bug.cgi?id=1581757 + shebang=$(echo "$shebang" | sed -r -e 's@^/bin/@/usr/bin/@') + # Replace ambiguous python with python2 py_shebang=$(echo "$shebang" | sed -r -e 's@/usr/bin/python(\s|$)@/usr/bin/python2\1@') diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b495529..6fad0e6 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 116 +Version: 117 Release: 1%{?dist} # No version specified. License: GPL+ @@ -183,6 +183,9 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon Jul 16 2018 Miro Hrončok - 117-1 +- Mangle /bin shebnags to /usr/bin ones (#1581757) + * Tue Jul 10 2018 Igor Gnatenko - 116-1 - Add option to add -Wl,--as-needed into LDFLAGS