Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641980 - net-misc/knock conditionally installs init scripts and depends on openrc
Summary: net-misc/knock conditionally installs init scripts and depends on openrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-21 23:06 UTC by Richard Freeman
Modified: 2017-12-22 09:26 UTC (History)
0 users

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 Richard Freeman gentoo-dev 2017-12-21 23:06:32 UTC
It looks like the knock-0.7 ebuild contains:

RDEPEND="${DEPEND}
        server? ( sys-apps/openrc )"

        if use server ; then
                newinitd "${FILESDIR}"/knockd.initd.2 knock
                newconfd "${FILESDIR}"/knockd.confd.2 knock
        fi


In general init.d scripts should be installed unconditionally and packages should not depend on a service manager unless they can only function when that service manager is running.  As far as I can tell there is nothing openrc-specific about knockd other than that is the only service manager that has a script written so far.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2017-12-22 09:24:19 UTC
It installs the client /usr/bin/knock
and if USE=server the server /usr/sbin/knockd.

/etc/init.d/knock references the server, so if it would be installed with 
USE=-server it'd be referencing a non-exitent binary and wrongly suggest the presence of the daemon part.
Comment 2 Larry the Git Cow gentoo-dev 2017-12-22 09:25:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94d458391b2959a5dd4f2ca7284aed890043409c

commit 94d458391b2959a5dd4f2ca7284aed890043409c
Author:     Michael Weber <xmw@gentoo.org>
AuthorDate: 2017-12-22 09:25:37 +0000
Commit:     Michael Weber <xmw@gentoo.org>
CommitDate: 2017-12-22 09:25:48 +0000

    net-misc/knock: Drop dependency on openrc.
    
    Bug: https://bugs.gentoo.org/641980
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 net-misc/knock/knock-0.7.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)}