diff --git a/0001-remove-Werror-in-upstream-build-scripts.patch b/0001-remove-Werror-in-upstream-build-scripts.patch deleted file mode 100644 index 2695031120d651f7c565ca61581ec67a926333ce..0000000000000000000000000000000000000000 --- a/0001-remove-Werror-in-upstream-build-scripts.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 00cab63102084b89de0a3494a1d023c4b1d4982b Mon Sep 17 00:00:00 2001 -From: Felix Kaechele -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 ---- - 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 - diff --git a/0002-fix-PIDFile-handling.patch b/0002-fix-PIDFile-handling.patch deleted file mode 100644 index 5748b638e6099474940177121a83dd0cfb903def..0000000000000000000000000000000000000000 --- a/0002-fix-PIDFile-handling.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 62470498cca9a209aa9904668c1949f5229123af Mon Sep 17 00:00:00 2001 -From: Felix Kaechele -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 -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 ---- - 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 - #include -+#include - - - 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 - diff --git a/nginx.spec b/nginx.spec index 4062082b6c21e2f156cc379ace8258dcb2c6cf73..a3aac87dc3125246ae2505623261cea1da004b35 100644 --- a/nginx.spec +++ b/nginx.spec @@ -23,8 +23,8 @@ Name: nginx -Version: 1.22.1 -Release: 5%{?dist} +Version: 1.25.2 +Release: 1%{?dist} Summary: A high performance web server and reverse proxy server License: BSD URL: https://nginx.org @@ -47,9 +47,6 @@ Source104: 50x.html Source200: README.dynamic Source210: UPGRADE-NOTES-1.6-to-1.10 -Patch3000: 0001-remove-Werror-in-upstream-build-scripts.patch -Patch3001: 0002-fix-PIDFile-handling.patch - BuildRequires: make, gcc BuildRequires: openssl-devel, pcre2-devel, zlib-devel, systemd %if 0%{?with_gperftools} @@ -490,6 +487,9 @@ fi %changelog +* Wed Aug 23 2023 cunshunxia - 1.25.2-1 +- upgrade to 1.25.2 + * Fri Apr 28 2023 OpenCloudOS Release Engineering - 1.22.1-5 - Rebuilt for OpenCloudOS Stream 23.05 diff --git a/sources b/sources index 18f0d0949688d4098e23ed0ad92e03c420cd8f9b..5c6225eeb8416e414f3f285fc83ffd1fc4dd1cf3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nginx-1.22.1.tar.gz) = 1d468dcfa9bbd348b8a5dc514ac1428a789e73a92384c039b73a51ce376785f74bf942872c5594a9fcda6bbf44758bd727ce15ac2395f1aa989c507014647dcc +SHA512 (nginx-1.25.2.tar.gz) = 47da46d823f336432aca6c4cd54c76660af60620518d5c518504033a9fd6b411fd6d41e4aac2c8200311a53f96159aa3da8920145e8ed85596c9c2c14e20cb27