From nobody Tue Nov 05 20:56:37 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 4XjgcP6X9hz5bbNb; Tue, 05 Nov 2024 20:56:37 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjgcP4x56z4ZqH; Tue, 5 Nov 2024 20:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730840197; 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=lFJu6SqOcKyACAHIp9wqBdKJSPuE8hGNDCbuXt+79IQ=; b=JA/EKZ6k5ncDMsKOR4ADwXQIduzvToRy4d3OFfd8gmFUxi33Ai6MmtlurIfx2Wr5J/93WM 1qFWVvCaWLC/fe/jm9IeBPCJn0fVBSUGUucp6Zubkel2FrpJEYZSGYw9PEe1ZAV3dZzcvO S8bOITUZlZd3f7soCCYaXnKTlArvZw4r/fQToB9xBBlNIAF0kyTsdoG+yQD9gvkye7zH7A gpGKrNxPbEa9FzrhksfodaBqvclcKlLqxhLmcef/6vjpsd7ZoK3LqIok+Lq8nxPxZwB9QX hO6QQufrBMJigX27M/GguOvyXO600hE6NhmYSgyvd0zWUgF2lFPtU93xGfpVNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730840197; 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=lFJu6SqOcKyACAHIp9wqBdKJSPuE8hGNDCbuXt+79IQ=; b=Ue4c+s7HWmOalhwza1VLb2Bq4uld0xDr0X8m41xTT2i1nuaJ8PG5TNIQdxhqLfNgRZ0tEh eDyqqAjAdjdQg3gmDA52WO7QZgqOtysnI4+nIoZUw4Y5JjzvfICK/UqMefsBIfbf5ipswp NYFHnoOM0E4PXIDrJXhkeOL+W3KqJzKN3t5IhOB5rXb/PN9Qwt2d3zDqIfuu1yyUD8I8xd wuPJRhgUmzOKGT3olIDzMBdBW1hrd0fhZ2vkbY6VFHLXCajCihI4Rw4zr33NLr+2nCDuCP YBc/aWvlNE2p5ow87zs+D2jOOfI+7/g4C3rhcl1A8sTyjDolCnzXXtKjezpAlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730840197; a=rsa-sha256; cv=none; b=Iwpi4571kLSYz0JqVCitmxH11HcJArUHni2kIcyKFe+BWFn5imi3KF2kSwKqpk0FTLmVQ6 2M/tZU7N4T+nC61+NHMpwG+FgBz/8AhggMDPnMgqR+Sa2NcBJpiJse7h69nCE7Sc2CSs4q VVrfqbU/oIrZoRMGqlcDuMJozrEgzjy4X/DkHGjU/CgTlQpQfoQed0InrZbuUCf9sHvTGg Fa9e2VpF7g2YGredtUCevcffRYd995KkfyjAH1yZxu9NCLt/VYx7daGkCHtkhGqKfVdaVV APYI2kztPkX7maKsXoS+vX6H7BAaUBCQdmqghugNVgnKg+cDCgat+pXzisSYJg== 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 4XjgcP4XvjzYX5; Tue, 5 Nov 2024 20:56:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A5Kub9c003023; Tue, 5 Nov 2024 20:56:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A5Kubau003020; Tue, 5 Nov 2024 20:56:37 GMT (envelope-from git) Date: Tue, 5 Nov 2024 20:56:37 GMT Message-Id: <202411052056.4A5Kubau003020@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Palle Girgensohn Subject: git: 4f4643368e25 - main - databases/py-powa-collector: New port 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: girgen X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f4643368e25ed7c025c9b0688856a1105db0558 Auto-Submitted: auto-generated The branch main has been updated by girgen: URL: https://cgit.FreeBSD.org/ports/commit/?id=4f4643368e25ed7c025c9b0688856a1105db0558 commit 4f4643368e25ed7c025c9b0688856a1105db0558 Author: Palle Girgensohn AuthorDate: 2024-11-05 20:41:26 +0000 Commit: Palle Girgensohn CommitDate: 2024-11-05 20:55:02 +0000 databases/py-powa-collector: New port PoWA (PostgreSQL Workload Analyzer) is a performance tool for PostgreSQL 9.4 and newer allowing to collect, aggregate and purge statistics on multiple PostgreSQL instances from various Stats Extensions. PoWA-collector is the daemon that gather performance metrics from remote PostgreSQL instances (optional) on a dedicated repository server. --- databases/Makefile | 1 + databases/py-powa-collector/Makefile | 31 +++++++++++++++++ databases/py-powa-collector/distinfo | 3 ++ .../files/patch-powa_collector__options.py | 11 ++++++ .../py-powa-collector/files/powa-collector.in | 40 ++++++++++++++++++++++ databases/py-powa-collector/pkg-descr | 6 ++++ 6 files changed, 92 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 20b509de290d..e6a3650e68df 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -806,6 +806,7 @@ SUBDIR += py-pickleshare SUBDIR += py-pony SUBDIR += py-postgresql + SUBDIR += py-powa-collector SUBDIR += py-psycogreen SUBDIR += py-psycopg SUBDIR += py-psycopg-c diff --git a/databases/py-powa-collector/Makefile b/databases/py-powa-collector/Makefile new file mode 100644 index 000000000000..d7c0bcb2e566 --- /dev/null +++ b/databases/py-powa-collector/Makefile @@ -0,0 +1,31 @@ +PORTNAME= powa-collector +DISTVERSION= 1.3.0 +CATEGORIES= databases python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= girgen@FreeBSD.org +COMMENT= Performs powa snapshots for remote servers +WWW= https://powa.readthedocs.io/en/stable/components/powa-collector/ + +LICENSE= PostgreSQL +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_SITELIBDIR}/psycopg2/__init__.py:databases/py-psycopg2@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist +NO_ARCH= yes + +USE_GITHUB= yes +GH_ACCOUNT= powa-team + +PLIST_FILES= "@sample etc/powa-collector.conf.sample" +USE_RC_SUBR= ${PORTNAME} + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/powa_collector/options.py + +post-install: + ${INSTALL_DATA} ${WRKSRC}/powa-collector.conf-dist ${STAGEDIR}${PREFIX}/etc/powa-collector.conf.sample + +.include diff --git a/databases/py-powa-collector/distinfo b/databases/py-powa-collector/distinfo new file mode 100644 index 000000000000..f7400b0ed2ee --- /dev/null +++ b/databases/py-powa-collector/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1730822338 +SHA256 (powa-team-powa-collector-1.3.0_GH0.tar.gz) = 793464ad0fae41edd8b40f81376e7d050ffcdd8a4a76453bf94319cfecca595d +SIZE (powa-team-powa-collector-1.3.0_GH0.tar.gz) = 22279 diff --git a/databases/py-powa-collector/files/patch-powa_collector__options.py b/databases/py-powa-collector/files/patch-powa_collector__options.py new file mode 100644 index 000000000000..98135fe474ba --- /dev/null +++ b/databases/py-powa-collector/files/patch-powa_collector__options.py @@ -0,0 +1,11 @@ +--- powa_collector/options.py.orig 2024-11-03 01:42:37 UTC ++++ powa_collector/options.py +@@ -18,7 +18,7 @@ CONF_LOCATIONS = [ + """ + + CONF_LOCATIONS = [ +- '/etc/powa-collector.conf', ++ '/usr/local/etc/powa-collector.conf', + os.path.expanduser('~/.config/powa-collector.conf'), + os.path.expanduser('~/.powa-collector.conf'), + './powa-collector.conf' diff --git a/databases/py-powa-collector/files/powa-collector.in b/databases/py-powa-collector/files/powa-collector.in new file mode 100644 index 000000000000..c1c63b1528b4 --- /dev/null +++ b/databases/py-powa-collector/files/powa-collector.in @@ -0,0 +1,40 @@ +#!/bin/sh + +# PROVIDE: powa-collector +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable fluent-bit: +# +# powa_collector_enable (bool): Set to YES to enable fluent-bit +# Default: NO +# powa_collector_config (str): config files to use +# Default: %%ETCDIR%%/fluent-bit.conf +# powa_collector_flags (str): Extra flags passed to fluent-bit + +. /etc/rc.subr + +name="powa_collector" +rcvar=${name}_enable +load_rc_config $name + +: ${powa_collector_enable:="NO"} +: ${powa_collector_user:="nobody"} +: ${powa_collector_group:="nogroup"} + +pidfile=/var/run/${name}.pid +procname="%%PREFIX%%/bin/powa-collector.py" +command="/usr/sbin/daemon" +command_args="-H -p ${pidfile} -o /var/log/${name}/${name}.log ${procname}" + +start_precmd=powa_collector_startprecmd + +powa_collector_startprecmd() +{ + install -o ${powa_collector_user} -g ${powa_collector_group} -d /var/log/${name} + if [ ! -e ${pidfile} ]; then + install -o ${powa_collector_user} -g ${powa_collector_group} /dev/null ${pidfile}; + fi +} + +run_rc_command "$1" diff --git a/databases/py-powa-collector/pkg-descr b/databases/py-powa-collector/pkg-descr new file mode 100644 index 000000000000..6fd27cc5029b --- /dev/null +++ b/databases/py-powa-collector/pkg-descr @@ -0,0 +1,6 @@ +PoWA (PostgreSQL Workload Analyzer) is a performance tool for PostgreSQL +allowing to collect, aggregate and purge statistics on multiple PostgreSQL +instances from various Stats Extensions. + +PoWA-collector is the daemon that gather performance metrics from remote +PostgreSQL instances (optional) on a dedicated repository server.