1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

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
This commit is contained in:
Muhammad Moinur Rahman 2022-06-26 22:10:28 -05:00
parent 750296a936
commit e81ba30a41
9 changed files with 136 additions and 0 deletions

1
GIDs
View File

@ -887,6 +887,7 @@ teamspeak:*:942:
dnetfold:*:943:
bbs:*:944:
dbxml:*:945:
pgagroal:*:946:
gnokii:*:947:
dnrd:*:948:
_lldpd:*:949:

1
UIDs
View File

@ -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

View File

@ -581,6 +581,7 @@
SUBDIR += pg_tileserv
SUBDIR += pgaccess
SUBDIR += pgadmin3
SUBDIR += pgagroal
SUBDIR += pgbackrest
SUBDIR += pgbadger
SUBDIR += pgbarman

View File

@ -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 <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1656274963
SHA256 (pgagroal-1.4.2.tar.gz) = 6feb76e59eb4163de423025a6a1fbe34a48fe6880741107ca1f73c617af4da31
SIZE (pgagroal-1.4.2.tar.gz) = 256332

View File

@ -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

View File

@ -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"

View File

@ -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/

View File

@ -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%%