From nobody Mon Jun 27 03:11:43 2022 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 E12A186FA17; Mon, 27 Jun 2022 03:11:43 +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 4LWXnW4GlSz3Jrl; Mon, 27 Jun 2022 03:11:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656299503; 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=TQkHlYEgHP4jgoPIFoD34TIU5kGFbn0Ayme5ZnAgi40=; b=iz3mlp0xWNG+mkKwCxto7GaeK/lIfRFnbveoW77iYLjBqxVEDnBV4Chvi1Tr5ukwNzruQD 1N4ZBslKSITBTDuLqthYBSo8HVkBiCBVMy3AYO+9Fd8Exux0KGFm+2IiFgte2VaoQO75tD ZyuJtYVxCuM6pYLMl5oDWQMMQGjAARLuSg6gzJIrNwZRyWSd4KAi+q4WE+4qN9HhgyP+8Q OBaLVm3WCYBhRuM+hKHODh5ttTd0VReUi2/ftkYD1kQ7CpyCuYS/wCLQJT7zQwq+tnGnrI TQQFHiHY9xWSt7jhzimA58qL4STN0g3KWiWmHJ5O88Z6XfKkXjNunFFCYX6wTQ== 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 5F90320720; Mon, 27 Jun 2022 03:11:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25R3BhQw083213; Mon, 27 Jun 2022 03:11:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25R3BhG6083212; Mon, 27 Jun 2022 03:11:43 GMT (envelope-from git) Date: Mon, 27 Jun 2022 03:11:43 GMT Message-Id: <202206270311.25R3BhG6083212@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: e81ba30a41e2 - main - databases/pgagroal: 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: 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: e81ba30a41e2c762617036c91a2da8adc718d811 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656299503; 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=TQkHlYEgHP4jgoPIFoD34TIU5kGFbn0Ayme5ZnAgi40=; b=gTzrQYS61/J3eqTt5LEpHQK7s0wHKV3WKXvVzYYvGIYLVk1BKCsZ+7uIeAHHu4w8lxpUs5 e01q6SBwixHHky0GAMhy5bo66M8XeS4FlZywXjBNmuLst0TvpIuz6wwps4R/TFl9JRuSsq R+IBwdw4vygFMGIwCiNO8A0MFpj/i2C0DlYEIkUof/NRwqGzoD7BUjgZUhyyJEszM3iXyV yZIhh4ZS6+0xWGX5XYoH8SUj/oNrxjArywgd845KU5Qr/dIsYVyiF1VGukRlLYhaJSO/JO WyezK8pNqsztNHv7HCTPOQBWc7HE6t/IJjzJ94s3gj7J5xYd0KizeHBs+4xTRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656299503; a=rsa-sha256; cv=none; b=pe0W9+Vx3iOBwuMfgT/aYtFH94C30dtcPG3nymRtQPc0ImyBtwcXeAusqGx8Fu9yL/4Drd ccoqkbk2R8XC9uAy5DJ58KDOea0VmRB5k2XP7f4nW0KoinqxwdJIxTazi0JU1shrxMofBR bIGOvLSUP6lyGq4Khz6mVFCJFbd41bgNUfeEK9rZuFCB7hGDAEuT4ltVipdYDg67H8gEvA jPlgXv5SHn41FHSZ0NWQ2N7soK5Tw9OkbCz/Slp//pC5sDTe7Bq3liInULzPqlni2EirUa xyvsDoWzjxYBv2mS/AATHCMz05FNzxBJnReOwbpaGe9AR/qSe0VgNQvtweOvlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=e81ba30a41e2c762617036c91a2da8adc718d811 commit e81ba30a41e2c762617036c91a2da8adc718d811 Author: Muhammad Moinur Rahman AuthorDate: 2022-06-27 03:10:28 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2022-06-27 03:11:32 +0000 databases/pgagroal: New Port pgagroal is a high-performance protocol-native connection pool for PostgreSQL. Which features High performance, Connection pool, Limit connections for users and databases, Prefill support, Remove idle connections, Connection validation, Enable / disable database access, Graceful / fast shutdown, Prometheus support, Grafana 8 dashboard, Remote management, Authentication query support, Failover support, Transport Layer Security (TLS) v1.2+ support, Daemon support, User vault, Lightweight connection pooler for PostgreSQL. WWW: https://agroal.github.io/pgagroal/ Sponsored by: Bounce Experts --- GIDs | 1 + UIDs | 1 + databases/Makefile | 1 + databases/pgagroal/Makefile | 49 ++++++++++++++++++++++ databases/pgagroal/distinfo | 3 ++ .../pgagroal/files/patch-doc_etc_pgagroal.conf | 20 +++++++++ databases/pgagroal/files/pgagroal.in | 35 ++++++++++++++++ databases/pgagroal/pkg-descr | 10 +++++ databases/pgagroal/pkg-plist | 16 +++++++ 9 files changed, 136 insertions(+) diff --git a/GIDs b/GIDs index 171823bb501f..7440c023f528 100644 --- a/GIDs +++ b/GIDs @@ -887,6 +887,7 @@ teamspeak:*:942: dnetfold:*:943: bbs:*:944: dbxml:*:945: +pgagroal:*:946: gnokii:*:947: dnrd:*:948: _lldpd:*:949: diff --git a/UIDs b/UIDs index 6cf2fbe047a6..57906f7725ff 100644 --- a/UIDs +++ b/UIDs @@ -892,6 +892,7 @@ teamspeak:*:942:942::0:0:TeamSpeak user:/nonexistent:/usr/sbin/nologin dnetfold:*:943:943::0:0:& user:/nonexistent:/usr/sbin/nologin bbs:*:944:944::0:0:& user:/nonexistent:/usr/sbin/nologin dbxml:*:945:945::0:0:& user:/nonexistent:/usr/sbin/nologin +pgagroal:*:946:946::0:0:Pgagroal user:/nonexistent:/usr/sbin/nologin mapred:*:947:955::0:0:Hadoop MapReduce user:/nonexistent:/usr/sbin/nologin dnrd:*:948:948::0:0:& user:/nonexistent:/usr/sbin/nologin _lldpd:*:949:949::0:0:lldpd user:/nonexistent:/usr/sbin/nologin diff --git a/databases/Makefile b/databases/Makefile index cf09aeff5f1e..d6c0942b3742 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -581,6 +581,7 @@ SUBDIR += pg_tileserv SUBDIR += pgaccess SUBDIR += pgadmin3 + SUBDIR += pgagroal SUBDIR += pgbackrest SUBDIR += pgbadger SUBDIR += pgbarman diff --git a/databases/pgagroal/Makefile b/databases/pgagroal/Makefile new file mode 100644 index 000000000000..83ecbd8a3dd0 --- /dev/null +++ b/databases/pgagroal/Makefile @@ -0,0 +1,49 @@ +PORTNAME= pgagroal +PORTVERSION= 1.4.2 +CATEGORIES= databases +MASTER_SITES= https://github.com/agroal/${PORTNAME}/releases/download/${PORTVERSION}/ + +MAINTAINER= bofh@FreeBSD.org +COMMENT= High-performance protocol-native connection pool for PostgreSQL + +LICENSE= BSD3CLAUSE + +BUILD_DEPENDS= rst2man:textproc/py-docutils +LIB_DEPENDS= libev.so:devel/libev + +USES= cmake pathfix ssl +USE_LDCONFIG= yes +USE_RC_SUBR= pgagroal + +SUB_LIST= PGAGROAL_RUNDIR="${PGAGROAL_RUNDIR}" + +USERS= pgagroal +GROUPS= pgagroal + +PLIST_SUB+= PGAGROAL_GROUP="${GROUPS}" \ + PGAGROAL_LOGDIR="${PGAGROAL_LOGDIR}" \ + PGAGROAL_RUNDIR="${PGAGROAL_RUNDIR}" \ + PGAGROAL_USER="${USERS}" + +PGAGROAL_GROUP?= pgagroal +PGAGROAL_USER?= pgagroal + +PGAGROAL_RUNDIR?= /var/run/pgagroal +PGAGROAL_LOGDIR?= /var/log/pgagroal + +post-patch: + @${MV} ${WRKSRC}/doc/etc/pgagroal.conf \ + ${WRKSRC}/doc/etc/pgagroal.conf.sample + @${MV} ${WRKSRC}/doc/etc/pgagroal_hba.conf \ + ${WRKSRC}/doc/etc/pgagroal_hba.conf.sample + @${REINPLACE_CMD} 's|etc/pgagroal.conf|etc/pgagroal.conf.sample|g; \ + s|etc/pgagroal_hba.conf|etc/pgagroal_hba.conf.sample|g' \ + ${WRKSRC}/doc/CMakeLists.txt + @${REINPLACE_CMD} 's|pgagraol.%d.pid|pgagroal.pid|g' \ + ${WRKSRC}/src/libpgagroal/configuration.c + +post-install: + @${MKDIR} ${STAGEDIR}${PGAGROAL_RUNDIR} \ + ${STAGEDIR}${PGAGROAL_LOGDIR} + +.include diff --git a/databases/pgagroal/distinfo b/databases/pgagroal/distinfo new file mode 100644 index 000000000000..6bf13a32b3b2 --- /dev/null +++ b/databases/pgagroal/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1656274963 +SHA256 (pgagroal-1.4.2.tar.gz) = 6feb76e59eb4163de423025a6a1fbe34a48fe6880741107ca1f73c617af4da31 +SIZE (pgagroal-1.4.2.tar.gz) = 256332 diff --git a/databases/pgagroal/files/patch-doc_etc_pgagroal.conf b/databases/pgagroal/files/patch-doc_etc_pgagroal.conf new file mode 100644 index 000000000000..aa2bbe98f625 --- /dev/null +++ b/databases/pgagroal/files/patch-doc_etc_pgagroal.conf @@ -0,0 +1,20 @@ +--- doc/etc/pgagroal.conf.orig 2022-05-23 17:17:02 UTC ++++ doc/etc/pgagroal.conf +@@ -2,14 +2,14 @@ port = 2345 + host = localhost + port = 2345 + +-log_type = console ++log_type = file + log_level = info +-log_path = ++log_path = /var/log/pgagroal/pgagroal.log + + max_connections = 100 + idle_timeout = 600 + validation = off +-unix_socket_dir = /tmp/ ++unix_socket_dir = /var/run/pgagroal/ + + [primary] + host = localhost diff --git a/databases/pgagroal/files/pgagroal.in b/databases/pgagroal/files/pgagroal.in new file mode 100644 index 000000000000..a8feb75819cd --- /dev/null +++ b/databases/pgagroal/files/pgagroal.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# PROVIDE: pgagroal +# REQUIRE: LOGIN +# BEFORE: securelevel +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable pgagroal: +# +# pgagroal_enable (bool): Set to "YES" to enable pgagroal +# Default is "NO". +# pgagroal_conf (path): Set full path to configuration file. +# Default is "%%PREFIX%%/etc/pgagroal.conf". +# pgagroal_flags (string): Additional flags passed to pgagroal. +# Default is "". + +. /etc/rc.subr + +name="pgagroal" +rcvar=pgagroal_enable + +load_rc_config "$name" +: ${pgagroal_enable="NO"} +: ${pgagroal_user="pgagroal"} +: ${pgagroal_conf="%%PREFIX%%/etc/$name/$name.conf"} +: ${pgagroal_hba_conf="%%PREFIX%%/etc/$name/pgagroal_hba.conf"} + +extra_commands="reload" + +command="%%PREFIX%%/bin/pgagroal" +pidfile="%%PGAGROAL_RUNDIR%%/$name.pid" +required_files="${pgagroal_conf} ${pgagroal_hba_conf}" +command_args="-d -c ${pgagroal_conf} -a ${pgagroal_hba_conf}" + +run_rc_command "$1" diff --git a/databases/pgagroal/pkg-descr b/databases/pgagroal/pkg-descr new file mode 100644 index 000000000000..c56a20b983b2 --- /dev/null +++ b/databases/pgagroal/pkg-descr @@ -0,0 +1,10 @@ +pgagroal is a high-performance protocol-native connection pool for +PostgreSQL. Which features High performance, Connection pool, Limit +connections for users and databases, Prefill support, Remove idle +connections, Connection validation, Enable / disable database access, +Graceful / fast shutdown, Prometheus support, Grafana 8 dashboard, +Remote management, Authentication query support, Failover support, +Transport Layer Security (TLS) v1.2+ support, Daemon support, User +vault, Lightweight connection pooler for PostgreSQL. + +WWW: https://agroal.github.io/pgagroal/ diff --git a/databases/pgagroal/pkg-plist b/databases/pgagroal/pkg-plist new file mode 100644 index 000000000000..ce32ef26fe91 --- /dev/null +++ b/databases/pgagroal/pkg-plist @@ -0,0 +1,16 @@ +bin/pgagroal +bin/pgagroal-admin +bin/pgagroal-cli +@sample %%ETCDIR%%/pgagroal.conf.sample +@sample %%ETCDIR%%/pgagroal_hba.conf.sample +lib/libpgagroal.so +lib/libpgagroal.so.1 +lib/libpgagroal.so.1.4.2 +share/man/man1/pgagroal-admin.1.gz +share/man/man1/pgagroal-cli.1.gz +share/man/man1/pgagroal.1.gz +share/man/man5/pgagroal.conf.5.gz +share/man/man5/pgagroal_databases.conf.5.gz +share/man/man5/pgagroal_hba.conf.5.gz +@dir(%%PGAGROAL_USER%%,%%PGAGROAL_GROUP%%,) %%PGAGROAL_LOGDIR%% +@dir(%%PGAGROAL_USER%%,%%PGAGROAL_GROUP%%,) %%PGAGROAL_RUNDIR%%