1 |
On Thu, Jul 11, 2019 at 11:56 AM William Hubbs <williamh@g.o> wrote: |
2 |
> |
3 |
> On Thu, Jul 11, 2019 at 09:42:02AM -0400, Rich Freeman wrote: |
4 |
> > On Wed, Jul 10, 2019 at 11:02 PM William Hubbs <williamh@g.o> wrote: |
5 |
> > > |
6 |
> > > > RDEPEND="sysv-utils? ( !sys-apps/sysvinit ) |
7 |
> > > > !sysv-utils? ( sys-apps/sysvinit )" |
8 |
> > > |
9 |
> > > I like this, but the second branch (!sysv-utils) is not really needed, |
10 |
> > > because if we put sysvinit as the first RDEPEND of virtual/init, we |
11 |
> > > don't need to worry about installing it through rdepend in openrc. |
12 |
> > |
13 |
> > Does openrc actually work with all the stuff you have in your proposed |
14 |
> > virtual/init? |
15 |
> |
16 |
> Remember that OpenRC wasn't originally an init process at all. it was |
17 |
> designed to work with any init process you want it to work with. That |
18 |
> hasn't changed, I've just added an init to it which you can use if you |
19 |
> want. |
20 |
> |
21 |
> > For example, you have systemd in there. I'm pretty sure you can't use |
22 |
> > systemd as PID1 and then use openrc as your service manager. I mean, |
23 |
> > you probably could come up with some way to do that, but certainly |
24 |
> > openrc doesn't work that way today, or systemd for that matter. |
25 |
> |
26 |
> There is nothing stopping you from that on the openrc side. It would |
27 |
> take a lot of custom systemd units to make it work, but that is an |
28 |
> exercise for the reader. |
29 |
> |
30 |
> > You have runit in there as well. Can you use runit as PID1 and openrc |
31 |
> > as your service manager? |
32 |
> |
33 |
> Sure. There's no reason you can't. |
34 |
|
35 |
I'm not talking about hypotheticals. Sure, somebody could completely |
36 |
dispose of the default set of systemd units and whatever runit uses as |
37 |
its equivalents, and create new ones that invoke openrc and have it |
38 |
take over, maybe, but none of this stuff actually exists right now. |
39 |
And I'm not sure how easy it would be to even get this working since |
40 |
systemd will still be trying to manage cgroups and whatever else that |
41 |
openrc will presumably also be trying to do. |
42 |
|
43 |
If somebody just installs openrc their expectation is going to be that |
44 |
they get sysvinit or your substitute that actually works with openrc |
45 |
out of the box. They're not going to want to have neither installed |
46 |
simply because they have runit or systemd already installed. If |
47 |
somebody is migrating from systemd to openrc that is exactly the |
48 |
situation they would be in. |
49 |
|
50 |
Neither systemd nor runit presume to be a drop-in replacement for |
51 |
sysvinit to be used with other service managers. Maybe you could |
52 |
mangle it into something like this, but at that point you might as |
53 |
well add python or bash to your virtual/init since you could just |
54 |
write your own script for init. |
55 |
|
56 |
My goal isn't to block user choice here - just to not just make it |
57 |
trivial for users to get their system into non-working conditions to |
58 |
support a configuration that nobody in their right mind is likely to |
59 |
actually care to use. I can't see the folks torn between Devuan and |
60 |
Gentoo saying that they're interested in using Gentoo with openrc but |
61 |
they've seen the light and it makes sense to use systemd as their PID1 |
62 |
with all its dbus dependencies just so that it can do nothing more |
63 |
than run a few bash scripts to launch openrc. |
64 |
|
65 |
I'd just stick with a direct conditional dependency on sysvinit. That |
66 |
is the only config that actually works with openrc reliably today. |
67 |
Now, if somebody comes up with a nice openrc wrapper for runit or |
68 |
systemd or whatever, then maybe add that wrapper to a virtual and |
69 |
revisit the issue, and then the wrapper can pull in the init |
70 |
implementation. Then users still get a working config no matter how |
71 |
portage resolves the virtual. |
72 |
|
73 |
-- |
74 |
Rich |