[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Switch to declarative inetd config fragments (was Re: deprecate and move off using update-inetd?)



Hi!

On Mon, 2022-07-25 at 12:43:56 -0700, Matt Taggart wrote:
> While working on a bug in a package that involved an update-inetd
> rathole(#24043) I got to thinking about it.

> Now that systemd provides a simple way to do socket activated services, I
> think maybe we should stop automatically enabling things in maintainer
> scripts with update-inetd. People not using systemd or preferring other
> inet-superservers can still enable it for things they want. (1)

That'd mean having to add those manually, which seems inconvenient,
and a loss of existing functionality.

> TL;DR packages shouldn't depend on update-inetd but instead should depend on
> inet-superserver and packages that provide that will have the dependency.

I've been working on switching the current implementation into a
declarative mode, and as part of that improving its parser:

  https://git.hadrons.org/cgit/debian/update-inetd.git/log/?h=pu/declarative

I still need to add few more test and rereview it, but should be
uploading that soon, given that there's been no upload for too long.

The declarative format I'm currently working with is something like
this (although I've got my reservations about TOML):

  ,--- inetd-provider.toml (such as inetutils-inetd) ---
  [provider]
  package = "provides-inetd"
  service = "provides-inetd"
  `---

  ,--- inetd-service.toml (such as inetutils-talk) ---
  [service]
  section = "OTHER"
  name = "some-service"
  socket-type = "dgram"
  protocol = "udp4"
  wait = true
  user = "root"
  group = "root"
  program = "/usr/sbin/tcpd"
  program-args = [ "/usr/sbin/some-serviced" ]
  `---

This will allow generating xinetd fragment files too, and removing the
update-inetd calls entirely from maintscripts, and switching those to
triggers.

Thanks,
Guillem


Reply to: