Resolve: #1953639 - Rebase nginx to 1.20
This commit is contained in:
parent
1fd7d27e7a
commit
8e7aa8c830
31
0001-remove-Werror-in-upstream-build-scripts.patch
Normal file
31
0001-remove-Werror-in-upstream-build-scripts.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 00cab63102084b89de0a3494a1d023c4b1d4982b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Felix Kaechele <felix@kaechele.ca>
|
||||||
|
Date: Sun, 7 Jun 2020 12:14:02 -0400
|
||||||
|
Subject: [PATCH 1/2] remove Werror in upstream build scripts
|
||||||
|
|
||||||
|
removes -Werror in upstream build scripts. -Werror conflicts with
|
||||||
|
-D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
|
||||||
|
|
||||||
|
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
|
||||||
|
---
|
||||||
|
auto/cc/gcc | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/auto/cc/gcc b/auto/cc/gcc
|
||||||
|
index a5c5c18..cdbbadb 100644
|
||||||
|
--- a/auto/cc/gcc
|
||||||
|
+++ b/auto/cc/gcc
|
||||||
|
@@ -166,7 +166,9 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
# stop on warning
|
||||||
|
-CFLAGS="$CFLAGS -Werror"
|
||||||
|
+# This combined with Fedora's FORTIFY_SOURCE=2 option causes it nginx
|
||||||
|
+# to not compile.
|
||||||
|
+#CFLAGS="$CFLAGS -Werror"
|
||||||
|
|
||||||
|
# debug
|
||||||
|
CFLAGS="$CFLAGS -g"
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
108
0002-fix-PIDFile-handling.patch
Normal file
108
0002-fix-PIDFile-handling.patch
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
From 62470498cca9a209aa9904668c1949f5229123af Mon Sep 17 00:00:00 2001
|
||||||
|
From: Felix Kaechele <felix@kaechele.ca>
|
||||||
|
Date: Tue, 20 Apr 2021 21:28:18 -0400
|
||||||
|
Subject: [PATCH 2/2] fix PIDFile handling
|
||||||
|
|
||||||
|
Corresponding RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1869026
|
||||||
|
|
||||||
|
Rejected upstream: https://trac.nginx.org/nginx/ticket/1897
|
||||||
|
|
||||||
|
Taken from: https://git.launchpad.net/ubuntu/+source/nginx/tree/debian/patches/nginx-fix-pidfile.patch
|
||||||
|
|
||||||
|
From original patch:
|
||||||
|
Author: Tj <ubuntu@iam.tj>
|
||||||
|
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864
|
||||||
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876365
|
||||||
|
iLast-Update: 2020-06-24
|
||||||
|
|
||||||
|
Signed-off-by: Felix Kaechele <felix@kaechele.ca>
|
||||||
|
---
|
||||||
|
src/core/nginx.c | 24 +++++++++++++++++++++---
|
||||||
|
src/os/unix/ngx_daemon.c | 8 ++++++--
|
||||||
|
2 files changed, 27 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/nginx.c b/src/core/nginx.c
|
||||||
|
index 48a20e9..32c0afe 100644
|
||||||
|
--- a/src/core/nginx.c
|
||||||
|
+++ b/src/core/nginx.c
|
||||||
|
@@ -339,14 +339,21 @@ main(int argc, char *const *argv)
|
||||||
|
ngx_process = NGX_PROCESS_MASTER;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* tell-tale to detect if this is parent or child process */
|
||||||
|
+ ngx_int_t child_pid = NGX_BUSY;
|
||||||
|
+
|
||||||
|
#if !(NGX_WIN32)
|
||||||
|
|
||||||
|
if (ngx_init_signals(cycle->log) != NGX_OK) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* tell-tale that this code has been executed */
|
||||||
|
+ child_pid--;
|
||||||
|
+
|
||||||
|
if (!ngx_inherited && ccf->daemon) {
|
||||||
|
- if (ngx_daemon(cycle->log) != NGX_OK) {
|
||||||
|
+ child_pid = ngx_daemon(cycle->log);
|
||||||
|
+ if (child_pid == NGX_ERROR) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -359,8 +366,19 @@ main(int argc, char *const *argv)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) {
|
||||||
|
- return 1;
|
||||||
|
+ /* If ngx_daemon() returned the child's PID in the parent process
|
||||||
|
+ * after the fork() set ngx_pid to the child_pid, which gets
|
||||||
|
+ * written to the PID file, then exit.
|
||||||
|
+ * For NGX_WIN32 always write the PID file
|
||||||
|
+ * For others, only write it from the parent process */
|
||||||
|
+ if (child_pid < NGX_OK || child_pid > NGX_OK) {
|
||||||
|
+ ngx_pid = child_pid > NGX_OK ? child_pid : ngx_pid;
|
||||||
|
+ if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) {
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (child_pid > NGX_OK) {
|
||||||
|
+ exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ngx_log_redirect_stderr(cycle) != NGX_OK) {
|
||||||
|
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c
|
||||||
|
index 385c49b..3719854 100644
|
||||||
|
--- a/src/os/unix/ngx_daemon.c
|
||||||
|
+++ b/src/os/unix/ngx_daemon.c
|
||||||
|
@@ -7,14 +7,17 @@
|
||||||
|
|
||||||
|
#include <ngx_config.h>
|
||||||
|
#include <ngx_core.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
|
ngx_int_t
|
||||||
|
ngx_daemon(ngx_log_t *log)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
+ /* retain the return value for passing back to caller */
|
||||||
|
+ pid_t pid_child = fork();
|
||||||
|
|
||||||
|
- switch (fork()) {
|
||||||
|
+ switch (pid_child) {
|
||||||
|
case -1:
|
||||||
|
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed");
|
||||||
|
return NGX_ERROR;
|
||||||
|
@@ -23,7 +26,8 @@ ngx_daemon(ngx_log_t *log)
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
- exit(0);
|
||||||
|
+ /* let caller do the exit() */
|
||||||
|
+ return pid_child;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngx_parent = ngx_pid;
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
30
aalexeev.key
30
aalexeev.key
@ -1,30 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v1.4.12 (Darwin)
|
|
||||||
|
|
||||||
mQENBE+EK6YBCAC/0pVOAUxCXwkOY/g6B7wAoIerb57lfMUqGUIpyZdRlD9ZADtF
|
|
||||||
kZLQxvsyFkXxfoCZa0zCXT4CCbkYIVtuM5dDnwN4NH6vLxVFT+WhCXoL9MfPfSTp
|
|
||||||
bQQIQxeYtl8Rm+9XoLYlrhGVeSOIPVTsziqR7RRKN1WSir0s8X6ky25hJHbvlWb8
|
|
||||||
5MNKt8VAS9sOsMOl4RAAWeWWjPvc9ZHPwf6yXYOV9wsvBJGv3O4b+xu59a90Zq47
|
|
||||||
UBXGkT0a6+xNNJNvXbupQAARJGyRBBaAylzOFNYKVi3tthqsyfWCoekYcCgq8zGG
|
|
||||||
aGUb2aQOR8/J/8v9/E1W3IeF7EKgNNd//hV3ABEBAAG0IUFuZHJldyBBbGV4ZWV2
|
|
||||||
IDxhbmRyZXdAbmdpbnguY29tPokBOAQTAQIAIgUCT4QrpgIbAwYLCQgHAwIGFQgC
|
|
||||||
CQoLBBYCAwECHgECF4AACgkQq9TTs/WAa021cwgAqNutkLpXYsc3kqAMifiVjOSD
|
|
||||||
sehoq3a+yTW60wy7AZrXebL+lAeUTkDUvrC6O2wXBYrj66SGE+0yhNT/hFkfc9IU
|
|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77FeEdJJ7RlsqMh3J8
|
|
||||||
37/RI7/cLPgUmyYTOSRC1XyJErdwExrBQEvcQkySa5I=
|
|
||||||
=Qg0t
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
37
is.key
37
is.key
@ -1,37 +0,0 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
|
||||||
Version: GnuPG v1.4.11 (FreeBSD)
|
|
||||||
|
|
||||||
mQGiBEqhKBQRBACyOVW0cliZfreT5AEPoXtZPZ6E8GUEkik8PUBskDkNxGh0Jgdj
|
|
||||||
CDYcJfd/ugTmhfZMB72essKaX9GauSVQCwcQn2AYX/zzGAcS5817xHcp9LPofGoF
|
|
||||||
0tvH5kS9I+OEVLsfmXkLvLcQBvwU2NtKRLAlRxVy4gi0ZBOwlbS+4s7y3wCgjQA2
|
|
||||||
uIWVxNMJ300VycFiAPlddXcD/2R+KbLHSNLxRMXzrXmuTELdg9Xl1lvXo/DSCj6s
|
|
||||||
JeL9Hurto1VVFsrkFLdFxBIv3PxILx25PrOaEnKyJACKu0LVr4WSPoY58tPHoyzj
|
|
||||||
M+pkvqrE+bcYD1frBVId0AsbS9+Y1RXaNLM8TNzDs/AVJmRUcuHoeW4QhCPKDWOd
|
|
||||||
6LYBBACJoSjoWCba1xfWqQkZuX0MZeMJSliUmMii+FU2gB1NCPbEHQnr6DaOu9Ot
|
|
||||||
a+2BOOoMaO6wZBuFqBrW74tyCmpkQDBBJMedf3TQwTzL3eCrbDuws86R4yMqQo/2
|
|
||||||
QksB0ItrBTezD0n39dkCnhiB0MFVPqt3OcWaiFpFdOhW6EhBmbQcSWdvciBTeXNv
|
|
||||||
ZXYgPGlnb3JAc3lzb2V2LnJ1PohGBBARAgAGBQJOTlzdAAoJEOzw6QssFyCDWEkA
|
|
||||||
oJPIUQzB/YTW2sBQ+CVmjKQXAWIQAJ9j/uCjOaaB6NZP6TH8sqMYctyui4hgBBMR
|
|
||||||
AgAgBQJKoSgUAhsDBgsJCAcD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
||||||
SLokq7QVtFY8yyV7oAVAhB0vDE545d5TcTP29Wu6huJ7x94PQ2wuYmGV76m/05+3
|
|
||||||
sTrfPRVe4d8uW238UPxUMFdT7XQ9lDS0bskkYgDOWKk+iZ5HPe5tuK3aUl1QN6TZ
|
|
||||||
5qaprppB8+CxM2R7BFZD1pU0WicRGqPPhtnXKfuh/DOSBcQPw+dIjsKqXcyde1iE
|
|
||||||
pVfrZ1V5YpxVckTU+Zg5VrBhfez7Vazxt8f+rRVXcLKbZ1Z5KquqdrUzhkCISQQY
|
|
||||||
EQIACQUCSqEoFAIbDAAKCRCpN2E5pSTFPvnqAKCKuPJRzq+NTHlsyLiJhM8tQe43
|
|
||||||
ZgCeLScMWL6OD4W8wUkcEnEuw+6So80=
|
|
||||||
=bMVt
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
|
|
||||||
index aee7a58..bcceecb 100644
|
|
||||||
--- a/src/core/ngx_cycle.c
|
|
||||||
+++ b/src/core/ngx_cycle.c
|
|
||||||
@@ -1108,7 +1108,7 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user)
|
|
||||||
}
|
|
||||||
|
|
||||||
fd = ngx_open_file(file[i].name.data, NGX_FILE_APPEND,
|
|
||||||
- NGX_FILE_CREATE_OR_OPEN, NGX_FILE_DEFAULT_ACCESS);
|
|
||||||
+ NGX_FILE_CREATE_OR_OPEN, NGX_FILE_DEFAULT_ACCESS | 0220);
|
|
||||||
|
|
||||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
|
||||||
"reopen file \"%s\", old:%d new:%d",
|
|
@ -1,13 +0,0 @@
|
|||||||
--- auto/cc/gcc.orig 2007-03-22 08:34:53.000000000 -0600
|
|
||||||
+++ auto/cc/gcc 2007-03-22 08:58:47.000000000 -0600
|
|
||||||
@@ -172,7 +172,9 @@
|
|
||||||
|
|
||||||
|
|
||||||
# stop on warning
|
|
||||||
-CFLAGS="$CFLAGS -Werror"
|
|
||||||
+# This combined with Fedora's FORTIFY_SOURCE=2 option causes it nginx
|
|
||||||
+# to not compile.
|
|
||||||
+#CFLAGS="$CFLAGS -Werror"
|
|
||||||
|
|
||||||
# debug
|
|
||||||
CFLAGS="$CFLAGS -g"
|
|
@ -45,11 +45,11 @@ http {
|
|||||||
include /etc/nginx/default.d/*.conf;
|
include /etc/nginx/default.d/*.conf;
|
||||||
|
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
location = /40x.html {
|
location = /404.html {
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/var/log/nginx/*log {
|
/var/log/nginx/*log {
|
||||||
create 0664 nginx root
|
|
||||||
daily
|
daily
|
||||||
rotate 10
|
rotate 10
|
||||||
missingok
|
missingok
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=The nginx HTTP and reverse proxy server
|
Description=The nginx HTTP and reverse proxy server
|
||||||
After=network.target remote-fs.target nss-lookup.target
|
After=network-online.target remote-fs.target nss-lookup.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -11,7 +12,7 @@ PIDFile=/run/nginx.pid
|
|||||||
ExecStartPre=/usr/bin/rm -f /run/nginx.pid
|
ExecStartPre=/usr/bin/rm -f /run/nginx.pid
|
||||||
ExecStartPre=/usr/sbin/nginx -t
|
ExecStartPre=/usr/sbin/nginx -t
|
||||||
ExecStart=/usr/sbin/nginx
|
ExecStart=/usr/sbin/nginx
|
||||||
ExecReload=/bin/kill -s HUP $MAINPID
|
ExecReload=/usr/sbin/nginx -s reload
|
||||||
KillSignal=SIGQUIT
|
KillSignal=SIGQUIT
|
||||||
TimeoutStopSec=5
|
TimeoutStopSec=5
|
||||||
KillMode=mixed
|
KillMode=mixed
|
||||||
|
116
nginx.spec
116
nginx.spec
@ -28,8 +28,8 @@
|
|||||||
|
|
||||||
Name: nginx
|
Name: nginx
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.18.0
|
Version: 1.20.0
|
||||||
Release: 6%{?dist}
|
Release: 3%{?dist}
|
||||||
|
|
||||||
Summary: A high performance web server and reverse proxy server
|
Summary: A high performance web server and reverse proxy server
|
||||||
# BSD License (two clause)
|
# BSD License (two clause)
|
||||||
@ -40,11 +40,9 @@ URL: https://nginx.org
|
|||||||
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
|
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
|
||||||
Source1: https://nginx.org/download/nginx-%{version}.tar.gz.asc
|
Source1: https://nginx.org/download/nginx-%{version}.tar.gz.asc
|
||||||
# Keys are found here: https://nginx.org/en/pgp_keys.html
|
# Keys are found here: https://nginx.org/en/pgp_keys.html
|
||||||
Source2: https://nginx.org/keys/aalexeev.key
|
Source2: https://nginx.org/keys/maxim.key
|
||||||
Source3: https://nginx.org/keys/is.key
|
Source3: https://nginx.org/keys/mdounin.key
|
||||||
Source4: https://nginx.org/keys/maxim.key
|
Source4: https://nginx.org/keys/sb.key
|
||||||
Source5: https://nginx.org/keys/mdounin.key
|
|
||||||
Source6: https://nginx.org/keys/sb.key
|
|
||||||
Source10: nginx.service
|
Source10: nginx.service
|
||||||
Source11: nginx.logrotate
|
Source11: nginx.logrotate
|
||||||
Source12: nginx.conf
|
Source12: nginx.conf
|
||||||
@ -58,19 +56,23 @@ Source210: UPGRADE-NOTES-1.6-to-1.10
|
|||||||
|
|
||||||
# removes -Werror in upstream build scripts. -Werror conflicts with
|
# removes -Werror in upstream build scripts. -Werror conflicts with
|
||||||
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
|
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
|
||||||
Patch0: nginx-auto-cc-gcc.patch
|
Patch0: 0001-remove-Werror-in-upstream-build-scripts.patch
|
||||||
|
|
||||||
# downstream patch - changing logs permissions to 664 instead
|
# downstream patch - fix PIDFile race condition (rhbz#1869026)
|
||||||
# previous 644
|
# rejected upstream: https://trac.nginx.org/nginx/ticket/1897
|
||||||
Patch2: nginx-1.12.1-logs-perm.patch
|
Patch1: 0002-fix-PIDFile-handling.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
%if 0%{?with_gperftools}
|
%if 0%{?with_gperftools}
|
||||||
BuildRequires: gperftools-devel
|
BuildRequires: gperftools-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: openssl11-devel
|
||||||
|
%endif
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
@ -86,11 +88,6 @@ Obsoletes: nginx-mod-http-geoip <= 1:1.16
|
|||||||
Requires: system-logos-httpd
|
Requires: system-logos-httpd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
|
||||||
# Introduced at 1:1.10.0-1 to ease upgrade path. To be removed later.
|
|
||||||
Requires: nginx-all-modules = %{epoch}:%{version}-%{release}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
Requires: pcre
|
Requires: pcre
|
||||||
Requires(pre): nginx-filesystem
|
Requires(pre): nginx-filesystem
|
||||||
@ -98,7 +95,9 @@ Requires(pre): nginx-filesystem
|
|||||||
Requires: nginx-mimetypes
|
Requires: nginx-mimetypes
|
||||||
%endif
|
%endif
|
||||||
Provides: webserver
|
Provides: webserver
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
@ -195,11 +194,9 @@ Requires: nginx
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
# Combine all keys from upstream into one file
|
# Combine all keys from upstream into one file
|
||||||
cat %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} > %{_builddir}/%{name}.gpg
|
cat %{S:2} %{S:3} %{S:4} > %{_builddir}/%{name}.gpg
|
||||||
%{gpgverify} --keyring='%{_builddir}/%{name}.gpg' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
%{gpgverify} --keyring='%{_builddir}/%{name}.gpg' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
%patch0 -p0
|
|
||||||
%patch2 -p1
|
|
||||||
cp %{SOURCE200} %{SOURCE210} %{SOURCE10} %{SOURCE12} .
|
cp %{SOURCE200} %{SOURCE210} %{SOURCE10} %{SOURCE12} .
|
||||||
|
|
||||||
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
||||||
@ -207,6 +204,13 @@ sed -i -e 's#KillMode=.*#KillMode=process#g' nginx.service
|
|||||||
sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf
|
sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 7
|
||||||
|
sed \
|
||||||
|
-e 's|\(ngx_feature_path=\)$|\1%{_includedir}/openssl11|' \
|
||||||
|
-e 's|\(ngx_feature_libs="\)|\1-L%{_libdir}/openssl11 |' \
|
||||||
|
-i auto/lib/openssl/conf
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# nginx does not utilize a standard configure script. It has its own
|
# nginx does not utilize a standard configure script. It has its own
|
||||||
@ -232,43 +236,44 @@ if ! ./configure \
|
|||||||
--lock-path=/run/lock/subsys/nginx \
|
--lock-path=/run/lock/subsys/nginx \
|
||||||
--user=%{nginx_user} \
|
--user=%{nginx_user} \
|
||||||
--group=%{nginx_user} \
|
--group=%{nginx_user} \
|
||||||
|
--with-compat \
|
||||||
|
--with-debug \
|
||||||
%if 0%{?with_aio}
|
%if 0%{?with_aio}
|
||||||
--with-file-aio \
|
--with-file-aio \
|
||||||
%endif
|
%endif
|
||||||
--with-ipv6 \
|
%if 0%{?with_gperftools}
|
||||||
--with-http_ssl_module \
|
--with-google_perftools_module \
|
||||||
--with-http_v2_module \
|
%endif
|
||||||
--with-http_realip_module \
|
|
||||||
--with-stream_ssl_preread_module \
|
|
||||||
--with-http_addition_module \
|
--with-http_addition_module \
|
||||||
--with-http_xslt_module=dynamic \
|
--with-http_auth_request_module \
|
||||||
--with-http_image_filter_module=dynamic \
|
--with-http_dav_module \
|
||||||
|
--with-http_degradation_module \
|
||||||
|
--with-http_flv_module \
|
||||||
%if %{with geoip}
|
%if %{with geoip}
|
||||||
--with-http_geoip_module=dynamic \
|
--with-http_geoip_module=dynamic \
|
||||||
%endif
|
%endif
|
||||||
--with-http_sub_module \
|
|
||||||
--with-http_dav_module \
|
|
||||||
--with-http_flv_module \
|
|
||||||
--with-http_mp4_module \
|
|
||||||
--with-http_gunzip_module \
|
--with-http_gunzip_module \
|
||||||
--with-http_gzip_static_module \
|
--with-http_gzip_static_module \
|
||||||
--with-http_random_index_module \
|
--with-http_image_filter_module=dynamic \
|
||||||
--with-http_secure_link_module \
|
--with-http_mp4_module \
|
||||||
--with-http_degradation_module \
|
|
||||||
--with-http_slice_module \
|
|
||||||
--with-http_stub_status_module \
|
|
||||||
--with-http_perl_module=dynamic \
|
--with-http_perl_module=dynamic \
|
||||||
--with-http_auth_request_module \
|
--with-http_random_index_module \
|
||||||
|
--with-http_realip_module \
|
||||||
|
--with-http_secure_link_module \
|
||||||
|
--with-http_slice_module \
|
||||||
|
--with-http_ssl_module \
|
||||||
|
--with-http_stub_status_module \
|
||||||
|
--with-http_sub_module \
|
||||||
|
--with-http_v2_module \
|
||||||
|
--with-http_xslt_module=dynamic \
|
||||||
--with-mail=dynamic \
|
--with-mail=dynamic \
|
||||||
--with-mail_ssl_module \
|
--with-mail_ssl_module \
|
||||||
--with-pcre \
|
--with-pcre \
|
||||||
--with-pcre-jit \
|
--with-pcre-jit \
|
||||||
--with-stream=dynamic \
|
--with-stream=dynamic \
|
||||||
--with-stream_ssl_module \
|
--with-stream_ssl_module \
|
||||||
%if 0%{?with_gperftools}
|
--with-stream_ssl_preread_module \
|
||||||
--with-google_perftools_module \
|
--with-threads \
|
||||||
%endif
|
|
||||||
--with-debug \
|
|
||||||
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
|
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
|
||||||
--with-ld-opt="$nginx_ldopts"; then
|
--with-ld-opt="$nginx_ldopts"; then
|
||||||
: configure failed
|
: configure failed
|
||||||
@ -276,11 +281,11 @@ if ! ./configure \
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
%make_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot} INSTALLDIRS=vendor
|
%make_install INSTALLDIRS=vendor
|
||||||
|
|
||||||
find %{buildroot} -type f -name .packlist -exec rm -f '{}' \;
|
find %{buildroot} -type f -name .packlist -exec rm -f '{}' \;
|
||||||
find %{buildroot} -type f -name perllocal.pod -exec rm -f '{}' \;
|
find %{buildroot} -type f -name perllocal.pod -exec rm -f '{}' \;
|
||||||
@ -451,7 +456,7 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/nginx
|
%config(noreplace) %{_sysconfdir}/logrotate.d/nginx
|
||||||
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx
|
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx
|
||||||
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx/tmp
|
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx/tmp
|
||||||
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/log/nginx
|
%dir %{_localstatedir}/log/nginx
|
||||||
%dir %{_libdir}/nginx/modules
|
%dir %{_libdir}/nginx/modules
|
||||||
|
|
||||||
%files all-modules
|
%files all-modules
|
||||||
@ -496,6 +501,27 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 26 2021 Lubos Uhliarik <luhliari@redhat.com> - 1:1.20.0-3
|
||||||
|
- Resolve: #1953639 - Rebase nginx to 1.20
|
||||||
|
|
||||||
|
* Wed Apr 21 2021 Felix Kaechele <heffer@fedoraproject.org> - 1:1.20.0-2
|
||||||
|
- sync rawhide and EPEL7 spec files again
|
||||||
|
- systemd service reload now checks config file (rhbz#1565377)
|
||||||
|
- drop nginx requirement on nginx-all-modules (rhbz#1708799)
|
||||||
|
- let nginx handle log creation on logrotate (rhbz#1683388)
|
||||||
|
- have log directory owned by root (rhbz#1390183, CVE-2016-1247)
|
||||||
|
- remove obsolete --with-ipv6 (src PR#8)
|
||||||
|
- correction: pcre2 is actually not supported by nginx, reintroduce pcre
|
||||||
|
|
||||||
|
* Wed Apr 21 2021 Felix Kaechele <heffer@fedoraproject.org> - 1:1.20.0-1
|
||||||
|
- update to 1.20.0
|
||||||
|
- sync with mainline spec file
|
||||||
|
- order configure options alphabetically for easier comparinggit
|
||||||
|
- add --with-compat option (rhbz#1834452)
|
||||||
|
- add patch to fix PIDFile race condition (rhbz#1869026)
|
||||||
|
- use pcre2 instead of pcre (rhbz#1938984)
|
||||||
|
- add Wants=network-online.target to systemd unit (rhbz#1943779)
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.18.0-6
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.18.0-6
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (nginx-1.18.0.tar.gz) = 8c21eeb62ab6e32e436932500f700bd2fb99fd2d29e43c08a5bfed4714c189c29c7141db551fcd5d2437303b7439f71758f7407dfd3e801e704e45e7daa78ddb
|
SHA512 (nginx-1.20.0.tar.gz.asc) = adc401a3f26461caec4cb3404ff7f2034baa799e03c0a9cd5ddc058a7ef41c29efc03d93a3c9b1794092319f611e29182092b610600c6f6beca6b881138bc22d
|
||||||
SHA512 (nginx-1.18.0.tar.gz.asc) = f6a8eaf7f8cdf3c32d7da916a046887a76ff8fbebf7d6b3e75a8ab243cb71e5aa0bdc0c88c2ebae6f0a128c7ee61fc129b4ba5cd9f0e5cfd4808e60c71ca8e4c
|
SHA512 (nginx-1.20.0.tar.gz) = 06433bde23610ab27deeb6bf8c78148e4249b603d194c81e71a08fc159caead07ea659510286fb6d02668d53b9afcdaabdde8692480ae83de4a531adc1b930ca
|
||||||
|
Loading…
Reference in New Issue
Block a user