GNU bug report logs - #77396
[PATCH] services: Add ngircd-service-type.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 31 Mar 2025 02:29:07 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 77396 <at> debbugs.gnu.org
Subject: [bug#77396] [PATCH] services: Add ngircd-service-type.
Date: Thu, 03 Apr 2025 11:27:55 +0200
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> I've added a not-too-serious one:

Perfect.  :-)

>> Please don’t export record type descriptors like <ngircd-configuration>
>> since that makes it impossible to provide any guarantee (ABI, validity
>> of fields, etc.).
>
> Since there would be so many fields to export, I was hoping to punt on
> exporting all individual accessors, and at least let users be able to
> use 'match-record', which requires the record type.  Isn't match-record
> intended to be used by users as well as service authors?

Well, it’s a tradeoff; common practice is to err on the safe side by
not exposing these low-level details.

> I've read the link above, and I think it's probably safer to keep it,
> since the interfaces that should be listened can be configured by the
> user.  Also, the 'contrib' systemd service uses 'After=network.target'
> [0].

OK, sounds good.

>> I’d use #:log-file and drop ‘--syslog’; I find it more convenient.
>
> Do you find it more convenient because of the new 'herd log service'
> functionality when #:log-file is used?  Otherwise I usually prefer
> searching messages in a single place as opposed to various log files.

The feature is ‘herd status service’, which shows recent messages, and
yes, that’s the main reason I find it more convenient.  :-)
But if you think otherwise, that’s fine too.

> It's a bit weird to me that something as permanent as an IRC server
> should be lazily started by socket activation, but it does support that,
> and it simplifies things a bit, so I've made the switch, like so:

You can use #:lazy-start? #f if you want to start it right away; it
still helps with startup synchronization.

>> But! if it’s about checking the configuration, I would do it in a
>> derivation (instead of at activation time), similar to how this is done
>> for mcron.
>
> Hm, I have looked at the mcron service and others, but haven't found it.
> Could you please point me to the exact file/line?

See ‘validated-file’ in mcron.scm.

Thanks,
Ludo’.




This bug report was last modified 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.