lang/php83: Update version 8.3.1=>8.3.2

- Add profile support in php-fpm rc script for running multiple php
  master process

Changelog: https://www.php.net/ChangeLog-8.php#8.3.2
This commit is contained in:
Johan Hendriks 2024-01-18 19:22:20 +01:00 committed by Muhammad Moinur Rahman
parent 147a672354
commit f7c6b6335d
No known key found for this signature in database
GPG Key ID: BDB9B5A617C0BC91
9 changed files with 173 additions and 21 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= php83
DISTVERSION= 8.3.1
DISTVERSION= 8.3.2
PORTREVISION?= 0
CATEGORIES?= lang devel www
MASTER_SITES= PHP/distributions
@ -22,6 +22,7 @@ LIB_DEPENDS= libargon2.so:security/libargon2 \
libpcre2-8.so:devel/pcre2
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${MANPREFIX}/share
CONFIGURE_ARGS+= \
--disable-all \
--program-prefix="" \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1703155183
SHA256 (php-8.3.1.tar.xz) = 56445b1771b2ba5b7573453f9e8a9451e2d810b1741a352fa05259733b1e9758
SIZE (php-8.3.1.tar.xz) = 12444232
TIMESTAMP = 1705528774
SHA256 (php-8.3.2.tar.xz) = 4ffa3e44afc9c590e28dc0d2d31fc61f0139f8b335f11880a121b9f9b9f0634e
SIZE (php-8.3.2.tar.xz) = 12440200

View File

@ -1,4 +1,4 @@
--- configure.ac.orig 2023-12-20 12:44:38 UTC
--- configure.ac.orig 2024-01-16 13:46:41 UTC
+++ configure.ac
@@ -55,6 +55,7 @@ AH_BOTTOM([
@ -43,7 +43,7 @@
exec_prefix=$old_exec_prefix
libdir=$old_libdir
@@ -1705,7 +1705,7 @@ PHP_SUBST(install_binary_targets)
@@ -1706,7 +1706,7 @@ PHP_SUBST(install_binary_targets)
PHP_SUBST(install_targets)
PHP_SUBST(install_binary_targets)

View File

@ -0,0 +1,26 @@
--- ext/standard/filestat.c.orig 2024-01-17 22:13:37 UTC
+++ ext/standard/filestat.c
@@ -281,7 +281,11 @@ PHPAPI zend_result php_get_gid_by_name(const char *nam
char *grbuf;
if (grbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ grbuflen = sysconf(_SC_PAGESIZE);
+#else
return FAILURE;
+#endif
}
grbuf = emalloc(grbuflen);
@@ -407,7 +411,11 @@ PHPAPI zend_result php_get_uid_by_name(const char *nam
char *pwbuf;
if (pwbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ pwbuflen = sysconf(_SC_PAGESIZE);
+#else
return FAILURE;
+#endif
}
pwbuf = emalloc(pwbuflen);

View File

@ -0,0 +1,14 @@
--- main/fopen_wrappers.c.orig 2024-01-17 22:12:12 UTC
+++ main/fopen_wrappers.c
@@ -381,7 +381,11 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *
char *pwbuf;
if (pwbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ pwbuflen = sysconf(_SC_PAGESIZE);
+#else
return FAILURE;
+#endif
}
pwbuf = emalloc(pwbuflen);

View File

@ -0,0 +1,14 @@
--- main/main.c.orig 2024-01-17 22:08:35 UTC
+++ main/main.c
@@ -1459,7 +1459,11 @@ PHPAPI char *php_get_current_user(void)
char *pwbuf;
if (pwbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ pwbuflen = sysconf(_SC_PAGESIZE);
+#else
return "";
+#endif
}
pwbuf = emalloc(pwbuflen);
if (getpwuid_r(pstat->st_uid, &_pw, pwbuf, pwbuflen, &retpwptr) != 0) {

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 nginx
# 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,53 @@ 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=""}
extra_commands="reload configtest logrotate"
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
command="%%PREFIX%%/sbin/php-fpm"
pidfile="/var/run/php-fpm.pid"
extra_commands="reload configtest logrotate"
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 +81,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()

View File

@ -309,10 +309,10 @@ lib/php/build/phpize.m4
lib/php/build/pkg.m4
lib/php/build/run-tests.php
lib/php/build/shtool
%%CGI%%man/man1/php-cgi.1.gz
man/man1/php-config.1.gz
%%CLI%%man/man1/php.1.gz
%%PHPDBG%%man/man1/phpdbg.1.gz
man/man1/phpize.1.gz
%%FPM%%man/man8/php-fpm.8.gz
%%CGI%%share/man/man1/php-cgi.1.gz
share/man/man1/php-config.1.gz
%%CLI%%share/man/man1/php.1.gz
%%PHPDBG%%share/man/man1/phpdbg.1.gz
share/man/man1/phpize.1.gz
%%FPM%%share/man/man8/php-fpm.8.gz
%%FPM%%share/php/fpm/status.html

View File

@ -0,0 +1,62 @@
--- posix.c.orig 2024-01-17 22:28:09 UTC
+++ posix.c
@@ -477,7 +477,11 @@ PHP_FUNCTION(posix_ttyname)
#if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX)
buflen = sysconf(_SC_TTY_NAME_MAX);
if (buflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ buflen = sysconf(_SC_PAGESIZE);
+#else
RETURN_FALSE;
+#endif
}
p = emalloc(buflen);
@@ -784,7 +788,11 @@ PHP_FUNCTION(posix_getgrnam)
#if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX)
buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
if (buflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ buflen = sysconf(_SC_PAGESIZE);
+#else
RETURN_FALSE;
+#endif
}
buf = emalloc(buflen);
try_again:
@@ -840,7 +848,11 @@ PHP_FUNCTION(posix_getgrgid)
grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
if (grbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ grbuflen = sysconf(_SC_PAGESIZE);
+#else
RETURN_FALSE;
+#endif
}
grbuf = emalloc(grbuflen);
@@ -914,7 +926,11 @@ PHP_FUNCTION(posix_getpwnam)
#if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R)
buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
if (buflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ buflen = sysconf(_SC_PAGESIZE);
+#else
RETURN_FALSE;
+#endif
}
buf = emalloc(buflen);
pw = &pwbuf;
@@ -969,7 +985,11 @@ PHP_FUNCTION(posix_getpwuid)
#if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R)
pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
if (pwbuflen < 1) {
+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE)
+ pwbuflen = sysconf(_SC_PAGESIZE);
+#else
RETURN_FALSE;
+#endif
}
pwbuf = emalloc(pwbuflen);