commit:     08b411e7498d7a0a454c3ce2a883ed1fafa69675
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun Apr 20 05:15:06 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Apr 21 09:02:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=08b411e7

net-irc/pounce: update OpenRC service

* Run as a non-privileged user

* Use supervise-daemon instead of s-s-d

* Log to syslog

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 net-irc/pounce/files/pounce.confd-r1 |  5 +++
 net-irc/pounce/files/pounce.initd-r1 | 33 ++++++++++++++++++++
 net-irc/pounce/pounce-3.1-r1.ebuild  | 60 ++++++++++++++++++++++++++++++++++++
 3 files changed, 98 insertions(+)

diff --git a/net-irc/pounce/files/pounce.confd-r1 
b/net-irc/pounce/files/pounce.confd-r1
new file mode 100644
index 000000000..cbd98a787
--- /dev/null
+++ b/net-irc/pounce/files/pounce.confd-r1
@@ -0,0 +1,5 @@
+# Configuration file.
+POUNCE_CONFIG="/etc/pounce/example.conf"
+
+# Configure the user[:group] pounce will run as.
+#POUNCE_USER="pounce:pounce"

diff --git a/net-irc/pounce/files/pounce.initd-r1 
b/net-irc/pounce/files/pounce.initd-r1
new file mode 100644
index 000000000..ea81c207b
--- /dev/null
+++ b/net-irc/pounce/files/pounce.initd-r1
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+#
+# shellcheck shell=sh
+
+extra_started_commands="reload"
+
+description="IRC bouncer"
+description_reload="Refresh TLS keys"
+
+supervisor="supervise-daemon"
+command="/usr/bin/pounce"
+command_args="${POUNCE_CONFIG:-/etc/pounce/pounce.conf}"
+command_user="${POUNCE_USER:-pounce:pounce}"
+pidfile="/run/pounce/${RC_SVCNAME}.pid"
+output_logger="logger -p daemon.info -t pounce --"
+error_logger="logger -p daemon.err -t pounce --"
+
+depend() {
+       use dns logger
+       need net
+}
+
+start_pre() {
+       checkpath -d -o "${command_user}" /run/pounce
+}
+
+reload() {
+       ebegin "Refreshing ${RC_SVCNAME} keys"
+       start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
+       eend $? "Failed to reload ${RC_SVCNAME}"
+}

diff --git a/net-irc/pounce/pounce-3.1-r1.ebuild 
b/net-irc/pounce/pounce-3.1-r1.ebuild
new file mode 100644
index 000000000..f19a60bea
--- /dev/null
+++ b/net-irc/pounce/pounce-3.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="Multi-client, TLS-only IRC bouncer"
+HOMEPAGE="https://git.causal.agency/pounce/about/";
+SRC_URI="https://git.causal.agency/${PN}/snapshot/${P}.tar.gz";
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="palaver"
+
+DEPEND="
+       dev-libs/libretls:=
+       virtual/libcrypt:=
+       palaver? (
+               dev-db/sqlite:3
+               net-misc/curl
+       )
+"
+RDEPEND="${DEPEND}
+       acct-user/pounce
+"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( {QUIRKS,README}.7 )
+
+src_configure() {
+       tc-export CC
+
+       local confargs=(
+               --enable-notify
+               $(use_enable palaver)
+
+               --prefix="${EPREFIX}/usr"
+               --mandir="${EPREFIX}/usr/share/man"
+       )
+
+       # note: not an autoconf configure script
+       edo ./configure "${confargs[@]}"
+}
+
+src_compile() {
+       emake all
+}
+
+src_install() {
+       emake DESTDIR="${D}" install
+       einstalldocs
+
+       newinitd "${FILESDIR}"/pounce.initd-r1 pounce
+       newconfd "${FILESDIR}"/pounce.confd-r1 pounce
+
+       insinto /etc/pounce
+       doins "${FILESDIR}"/example.conf
+}

Reply via email to