From nobody Thu Jan 18 18:29:31 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TGB9R6ZRvz56gWR; Thu, 18 Jan 2024 18:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TGB9R4cP1z4K2X; Thu, 18 Jan 2024 18:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705602571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rn867o8zF3J44yFD80OgMFgwtyJ/jMahJFaME6c7i7E=; b=plBHxGE28adsBTLmaVYJCIJQNxZrFkgzAVk0TeCV460Nsax1NPrNxzwipuIXJgB1gPozcM PiKbyDKI/5MYErs0fWs67RvcLsXHTsBOtb3H8zPsA7/3SBWIWalukREwNRGZGGE1xHH0Kg QLvcwsprF0abjYFbs8wp6jezp6rnvB3TuHCRs7WYMP2ZcHiLz5tyFMIRmjPBGjKHRUaf5B v/xCmvAioolhdQKtO6fJ9wylci+GMWbfXkINomtcMO3Qte8ehbu/VGZZtNo+rAvNeicOYY 2KznJ2NAvZX6sH9KpN6Hz6qdgN7aEMVG1lrSf1oKAA+RJiYl1zt34xKHu7nZMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705602571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rn867o8zF3J44yFD80OgMFgwtyJ/jMahJFaME6c7i7E=; b=r0MpztXnkZ75A7rZ1iQjM4MQCD/Mdbjo80dZlD9I/pFOkK53q2NIFYZM+Z+Wnj3k2967BL 3b0pf2Oncmyiwdd8LjgUVWjFWU41ve6EdOH2S2RpEMSa8d0O1y9lmkiQk47yFqLrPy6tGv TxYLspYXoGk7kYAMKqcdN/aai76Buet/T3p0Hr7VC61CkKQOMCBSdV7MG9uwQ3tYGCDplY l9wT2p1kNL6DNfbEPtVGefrZz1sqoKvfn4TtbCV4ajSAB5iXdsxfMpcW6TehFXcNdPJD0e l6uPhkFCuHKkDjm7G9Pq2uES/ktpDxVQ3C1jhgEEfaobbW9b87KpElEwvmq5XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705602571; a=rsa-sha256; cv=none; b=psp9+Wc2qZj6S62qen2wGTaKhS4sO/rq+FgdmsvNuubP0mdfJIAJfe+eKkSSuirg7HUoNF 9WLh7LhZ3P6L4rXgq0j//fqurmr0DGLONXONiMtAorvMWZvLMVevnxec0TRLxkGOIkg5Vk 9OmmEllbLFuWx75GrXl3vrkB+YIwnu9/Hqd8juC2Z2reh09R6zYEnOFbtul804VATNXpHq zmc782Ao9JRSAbD2TsojGEidlwz/4wu2seEb1xM2MWZ7xg30pcDaULLi+oUhnIwa7uLbr0 4tt2t6ROvhFl6JvNGTa6UVJxZCUeh/nWfmKyBnMGTGmO+Zm2Lt17KJV1nwvbVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TGB9R3hcMzJ32; Thu, 18 Jan 2024 18:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IITVtK083747; Thu, 18 Jan 2024 18:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IITVo3083744; Thu, 18 Jan 2024 18:29:31 GMT (envelope-from git) Date: Thu, 18 Jan 2024 18:29:31 GMT Message-Id: <202401181829.40IITVo3083744@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: f7c6b6335d77 - main - lang/php83: Update version 8.3.1=>8.3.2 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7c6b6335d77de48a1fd4986c69066a5c8d5bd87 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=f7c6b6335d77de48a1fd4986c69066a5c8d5bd87 commit f7c6b6335d77de48a1fd4986c69066a5c8d5bd87 Author: Johan Hendriks AuthorDate: 2024-01-18 18:22:20 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2024-01-18 18:29:10 +0000 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 --- lang/php83/Makefile | 3 +- lang/php83/distinfo | 6 +-- lang/php83/files/patch-configure.ac | 4 +- lang/php83/files/patch-ext_standard_filestat.c | 26 +++++++++++ lang/php83/files/patch-main_fopen__wrappers.c | 14 ++++++ lang/php83/files/patch-main_main.c | 14 ++++++ lang/php83/files/php-fpm.in | 53 ++++++++++++++++++---- lang/php83/pkg-plist | 12 ++--- sysutils/php83-posix/files/patch-posix.c | 62 ++++++++++++++++++++++++++ 9 files changed, 173 insertions(+), 21 deletions(-) diff --git a/lang/php83/Makefile b/lang/php83/Makefile index 8948d1e444b2..45741ef17f84 100644 --- a/lang/php83/Makefile +++ b/lang/php83/Makefile @@ -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="" \ diff --git a/lang/php83/distinfo b/lang/php83/distinfo index 53ca8a45b507..d7927d336a68 100644 --- a/lang/php83/distinfo +++ b/lang/php83/distinfo @@ -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 diff --git a/lang/php83/files/patch-configure.ac b/lang/php83/files/patch-configure.ac index a616256a55df..bdd8afc9c692 100644 --- a/lang/php83/files/patch-configure.ac +++ b/lang/php83/files/patch-configure.ac @@ -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) diff --git a/lang/php83/files/patch-ext_standard_filestat.c b/lang/php83/files/patch-ext_standard_filestat.c new file mode 100644 index 000000000000..eb08358dedfa --- /dev/null +++ b/lang/php83/files/patch-ext_standard_filestat.c @@ -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); diff --git a/lang/php83/files/patch-main_fopen__wrappers.c b/lang/php83/files/patch-main_fopen__wrappers.c new file mode 100644 index 000000000000..4044ea70b113 --- /dev/null +++ b/lang/php83/files/patch-main_fopen__wrappers.c @@ -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); diff --git a/lang/php83/files/patch-main_main.c b/lang/php83/files/patch-main_main.c new file mode 100644 index 000000000000..5a0c3c558cfe --- /dev/null +++ b/lang/php83/files/patch-main_main.c @@ -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) { diff --git a/lang/php83/files/php-fpm.in b/lang/php83/files/php-fpm.in index c234856b0e54..511e53426b71 100644 --- a/lang/php83/files/php-fpm.in +++ b/lang/php83/files/php-fpm.in @@ -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() diff --git a/lang/php83/pkg-plist b/lang/php83/pkg-plist index cac3796b458a..84225fc4e311 100644 --- a/lang/php83/pkg-plist +++ b/lang/php83/pkg-plist @@ -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 diff --git a/sysutils/php83-posix/files/patch-posix.c b/sysutils/php83-posix/files/patch-posix.c new file mode 100644 index 000000000000..c97a44fcff96 --- /dev/null +++ b/sysutils/php83-posix/files/patch-posix.c @@ -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); +