All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH] pgbouncer: add recipe
@ 2026-12-01 20:17 Babanpreet Singh
  2026-12-02  1:37 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Babanpreet Singh @ 2026-12-01 20:17 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj, Babanpreet Singh

PgBouncer is a lightweight connection pooler for PostgreSQL.

AI-Generated: Uses Claude (claude-opus-5-5)
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
---
 .../pgbouncer/pgbouncer/pgbouncer.service     | 18 ++++++++
 .../pgbouncer/pgbouncer_1.26.1.bb             | 42 +++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 meta-networking/recipes-support/pgbouncer/pgbouncer/pgbouncer.service
 create mode 100644 meta-networking/recipes-support/pgbouncer/pgbouncer_1.26.1.bb

diff --git a/meta-networking/recipes-support/pgbouncer/pgbouncer/pgbouncer.service b/meta-networking/recipes-support/pgbouncer/pgbouncer/pgbouncer.service
new file mode 100644
index 0000000000..212b02d7a6
--- /dev/null
+++ b/meta-networking/recipes-support/pgbouncer/pgbouncer/pgbouncer.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Connection pooler for PostgreSQL
+Documentation=https://www.pgbouncer.org/
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=notify
+User=pgbouncer
+RuntimeDirectory=pgbouncer
+LogsDirectory=pgbouncer
+ExecStart=/usr/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini
+ExecReload=/bin/kill -HUP $MAINPID
+KillSignal=SIGINT
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/pgbouncer/pgbouncer_1.26.1.bb b/meta-networking/recipes-support/pgbouncer/pgbouncer_1.26.1.bb
new file mode 100644
index 0000000000..f01c29d3c4
--- /dev/null
+++ b/meta-networking/recipes-support/pgbouncer/pgbouncer_1.26.1.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Lightweight connection pooler for PostgreSQL"
+HOMEPAGE = "https://www.pgbouncer.org/"
+BUGTRACKER = "https://github.com/pgbouncer/pgbouncer/issues"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d5f4369a96e12a98e8695033381d6c28"
+
+SRC_URI = "https://www.pgbouncer.org/downloads/files/${PV}/${BP}.tar.gz \
+           file://pgbouncer.service \
+           "
+SRC_URI[sha256sum] = "00886a2994b4844cd37110970df777772cfc42a74c400522c82fba509a3f42d9"
+
+UPSTREAM_CHECK_URI = "https://www.pgbouncer.org/downloads/"
+UPSTREAM_CHECK_REGEX = "pgbouncer-(?P<pver>\d+(\.\d+)+)\.tar\.gz"
+
+DEPENDS = "libevent"
+
+inherit autotools-brokensep pkgconfig systemd useradd
+
+EXTRA_AUTORECONF += "-I ${S}/lib/m4"
+
+PACKAGECONFIG ??= "openssl cares ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+PACKAGECONFIG[cares] = "--with-cares,--without-cares,c-ares"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+
+EXTRA_OEMAKE += "dist_man_MANS="
+
+do_install:append() {
+    install -d ${D}${sysconfdir}/pgbouncer
+    install -m 0644 ${S}/etc/pgbouncer.ini ${D}${sysconfdir}/pgbouncer/
+    install -D -m 0644 ${UNPACKDIR}/pgbouncer.service ${D}${systemd_system_unitdir}/pgbouncer.service
+}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = "--system --home-dir /nonexistent --no-create-home --shell /sbin/nologin --user-group pgbouncer"
+
+SYSTEMD_SERVICE:${PN} = "pgbouncer.service"
+SYSTEMD_AUTO_ENABLE:${PN} = "disable"
+
+CONFFILES:${PN} = "${sysconfdir}/pgbouncer/pgbouncer.ini"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-02  1:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 20:17 [meta-networking][PATCH] pgbouncer: add recipe Babanpreet Singh
2026-12-02  1:37 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.