Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 609390

Summary: net-libs/phodav-2.1 - review init and unit file installation conditionals
Product: Gentoo Linux Reporter: Uwe Sauter <uwe>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: CONFIRMED ---    
Severity: normal CC: virtualization
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
emerge --info

Description Uwe Sauter 2017-02-15 08:40:01 UTC
Created attachment 463800 [details]
build.log

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:
 *     ebuild.sh, 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. https://github.com/gentoo/gentoo/pull/4009/files
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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30c2f36efb1baa5618431cf3d53cf5f2750c3639

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

    net-libs/phodav: Version bump to 2.5
    
    Bug: https://bugs.gentoo.org/609390
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 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.