Jelajahi Sumber

新增:nginx-1.23.2

呉真 2 tahun lalu
induk
melakukan
cc9630fe06
3 mengubah file dengan 13 tambahan dan 10 penghapusan
  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
 
-# Source function library.
-[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
-
 prog=nginx
 pidfile=`/usr/bin/systemctl show -p PIDFile nginx.service | sed 's/^PIDFile=//' | tr ' ' '\n'`
 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 &
 /bin/sleep 1
 /bin/echo -n $"Sending reload signal to $prog: "
-killproc -p ${pidfile} ${prog} -HUP
+pkill -F ${pidfile} ${prog} --signal HUP
 /bin/echo
 /bin/sleep $CHECKSLEEP
 /bin/grep -E "\[emerg\]|\[alert\]" $templog

+ 10 - 1
nginx.spec

@@ -18,6 +18,7 @@ Requires(postun): systemd
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires: openssl >= 1.0.2
+Requires: procps-ng
 BuildRequires: openssl-devel >= 1.0.2
 %define dist .el7
 %endif
@@ -27,6 +28,7 @@ BuildRequires: openssl-devel >= 1.0.2
 Epoch: %{epoch}
 Requires(pre): shadow-utils
 Requires: openssl11 >= 1.1.1
+Requires: procps-ng
 BuildRequires: openssl11-devel >= 1.1.1
 %endif
 
@@ -34,6 +36,7 @@ BuildRequires: openssl11-devel >= 1.1.1
 %define epoch 1
 Epoch: %{epoch}
 Requires(pre): shadow-utils
+Requires: procps-ng
 BuildRequires: openssl-devel >= 1.1.1
 %define _debugsource_template %{nil}
 %endif
@@ -42,6 +45,7 @@ BuildRequires: openssl-devel >= 1.1.1
 %define epoch 1
 Epoch: %{epoch}
 Requires(pre): shadow-utils
+Requires: procps-ng
 BuildRequires: openssl-devel
 %define _debugsource_template %{nil}
 %endif
@@ -50,6 +54,7 @@ BuildRequires: openssl-devel
 %define _group Productivity/Networking/Web/Servers
 %define nginx_loggroup trusted
 Requires(pre): shadow
+Requires: procps
 BuildRequires: libopenssl-devel
 %define _debugsource_template %{nil}
 %endif
@@ -58,6 +63,7 @@ BuildRequires: libopenssl-devel
 %define _debugsource_template %{nil}
 %global _hardened_build 1
 %define _group System Environment/Daemons
+Requires: procps-ng
 BuildRequires: openssl-devel
 Requires(pre): shadow-utils
 %endif
@@ -66,7 +72,7 @@ Requires(pre): shadow-utils
 
 %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 bdir %{_builddir}/%{name}-%{base_version}
@@ -306,6 +312,9 @@ if [ $1 -ge 1 ]; then
 fi
 
 %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
 - 1.23.1-1
 

+ 2 - 5
nginx.upgrade.sh

@@ -2,9 +2,6 @@
 #
 # 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
     . /etc/sysconfig/nginx
 fi
@@ -19,14 +16,14 @@ UPGRADEWAITLOOPS=${UPGRADEWAITLOOPS:-5}
 oldbinpidfile=${pidfile}.oldbin
 ${nginx} -t -c ${conffile} -q || return 6
 echo -n $"Starting new master $prog: "
-killproc -p ${pidfile} ${prog} -USR2
+pkill -F ${pidfile} ${prog} --signal USR2
 echo
 
 for i in `/usr/bin/seq $UPGRADEWAITLOOPS`; do
     /bin/sleep $SLEEPSEC
     if [ -f ${oldbinpidfile} -a -f ${pidfile} ]; then
         echo -n $"Graceful shutdown of old $prog: "
-        killproc -p ${oldbinpidfile} ${prog} -QUIT
+        pkill -F ${oldbinpidfile} ${prog} --signal QUIT
         echo
         exit 0
     fi