Received: from vps892.directvps.nl (ikke.info [178.21.113.177]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id A6751782B89 for <~alpine/devel@lists.alpinelinux.org>; Sat, 22 Feb 2020 08:14:00 +0000 (UTC) Received: by vps892.directvps.nl (Postfix, from userid 1008) id F014B4400E1; Sat, 22 Feb 2020 09:13:58 +0100 (CET) Date: Sat, 22 Feb 2020 09:13:58 +0100 From: Kevin Daudt To: opal hart Cc: ~alpine/devel@lists.alpinelinux.org Subject: Re: Question before modifying main/charybdis Message-ID: <20200222081358.GB1247035@alpha> References: <20200213152201.5ee8bc57@clamav.wowana.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213152201.5ee8bc57@clamav.wowana.me> On Thu, Feb 13, 2020 at 03:22:01PM +0000, opal hart wrote: > 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. 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. > > > [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 $? > -} > - This is also an imrovement, using declarative style is preferred above imperative style initd files. > > -- > wowaname