From: Rich Freeman <rich0@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did)
Date: Sat, 16 Sep 2017 16:09:42 -0400 [thread overview]
Message-ID: <CAGfcS_nbyh=rwh4ZKeMWG0N=BXq8rBUuGQL3PCQyaUx-YA1TGQ@mail.gmail.com> (raw)
In-Reply-To: <3005176.dSsCWkhPpk@note>
On Sat, Sep 16, 2017 at 3:56 PM, Vadim A. Misbakh-Soloviov
<gentoo@mva.name> wrote:
>
> I'd like to suggest to remove `service` widget from openrc and make it the
> part of (which package? baselayout?)?
IMO this really should go in its own package. By all means have
openrc and/or systemd pull it in by default, but this gives everybody
a bit more control. This was the approach with functions.sh as well.
>
> P.S. actually, it also would be nice to add "generators" thing to it too, to
> make it possible to manage services that have no systemd's units under SystemD
> and services that have only units under OpenRC (well, that one looks much
> harder than first variant, but, again, looks like deb/ubuntu guys did that
> work already and we can try to use their work as cheatsheet)
>
We don't really have the same situation that they do. IMO this is
best done by having some kind of wrapper that needs to be manually
invoked. I think most people would want to know the first time they
go to start a service that wasn't really tested under their particular
configuration. The service might not work the way they expect, so
they'd want to pay closer attention to it, for a start.
Wrapping systemd units into openrc scripts should be relatively easy,
because they're descriptive. You just need a parser of some kind.
The only issue I see is any code that has to run in global context -
I'm not sure how well openrc behaves when dependency parsing starts
running code.
Going in the other direction will be harder, but probably is possible.
Honestly, though, it isn't like it is that hard to write a unit or
script, so I think most people are going to prefer to hand-write them.
One of the really nice things about Gentoo is that whether you use
openrc or systemd you get a completely native experience without a ton
of duct-tape adapting one system into a completely different one, full
of caveats and stuff that doesn't behave like you'd expect. IMO the
only other distro that delivers a similar experience with systemd is
Arch, and they don't support openrc really.
But, nobody is going to complain if you create a tool that creates
init.d scripts or units automatically for you. People can use it as
they wish, and it might or might not make a good starting point for a
new script/unit.
--
Rich
next prev parent reply other threads:[~2017-09-16 20:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-16 19:56 [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did) Vadim A. Misbakh-Soloviov
2017-09-16 20:09 ` Rich Freeman [this message]
2017-09-17 9:12 ` Andrew Savchenko
2017-09-17 10:05 ` Michał Górny
2017-09-17 15:44 ` Andrew Savchenko
2017-09-18 2:22 ` [gentoo-dev] " Duncan
2017-09-18 9:32 ` Vadim A. Misbakh-Soloviov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGfcS_nbyh=rwh4ZKeMWG0N=BXq8rBUuGQL3PCQyaUx-YA1TGQ@mail.gmail.com' \
--to=rich0@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox