diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-03-25 16:24:25 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2025-03-25 17:15:34 +0000 |
commit | b24f0a31529ae11d93c63c2b51719ceffb855135 (patch) | |
tree | f0b60de54c13c2021304837dc3d9086a646614aa | |
parent | db81cacee33d877f0f143a605705adc49847a76e (diff) | |
download | meta-virtualization-b24f0a31529ae11d93c63c2b51719ceffb855135.tar.gz |
nagios-core to git (and update)
Move nagios-core away from the sourceforge and tarball releases
to a git based fetch and build.
We update the configuration to adapt to the newer nagios core,
but otherwise, this is largely unchanged.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch | 63 | ||||
-rw-r--r-- | recipes-extended/nagios/nagios-core_git.bb (renamed from recipes-extended/nagios/nagios-core_4.4.6.bb) | 24 |
2 files changed, 15 insertions, 72 deletions
diff --git a/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch b/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch deleted file mode 100644 index 014ed1d8..00000000 --- a/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 3c51d942f6da08045351ce61cc7f426fa0855489 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Fri, 31 Aug 2018 10:51:36 +0800 | ||
4 | Subject: [PATCH] fix autoheader error | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | configure.ac | 12 ++++++------ | ||
11 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/configure.ac b/configure.ac | ||
14 | index 17e436d..16b3e71 100644 | ||
15 | --- a/configure.ac | ||
16 | +++ b/configure.ac | ||
17 | @@ -388,7 +388,7 @@ AC_ARG_WITH(iobroker, | ||
18 | case $IOBROKER_METHOD in | ||
19 | epoll*) | ||
20 | if test "$GLIBC_NEWER_2_4" -eq 1 -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then | ||
21 | - AC_DEFINE([IOBROKER_USES_EPOLL]) | ||
22 | + AC_DEFINE([IOBROKER_USES_EPOLL], [1], [iobroker uses epoll]) | ||
23 | else | ||
24 | echo "\"epoll\" is not available as an iobroker method." | ||
25 | echo "Please use one of the other options." | ||
26 | @@ -397,7 +397,7 @@ epoll*) | ||
27 | ;; | ||
28 | poll*) | ||
29 | if test "x$ac_cv_header_sys_poll_h" = "xyes" -o "x$ac_cv_header_poll_h" = "xyes"; then | ||
30 | - AC_DEFINE([IOBROKER_USES_POLL]) | ||
31 | + AC_DEFINE([IOBROKER_USES_POLL], [1], [iobroker uses poll]) | ||
32 | else | ||
33 | echo "\"poll\" is not available as an iobroker method." | ||
34 | echo "Please use one of the other options." | ||
35 | @@ -406,7 +406,7 @@ poll*) | ||
36 | ;; | ||
37 | select*) | ||
38 | if test "x$ac_cv_header_sys_select_h" = "xyes"; then | ||
39 | - AC_DEFINE([IOBROKER_USES_SELECT]) | ||
40 | + AC_DEFINE([IOBROKER_USES_SELECT], [1], [iobroker uses select]) | ||
41 | else | ||
42 | echo "\"select\" is not available as an iobroker method." | ||
43 | echo "Please use one of the other options." | ||
44 | @@ -415,13 +415,13 @@ select*) | ||
45 | ;; | ||
46 | none*) | ||
47 | if test "$GLIBC_NEWER_2_4" -eq 1 -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then | ||
48 | - AC_DEFINE([IOBROKER_USES_EPOLL]) | ||
49 | + AC_DEFINE([IOBROKER_USES_EPOLL], [1], [iobroker uses epoll]) | ||
50 | IOBROKER_METHOD="epoll" | ||
51 | elif test "x$ac_cv_header_sys_poll_h" = "xyes" -o "x$ac_cv_header_poll_h" = "xyes"; then | ||
52 | - AC_DEFINE([IOBROKER_USES_POLL]) | ||
53 | + AC_DEFINE([IOBROKER_USES_POLL], [1], [iobroker uses poll]) | ||
54 | IOBROKER_METHOD="poll" | ||
55 | elif test "x$ac_cv_header_sys_select_h" = "xyes"; then | ||
56 | - AC_DEFINE([IOBROKER_USES_SELECT]) | ||
57 | + AC_DEFINE([IOBROKER_USES_SELECT], [1], [iobroker uses select]) | ||
58 | IOBROKER_METHOD="select" | ||
59 | else | ||
60 | echo "There are no available options for iobroker polling" | ||
61 | -- | ||
62 | 2.7.4 | ||
63 | |||
diff --git a/recipes-extended/nagios/nagios-core_4.4.6.bb b/recipes-extended/nagios/nagios-core_git.bb index 7ec930cd..5ffb4e17 100644 --- a/recipes-extended/nagios/nagios-core_4.4.6.bb +++ b/recipes-extended/nagios/nagios-core_git.bb | |||
@@ -10,9 +10,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4c4203caac58013115c9ca4b85f296ae" | |||
10 | 10 | ||
11 | SRCNAME = "nagios" | 11 | SRCNAME = "nagios" |
12 | 12 | ||
13 | SRC_URI = "http://prdownloads.sourceforge.net/sourceforge/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ | 13 | SRCREV = "2706fa7a451afe48bd4dc240d72d23fdcec0d9ef" |
14 | |||
15 | SRC_URI = "git://github.com/NagiosEnterprises/nagioscore.git;protocol=https;branch=master \ | ||
14 | file://eventhandlers_nagioscmd_path.patch \ | 16 | file://eventhandlers_nagioscmd_path.patch \ |
15 | file://0001-fix-autoheader-error.patch \ | ||
16 | file://0001-fix-compile-error-of-missing-headers.patch \ | 17 | file://0001-fix-compile-error-of-missing-headers.patch \ |
17 | file://0001-fix-segment-fault.patch \ | 18 | file://0001-fix-segment-fault.patch \ |
18 | file://volatiles \ | 19 | file://volatiles \ |
@@ -20,14 +21,13 @@ SRC_URI = "http://prdownloads.sourceforge.net/sourceforge/${SRCNAME}/${SRCNAME}- | |||
20 | file://nagios-core-systemd-volatile.conf \ | 21 | file://nagios-core-systemd-volatile.conf \ |
21 | " | 22 | " |
22 | 23 | ||
23 | SRC_URI[md5sum] = "ba849e9487e13859381eb117127bfee2" | 24 | PV = "4.5.9+git" |
24 | SRC_URI[sha256sum] = "ab0d5a52caf01e6f4dcd84252c4eb5df5a24f90bb7f951f03875eef54f5ab0f4" | ||
25 | 25 | ||
26 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 26 | S = "${WORKDIR}/git" |
27 | 27 | ||
28 | inherit autotools-brokensep update-rc.d systemd update-alternatives | 28 | inherit autotools-brokensep update-rc.d systemd update-alternatives pkgconfig |
29 | 29 | ||
30 | DEPENDS = "gd unzip-native" | 30 | DEPENDS = "gd unzip-native openssl" |
31 | 31 | ||
32 | RDEPENDS:${PN} += "\ | 32 | RDEPENDS:${PN} += "\ |
33 | gd \ | 33 | gd \ |
@@ -41,6 +41,7 @@ RDEPENDS:${PN} += "\ | |||
41 | SKIP_RECIPE[nagios-core] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on apache2 from meta-webserver which is not included', d)}" | 41 | SKIP_RECIPE[nagios-core] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on apache2 from meta-webserver which is not included', d)}" |
42 | 42 | ||
43 | acpaths = "-I ${S}/autoconf-macros" | 43 | acpaths = "-I ${S}/autoconf-macros" |
44 | EXTRA_AUTORECONF += "-I ${S}/m4 -I ${S}/autoconf-macros" | ||
44 | 45 | ||
45 | # Set default password for the hardcoded Nagios admin user "nagiosadmin". | 46 | # Set default password for the hardcoded Nagios admin user "nagiosadmin". |
46 | # If this variable is empty then will prompt user for password. | 47 | # If this variable is empty then will prompt user for password. |
@@ -52,7 +53,9 @@ EXTRA_OECONF += "--sbindir=${NAGIOS_CGIBIN_DIR} \ | |||
52 | --with-command-group=nagcmd \ | 53 | --with-command-group=nagcmd \ |
53 | --with-httpd-conf=${sysconfdir}/apache2/conf.d \ | 54 | --with-httpd-conf=${sysconfdir}/apache2/conf.d \ |
54 | --with-lockfile=${localstatedir}/run/nagios/nagios.pid \ | 55 | --with-lockfile=${localstatedir}/run/nagios/nagios.pid \ |
55 | --with-init-dir=${sysconfdir}/init.d \ | 56 | --with-initdir=${sysconfdir}/init.d \ |
57 | --with-init-type=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'sysv', d)} \ | ||
58 | --with-inetd-type=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'inetd', d)} \ | ||
56 | " | 59 | " |
57 | 60 | ||
58 | # Prevent nagios from stripping binaries, bitbake will take care of that | 61 | # Prevent nagios from stripping binaries, bitbake will take care of that |
@@ -108,7 +111,10 @@ do_install() { | |||
108 | install -d ${D}${systemd_unitdir}/system | 111 | install -d ${D}${systemd_unitdir}/system |
109 | install -m 644 ${UNPACKDIR}/nagios-core.service ${D}${systemd_unitdir}/system/ | 112 | install -m 644 ${UNPACKDIR}/nagios-core.service ${D}${systemd_unitdir}/system/ |
110 | # use our own service file | 113 | # use our own service file |
111 | rm -f ${D}${systemd_unitdir}/system/nagios.service | 114 | nagios_default_service=$(find ${D} -name 'nagios.service') |
115 | if [ -n "$nagios_default_service" ]; then | ||
116 | rm -f $nagios_default_service | ||
117 | fi | ||
112 | install -d ${D}${sysconfdir}/tmpfiles.d | 118 | install -d ${D}${sysconfdir}/tmpfiles.d |
113 | install -m 755 ${UNPACKDIR}/nagios-core-systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/nagios-core-volatile.conf | 119 | install -m 755 ${UNPACKDIR}/nagios-core-systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/nagios-core-volatile.conf |
114 | else | 120 | else |