Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 599468 - sys-apps/openrc should not depend on sys-apps/sysvinit
Summary: sys-apps/openrc should not depend on sys-apps/sysvinit
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2016-11-11 14:02 UTC by Tazy
Modified: 2023-05-06 21:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tazy 2016-11-11 14:02:00 UTC
Since last emerge --sync i noticed that openrc wants to pull in sys-apps/sysvinit which in turn results into file collisions as i use sys-process/runit with the required shutdown/reboot scripts .  (as reccomened by the wiki)

It should depend on either or, as i am stuck now in a state where sysvinit blocks all -avuDN upgrades and masking it just blocks it with a unmask request. 

Perhaps a new useflag with sysvinit as default and if none is set require no init?
Comment 1 William Hubbs gentoo-dev 2016-11-13 17:27:07 UTC
(In reply to Tazy from comment #0)
> Since last emerge --sync i noticed that openrc wants to pull in
> sys-apps/sysvinit which in turn results into file collisions as i use
> sys-process/runit with the required shutdown/reboot scripts .  (as
> reccomened by the wiki)

I am also the maintainer of runit, and I am not aware of these scripts. Can you please provide the link to the wiki page?

> It should depend on either or, as i am stuck now in a state where sysvinit
> blocks all -avuDN upgrades and masking it just blocks it with a unmask
> request. 
> 
> Perhaps a new useflag with sysvinit as default and if none is set require no
> init?

The killprocs service, which is part of the OpenRC shutdown process,  has a hard requirement for killall5, which Is part of sys-apps/sysvinit. That is the reason for this hard dependency.
Comment 2 Tazy 2016-11-13 23:00:31 UTC
(In reply to William Hubbs from comment #1)

> I am also the maintainer of runit, and I am not aware of these scripts. Can
> you please provide the link to the wiki page?
> 

> The killprocs service, which is part of the OpenRC shutdown process,  has a
> hard requirement for killall5, which Is part of sys-apps/sysvinit. That is
> the reason for this hard dependency.

according to this page: https://wiki.gentoo.org/wiki/Runit#Reboot_and_shutdown
i've put these both short shell scripts onto /sbin/reboot and /sbin/shutdown 
And reboot's seem to work just fine once i followed the alternative suggestion on: https://wiki.gentoo.org/wiki/Runit#PID_1_-_init_replacement
At least it stops running services, not sure about killall5 missing causing issues yet.
Comment 3 Johannes Schmidt 2017-07-04 18:04:53 UTC
Since openrc-0.25 openrc provides its own PID1 implementation which adds to this issue.

I'll suggest the following possible solution:

-add the USE=init to sys-apps/openrc that symlinks /sbin/init to openrc-init
-add virtual/init which depends on all relevant providers of PID1
  a) sys-apps/sysvinit
  b) sys-process/runit
  c) sys-apps/openrc[init]
-these three options block each other
Comment 4 Mikhail Kurinnoi 2017-07-08 12:27:08 UTC
Probably, we could use eselect (add eselect modules to sysvinit/runit/openrc in order to switch system init). In this way we could switch system init and provide scripts/symlinks on halt/reboot/shutdown/killall5 in easy way without re-emerge any packets.
Comment 5 Mikhail Kurinnoi 2017-07-09 14:00:07 UTC
(In reply to William Hubbs from comment #1)
> The killprocs service, which is part of the OpenRC shutdown process,  has a
> hard requirement for killall5, which Is part of sys-apps/sysvinit. That is
> the reason for this hard dependency.

https://github.com/OpenRC/openrc/commit/44bac3c3798f7eb9186c3ea8774552aa191bfae7
Looks like killprocs service don't require killall5 (for openrc v0.27.2 and later), and use kill_all instead (part of openrc).