Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620020 - net-analyzer/nrpe-3.1.0: systemd service file doesn't work with 3.1 release
Summary: net-analyzer/nrpe-3.1.0: systemd service file doesn't work with 3.1 release
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sysadmin Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-28 14:48 UTC by Pierre-Olivier Mercier
Modified: 2017-07-16 12:49 UTC (History)
2 users (show)

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


Attachments
nrpe-3.1.0.service (nrpe-3.1.0.service,238 bytes, text/plain)
2017-05-28 14:48 UTC, Pierre-Olivier Mercier
Details
nrpe-3.1.0.service (nrpe-3.1.0.service,225 bytes, text/plain)
2017-05-28 14:56 UTC, Pierre-Olivier Mercier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Olivier Mercier 2017-05-28 14:48:00 UTC
Created attachment 474580 [details]
nrpe-3.1.0.service

The ebuild for the new version 3.1.0 introduces a new init file (mainly because of the new location of the binary). This should also be done in the service file, I attached.
Comment 1 Pierre-Olivier Mercier 2017-05-28 14:56:57 UTC
Created attachment 474582 [details]
nrpe-3.1.0.service

Here is a service file a bit more compliant with systemd usage: it uses the new -f option which runs the server in foreground for systemd.
Comment 2 Michael Orlitzky gentoo-dev 2017-07-15 19:20:10 UTC
Upstream has a service file here:

https://github.com/NagiosEnterprises/nrpe/blob/master/startup/default-service.in

If you substitute the correct paths for the variables in the file (like @sbindir@), does that one work? If so, I'd rather stick with that one so we don't have to carry another file around. If not, I'll ship this one.
Comment 3 Pierre-Olivier Mercier 2017-07-16 09:36:31 UTC
Yes, the upstream service file works well.

I made the check with the following patch to the ebuild:

--- /usr/local/portage/net-analyzer/nrpe/nrpe-3.1.1.ebuild~	2017-06-07 14:23:15.000000000 +0200
+++ /usr/local/portage/net-analyzer/nrpe/nrpe-3.1.1.ebuild	2017-07-16 11:27:55.638433985 +0200
@@ -49,7 +49,7 @@
 	fperms 0640 /etc/nagios/nrpe.cfg
 
 	newinitd "${FILESDIR}/nrpe-${PV}.init" nrpe
-	systemd_dounit "${FILESDIR}/${PN}.service"
+	systemd_newunit "${S}/startup/default-service" "${PN}.service"
 
 	insinto /etc/xinetd.d/
 	newins "${FILESDIR}/nrpe.xinetd.2" nrpe
Comment 4 Michael Orlitzky gentoo-dev 2017-07-16 12:49:44 UTC
Thanks! The new nrpe-3.2.0-r1 has your fix.