From nobody Sat Jan 27 16:27:19 2024 X-Original-To: dev-commits-ports-main@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 4TMg2J2H7Tz58W6L; Sat, 27 Jan 2024 16:27:20 +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 4TMg2J1Rhgz4V8Y; Sat, 27 Jan 2024 16:27:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706372840; 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=KJJqI8H+bg4Btyy5fcthaDgVSJV/ZqbPJTO0YqnJgaU=; b=T9N5WpcJSull1dS+0spUQTiF+4y8HykzVoYo8K3HyLcXZ0n7AWQnIk/NGUhLkTbTyf3Z9R nXpISmu5Nvv6uRJSB6NQQ9EkNKokQWf97X67u7NmLpDJCdaD79IHPxxKf2M9woOWo4/scX Q7VYn5GoHb++ldIsYXEgzgavjKYZI9TGRyemv2mtsuLex3EPZsWp/IsD0S5Sei/5Ko3HKf 9+zoUWX8SOwUm5BfwrsUN+N4N5U3NAMyf0h1KWAFqskjMrMCAXovS/2Kt+x855zAS6oGtu mL40BVzjpMD2HFd9QMY4p/GsAcEpGfo/wMegJKsjsKoSJT+exkfk2Jd9RnlONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706372840; 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=KJJqI8H+bg4Btyy5fcthaDgVSJV/ZqbPJTO0YqnJgaU=; b=by88bj6G5HBsaaT9+EcphiN91gByPEx7uEHL9IGq2ekkAJDYAxK1nO0OENpwaAWbOS8fFa 18ek0B3z1x7oKCH0m7MBX7w8xV5KkK8ZWjXAg1n2kJnvmjO8fcx1no8QtoNpoGxm5Q2AkJ HaeTfgwJLG2bksd0O7MX/KYJrW1qfyJvRtf5dBydK5Tn/LbDNM+ffvVSGMChSAHdMHqbGr FEgwjcQH743+1msihLsTrL9r4UFcck26JsS6UOyKRl7EZfz+UJ+aIqs/cUAN4y3+q28ics 5D33OOQJ9o+Dlqm0mqSpHpaZoDtX/l41stDwt6owQOBqZReAejCh7hHW/nUmYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706372840; a=rsa-sha256; cv=none; b=doBbMwLsD7aui/Rt9bMO8zhzGNovFZVu9dAjbX1RY5PQcICVX7/zMh1kKLTftc+Xl0ezNB +oam3OndM+3KS9F7vef7bv/z71FJh7mGR29d+WqV0B0jx2k78EXu630Z00JtKDSlJTAB9L LBK3A3hmqlD+DDh4ijqHQX2IZLT5oZ4Tb5D5dJ+gQzxZafo56R53XIfY5eUEFGY9NFwX7O eF+6PYLAZS+cgFAyVAFkkZ1TUwtq9cF1flmSxwICcOZfDsqXbbxjPrnQ9kmLIB1fuJkc9O Ov2xTa5kAwp+rB5HINCPOw5rjnxjGxLPgPm8p2rIWv3D8g/pL+Tc8kkqNeb6ww== 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 4TMg2J0TLrzXcb; Sat, 27 Jan 2024 16:27:20 +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 40RGRJR3037994; Sat, 27 Jan 2024 16:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RGRJQl037991; Sat, 27 Jan 2024 16:27:19 GMT (envelope-from git) Date: Sat, 27 Jan 2024 16:27:19 GMT Message-Id: <202401271627.40RGRJQl037991@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: e8d69259d834 - main - lang/php81: Moved man to share/man List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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: e8d69259d834aea5a90e6fede00d63d73930b5e6 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=e8d69259d834aea5a90e6fede00d63d73930b5e6 commit e8d69259d834aea5a90e6fede00d63d73930b5e6 Author: Johan Hendriks AuthorDate: 2024-01-27 13:06:47 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2024-01-27 16:26:52 +0000 lang/php81: Moved man to share/man - Add profile support in php-fpm rc script for running multiple php master process --- lang/php81/Makefile | 3 ++- lang/php81/files/php-fpm.in | 53 +++++++++++++++++++++++++++++++++++++-------- lang/php81/pkg-plist | 12 +++++----- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/lang/php81/Makefile b/lang/php81/Makefile index abfebe77fa6c..49e612fc4c63 100644 --- a/lang/php81/Makefile +++ b/lang/php81/Makefile @@ -1,6 +1,6 @@ PORTNAME= php81 DISTVERSION= 8.1.27 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= lang devel www MASTER_SITES= PHP/distributions DISTNAME= php-${DISTVERSION} @@ -25,6 +25,7 @@ LIB_DEPENDS= libargon2.so:security/libargon2 \ libpcre2-8.so:devel/pcre2 GNU_CONFIGURE= yes +GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ARGS+= --disable-all \ --program-prefix="" \ --with-config-file-scan-dir=${PREFIX}/etc/php \ diff --git a/lang/php81/files/php-fpm.in b/lang/php81/files/php-fpm.in index c234856b0e54..511e53426b71 100644 --- a/lang/php81/files/php-fpm.in +++ b/lang/php81/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/php81/pkg-plist b/lang/php81/pkg-plist index bf8a092bc4cb..9b1ef314b1e5 100644 --- a/lang/php81/pkg-plist +++ b/lang/php81/pkg-plist @@ -300,10 +300,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