summaryrefslogtreecommitdiffstats
path: root/recipes-extended/nagios
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-07-28 14:22:43 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-08-02 17:17:53 -0400
commitd876cfc5bfafa516dee55d04b50b319a22165640 (patch)
treeea03c34f999bd85e440c85fc8e722df8666e2e68 /recipes-extended/nagios
parent5fdf66c1e2ec0c6b08573bf0a6aa9f84d2fc4ae6 (diff)
downloadmeta-virtualization-d876cfc5bfafa516dee55d04b50b319a22165640.tar.gz
global: overrides syntax conversion
OEcore/bitbake are moving to use the clearer ":" as an overrides separator. This is pass one of updating the meta-virt recipes to use that syntax. This has only been minimally build/runtime tested, more changes will be required for missed overrides, or incorrect conversions Note: A recent bitbake is required: commit 75fad23fc06c008a03414a1fc288a8614c6af9ca Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Sun Jul 18 12:59:15 2021 +0100 bitbake: data_smart/parse: Allow ':' characters in variable/function names It is becomming increasingly clear we need to find a way to show what is/is not an override in our syntax. We need to do this in a way which is clear to users, readable and in a way we can transition to. The most effective way I've found to this is to use the ":" charater to directly replace "_" where an override is being specified. This includes "append", "prepend" and "remove" which are effectively special override directives. This patch simply adds the character to the parser so bitbake accepts the value but maps it back to "_" internally so there is no behaviour change. This change is simple enough it could potentially be backported to older version of bitbake meaning layers using the new syntax/markup could work with older releases. Even if other no other changes are accepted at this time and we don't backport, it does set us on a path where at some point in future we could require a more explict syntax. I've tested this patch by converting oe-core/meta-yocto to the new syntax for overrides (9000+ changes) and then seeing that builds continue to work with this patch. (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/nagios')
-rw-r--r--recipes-extended/nagios/nagios-common.inc10
-rw-r--r--recipes-extended/nagios/nagios-core_4.4.6.bb26
-rw-r--r--recipes-extended/nagios/nagios-nrpe_4.0.2.bb20
-rw-r--r--recipes-extended/nagios/nagios-nsca_2.9.2.bb16
-rw-r--r--recipes-extended/nagios/nagios-plugins_2.2.1.bb6
5 files changed, 39 insertions, 39 deletions
diff --git a/recipes-extended/nagios/nagios-common.inc b/recipes-extended/nagios/nagios-common.inc
index c173041c..bfbe188b 100644
--- a/recipes-extended/nagios/nagios-common.inc
+++ b/recipes-extended/nagios/nagios-common.inc
@@ -11,16 +11,16 @@ EXTRA_OECONF += "--sysconfdir=${NAGIOS_CONF_DIR} \
11 --localstatedir=${NAGIOS_STATE_DIR} \ 11 --localstatedir=${NAGIOS_STATE_DIR} \
12" 12"
13 13
14FILES_${PN}-dbg += "${NAGIOS_PLUGIN_DIR}/.debug" 14FILES:${PN}-dbg += "${NAGIOS_PLUGIN_DIR}/.debug"
15 15
16DEPENDS = "nagios-core" 16DEPENDS = "nagios-core"
17 17
18COMPATIBLE_HOST_aarch64 = "null" 18COMPATIBLE_HOST:aarch64 = "null"
19 19
20inherit useradd 20inherit useradd
21 21
22USERADD_PACKAGES = "${PN}" 22USERADD_PACKAGES = "${PN}"
23GROUPADD_PARAM_${PN} = "-r ${NAGIOS_GROUP}; -r nagcmd" 23GROUPADD_PARAM:${PN} = "-r ${NAGIOS_GROUP}; -r nagcmd"
24USERADD_PARAM_${PN} = "-r -M -g ${NAGIOS_GROUP} ${NAGIOS_USER}" 24USERADD_PARAM:${PN} = "-r -M -g ${NAGIOS_GROUP} ${NAGIOS_USER}"
25 25
26FILESYSTEM_PERMS_TABLES_append = " files/fs-perms-nagios.txt" 26FILESYSTEM_PERMS_TABLES:append = " files/fs-perms-nagios.txt"
diff --git a/recipes-extended/nagios/nagios-core_4.4.6.bb b/recipes-extended/nagios/nagios-core_4.4.6.bb
index fc3d2c5a..01c8c0cc 100644
--- a/recipes-extended/nagios/nagios-core_4.4.6.bb
+++ b/recipes-extended/nagios/nagios-core_4.4.6.bb
@@ -29,7 +29,7 @@ inherit autotools-brokensep update-rc.d systemd update-alternatives
29 29
30DEPENDS = "gd unzip-native" 30DEPENDS = "gd unzip-native"
31 31
32RDEPENDS_${PN} += "\ 32RDEPENDS:${PN} += "\
33 gd \ 33 gd \
34 libpng \ 34 libpng \
35 fontconfig \ 35 fontconfig \
@@ -65,12 +65,12 @@ EXTRA_OECONF += "ac_cv_header_ltdl_h=no"
65EXTRA_OECONF += "ac_cv_path_PERL=${bindir}/perl" 65EXTRA_OECONF += "ac_cv_path_PERL=${bindir}/perl"
66 66
67# Fix build failure for gcc-10 67# Fix build failure for gcc-10
68CFLAGS_append = " -fcommon" 68CFLAGS:append = " -fcommon"
69 69
70# Set to "1" to allow nagios-core post-init to modify Apache configuration 70# Set to "1" to allow nagios-core post-init to modify Apache configuration
71NAGIOS_MODIFY_APACHE ??= "1" 71NAGIOS_MODIFY_APACHE ??= "1"
72 72
73do_configure_prepend() { 73do_configure:prepend() {
74 # rename these macros to have .m4 suffix so that autoreconf could recognize them 74 # rename these macros to have .m4 suffix so that autoreconf could recognize them
75 for macro in `ls ${S}/autoconf-macros/ax_nagios_get_*`; do 75 for macro in `ls ${S}/autoconf-macros/ax_nagios_get_*`; do
76 mv $macro $macro.m4 76 mv $macro $macro.m4
@@ -117,7 +117,7 @@ do_install() {
117 fi 117 fi
118} 118}
119 119
120pkg_postinst_ontarget_${PN}-setup () { 120pkg_postinst_ontarget:${PN}-setup () {
121 # Set password for nagiosadmin user 121 # Set password for nagiosadmin user
122 if [ -z "${NAGIOS_DEFAULT_ADMINUSER_PASSWORD}" ]; then 122 if [ -z "${NAGIOS_DEFAULT_ADMINUSER_PASSWORD}" ]; then
123 htpasswd -c ${NAGIOS_CONF_DIR}/htpasswd.users nagiosadmin 123 htpasswd -c ${NAGIOS_CONF_DIR}/htpasswd.users nagiosadmin
@@ -134,23 +134,23 @@ pkg_postinst_ontarget_${PN}-setup () {
134 134
135PACKAGES += "${SRCNAME}-base ${PN}-setup" 135PACKAGES += "${SRCNAME}-base ${PN}-setup"
136 136
137FILES_${PN} += "${datadir} \ 137FILES:${PN} += "${datadir} \
138 ${NAGIOS_PLUGIN_DIR} \ 138 ${NAGIOS_PLUGIN_DIR} \
139 ${NAGIOS_CGIBIN_DIR} \ 139 ${NAGIOS_CGIBIN_DIR} \
140" 140"
141 141
142FILES_${PN}-dbg += "${NAGIOS_CGIBIN_DIR}/.debug" 142FILES:${PN}-dbg += "${NAGIOS_CGIBIN_DIR}/.debug"
143 143
144ALLOW_EMPTY_${SRCNAME}-base = "1" 144ALLOW_EMPTY:${SRCNAME}-base = "1"
145ALLOW_EMPTY_${PN}-setup = "1" 145ALLOW_EMPTY:${PN}-setup = "1"
146 146
147SYSTEMD_PACKAGES = "${PN}" 147SYSTEMD_PACKAGES = "${PN}"
148SYSTEMD_SERVICE_${PN} = "nagios-core.service" 148SYSTEMD_SERVICE:${PN} = "nagios-core.service"
149SYSTEMD_AUTO_ENABLE_${PN} = "enable" 149SYSTEMD_AUTO_ENABLE:${PN} = "enable"
150 150
151USERADD_PACKAGES += "${SRCNAME}-base" 151USERADD_PACKAGES += "${SRCNAME}-base"
152GROUPADD_PARAM_${SRCNAME}-base = "-r ${NAGIOS_GROUP}" 152GROUPADD_PARAM:${SRCNAME}-base = "-r ${NAGIOS_GROUP}"
153USERADD_PARAM_${SRCNAME}-base = "-r -M -g ${NAGIOS_GROUP} ${NAGIOS_USER}" 153USERADD_PARAM:${SRCNAME}-base = "-r -M -g ${NAGIOS_GROUP} ${NAGIOS_USER}"
154 154
155INITSCRIPT_NAME = "nagios" 155INITSCRIPT_NAME = "nagios"
156INITSCRIPT_PARAMS = "defaults" 156INITSCRIPT_PARAMS = "defaults"
@@ -158,5 +158,5 @@ INITSCRIPT_PARAMS = "defaults"
158CVE_PRODUCT = "nagios_core" 158CVE_PRODUCT = "nagios_core"
159 159
160ALTERNATIVE_PRIORITY_${PN} = '20' 160ALTERNATIVE_PRIORITY_${PN} = '20'
161ALTERNATIVE_${PN} = "nagios" 161ALTERNATIVE:${PN} = "nagios"
162ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios" 162ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
diff --git a/recipes-extended/nagios/nagios-nrpe_4.0.2.bb b/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
index 7f81172e..71604534 100644
--- a/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
+++ b/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
@@ -59,7 +59,7 @@ do_compile() {
59 oe_runmake all 59 oe_runmake all
60} 60}
61 61
62do_install_append() { 62do_install:append() {
63 oe_runmake 'DESTDIR=${D}' install-daemon 63 oe_runmake 'DESTDIR=${D}' install-daemon
64 oe_runmake 'DESTDIR=${D}' install-config 64 oe_runmake 'DESTDIR=${D}' install-config
65 65
@@ -83,26 +83,26 @@ do_install_append() {
83 83
84PACKAGES = "${PN}-dbg ${PN}-plugin ${PN}-daemon" 84PACKAGES = "${PN}-dbg ${PN}-plugin ${PN}-daemon"
85 85
86FILES_${PN}-plugin = "${NAGIOS_PLUGIN_DIR} \ 86FILES:${PN}-plugin = "${NAGIOS_PLUGIN_DIR} \
87 ${NAGIOS_PLUGIN_CONF_DIR} \ 87 ${NAGIOS_PLUGIN_CONF_DIR} \
88" 88"
89 89
90FILES_${PN}-daemon = "${sysconfdir} \ 90FILES:${PN}-daemon = "${sysconfdir} \
91 ${bindir} \ 91 ${bindir} \
92 ${nonarch_libdir}/tmpfiles.d/ \ 92 ${nonarch_libdir}/tmpfiles.d/ \
93 ${localstatedir} \ 93 ${localstatedir} \
94" 94"
95 95
96RDEPENDS_${PN}-daemon = "nagios-base" 96RDEPENDS:${PN}-daemon = "nagios-base"
97RDEPENDS_${PN}-plugin = "nagios-base" 97RDEPENDS:${PN}-plugin = "nagios-base"
98 98
99SYSTEMD_PACKAGES = "${PN}-daemon" 99SYSTEMD_PACKAGES = "${PN}-daemon"
100SYSTEMD_SERVICE_${PN}-daemon = "nagios-nrpe.service" 100SYSTEMD_SERVICE:${PN}-daemon = "nagios-nrpe.service"
101SYSTEMD_AUTO_ENABLE_${PN}-daemon = "enable" 101SYSTEMD_AUTO_ENABLE:${PN}-daemon = "enable"
102 102
103INITSCRIPT_PACKAGES = "${PN}-daemon" 103INITSCRIPT_PACKAGES = "${PN}-daemon"
104INITSCRIPT_NAME_${PN}-daemon = "nrpe" 104INITSCRIPT_NAME:${PN}-daemon = "nrpe"
105INITSCRIPT_PARAMS_${PN}-daemon = "defaults" 105INITSCRIPT_PARAMS:${PN}-daemon = "defaults"
106 106
107ALTERNATIVE_${PN}-daemon = "nagios" 107ALTERNATIVE:${PN}-daemon = "nagios"
108ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios" 108ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
diff --git a/recipes-extended/nagios/nagios-nsca_2.9.2.bb b/recipes-extended/nagios/nagios-nsca_2.9.2.bb
index fd45d84c..74e5b5b2 100644
--- a/recipes-extended/nagios/nagios-nsca_2.9.2.bb
+++ b/recipes-extended/nagios/nagios-nsca_2.9.2.bb
@@ -61,26 +61,26 @@ do_install() {
61 61
62PACKAGES = "${PN}-dbg ${PN}-daemon ${PN}-client" 62PACKAGES = "${PN}-dbg ${PN}-daemon ${PN}-client"
63 63
64FILES_${PN}-daemon = "${sysconfdir}/init.d \ 64FILES:${PN}-daemon = "${sysconfdir}/init.d \
65 ${NAGIOS_CONF_DIR}/nsca.cfg \ 65 ${NAGIOS_CONF_DIR}/nsca.cfg \
66 ${bindir}/nsca \ 66 ${bindir}/nsca \
67" 67"
68 68
69FILES_${PN}-client = "${NAGIOS_CONF_DIR}/send_nsca.cfg \ 69FILES:${PN}-client = "${NAGIOS_CONF_DIR}/send_nsca.cfg \
70 ${bindir}/send_nsca \ 70 ${bindir}/send_nsca \
71" 71"
72 72
73RDEPENDS_${PN}-daemon += "libmcrypt \ 73RDEPENDS:${PN}-daemon += "libmcrypt \
74 nagios-base \ 74 nagios-base \
75" 75"
76RDEPENDS_${PN}-client += "libmcrypt \ 76RDEPENDS:${PN}-client += "libmcrypt \
77 nagios-base \ 77 nagios-base \
78" 78"
79 79
80SYSTEMD_PACKAGES = "${PN}-daemon" 80SYSTEMD_PACKAGES = "${PN}-daemon"
81SYSTEMD_SERVICE_${PN}-daemon = "nagios-nsca.service" 81SYSTEMD_SERVICE:${PN}-daemon = "nagios-nsca.service"
82SYSTEMD_AUTO_ENABLE_${PN}-daemon = "enable" 82SYSTEMD_AUTO_ENABLE:${PN}-daemon = "enable"
83 83
84INITSCRIPT_PACKAGES = "${PN}-daemon" 84INITSCRIPT_PACKAGES = "${PN}-daemon"
85INITSCRIPT_NAME_${PN}-daemon = "nsca" 85INITSCRIPT_NAME:${PN}-daemon = "nsca"
86INITSCRIPT_PARAMS_${PN}-daemon = "defaults" 86INITSCRIPT_PARAMS:${PN}-daemon = "defaults"
diff --git a/recipes-extended/nagios/nagios-plugins_2.2.1.bb b/recipes-extended/nagios/nagios-plugins_2.2.1.bb
index b97d80cb..f61262ee 100644
--- a/recipes-extended/nagios/nagios-plugins_2.2.1.bb
+++ b/recipes-extended/nagios/nagios-plugins_2.2.1.bb
@@ -59,17 +59,17 @@ do_configure() {
59 oe_runconf || die "make failed" 59 oe_runconf || die "make failed"
60} 60}
61 61
62do_install_append() { 62do_install:append() {
63 sed -i '1s,#! /usr/bin/perl -w.*,#! ${bindir}/env perl,' ${D}${libdir}/nagios/plugins/* 63 sed -i '1s,#! /usr/bin/perl -w.*,#! ${bindir}/env perl,' ${D}${libdir}/nagios/plugins/*
64} 64}
65 65
66RDEPENDS_${PN} += "\ 66RDEPENDS:${PN} += "\
67 iputils \ 67 iputils \
68 nagios-base \ 68 nagios-base \
69 perl \ 69 perl \
70 bash \ 70 bash \
71" 71"
72 72
73FILES_${PN} += "${datadir} \ 73FILES:${PN} += "${datadir} \
74 ${NAGIOS_PLUGIN_DIR} \ 74 ${NAGIOS_PLUGIN_DIR} \
75" 75"