Subject: Question before modifying main/charybdis

From: opal hart <[email-masked]> (by way of opal hart <[email-masked]>)
Date: Thu, 13 Feb 2020 15:22:01 +0000

Currently the charybdis-ircd init script does not start charybdis
appropriately, due to the new executable name as of version 4.x. I
will propose a change similar to [1] but I first have a question,
because there is also another issue I have with the current package.

I believe during configuration the localstatedir should be set
to /var/lib therefore the bandb gets stored
in /var/lib/charybdis/ban.db, rather than the
current /var/charybdis/ban.db. This could potentially cause issues, but
IMO there's an issue anyway with the current path: IIRC it is not
created on package install and charybdis will fail to start without the
directory being manually created first. At least, I've heard another
Alpine user report that they had issues with the directory being
nonexistent, but I don't know if this was an error on their part or a
packaging issue. Please let me know if I'm wrong, and if I'm not,
whether setting configure flag --localstatedir=/var/lib would be a
welcomed change.

[1] Partial patch which excludes anything regarding the localstatedir:

diff --git a/main/charybdis/charybdis.initd b/main/charybdis/charybdis.initd
index bbf614de9b..30fbc12e8d 100644
--- a/main/charybdis/charybdis.initd
+++ b/main/charybdis/charybdis.initd
@@ -1,22 +1,9 @@
 #!/sbin/openrc-run
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/charybdis/files/charybdis-ircd.initd,v 1.2 2008/01/08 21:17:02 jokey Exp $
+
+command="/usr/bin/charybdis"
+command_user="${CHARYBDIS_USER:-ircd}"

 depend() {
-       use net
-       provide ircd
+        use net
+        provide ircd
 }
-
-start() {
-       ebegin "Starting ircd-charybdis"
-       start-stop-daemon --start --quiet -u ${CHARYBDIS_USER} --exec /usr/bin/charybdis-ircd -- -configfile ${CHARYBDIS_CONF}>/dev/null
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping ircd-charybdis"
-       start-stop-daemon --stop --quiet --pidfile ${CHARYBDIS_PID}
-       eend $?
-}
-

-- 
wowaname <https://wowana.me/pgp.xht>

---

From: Kevin Daudt <[email-masked]>
Date: Sat, 22 Feb 2020 09:13:58 +0100

> whether setting configure flag --localstatedir=/var/lib would be a

I think this is the correct thing to do. `/var/lib/` is meant for this
kind of data.

If it did not work in the first place, I'm not even sure some kind of
migration is necessary. In any case make sure the directory is created
now.

> +++ b/main/charybdis/charybdis.initd

This is also an imrovement, using declarative style is preferred above
imperative style initd files.