Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609390 - net-libs/phodav-2.1 - review init and unit file installation conditionals
Summary: net-libs/phodav-2.1 - review init and unit file installation conditionals
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Depends on:
Reported: 2017-02-15 08:40 UTC by Uwe Sauter
Modified: 2021-05-04 03:31 UTC (History)
1 user (show)

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

build.log (net-libs:phodav-2.1:20170215-082949.log,111.07 KB, text/plain)
2017-02-15 08:40 UTC, Uwe Sauter
emerge --info (emerge_info.log,6.27 KB, text/plain)
2017-02-15 08:40 UTC, Uwe Sauter

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Sauter 2017-02-15 08:40:01 UTC
Created attachment 463800 [details]

Currently available net-libs/phodav-2.1 failes to build with:

 * ERROR: net-libs/phodav-2.1::gentoo failed (install phase):
 *   systemd_get_unitdir is banned in EAPI 6, use systemd_get_systemunitdir instead
 * Call stack:
 *, line  115:  Called src_install
 *   environment, line 3118:  Called systemd_get_unitdir
 *   environment, line 3248:  Called die
 * The specific snippet of code:
 *       [[ ${EAPI} == [012345] ]] || die "${FUNCNAME} is banned in EAPI 6, use systemd_get_systemunitdir instead";

On my system phodav is included as dependency of spice-gtk.

Build log and 'emerge --info' attached…
Comment 1 Uwe Sauter 2017-02-15 08:40:42 UTC
Created attachment 463802 [details]
emerge --info
Comment 2 genoob 2017-02-18 15:02:36 UTC
I have created a pull request that solves that issue on the repository on github.
Comment 3 Mart Raudsepp gentoo-dev 2017-02-18 15:52:21 UTC
All this USE=systemd stuff seems very wrong to me completely in this package. Why shouldn't the unit files be installed unconditionally? Same for the init scripts...
Comment 4 Mart Raudsepp gentoo-dev 2017-02-20 02:28:50 UTC
I've merged the PR fixing the error with USE="spice -systemd".

I didn't change the init file/unit file installation logic in this version, as it's already been stabled on amd64/x86, so converting this bug to considering doing it later on next revbump or version bump, if it makes sense.

I mean I don't think there should be any USE=systemd - unit and init files should always be unconditionally installed for both (at least if USE=spice is set). USE=systemd mustn't mean "support only systemd" or vice-versa, but to add support, and be able to choose which init system to use at boot time with init= kernel commandline option.

Additionally I'm not sure why USE=spice controls it here, but there might be some need there. virtualization@?
Comment 5 Mart Raudsepp gentoo-dev 2017-02-20 02:33:40 UTC
So apparently /usr/sbin/spice-webdavd-2.0 is always compiled, but without USE=spice is removed in the "rm -r" call... This is wrong as well, it would be better to look into contributing a patch upstream to add a configure switch for the actual building of this and not need any of this useless compiling and then deleting.
Comment 6 Larry the Git Cow gentoo-dev 2021-05-04 03:29:16 UTC
The bug has been referenced in the following commit(s):

commit 30c2f36efb1baa5618431cf3d53cf5f2750c3639
Author:     Matt Turner <>
AuthorDate: 2021-05-04 02:10:37 +0000
Commit:     Matt Turner <>
CommitDate: 2021-05-04 03:28:35 +0000

    net-libs/phodav: Version bump to 2.5
    Signed-off-by: Matt Turner <>

 net-libs/phodav/Manifest                           |  1 +
 ...Allow-specifying-systemd-udev-directories.patch | 79 ++++++++++++++++++++++
 net-libs/phodav/phodav-2.5.ebuild                  | 59 ++++++++++++++++
 3 files changed, 139 insertions(+)
Comment 7 Matt Turner gentoo-dev 2021-05-04 03:31:48 UTC
I removed IUSE=spice from phodav-2.5, but I had to leave IUSE=systemd. This is because files/70-spice-webdavd.rules differs from the upstream 70-spice-webdavd.rules file:

# diff -u files/70-spice-webdavd.rules work/phodav-2.5/data/70-spice-webdavd.rules 
--- files/70-spice-webdavd.rules	2015-08-12 20:41:59.634025451 -0400
+++ work/phodav-2.5/data/70-spice-webdavd.rules	2020-08-27 08:04:52.877991200 -0400
@@ -1 +1 @@
-ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/org.spice-space.webdav.0", RUN+="/bin/env /etc/init.d/spice-webdavd --quiet start"
+ACTION=="add", SUBSYSTEM=="virtio-ports", ENV{DEVLINKS}=="/dev/virtio-ports/org.spice-space.webdav.0", ENV{SYSTEMD_WANTS}="spice-webdavd.service"

That is, the upstream file supports systemd and the one in files/ supports !systemd.