From owner-svn-ports-all@freebsd.org Sat Oct 24 07:44:15 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BD0D43FFA4; Sat, 24 Oct 2020 07:44:15 +0000 (UTC) (envelope-from lwhsu@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CJClz2D5lz4CMb; Sat, 24 Oct 2020 07:44:15 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F506151DF; Sat, 24 Oct 2020 07:44:15 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09O7iEg0076090; Sat, 24 Oct 2020 07:44:14 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09O7iD31076084; Sat, 24 Oct 2020 07:44:13 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202010240744.09O7iD31076084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 24 Oct 2020 07:44:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r553158 - in head: . net-mgmt net-mgmt/phpfpm_exporter net-mgmt/phpfpm_exporter/files sysutils sysutils/phpfpm_exporter X-SVN-Group: ports-head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in head: . net-mgmt net-mgmt/phpfpm_exporter net-mgmt/phpfpm_exporter/files sysutils sysutils/phpfpm_exporter X-SVN-Commit-Revision: 553158 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2020 07:44:15 -0000 Author: lwhsu Date: Sat Oct 24 07:44:13 2020 New Revision: 553158 URL: https://svnweb.freebsd.org/changeset/ports/553158 Log: sysutils/phpfpm_exporter: Update to 0.4.1 and move to net-mgmt PR: 227359 Submitted by: Gasol Wu (maintainer) Added: head/net-mgmt/phpfpm_exporter/ - copied from r553157, head/sysutils/phpfpm_exporter/ Deleted: head/sysutils/phpfpm_exporter/ Modified: head/MOVED head/net-mgmt/Makefile head/net-mgmt/phpfpm_exporter/Makefile head/net-mgmt/phpfpm_exporter/distinfo head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in head/sysutils/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Sat Oct 24 06:57:34 2020 (r553157) +++ head/MOVED Sat Oct 24 07:44:13 2020 (r553158) @@ -15652,3 +15652,4 @@ devel/geany-plugin-geanypy||2020-10-15|Has expired: Us comms/chirp||2020-10-16|Use deprecated version of python x11-toolkits/py-gtk2||2020-10-16|Remove deprecated binding replace by py-gobject www/py-unit|www/unit-python|2020-10-21|Rename to be more consistent with the naming convention +sysutils/phpfpm_exporter|net-mgmt/phpfpm_exporter|2020-10-24|Move to net-mgmt category Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -279,6 +279,7 @@ SUBDIR += php73-snmp SUBDIR += php74-snmp SUBDIR += php80-snmp + SUBDIR += phpfpm_exporter SUBDIR += phpipam SUBDIR += phpweathermap SUBDIR += ping_exporter Modified: head/net-mgmt/phpfpm_exporter/Makefile ============================================================================== --- head/sysutils/phpfpm_exporter/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -1,10 +1,9 @@ # $FreeBSD$ PORTNAME= phpfpm_exporter -PORTVERSION= 0.3.3 +PORTVERSION= 0.4.1 DISTVERSIONPREFIX=v -PORTREVISION= 1 -CATEGORIES= sysutils +CATEGORIES= net-mgmt MAINTAINER= gasol.wu@gmail.com COMMENT= Export php-fpm metrics in Prometheus format @@ -22,5 +21,7 @@ GO_TARGET= ./cmd/${GH_PROJECT}:${PORTNAME} PLIST_FILES= bin/${PORTNAME} USE_RC_SUBR= phpfpm_exporter +USERS= prometheus +GROUPS= prometheus .include Modified: head/net-mgmt/phpfpm_exporter/distinfo ============================================================================== --- head/sysutils/phpfpm_exporter/distinfo Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/distinfo Sat Oct 24 07:44:13 2020 (r553158) @@ -1,3 +1,3 @@ -TIMESTAMP = 1512723537 -SHA256 (bakins-php-fpm-exporter-v0.3.3_GH0.tar.gz) = 02b6ee16d3c595430dd875953639daa95e2b41e9f78e1aca45656e9f5e196b4c -SIZE (bakins-php-fpm-exporter-v0.3.3_GH0.tar.gz) = 1510300 +TIMESTAMP = 1523129478 +SHA256 (bakins-php-fpm-exporter-v0.4.1_GH0.tar.gz) = 1e35ac0254fd897d17d03063604b742405b655f090b79b32b821fe238ff97f4d +SIZE (bakins-php-fpm-exporter-v0.4.1_GH0.tar.gz) = 300772 Modified: head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in ============================================================================== --- head/sysutils/phpfpm_exporter/files/phpfpm_exporter.in Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in Sat Oct 24 07:44:13 2020 (r553158) @@ -9,14 +9,16 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# phpfpm_exporter_enable (bool): Set to NO by default. +# phpfpm_exporter_enable (bool): Set to NO by default. # Set it to YES to enable phpfpm_exporter. -# phpfpm_exporter_user (string): Set user that phpfpm_exporter will run under -# Default is "nobody". -# phpfpm_exporter_group (string): Set group that phpfpm_exporter will run under -# Default is "nobody". +# phpfpm_exporter_user (string): Set user that phpfpm_exporter will run under +# Default is "prometheus". +# phpfpm_exporter_group (string): Set group that phpfpm_exporter will run under +# Default is "prometheus". # phpfpm_exporter_endpoint (string): Set status endpoint # Default is "http://127.0.0.1:9000/status". +# phpfpm_exporter_fastcgi (string): Set fastcgi url +# Default is "", If this is set, fastcgi will be used instead of HTTP. # phpfpm_exporter_listen_address (string): Set ip:port that phpfpm_exporter will listen on # Default is "127.0.0.1:8080". @@ -24,19 +26,20 @@ name=phpfpm_exporter rcvar=phpfpm_exporter_enable +desc="PHP-FPM prometheus exporter" load_rc_config $name -: ${phpfpm_exporter_enable:="NO"} -: ${phpfpm_exporter_user:="nobody"} -: ${phpfpm_exporter_group:="nobody"} -: ${phpfpm_exporter_endpoint:="http://127.0.0.1:9000/status"} -: ${phpfpm_exporter_listen_address:="127.0.0.1:8080"} +: ${phpfpm_exporter_enable:=NO} +: ${phpfpm_exporter_user:=prometheus} +: ${phpfpm_exporter_group:=prometheus} +: ${phpfpm_exporter_endpoint=http://127.0.0.1:9000/status} +: ${phpfpm_exporter_listen_address:=127.0.0.1:8080} pidfile=/var/run/phpfpm_exporter.pid -command="/usr/sbin/daemon" -procname="%%PREFIX%%/bin/phpfpm_exporter" +command=/usr/sbin/daemon +procname=%%PREFIX%%/bin/phpfpm_exporter command_args="-p ${pidfile} /usr/bin/env ${procname} \ --addr ${phpfpm_exporter_listen_address} \ --endpoint ${phpfpm_exporter_endpoint}" @@ -45,10 +48,15 @@ start_precmd=phpfpm_exporter_startprecmd phpfpm_exporter_startprecmd() { - if [ ! -e ${pidfile} ]; then - install -o ${phpfpm_exporter_user} -g ${phpfpm_exporter_group} /dev/null ${pidfile}; - fi + if [ -n "$phpfpm_exporter_fastcgi" ]; then + command_args="$command_args --fastcgi $phpfpm_exporter_fastcgi" + fi + + if [ -e ${pidfile} ]; then + chown ${phpfpm_exporter_user}:${phpfpm_exporter_group} ${pidfile}; + else + install -o ${phpfpm_exporter_user} -g ${phpfpm_exporter_group} /dev/null ${pidfile}; + fi } -load_rc_config $name run_rc_command "$1" Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/sysutils/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -910,7 +910,6 @@ SUBDIR += php74-posix SUBDIR += php80-fileinfo SUBDIR += php80-posix - SUBDIR += phpfpm_exporter SUBDIR += phybs SUBDIR += pick SUBDIR += pidof