From 0b6d4f699238e8af823a3f7eef50b663150332e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?= Date: Wed, 22 Sep 2021 16:04:14 +0200 Subject: [PATCH] Resolves: #2006822 - Hardening tests fail for nginx --- ...ler-optimalization-level-O2-for-perl.patch | 26 +++++++++++++++++++ nginx.spec | 8 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0004-Set-proper-compiler-optimalization-level-O2-for-perl.patch diff --git a/0004-Set-proper-compiler-optimalization-level-O2-for-perl.patch b/0004-Set-proper-compiler-optimalization-level-O2-for-perl.patch new file mode 100644 index 0000000..e59dd58 --- /dev/null +++ b/0004-Set-proper-compiler-optimalization-level-O2-for-perl.patch @@ -0,0 +1,26 @@ +From 80c0ee172cceaef933ff5a451ec2a16213e03996 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?= +Date: Wed, 22 Sep 2021 15:55:39 +0200 +Subject: [PATCH] Set proper compiler optimalization level (O2) for perl + module. + +--- + src/http/modules/perl/Makefile.PL | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/http/modules/perl/Makefile.PL b/src/http/modules/perl/Makefile.PL +index 7edadcb..2ebb7c4 100644 +--- a/src/http/modules/perl/Makefile.PL ++++ b/src/http/modules/perl/Makefile.PL +@@ -14,7 +14,7 @@ WriteMakefile( + AUTHOR => 'Igor Sysoev', + + CCFLAGS => "$ENV{NGX_PM_CFLAGS}", +- OPTIMIZE => '-O', ++ OPTIMIZE => '-O2', + + LDDLFLAGS => "$ENV{NGX_PM_LDFLAGS}", + +-- +2.31.1 + diff --git a/nginx.spec b/nginx.spec index 5414288..ada31be 100644 --- a/nginx.spec +++ b/nginx.spec @@ -41,7 +41,7 @@ Name: nginx Epoch: 1 Version: 1.20.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A high performance web server and reverse proxy server # BSD License (two clause) @@ -79,6 +79,9 @@ Patch1: 0002-fix-PIDFile-handling.patch # downstream patch for RHEL - https://bugzilla.redhat.com/show_bug.cgi?id=1955564 Patch2: 0003-Support-loading-cert-hardware-token-PKC.patch +# downstream patch for RHEL - https://bugzilla.redhat.com/show_bug.cgi?id=2006822 +Patch3: 0004-Set-proper-compiler-optimalization-level-O2-for-perl.patch + BuildRequires: make BuildRequires: gcc BuildRequires: gnupg2 @@ -578,6 +581,9 @@ fi %changelog +* Wed Sep 22 2021 Luboš Uhliarik - 1:1.20.1-6 +- Resolves: #2006822 - Hardening tests fail for nginx + * Tue Sep 21 2021 Luboš Uhliarik - 1:1.20.1-5 - Add -mod-devel subpackage for building external nginx modules Resolves: rhbz#1991720 (Neal Gompa)