commit: ea33afbdeaa8a6d2aa86bdfeddc8dbb45818e875 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> AuthorDate: Wed Feb 24 00:32:38 2021 +0000 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> CommitDate: Wed Feb 24 00:33:01 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea33afbd
net-analyzer/nagios-core: new revision to install systemd service. Closes: https://bugs.gentoo.org/771774 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> ...-core-4.4.6-r1.ebuild => nagios-core-4.4.6-r2.ebuild} | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net-analyzer/nagios-core/nagios-core-4.4.6-r1.ebuild b/net-analyzer/nagios-core/nagios-core-4.4.6-r2.ebuild similarity index 93% rename from net-analyzer/nagios-core/nagios-core-4.4.6-r1.ebuild rename to net-analyzer/nagios-core/nagios-core-4.4.6-r2.ebuild index b345507323e..90f596a5cc8 100644 --- a/net-analyzer/nagios-core/nagios-core-4.4.6-r1.ebuild +++ b/net-analyzer/nagios-core/nagios-core-4.4.6-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs +inherit systemd toolchain-funcs MY_P="${PN/-core}-${PV}" DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" @@ -108,6 +108,9 @@ src_configure() { fi fi + # We pass "unknown" as the init type because we don't want it to + # guess. Later on, we'll manually install both OpenRC and systemd + # services. econf ${myconf} \ --prefix="${EPREFIX}/usr" \ --bindir="${EPREFIX}/usr/sbin" \ @@ -115,7 +118,8 @@ src_configure() { --sysconfdir="${EPREFIX}/etc/nagios" \ --libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins" \ --with-cgibindir="${EPREFIX}/usr/$(get_libdir)/nagios/cgi-bin" \ - --with-webdir="${EPREFIX}/usr/share/nagios/htdocs" + --with-webdir="${EPREFIX}/usr/share/nagios/htdocs" \ + --with-init-type="unknown" # The paths in the web server configuration files need to match # those passed to econf above. @@ -198,7 +202,13 @@ src_install() { doins "${WORKDIR}/${GENTOO_ICONS}"/*.* fi + # The ./configure script for nagios detects the init system on the + # build host, which is wrong for all sorts of reasons. We've gone + # to great lengths above to avoid running "install-init" -- even + # indirectly -- and so now we must install whatever service files + # we need by hand. newinitd startup/openrc-init nagios + systemd_newunit startup/default-service nagios.service if use web ; then if use apache2 ; then
