1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-07 11:49:40 +00:00

lang/php82: Update version 8.2.20=>8.2.21

- Add profile support in php-fpm rc script for running multiple php
  master process
- Make the rc script jail ready [1]

Changelog: https://www.php.net/ChangeLog-8.php#8.2.21
Reported by:	netchild [1]
This commit is contained in:
Muhammad Moinur Rahman 2024-07-28 02:26:34 +02:00
parent 55272c3874
commit d6c16b39ea
No known key found for this signature in database
GPG Key ID: BDB9B5A617C0BC91
3 changed files with 49 additions and 13 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= php82
DISTVERSION= 8.2.20
DISTVERSION= 8.2.21
PORTREVISION?= 0
CATEGORIES?= lang devel www
MASTER_SITES= PHP/distributions

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1717709436
SHA256 (php-8.2.20.tar.xz) = 4474cc430febef6de7be958f2c37253e5524d5c5331a7e1765cd2d2234881e50
SIZE (php-8.2.20.tar.xz) = 12097568
TIMESTAMP = 1722079018
SHA256 (php-8.2.21.tar.xz) = 8cc44d51bb2506399ec176f70fe110f0c9e1f7d852a5303a2cd1403402199707
SIZE (php-8.2.21.tar.xz) = 12106792

View File

@ -6,8 +6,13 @@
#
# Add the following line to /etc/rc.conf to enable php-fpm:
# php_fpm_enable="YES"
#
# php-fpm_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable php-fpm
# php-fpm_profiles (str): Set to "" by default.
# Define your profiles here.
# php_fpm_pid_prefix (str): Set to "" by default.
# When using profiles manually assign value to "php_fpm_"
# for prevent collision with other PIDs names.
. /etc/rc.subr
@ -17,23 +22,54 @@ rcvar=php_fpm_enable
start_precmd="php_fpm_prestart"
restart_precmd="php_fpm_checkconfig"
reload_precmd="php_fpm_checkconfig"
command="%%PREFIX%%/sbin/php-fpm"
configtest_cmd="php_fpm_checkconfig"
_pidprefix="/var/run"
pidfile="${_pidprefix}/php-fpm.pid"
required_files="%%PREFIX%%/etc/php-fpm.conf"
load_rc_config "$name"
load_rc_config "${name}"
: ${php_fpm_enable="NO"}
: ${php_fpm_umask=""}
: ${php_fpm_svcj_options:="net_basic"}
if [ -n "$2" ]; then
profile="$2"
if [ "x${php_fpm_profiles}" != "x" ]; then
pidfile="${_pidprefix}/${php_fpm_pid_prefix}php-fpm-${profile}.pid"
eval php_fpm_configfile="\${php_fpm_${profile}_configfile:-}"
if [ "x${php_fpm_configfile}" = "x" ]; then
echo "You must define a configuration file (php_fpm_${profile}_configfile)"
exit 1
fi
required_files="${php_fpm_configfile}"
eval php_fpm_enable="\${php_fpm_${profile}_enable:-${php_fpm_enable}}"
php_fpm_flags="-y ${php_fpm_configfile} -g ${pidfile}"
else
echo "$0: extra argument ignored"
fi
else
if [ "x${php_fpm_profiles}" != "x" -a "x$1" != "x" ]; then
for profile in ${php_fpm_profiles}; do
echo "===> php_fpm profile: ${profile}"
/usr/local/etc/rc.d/php-fpm $1 ${profile}
retcode="$?"
if [ "0${retcode}" -ne 0 ]; then
failed="${profile} (${retcode}) ${failed:-}"
else
success="${profile} ${success:-}"
fi
done
exit 0
fi
fi
extra_commands="reload configtest logrotate"
command="%%PREFIX%%/sbin/php-fpm"
pidfile="/var/run/php-fpm.pid"
sig_stop="QUIT"
sig_reload="USR2"
logrotate_cmd="php_fpm_logrotate"
required_files="%%PREFIX%%/etc/php-fpm.conf"
php_fpm_logrotate() {
if [ -z "$rc_pid" ]; then
_run_rc_notrunning
@ -46,7 +82,7 @@ php_fpm_logrotate() {
php_fpm_checkconfig()
{
echo "Performing sanity check on php-fpm configuration:"
eval ${command} -t
eval ${command} ${php_fpm_flags} -t
}
php_fpm_prestart()