From nobody Tue Dec 05 17:29:50 2023 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 4Sl6wt3QLNz53FR6; Tue, 5 Dec 2023 17:29:50 +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 4Sl6wt2yg9z3SBq; Tue, 5 Dec 2023 17:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701797390; 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=ukcpneEZc/Qx6wjg/uvRtYIAl3O4k6MZWxWab+NQR4c=; b=hBtXIY5/GqFPX1pXollCyCKwJ6CvK46tKU3fK0Y4QT86Yu2bz9ayvK2yfg96Y4d7xKqzxI FA3zjea7TG8cOg7ecZcc5IkxGLsdmT34qVGFpYwPB4LCpv7e+DzE7pA8T+Qd0MdwryL6Nf VaD9JG0RAbL/saKaoZ6NRkyoNvJ360fSfa7uwgIhVTCTNAKs3kSW3sRFzPam8FcXR2LdsR eZKP5A83LRTE8HY71H7dPC2G/z98odcwlqqNJjdEkYzj6AhB4ndhxxmvX7U7w+PUmC5S0X gxUw/J/05FBvlhcNFLJ3TG905VhMW7dWEACXgoTcOnPMI1DZu47mNqo54mlcsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701797390; a=rsa-sha256; cv=none; b=PrDhj7jcjyIALEsrK1WGzeBL0EJWQrh1hid/uK7MajPJE0P+Ki6fDcyBHP52RgLxiIH0bE QTeWMHIYQP+7+irLDJ0wgzo9Z5sok34h23HgV40LRgr+R+zfujjBo0ZV6BFAsFVOktYtP/ g34Ak+vdJls8YtLowST+aWmIg7vbhxUddih5mKzteGgdCifeN4ERE7/wtrMEVwiUdsbJ6J aea1sdvqZ82NYLAKzr36U9pYpBHnHo3MPMIkEL7VYdnmLWW49XLnGMx15Kud5dwT/zp88s Im9Ssuh6yYua4IOrch7+WUye4lhYJELGxdGF45ss1YnT45zYv1vNRP36Tey+HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701797390; 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=ukcpneEZc/Qx6wjg/uvRtYIAl3O4k6MZWxWab+NQR4c=; b=DbcLZQcJCqjZ8ySTi/Y9w5vnTQQKcvlJbTHuBfcsyep3vkVoRykOCKbu9t1lg0go3V2jqd cWv2B+scZqAHYNJsbtDW21j+3hOishGmLgxZOITHW2A+XpTUY2tDbqVgb5wVL1LOWLYs/h PXsb8iP9QPfaPBvumAIbk31gM1ldiZ3TVgcrOKGcHfYThpYZHJXkBKtPQvrvbAe30bRQbk gpUFPVBdbT2jSrUMWjMxMFrqRGdObaPj0yNswv3ZH7Gh0oTKGZMWTi/WXASPczNcYc4Bon 2GEaUSgR5qFsa+qAt4Krf0fGRxZ8Dtwn6FlFD2jp7bcLtHYN26Bg6Nu3W9y8ZA== 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 4Sl6wt246jz3KC; Tue, 5 Dec 2023 17:29:50 +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 3B5HTop0007923; Tue, 5 Dec 2023 17:29:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B5HTocx007920; Tue, 5 Dec 2023 17:29:50 GMT (envelope-from git) Date: Tue, 5 Dec 2023 17:29:50 GMT Message-Id: <202312051729.3B5HTocx007920@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: 5acc30bdc244 - main - lang/php81: Runtime fix 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: 5acc30bdc24452e17fff0127122096bda42b1d18 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=5acc30bdc24452e17fff0127122096bda42b1d18 commit 5acc30bdc24452e17fff0127122096bda42b1d18 Author: Muhammad Moinur Rahman AuthorDate: 2023-12-05 17:20:34 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-12-05 17:29:32 +0000 lang/php81: Runtime fix - php modules while build with system pcre fails to run when using apache httpd and mod_php. So OPTIONIZE and add as a non-DEFAULT option. However to my knowledge and experience I haven't faced this with nginx and php-fpm yet. [1] - There is another corner case with apache httpd and mod_php when run on 13.2-RELEASE or newer specially on versions where ASLR is by default turned on. All modules specialy opcache crashes httpd. So add a warning message to advise users to move into php-fpm. [2] Thanks to brnrd@ for the patch. [2] PR: 275522 [1], 268318 [2] Reported by: majo-bugs.freebsd.org@cerny.sk [1], zarychtam@plan-b.pwste.edu.pl [2] --- lang/php81/Makefile | 15 ++++++++++----- lang/php81/pkg-message.mod | 15 ++++++++++----- lang/php81/pkg-plist | 7 +++++++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/lang/php81/Makefile b/lang/php81/Makefile index fa756234327b..e340f547fbd9 100644 --- a/lang/php81/Makefile +++ b/lang/php81/Makefile @@ -1,5 +1,6 @@ PORTNAME= php81 DISTVERSION= 8.1.26 +PORTREVISION= 1 CATEGORIES?= lang devel www MASTER_SITES= PHP/distributions DISTNAME= php-${DISTVERSION} @@ -17,7 +18,6 @@ PHP_VER= 81 CONFLICTS_INSTALL?= php[0-9][0-9]${PKGNAMESUFFIX} .if !defined(PKGNAMESUFFIX) -BUILD_DEPENDS= re2c>0:devel/re2c LIB_DEPENDS= libargon2.so:security/libargon2 \ libpcre2-8.so:devel/pcre2 @@ -28,8 +28,7 @@ CONFIGURE_ARGS+= --disable-all \ --with-layout=GNU \ --with-libxml \ --with-openssl \ - --with-password-argon2=${LOCALBASE} \ - --with-external-pcre=${LOCALBASE} + --with-password-argon2=${LOCALBASE} USES+= autoreconf:build ssl USE_GNOME= libxml2 @@ -39,8 +38,8 @@ LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl LDFLAGS_i386+= -Wl,-z,notext OPTIONS_DEFINE+= CGI CLI DEBUG DTRACE EMBED FPM IPV6 LINKTHR \ - MYSQLND PHPDBG ZTS -OPTIONS_DEFAULT= CGI CLI DTRACE EMBED FPM LINKTHR MYSQLND + MYSQLND PCRE PHPDBG ZTS +OPTIONS_DEFAULT= CGI CLI DTRACE EMBED FPM LINKTHR MYSQLND PCRE OPTIONS_EXCLUDE_DragonFly= DTRACE # ld(1) fails to link probes: Relocations in generic ELF (EM: 0) OPTIONS_EXCLUDE_aarch64= DTRACE @@ -63,6 +62,7 @@ EMBED_DESC= Build embedded library FPM_DESC= Build FPM version LINKTHR_DESC= Link thread lib (for threaded extensions) MYSQLND_DESC= Build with MySQL Native Driver +PCRE_DESC= Use system pcre instead of bundled one PHPDBG_DESC= Interactive PHP debugger ZTS_DESC= Force Zend Thread Safety (ZTS) build @@ -82,6 +82,10 @@ FPM_VARS= PHP_SAPI+=fpm \ IPV6_CONFIGURE_OFF= --disable-ipv6 LINKTHR_LIBS= -lpthread MYSQLND_CONFIGURE_ON= --enable-mysqlnd +PCRE_BUILD_DEPENDS= re2c>0:devel/re2c +PCRE_CONFIGURE_ON= --with-external-pcre=${LOCALBASE} +PCRE_PLIST_SUB= BUNDLED_PCRE="@comment " +PCRE_PLIST_SUB_OFF= BUNDLED_PCRE="" PHPDBG_CONFIGURE_ON= --enable-phpdbg PHPDBG_VARS= PHP_SAPI+=phpdbg ZTS_CONFIGURE_ON= --enable-zts @@ -96,6 +100,7 @@ PKGMESSAGE= ${PKGDIR}/pkg-message.mod MODULENAME= libphp SHORTMODNAME= php WARNING= "!!! If you have a threaded Apache, you must build ${PHP_PORT} with ZTS support to enable thread-safety in extensions !!!" +WARNING+= "!!! Consider switching to php-fpm and mod_proxy_fcgi as per Apache httpd recommendations !!!" .endif .include diff --git a/lang/php81/pkg-message.mod b/lang/php81/pkg-message.mod index a0c2c87889a7..8ad98d25b4e6 100644 --- a/lang/php81/pkg-message.mod +++ b/lang/php81/pkg-message.mod @@ -1,5 +1,15 @@ ****************************************************************************** +Consider switching to php-fpm and mod_fast_cgi as per Apache httpd project +recommendation. See https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM + +****************************************************************************** + +If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled, +add WITH_MPM=event to /etc/make.conf to prevent build failures. + +****************************************************************************** + Make sure index.php is part of your DirectoryIndex. You should add the following to your Apache configuration file: @@ -12,8 +22,3 @@ You should add the following to your Apache configuration file: ****************************************************************************** - -If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled, -add WITH_MPM=event to /etc/make.conf to prevent build failures. - -****************************************************************************** diff --git a/lang/php81/pkg-plist b/lang/php81/pkg-plist index 94ef315fa1a8..bf8a092bc4cb 100644 --- a/lang/php81/pkg-plist +++ b/lang/php81/pkg-plist @@ -162,6 +162,13 @@ include/php/ext/libxml/php_libxml.h %%MYSQLND%%include/php/ext/mysqlnd/mysqlnd_vio.h %%MYSQLND%%include/php/ext/mysqlnd/mysqlnd_wireprotocol.h %%MYSQLND%%include/php/ext/mysqlnd/php_mysqlnd.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/config.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2_internal.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2_intmodedep.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2_jit_neon_inc.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2_jit_simd_inc.h +%%BUNDLED_PCRE%%include/php/ext/pcre/pcre2lib/pcre2_ucp.h include/php/ext/pcre/php_pcre.h include/php/ext/spl/php_spl.h include/php/ext/spl/spl_array.h