Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434692 - net-misc/networkmanager[systemd] should not install openrc dispatcher script
Summary: net-misc/networkmanager[systemd] should not install openrc dispatcher script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: EBUILD, Inclusion, PATCH
Depends on:
Blocks:
 
Reported: 2012-09-11 06:42 UTC by Arne Flagge
Modified: 2014-02-11 13:20 UTC (History)
7 users (show)

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


Attachments
Ebuild patch (ebuild.patch,848 bytes, patch)
2012-09-11 06:42 UTC, Arne Flagge
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Flagge 2012-09-11 06:42:12 UTC
net-misc/networkmanager install the "10-openrc-status" dispatcher script to sync status of NM with openrc net. If running systemd, there is no openrc net, so it's useless. Also the failure of the script gets logged all the time.

So just install the script, if not running systemd.

Reproducible: Always
Comment 1 Arne Flagge 2012-09-11 06:42:27 UTC
Created attachment 323476 [details, diff]
Ebuild patch
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-11 19:09:23 UTC
In this case, I suppose we shouldn't install /etc/init.d/NetworkManager either, since it requires the dispatcher script to work.
Comment 3 Arne Flagge 2012-09-12 04:46:44 UTC
That's not important, because the init.d script will never be called by something. It's the dispatcher script, which gets called on suspend/resume, etc.

So, to save another condition in the ebuild, I would only skip the dispatcher script.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-09-13 09:57:49 UTC
Fixed in 0.9.6.0; thanks for reporting.

>*networkmanager-0.9.6.0 (13 Sep 2012)
>
>  13 Sep 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  -files/10-openrc-status-r1, -networkmanager-0.8-r1.ebuild,
>  -files/networkmanager-0.8-confchanges.patch,
>  -files/networkmanager-0.8-nscd-clear-cache.patch,
>  -files/networkmanager-0.8-read-hostname.patch, -networkmanager-0.9.0.ebuild,
>  -files/networkmanager-0.9.1.95-force-libnl1.1.patch,
>  -networkmanager-0.9.2.0-r5.ebuild,
>  -files/networkmanager-0.9.2.0-ifnet-ignore-user-connections.patch,
>  -files/networkmanager-0.9.2.0-ifnet-openrc-style.patch,
>  -files/networkmanager-0.9.2.0-ifnet-password-truncated.patch,
>  -files/networkmanager-0.9.2.0-ifnet-remove-system-prefix.patch,
>  -files/networkmanager-0.9.2.0-ifnet-unquote-hostname.patch,
>  -files/networkmanager-0.9.2.0-init-provide-net.patch,
>  +networkmanager-0.9.6.0.ebuild,
>  +files/networkmanager-0.9.6.0-cached-ipv6-routes-1.patch,
>  +files/networkmanager-0.9.6.0-cached-ipv6-routes-2.patch,
>  +files/networkmanager-0.9.6.0-daemon-signals.patch,
>  -files/NetworkManagerDispatcher, -files/nm-system-settings.conf,
>  metadata.xml:
>  Version bump with various fixes. No longer saves thousands of temporary ipv6
>  routes (bug #428274, thanks to Matthias Nagel). No longer installs dispatcher
>  and init scripts when USE=systemd to avoid annoying systemd users (bug
>  #434692, thanks to Arne Stäcker). Drop old.
Comment 5 Fabio Erculiani (RETIRED) gentoo-dev 2013-04-10 13:08:07 UTC
I believe that the dispatcher script can just check if openrc is running, instead of removing arbitrary files depending on USE=systemd.
I also believe that checking if openrc is running is a one liner.
Comment 6 Fabio Erculiani (RETIRED) gentoo-dev 2013-04-10 13:26:36 UTC
A simple:
if [ ! -e "/run/openrc/softlevel" ]; then
        # OpenRC is not running
        exit 0
fi

inside 10-openrc-status is much better.
Please have a look at the net-misc/networkmanager ebuild at the systemd-love overlay [1].


[1] https://github.com/Sabayon/systemd-love/tree/master/net-misc/networkmanager
Comment 7 Arne Flagge 2013-05-02 13:00:52 UTC
networkmanager-0.9.8.0.ebuild from systemd-love overlay works for me.
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-05-05 14:13:49 UTC
Removal of /etc/init.d/ scripts with USE="systemd" is a really bad idea, and makes the transition period to systemd needlessly difficult.

I didn't expect when I put systemd into USE, in anticipation that I would try systemd at a later time, that it would break my NetworkManager install under OpenRC/SysVInit

If you feel that this is a "necessary" requirement to make systemd work properly*, then please, don't just make it an unexpected change, add a USE="sysvinit" flag or something like that that controls the installation of those scripts, and if you *cant* get network-manager to "just work" under both, then advise the user of that in advance using REQUIRED_USE

* Though I see other comments saying this is not the case, and it can be made to work under both satisfactorily, I'm just explaining my rationale in the event some other package has similar logic involved. 

TL;DR: 

  USE="systemd" breaking sysvinit without warning -> not expected.
Comment 9 Nikoli 2013-05-27 08:30:59 UTC
May be just add openrc USE flag?
Comment 10 Pacho Ramos gentoo-dev 2013-06-16 11:59:57 UTC
Fabio, as you can check this with systemd (and also openrc), feel free to commit your fixed script to make both happy

Thanks!
Comment 11 Pacho Ramos gentoo-dev 2013-08-26 11:55:57 UTC
0.9.8.2-r3 should be ok