Marcel Telka
2022-09-04 b8e90d1f9244e35960ba3f1efdf4bf5475897787
Add nrpe (Nagios Remote Plugin Executor)
7 files added
1 files modified
167 ■■■■■ changed files
components/sysutils/nrpe/Makefile 56 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/manifests/sample-manifest.p5m 28 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/nrpe.p5m 36 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/patches/01-no-nrpe-uninstall.patch 10 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/patches/02-smf-cfg-path.patch 11 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/patches/03-smf-creds.patch 12 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/pkg5 12 ●●●●● patch | view | raw | blame | history
doc/reserved_uids_and_gids.md 2 ●●●●● patch | view | raw | blame | history
components/sysutils/nrpe/Makefile
New file
@@ -0,0 +1,56 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2022 Marcel Telka
#
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME =        nrpe
COMPONENT_VERSION =        4.1.0
COMPONENT_SUMMARY =        Nagios Remote Plugin Executor
COMPONENT_PROJECT_URL =        https://github.com/NagiosEnterprises/nrpe
COMPONENT_FMRI =        system/management/nagios/nrpe
COMPONENT_CLASSIFICATION =    System/Enterprise Management
COMPONENT_SRC =            $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE =        $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_URL =        \
    https://github.com/NagiosEnterprises/nrpe/releases/download/$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
COMPONENT_ARCHIVE_HASH =    \
    sha256:a1f14aa8aaf935b576cc55ab5d77b7cb9c920d7702aff44c9d18c4c841ef8ecc
COMPONENT_LICENSE =        GPL-2.0-only
COMPONENT_LICENSE_FILE =    LICENSE.md
TEST_TARGET = $(NO_TESTS)
include $(WS_MAKE_RULES)/common.mk
CONFIGURE_OPTIONS += --enable-install-method=os
CONFIGURE_OPTIONS += --with-piddir=$(VARDIR)/run
CONFIGURE_OPTIONS += --with-nrpe-user=nrpe
CONFIGURE_OPTIONS += --with-nrpe-group=nrpe
COMPONENT_BUILD_TARGETS = nrpe
COMPONENT_INSTALL_ARGS += NAGIOS_INSTALL_OPTS=
COMPONENT_INSTALL_ARGS += NRPE_INSTALL_OPTS=
# The default 'install' target installs both nrpe and check_nrpe.  Since we do
# not need check_nrpe for now we need to override it by 'install-daemon'
# target.
COMPONENT_INSTALL_TARGETS = install-daemon
COMPONENT_INSTALL_TARGETS += install-config
COMPONENT_INSTALL_TARGETS += install-init
# Auto-generated dependencies
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += SUNWcs
REQUIRED_PACKAGES += system/library
components/sysutils/nrpe/manifests/sample-manifest.p5m
New file
@@ -0,0 +1,28 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2022 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=etc/nagios/nrpe.cfg
file path=lib/svc/manifest/network/nagios/nrpe.xml
file path=usr/sbin/nrpe
components/sysutils/nrpe/nrpe.p5m
New file
@@ -0,0 +1,36 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2022 Marcel Telka
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
<transform file path=.*/nrpe\.cfg$ -> set mode 0644>
<transform file path=.*/nrpe\.cfg$ -> set overlay allow>
<transform file path=.*/nrpe\.cfg$ -> set preserve renamenew>
group groupname=nrpe gid=84
user username=nrpe uid=84 group=nrpe gcos-field="Nagios Remote Plugin Executor" \
    home-dir=/var/empty login-shell=/bin/false ftpuser=false
file path=etc/nagios/nrpe.cfg
file path=lib/svc/manifest/network/nagios/nrpe.xml
file path=usr/sbin/nrpe
components/sysutils/nrpe/patches/01-no-nrpe-uninstall.patch
New file
@@ -0,0 +1,10 @@
--- nrpe-4.1.0/src/Makefile.in.orig    2022-09-03 08:03:42.587879112 +0000
+++ nrpe-4.1.0/src/Makefile.in    2022-09-03 08:03:52.019237210 +0000
@@ -74,7 +74,6 @@
 install-uninstall:
     $(INSTALL) -m 755 -d $(SBINDIR)
-    $(INSTALL) -m 755 ../uninstall $(SBINDIR)/nrpe-uninstall
 clean:
     rm -f core nrpe check_nrpe $(SNPRINTF_O)
components/sysutils/nrpe/patches/02-smf-cfg-path.patch
New file
@@ -0,0 +1,11 @@
--- nrpe-4.1.0/startup/solaris-init.xml.in.orig    2022-09-03 23:06:39.591423133 +0000
+++ nrpe-4.1.0/startup/solaris-init.xml.in    2022-09-03 23:06:49.459296706 +0000
@@ -68,7 +68,7 @@
             restart_on='restart'
             type='path'>
             <service_fmri
-                value='file://localhost@sysconfdir@/nrpe.cfg' />
+                value='file://localhost@pkgsysconfdir@/nrpe.cfg' />
         </dependency>
         <dependency
components/sysutils/nrpe/patches/03-smf-creds.patch
New file
@@ -0,0 +1,12 @@
--- nrpe-4.1.0/startup/solaris-init.xml.in.orig    2022-09-04 08:25:13.012334859 +0000
+++ nrpe-4.1.0/startup/solaris-init.xml.in    2022-09-04 08:25:32.429454220 +0000
@@ -91,9 +91,6 @@
             name='start'
             exec='@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -d'
             timeout_seconds='5'>
-            <method_context>
-                <method_credential user='@nrpe_user@' group='@nrpe_group@'/>
-            </method_context>
         </exec_method>
         <exec_method
components/sysutils/nrpe/pkg5
New file
@@ -0,0 +1,12 @@
{
    "dependencies": [
        "SUNWcs",
        "library/security/openssl",
        "shell/ksh93",
        "system/library"
    ],
    "fmris": [
        "system/management/nagios/nrpe"
    ],
    "name": "nrpe"
}
doc/reserved_uids_and_gids.md
@@ -61,6 +61,7 @@
80    | webservd
81    | udpxy
82    | asterisk
84    | nrpe
88    | powerdns
90    | postgres
91    | barman
@@ -131,6 +132,7 @@
80    | webservd
81    | udpxy
82    | asterisk
84    | nrpe
88    | powerdns
90    | postgres
91    | barman