Browse Source

新增:nginx-1.23.2

呉真 2 years ago
parent
commit
cc9630fe06
3 changed files with 13 additions and 10 deletions
  1. 1 4
      nginx.check-reload.sh
  2. 10 1
      nginx.spec
  3. 2 5
      nginx.upgrade.sh

+ 1 - 4
nginx.check-reload.sh

@@ -2,9 +2,6 @@
 #
 #
 # Legacy action script to visually check if nginx fails to reload
 # Legacy action script to visually check if nginx fails to reload
 
 
-# Source function library.
-[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
-
 prog=nginx
 prog=nginx
 pidfile=`/usr/bin/systemctl show -p PIDFile nginx.service | sed 's/^PIDFile=//' | tr ' ' '\n'`
 pidfile=`/usr/bin/systemctl show -p PIDFile nginx.service | sed 's/^PIDFile=//' | tr ' ' '\n'`
 CHECKSLEEP=3
 CHECKSLEEP=3
@@ -14,7 +11,7 @@ trap '/bin/rm -f $templog' 0
 /usr/bin/tail --pid=$$ -n 0 --follow=name /var/log/nginx/error.log > $templog &
 /usr/bin/tail --pid=$$ -n 0 --follow=name /var/log/nginx/error.log > $templog &
 /bin/sleep 1
 /bin/sleep 1
 /bin/echo -n $"Sending reload signal to $prog: "
 /bin/echo -n $"Sending reload signal to $prog: "
-killproc -p ${pidfile} ${prog} -HUP
+pkill -F ${pidfile} ${prog} --signal HUP
 /bin/echo
 /bin/echo
 /bin/sleep $CHECKSLEEP
 /bin/sleep $CHECKSLEEP
 /bin/grep -E "\[emerg\]|\[alert\]" $templog
 /bin/grep -E "\[emerg\]|\[alert\]" $templog

+ 10 - 1
nginx.spec

@@ -18,6 +18,7 @@ Requires(postun): systemd
 Epoch: %{epoch}
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
 Requires: openssl >= 1.0.2
 Requires: openssl >= 1.0.2
+Requires: procps-ng
 BuildRequires: openssl-devel >= 1.0.2
 BuildRequires: openssl-devel >= 1.0.2
 %define dist .el7
 %define dist .el7
 %endif
 %endif
@@ -27,6 +28,7 @@ BuildRequires: openssl-devel >= 1.0.2
 Epoch: %{epoch}
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
 Requires: openssl11 >= 1.1.1
 Requires: openssl11 >= 1.1.1
+Requires: procps-ng
 BuildRequires: openssl11-devel >= 1.1.1
 BuildRequires: openssl11-devel >= 1.1.1
 %endif
 %endif
 
 
@@ -34,6 +36,7 @@ BuildRequires: openssl11-devel >= 1.1.1
 %define epoch 1
 %define epoch 1
 Epoch: %{epoch}
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
+Requires: procps-ng
 BuildRequires: openssl-devel >= 1.1.1
 BuildRequires: openssl-devel >= 1.1.1
 %define _debugsource_template %{nil}
 %define _debugsource_template %{nil}
 %endif
 %endif
@@ -42,6 +45,7 @@ BuildRequires: openssl-devel >= 1.1.1
 %define epoch 1
 %define epoch 1
 Epoch: %{epoch}
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
+Requires: procps-ng
 BuildRequires: openssl-devel
 BuildRequires: openssl-devel
 %define _debugsource_template %{nil}
 %define _debugsource_template %{nil}
 %endif
 %endif
@@ -50,6 +54,7 @@ BuildRequires: openssl-devel
 %define _group Productivity/Networking/Web/Servers
 %define _group Productivity/Networking/Web/Servers
 %define nginx_loggroup trusted
 %define nginx_loggroup trusted
 Requires(pre): shadow
 Requires(pre): shadow
+Requires: procps
 BuildRequires: libopenssl-devel
 BuildRequires: libopenssl-devel
 %define _debugsource_template %{nil}
 %define _debugsource_template %{nil}
 %endif
 %endif
@@ -58,6 +63,7 @@ BuildRequires: libopenssl-devel
 %define _debugsource_template %{nil}
 %define _debugsource_template %{nil}
 %global _hardened_build 1
 %global _hardened_build 1
 %define _group System Environment/Daemons
 %define _group System Environment/Daemons
+Requires: procps-ng
 BuildRequires: openssl-devel
 BuildRequires: openssl-devel
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
 %endif
 %endif
@@ -66,7 +72,7 @@ Requires(pre): shadow-utils
 
 
 %define openssl_version 1.1.1q
 %define openssl_version 1.1.1q
 
 
-%define base_version 1.23.1
+%define base_version 1.23.2
 %define base_release 1%{?dist}.ngx
 %define base_release 1%{?dist}.ngx
 
 
 %define bdir %{_builddir}/%{name}-%{base_version}
 %define bdir %{_builddir}/%{name}-%{base_version}
@@ -306,6 +312,9 @@ if [ $1 -ge 1 ]; then
 fi
 fi
 
 
 %changelog
 %changelog
+* Wed Oct 19 2022 Nginx Packaging <nginx-packaging@f5.com> - 1.23.2-1%{?dist}.ngx
+- 1.23.2-1
+
 * Tue Jul 19 2022 Nginx Packaging <nginx-packaging@f5.com> - 1.23.1-1%{?dist}.ngx
 * Tue Jul 19 2022 Nginx Packaging <nginx-packaging@f5.com> - 1.23.1-1%{?dist}.ngx
 - 1.23.1-1
 - 1.23.1-1
 
 

+ 2 - 5
nginx.upgrade.sh

@@ -2,9 +2,6 @@
 #
 #
 # Legacy action script for "service nginx upgrade"
 # Legacy action script for "service nginx upgrade"
 
 
-# Source function library.
-[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
-
 if [ -f /etc/sysconfig/nginx ]; then
 if [ -f /etc/sysconfig/nginx ]; then
     . /etc/sysconfig/nginx
     . /etc/sysconfig/nginx
 fi
 fi
@@ -19,14 +16,14 @@ UPGRADEWAITLOOPS=${UPGRADEWAITLOOPS:-5}
 oldbinpidfile=${pidfile}.oldbin
 oldbinpidfile=${pidfile}.oldbin
 ${nginx} -t -c ${conffile} -q || return 6
 ${nginx} -t -c ${conffile} -q || return 6
 echo -n $"Starting new master $prog: "
 echo -n $"Starting new master $prog: "
-killproc -p ${pidfile} ${prog} -USR2
+pkill -F ${pidfile} ${prog} --signal USR2
 echo
 echo
 
 
 for i in `/usr/bin/seq $UPGRADEWAITLOOPS`; do
 for i in `/usr/bin/seq $UPGRADEWAITLOOPS`; do
     /bin/sleep $SLEEPSEC
     /bin/sleep $SLEEPSEC
     if [ -f ${oldbinpidfile} -a -f ${pidfile} ]; then
     if [ -f ${oldbinpidfile} -a -f ${pidfile} ]; then
         echo -n $"Graceful shutdown of old $prog: "
         echo -n $"Graceful shutdown of old $prog: "
-        killproc -p ${oldbinpidfile} ${prog} -QUIT
+        pkill -F ${oldbinpidfile} ${prog} --signal QUIT
         echo
         echo
         exit 0
         exit 0
     fi
     fi