summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2021-01-15 00:37:17 +0000
committerwiz <wiz@pkgsrc.org>2021-01-15 00:37:17 +0000
commit7e085352bfa8d004e2c02fa5a81481129e6a2f2e (patch)
tree643dcb4e7c71ff58bf2b13328375aacad4278eba
parenta774cfa1cbfb85a5e7d1873815407808b6f799a6 (diff)
downloadpkgsrc-7e085352bfa8d004e2c02fa5a81481129e6a2f2e.tar.gz
net/icinga2: import icinga2-2.12.3
Packaged by Edgar Fuß for pkgsrc-wip. Icinga 2 is an open source monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting. Scalable and extensible, Icinga 2 can monitor large, complex environments across multiple locations.
-rw-r--r--net/icinga2/DESCR6
-rw-r--r--net/icinga2/Makefile164
-rw-r--r--net/icinga2/PLIST176
-rw-r--r--net/icinga2/distinfo17
-rw-r--r--net/icinga2/files/icinga2.sh57
-rw-r--r--net/icinga2/options.mk51
-rw-r--r--net/icinga2/patches/patch-CMakeLists.txt18
-rw-r--r--net/icinga2/patches/patch-lib_base_string.cpp27
-rw-r--r--net/icinga2/patches/patch-lib_base_string.hpp24
-rw-r--r--net/icinga2/patches/patch-lib_base_utility.cpp20
-rw-r--r--net/icinga2/patches/patch-lib_perfdata_elasticsearchwriter.cpp17
-rw-r--r--net/icinga2/patches/patch-lib_perfdata_influxdbwriter.cpp17
-rw-r--r--net/icinga2/patches/patch-lib_remote_configfileshandler.cpp17
-rw-r--r--net/icinga2/patches/patch-lib_remote_httpserverconnection.cpp53
-rw-r--r--net/icinga2/patches/patch-lib_remote_httputility.cpp17
-rw-r--r--net/icinga2/patches/patch-lib_remote_infohandler.cpp17
-rw-r--r--net/icinga2/patches/patch-third-party_cmake_FindMySQL.cmake42
17 files changed, 740 insertions, 0 deletions
diff --git a/net/icinga2/DESCR b/net/icinga2/DESCR
new file mode 100644
index 00000000000..24de7f3d546
--- /dev/null
+++ b/net/icinga2/DESCR
@@ -0,0 +1,6 @@
+Icinga 2 is an open source monitoring system which checks the
+availability of your network resources, notifies users of outages,
+and generates performance data for reporting.
+
+Scalable and extensible, Icinga 2 can monitor large, complex
+environments across multiple locations.
diff --git a/net/icinga2/Makefile b/net/icinga2/Makefile
new file mode 100644
index 00000000000..82be6823bcd
--- /dev/null
+++ b/net/icinga2/Makefile
@@ -0,0 +1,164 @@
+# $NetBSD: Makefile,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+DISTNAME= icinga2-2.12.3
+CATEGORIES= net sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=icinga/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= ef@math.uni-bonn.de
+HOMEPAGE= https://www.icinga.com/products/icinga-2/
+COMMENT= Monitoring system
+LICENSE= gnu-gpl-v2
+
+ICINGA2_USER?= icinga
+ICINGA2_GROUP?= icinga
+ICINGA2_COMMAND_GROUP?= icingacmd
+
+PLUGINDIR= ${PREFIX}/libexec/nagios
+
+PKG_USERS= ${ICINGA2_USER}:${ICINGA2_GROUP}
+PKG_GROUPS= ${ICINGA2_GROUP} ${ICINGA2_COMMAND_GROUP}
+PKG_USERS_VARS+= ICINGA2_USER
+PKG_GROUPS_VARS+= ICINGA2_GROUP ICINGA2_COMMAND_GROUP
+BUILD_DEFS+= ICINGA2_USER ICINGA2_GROUP ICINGA2_COMMAND_GROUP VARBASE PKG_SYSCONFBASE
+
+USE_LANGUAGES= c c++ c++11
+USE_CMAKE= yes
+USE_TOOLS+= flex bison
+
+PKG_RCD_SCRIPTS= YES
+RCD_SCRIPTS= icinga2
+FILES_SUBST+= ICINGA2_USER=${ICINGA2_USER}
+FILES_SUBST+= ICINGA2_GROUP=${ICINGA2_GROUP} ICINGA2_COMMAND_GROUP=${ICINGA2_COMMAND_GROUP}
+FILES_SUBST+= NAGIOS_PLUGIN_STATE_DIRECTORY=${VARBASE}/spool/nagios
+FILES_SUBST+= RUNDIR=${RUNDIR}
+
+PKG_SYSCONFSUBDIR= icinga2
+EGDIR_PARENT= ${PREFIX}/share/examples
+EGDIR= ${EGDIR_PARENT}/icinga2
+DOCDIR= ${PREFIX}/share/doc/icinga2
+INSTALLATION_DIRS+= ${EGDIR} ${DOCDIR}
+INSTALLATION_DIRS+= ${EGDIR_PARENT}/bash_completion.d
+#! intall into BASHCOMPDIR=${PREFIX}/share/bash-completion/completions?
+INSTALLATION_DIRS+= ${EGDIR}/conf.d
+INSTALLATION_DIRS+= ${EGDIR}/features-available
+INSTALLATION_DIRS+= ${EGDIR}/scripts
+INSTALLATION_DIRS+= ${EGDIR}/zones.d
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+RUNDIR_PARENT= ${VARBASE}/run
+RUNDIR= ${RUNDIR_PARENT}/icinga2
+
+SPOOLDIR_PARENT= ${VARBASE}/spool
+SPOOLDIR= ${SPOOLDIR_PARENT}/icinga2
+PKG_HOME.${ICINGA2_USER}= ${SPOOLDIR}
+
+# All the _PERMS values are chosen to mimic what icinga2.spec says
+
+MAKE_DIRS+= ${VARBASE}/cache
+OWN_DIRS_PERMS+= ${VARBASE}/cache/icinga2 ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0750
+MAKE_DIRS+= ${VARBASE}/log
+OWN_DIRS_PERMS+= ${VARBASE}/log/icinga2 ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0755 # spec: 0750
+OWN_DIRS_PERMS+= ${VARBASE}/log/icinga2/crash ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+.if !empty(PKG_OPTIONS:Micinga2-compat)
+OWN_DIRS_PERMS+= ${VARBASE}/log/icinga2/compat ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0750
+OWN_DIRS_PERMS+= ${VARBASE}/log/icinga2/archive ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0750
+.endif
+MAKE_DIRS+= ${VARBASE}/lib
+OWN_DIRS_PERMS+= ${VARBASE}/lib/icinga2 ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0750
+#OWN_DIRS+= ${VARBASE}/lib/icinga2/api
+#OWN_DIRS+= ${VARBASE}/lib/icinga2/api/log
+#OWN_DIRS+= ${VARBASE}/lib/icinga2/api/repository
+#OWN_DIRS+= ${VARBASE}/lib/icinga2/api/zones
+# These need to be created in the RC script since RUNDIR may reside on a tempfs
+#MAKE_DIRS+= ${RUNDIR_PARENT}
+#OWN_DIRS_PERMS+= ${RUNDIR} ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 0751 # spec: 0750
+#OWN_DIRS_PERMS+= ${RUNDIR}/cmd ${ICINGA2_USER} ${ICINGA2_COMMAND_GROUP} 2750
+MAKE_DIRS+= ${SPOOLDIR_PARENT}
+OWN_DIRS_PERMS+= ${SPOOLDIR} ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+.if !empty(PKG_OPTIONS:Micinga2-perfdata)
+OWN_DIRS_PERMS+= ${SPOOLDIR}/perfdata ${ICINGA2_USER} ${ICINGA2_GROUP} 0770
+.endif
+OWN_DIRS_PERMS+= ${SPOOLDIR}/tmp ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+
+#OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR} ${REAL_ROOT_USER} ${ICINGA2_GROUP} 0750
+OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/conf.d ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+.for f in app commands downtimes groups hosts notifications services templates timeperiods users
+CONF_FILES_PERMS+= ${EGDIR}/conf.d/${f}.conf ${PKG_SYSCONFDIR}/conf.d/${f}.conf ${ICINGA2_USER} ${ICINGA2_GROUP} 0640
+.endfor
+OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/features-available ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/features-enabled ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+FEATURES= api debuglog mainlog syslog
+.if !empty(PKG_OPTIONS:Micinga2-checker)
+FEATURES+= checker
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-compat)
+FEATURES+= command compatlog statusdata
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-livestatus)
+FEATURES+= livestatus
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-mysql)
+FEATURES+= ido-mysql
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-notification)
+FEATURES+= notification
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-perfdata)
+FEATURES+= elasticsearch gelf graphite influxdb opentsdb perfdata
+.endif
+.if !empty(PKG_OPTIONS:Micinga2-pgsql)
+FEATURES+= ido-pgsql
+.endif
+.for f in ${FEATURES}
+CONF_FILES_PERMS+= ${EGDIR}/features-available/${f}.conf ${PKG_SYSCONFDIR}/features-available/${f}.conf ${ICINGA2_USER} ${ICINGA2_GROUP} 0640
+.endfor
+OWN_DIRS+= ${PKG_SYSCONFDIR}/scripts
+.for f in mail-host-notification.sh mail-service-notification.sh
+CONF_FILES_PERMS+= ${EGDIR}/scripts/${f} ${PKG_SYSCONFDIR}/scripts/${f} ${ICINGA2_USER} ${ICINGA2_GROUP} 0755
+.endfor
+OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/zones.d ${ICINGA2_USER} ${ICINGA2_GROUP} 0750
+.for f in constants.conf icinga2.conf zones.conf zones.d/README
+CONF_FILES_PERMS+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} ${ICINGA2_USER} ${ICINGA2_GROUP} 0640
+.endfor
+#OWN_DIRS+= ${PKG_SYSCONFDIR}/keys
+#OWN_DIRS+= ${PKG_SYSCONFDIR}/pki
+
+CMAKE_ARGS+= -DICINGA2_USER=${ICINGA2_USER} -DICINGA2_GROUP=${ICINGA2_GROUP}
+CMAKE_ARGS+= -DICINGA2_GIT_VERSION_INFO=OFF
+CMAKE_ARGS+= -DICINGA2_COMMAND_GROUP=${ICINGA2_COMMAND_GROUP}
+#CMAKE_ARGS+= -DICINGA2_UNITY_BUILD=??? # Whether to perform a unity build; defaults to `ON`
+#CMAKE_ARGS+= -DICINGA2_LTO_BUILD=??? # Whether to use link time optimization (LTO); defaults to `OFF`
+CMAKE_ARGS+= -DICINGA2_PLUGINDIR=${PLUGINDIR}
+CMAKE_ARGS+= -DICINGA2_RUNDIR=${RUNDIR_PARENT}
+CMAKE_ARGS+= -DCMAKE_INSTALL_SYSCONFDIR=${PKG_SYSCONFBASE} # not PKG_SYSCONFDIR!
+#CMAKE_ARGS+= -DICINGA2_SYSCONFIGFILE=??? # Where to put the config file the initscript/systemd pulls it's dirs from; defaults to `CMAKE_INSTALL_PREFIX/etc/sysconfig/icinga2`
+CMAKE_ARGS+= -DCMAKE_INSTALL_LOCALSTATEDIR=${VARBASE}
+# For ICINGA2_WITH_XXX see options.mk
+CMAKE_ARGS+= -DICINGA2_WITH_TESTS=OFF
+
+# The configuration files are installed in etc/icinga2. You can't tell CMAKE
+# to put them elsewhere because the program and the config files contain
+# references to the config dir. So move them to share/examples after
+# installation.
+post-install:
+ ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/* ${DESTDIR}${EGDIR}
+
+CHECK_FILES_SKIP= ${PREFIX}/etc/bash_completion.d/icinga2
+CHECK_FILES_SKIP+= ${PREFIX}/share/examples/icinga2/features-enabled/checker.conf
+CHECK_FILES_SKIP+= ${PREFIX}/share/examples/icinga2/features-enabled/mainlog.conf
+CHECK_FILES_SKIP+= ${PREFIX}/share/examples/icinga2/features-enabled/notification.conf
+
+#CMAKE_ARGS+= -DCMAKE_SKIP_BUILD_RPATH=FALSE
+#CMAKE_ARGS+= -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE
+#CMAKE_ARGS+= -DCMAKE_INSTALL_RPATH=${PREFIX}/lib/icinga2
+#CMAKE_ARGS+= -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/icinga2
+
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/icinga2/PLIST b/net/icinga2/PLIST
new file mode 100644
index 00000000000..13fbcc110fe
--- /dev/null
+++ b/net/icinga2/PLIST
@@ -0,0 +1,176 @@
+@comment $NetBSD: PLIST,v 1.1 2021/01/15 00:37:17 wiz Exp $
+${PLIST.mysql}lib/icinga2/libmysql_shim.so
+${PLIST.mysql}lib/icinga2/libmysql_shim.so.2.12.0
+${PLIST.pgsql}lib/icinga2/libpgsql_shim.so
+${PLIST.pgsql}lib/icinga2/libpgsql_shim.so.2.12.0
+lib/icinga2/sbin/icinga2
+libexec/nagios/check_nscp_api
+man/man8/icinga2.8
+sbin/icinga2
+share/doc/icinga2/AUTHORS
+share/doc/icinga2/CHANGELOG.md
+share/doc/icinga2/COPYING
+share/doc/icinga2/NEWS
+share/doc/icinga2/README.md
+share/doc/icinga2/markdown/01-about.md
+share/doc/icinga2/markdown/02-installation.md
+share/doc/icinga2/markdown/03-monitoring-basics.md
+share/doc/icinga2/markdown/04-configuration.md
+share/doc/icinga2/markdown/05-service-monitoring.md
+share/doc/icinga2/markdown/06-distributed-monitoring.md
+share/doc/icinga2/markdown/07-agent-based-monitoring.md
+share/doc/icinga2/markdown/08-advanced-topics.md
+share/doc/icinga2/markdown/09-object-types.md
+share/doc/icinga2/markdown/10-icinga-template-library.md
+share/doc/icinga2/markdown/11-cli-commands.md
+share/doc/icinga2/markdown/12-icinga2-api.md
+share/doc/icinga2/markdown/13-addons.md
+share/doc/icinga2/markdown/14-features.md
+share/doc/icinga2/markdown/15-troubleshooting.md
+share/doc/icinga2/markdown/16-upgrading-icinga-2.md
+share/doc/icinga2/markdown/17-language-reference.md
+share/doc/icinga2/markdown/18-library-reference.md
+share/doc/icinga2/markdown/19-technical-concepts.md
+share/doc/icinga2/markdown/20-script-debugger.md
+share/doc/icinga2/markdown/21-development.md
+share/doc/icinga2/markdown/22-selinux.md
+share/doc/icinga2/markdown/23-migrating-from-icinga-1x.md
+share/doc/icinga2/markdown/24-appendix.md
+share/doc/icinga2/markdown/images/addons/dashing_icinga2.png
+share/doc/icinga2/markdown/images/addons/icinga_certificate_monitoring.png
+share/doc/icinga2/markdown/images/addons/icinga_reporting.png
+share/doc/icinga2/markdown/images/addons/icingaweb2_businessprocess.png
+share/doc/icinga2/markdown/images/addons/icingaweb2_grafana.png
+share/doc/icinga2/markdown/images/addons/icingaweb2_graphite.png
+share/doc/icinga2/markdown/images/addons/icingaweb2_maps.png
+share/doc/icinga2/markdown/images/advanced-topics/flapping-state-graph.png
+share/doc/icinga2/markdown/images/advanced-topics/icinga2_external_checks_freshness_icingaweb2.png
+share/doc/icinga2/markdown/images/advanced-topics/icingaweb2_downtime_handled.png
+share/doc/icinga2/markdown/images/api/icinga2_api_powershell_ise.png
+share/doc/icinga2/markdown/images/configuration/icinga_web_local_server.png
+share/doc/icinga2/markdown/images/development/windows_boost_build_dev_cmd.png
+share/doc/icinga2/markdown/images/development/windows_builds_gitlab_pipeline.png
+share/doc/icinga2/markdown/images/development/windows_powershell_posh_git.png
+share/doc/icinga2/markdown/images/development/windows_visual_studio_installer_01.png
+share/doc/icinga2/markdown/images/development/windows_visual_studio_installer_02.png
+share/doc/icinga2/markdown/images/development/windows_visual_studio_installer_03.png
+share/doc/icinga2/markdown/images/development/windows_visual_studio_tabs_c++.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_agent_checks_command_endpoint.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_endpoints.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_roles.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_satellite_config_sync.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_scenario_ha_masters_with_agents.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_scenarios_master_satellites_agents.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_scenarios_master_with_agents.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_monitoring_zones.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_windows_client_disk_icingaweb2.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_windows_nscp_api_drivesize_icingaweb2.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_distributed_windows_nscp_counter_icingaweb2.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_running_service.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_installer_01.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_installer_02.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_installer_03.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_installer_04.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_installer_05.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_01.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_02.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_02_global_zone.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_03.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_04.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_01.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_02.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_03.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_04.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_05.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_06.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_05_nsclient_07.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_06_finish_no_ticket.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_06_finish_with_ticket.png
+share/doc/icinga2/markdown/images/distributed-monitoring/icinga2_windows_setup_wizard_examine_config.png
+share/doc/icinga2/markdown/images/installation/mariadb-centos7.png
+share/doc/icinga2/markdown/images/installation/nano-syntax.png
+share/doc/icinga2/markdown/images/installation/postgr-import-ido.png
+share/doc/icinga2/markdown/images/installation/vim-syntax.png
+share/examples/icinga2/conf.d/app.conf
+share/examples/icinga2/conf.d/commands.conf
+share/examples/icinga2/conf.d/downtimes.conf
+share/examples/icinga2/conf.d/groups.conf
+share/examples/icinga2/conf.d/hosts.conf
+share/examples/icinga2/conf.d/notifications.conf
+share/examples/icinga2/conf.d/services.conf
+share/examples/icinga2/conf.d/templates.conf
+share/examples/icinga2/conf.d/timeperiods.conf
+share/examples/icinga2/conf.d/users.conf
+share/examples/icinga2/constants.conf
+share/examples/icinga2/features-available/api.conf
+${PLIST.checker}share/examples/icinga2/features-available/checker.conf
+${PLIST.compat}share/examples/icinga2/features-available/command.conf
+${PLIST.compat}share/examples/icinga2/features-available/compatlog.conf
+share/examples/icinga2/features-available/debuglog.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/elasticsearch.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/gelf.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/graphite.conf
+${PLIST.icingadb}share/examples/icinga2/features-available/icingadb.conf
+${PLIST.mysql}share/examples/icinga2/features-available/ido-mysql.conf
+${PLIST.pgsql}share/examples/icinga2/features-available/ido-pgsql.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/influxdb.conf
+${PLIST.livestatus}share/examples/icinga2/features-available/livestatus.conf
+share/examples/icinga2/features-available/mainlog.conf
+${PLIST.notification}share/examples/icinga2/features-available/notification.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/opentsdb.conf
+${PLIST.perfdata}share/examples/icinga2/features-available/perfdata.conf
+${PLIST.compat}share/examples/icinga2/features-available/statusdata.conf
+share/examples/icinga2/features-available/syslog.conf
+share/examples/icinga2/icinga2.conf
+share/examples/icinga2/scripts/mail-host-notification.sh
+share/examples/icinga2/scripts/mail-service-notification.sh
+share/examples/icinga2/zones.conf
+share/examples/icinga2/zones.d/README
+${PLIST.mysql}share/icinga2-ido-mysql/schema/mysql.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.0.2.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.1.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.2.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.3.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.4.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.5.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.6.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.8.0.sql
+${PLIST.mysql}share/icinga2-ido-mysql/schema/upgrade/2.8.1.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/pgsql.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.0.2.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.1.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.2.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.3.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.4.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.5.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.6.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.8.0.sql
+${PLIST.pgsql}share/icinga2-ido-pgsql/schema/upgrade/2.8.1.sql
+share/icinga2/include/command-icinga.conf
+share/icinga2/include/command-nscp-local.conf
+share/icinga2/include/command-plugins-manubulon.conf
+share/icinga2/include/command-plugins-windows.conf
+share/icinga2/include/command-plugins.conf
+share/icinga2/include/hangman
+share/icinga2/include/itl
+share/icinga2/include/manubulon
+share/icinga2/include/nscp
+share/icinga2/include/plugins
+share/icinga2/include/plugins-contrib
+share/icinga2/include/plugins-contrib.d/big-data.conf
+share/icinga2/include/plugins-contrib.d/databases.conf
+share/icinga2/include/plugins-contrib.d/hardware.conf
+share/icinga2/include/plugins-contrib.d/icingacli.conf
+share/icinga2/include/plugins-contrib.d/ipmi.conf
+share/icinga2/include/plugins-contrib.d/logmanagement.conf
+share/icinga2/include/plugins-contrib.d/metrics.conf
+share/icinga2/include/plugins-contrib.d/network-components.conf
+share/icinga2/include/plugins-contrib.d/network-services.conf
+share/icinga2/include/plugins-contrib.d/operating-system.conf
+share/icinga2/include/plugins-contrib.d/raid-controller.conf
+share/icinga2/include/plugins-contrib.d/smart-attributes.conf
+share/icinga2/include/plugins-contrib.d/storage.conf
+share/icinga2/include/plugins-contrib.d/virtualization.conf
+share/icinga2/include/plugins-contrib.d/vmware.conf
+share/icinga2/include/plugins-contrib.d/web.conf
+share/icinga2/include/windows-plugins
diff --git a/net/icinga2/distinfo b/net/icinga2/distinfo
new file mode 100644
index 00000000000..73e82ea060b
--- /dev/null
+++ b/net/icinga2/distinfo
@@ -0,0 +1,17 @@
+$NetBSD: distinfo,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+SHA1 (icinga2-2.12.3.tar.gz) = 2cbcb9e1dd85613c8452235bdacd0eac347b0f69
+RMD160 (icinga2-2.12.3.tar.gz) = 21d907c8441503fcfda975756ccc76fb2a04f5b4
+SHA512 (icinga2-2.12.3.tar.gz) = 28b87e03a8ffeb7a1d19ddf9555151b826f7bf1fd33b0139c2fc8abe7c89d66d96089d5b32d0aaccc3876040514b2bfbde9970416d5ec4ea3b023b17c0fb1799
+Size (icinga2-2.12.3.tar.gz) = 7534454 bytes
+SHA1 (patch-CMakeLists.txt) = ef1bf5f3c7a787e2e1aba0ca241c605de21737c6
+SHA1 (patch-lib_base_string.cpp) = 8af8d9e7270664d9386f2dc2b0a3cc664f800610
+SHA1 (patch-lib_base_string.hpp) = f6c978a9fc1df45977ae02e35b59ff447630590b
+SHA1 (patch-lib_base_utility.cpp) = 85abaca2e84a0053247084b7f5f6baf70f50141c
+SHA1 (patch-lib_perfdata_elasticsearchwriter.cpp) = 8a98e1dfd0c273adebf842d6083c5f192c91bf0c
+SHA1 (patch-lib_perfdata_influxdbwriter.cpp) = 47df0dc5949e3812beb4d0d5168bc126f15d953c
+SHA1 (patch-lib_remote_configfileshandler.cpp) = 0b8ae9509a99df500502f163201bf0d1aeb8282d
+SHA1 (patch-lib_remote_httpserverconnection.cpp) = ce67da2feba7e262045478e933c4800d62d5591b
+SHA1 (patch-lib_remote_httputility.cpp) = 1da86b1be9566b977c7da03e17e206957f1bc0d7
+SHA1 (patch-lib_remote_infohandler.cpp) = 8f0767ced2be04953cfd6132a865de31da92e89e
+SHA1 (patch-third-party_cmake_FindMySQL.cmake) = a33567c30db47c4fab379f1b7c358174dd85fdd3
diff --git a/net/icinga2/files/icinga2.sh b/net/icinga2/files/icinga2.sh
new file mode 100644
index 00000000000..d0372977488
--- /dev/null
+++ b/net/icinga2/files/icinga2.sh
@@ -0,0 +1,57 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: icinga2.sh,v 1.1 2021/01/15 00:37:17 wiz Exp $
+#
+# PROVIDE: icinga2
+# REQUIRE: DAEMON
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="icinga2"
+rcvar=${name}
+command="/usr/pkg/sbin/icinga2"
+procname="/usr/pkg/lib/icinga2/sbin/icinga2"
+pidfile="/var/run/icinga2/icinga2.pid"
+icinga2_chdir="/" # Icinga2 doesn't deamonize properly
+icinga2_env="ICINGA2_USER=@ICINGA2_USER@ ICINGA2_GROUP=@ICINGA2_GROUP@" # ICINGA2_RLIMIT_FILES ICINGA2_RLIMIT_PROCESSES ICINGA2_RLIMIT_STACK
+start_precmd="icinga2_start_precmd"
+reload_precmd="icinga2_reload_precmd"
+extra_commands="reload checkconfig"
+checkconfig_cmd="icinga2_checkconfig"
+
+# Check configuration (noisy)
+icinga2_checkconfig() {
+ ${command} daemon -C -x information ${icinga2_flags}
+}
+
+# Less noisy (-x critical) than icinga2_checkconfig
+icinga2_reload_precmd() {
+ ${command} daemon -C -x critical ${icinga2_flags}
+}
+
+icinga2_start_precmd() {
+ # Set owner/permission on /var/run files (may be a tempfs)
+ if ! [ -d "@RUNDIR@" ]; then
+ @MKDIR@ -p "@RUNDIR@" "@RUNDIR@/cmd"
+ @CHOWN@ @ICINGA2_USER@:@ICINGA2_COMMAND_GROUP@ "@RUNDIR@" "@RUNDIR@/cmd"
+ @CHMOD@ 0751 "@RUNDIR@" # icinga2.spec says 0750, but that makes the PID file inaccessable
+ @CHMOD@ 2750 "@RUNDIR@/cmd"
+ fi
+ # Create plugin state directory (depends on $NAGIOS_PLUGIN_STATE_DIRECTORY)
+ : ${NAGIOS_PLUGIN_STATE_DIRECTORY:="@NAGIOS_PLUGIN_STATE_DIRECTORY@"}
+ if ! [ -d "$NAGIOS_PLUGIN_STATE_DIRECTORY" ]; then
+ @MKDIR@ "$NAGIOS_PLUGIN_STATE_DIRECTORY"
+ @CHOWN@ @ICINGA2_USER@:@ICINGA2_GROUP@ "$NAGIOS_PLUGIN_STATE_DIRECTORY"
+ @CHMOD@ 775 "$NAGIOS_PLUGIN_STATE_DIRECTORY"
+ fi
+}
+
+load_rc_config $name
+
+# The deamon is invoked by "icinga2 daemon" and needs an additional -d
+# to actually deamonize.
+# Also use -x critical to comply with "no news is good news" mantra.
+# See icinga2_chdir above for an additional step requred to properly daemonize.
+flags="daemon -d -x critical ${icinga2_flags}"
+
+run_rc_command "$1"
diff --git a/net/icinga2/options.mk b/net/icinga2/options.mk
new file mode 100644
index 00000000000..a0a4da571d2
--- /dev/null
+++ b/net/icinga2/options.mk
@@ -0,0 +1,51 @@
+# $NetBSD: options.mk,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.icinga2
+PKG_SUPPORTED_OPTIONS= debug
+PKG_SUPPORTED_OPTIONS+= mysql pgsql
+PKG_SUPPORTED_OPTIONS+= icingadb icinga2-studio
+PKG_SUPPORTED_OPTIONS+= icinga2-checker icinga2-compat
+PKG_SUPPORTED_OPTIONS+= icinga2-livestatus icinga2-notification icinga2-perfdata
+PKG_SUGGESTED_OPTIONS= icinga2-checker icinga2-compat
+PKG_SUGGESTED_OPTIONS+= icinga2-livestatus icinga2-notification icinga2-perfdata
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= mysql pgsql
+
+.if !empty(PKG_OPTIONS:Mmysql)
+PLIST.mysql= yes
+CMAKE_ARGS+= -DICINGA2_WITH_MYSQL=ON
+.include "../../mk/mysql.buildlink3.mk"
+.else
+CMAKE_ARGS+= -DICINGA2_WITH_MYSQL=OFF
+.endif
+.if !empty(PKG_OPTIONS:Mpgsql)
+PLIST.pgsql= yes
+CMAKE_ARGS+= -DICINGA2_WITH_PGSQL=ON
+.include "../../mk/pgsql.buildlink3.mk"
+.else
+CMAKE_ARGS+= -DICINGA2_WITH_PGSQL=OFF
+.endif
+
+PLIST_VARS+= icingadb
+.if !empty(PKG_OPTIONS:Micingadb)
+CMAKE_ARGS+= -DICINGA2_WITH_ICINGADB=ON
+PLIST.icingadb= yes
+.else
+CMAKE_ARGS+= -DICINGA2_WITH_ICINGADB=OFF
+.endif
+
+.for option in checker compat livestatus notification perfdata
+PLIST_VARS+= ${option}
+. if !empty(PKG_OPTIONS:Micinga2-${option})
+CMAKE_ARGS+= -DICINGA2_WITH_${option:tu}=ON
+PLIST.${option}= yes
+. else
+CMAKE_ARGS+= -DICINGA2_WITH_${option:tu}=OFF
+. endif
+.endfor
+
+.if !empty(PKG_OPTIONS:Micinga2-studio)
+.include "../../x11/wxGTK30/buildlink3.mk"
+.endif
diff --git a/net/icinga2/patches/patch-CMakeLists.txt b/net/icinga2/patches/patch-CMakeLists.txt
new file mode 100644
index 00000000000..5be144fef4b
--- /dev/null
+++ b/net/icinga2/patches/patch-CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
+
+Upstream Issue #8185, Pull Request #8192, commit 34942a35112438a91ef25ffa5f0c6c18f1999303
+
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -172,6 +172,9 @@ add_definitions(-DBOOST_COROUTINES_NO_DEPRECATION_WARNING)
+
+ add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED)
+
++# Required for Boost v1.74+
++add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
++
+ link_directories(${Boost_LIBRARY_DIRS})
+ include_directories(${Boost_INCLUDE_DIRS})
+
diff --git a/net/icinga2/patches/patch-lib_base_string.cpp b/net/icinga2/patches/patch-lib_base_string.cpp
new file mode 100644
index 00000000000..bba57a02441
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_base_string.cpp
@@ -0,0 +1,27 @@
+$NetBSD: patch-lib_base_string.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit eab07a7318f9e42157bc21d86585340d762759e7
+
+--- lib/base/string.cpp.orig
++++ lib/base/string.cpp
+@@ -127,6 +127,18 @@ String::operator const std::string&() const
+ return m_Data;
+ }
+
++/**
++ * Conversion function to boost::string_view.
++ *
++ * This allows using String as the value for HTTP headers in boost::beast::http::basic_fields::set.
++ *
++ * @return A boost::string_view representing this string.
++ */
++String::operator boost::string_view() const
++{
++ return boost::string_view(m_Data);
++}
++
+ const char *String::CStr() const
+ {
+ return m_Data.c_str();
diff --git a/net/icinga2/patches/patch-lib_base_string.hpp b/net/icinga2/patches/patch-lib_base_string.hpp
new file mode 100644
index 00000000000..e59cf1ec95c
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_base_string.hpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-lib_base_string.hpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit eab07a7318f9e42157bc21d86585340d762759e7
+
+--- lib/base/string.hpp.orig
++++ lib/base/string.hpp
+@@ -6,6 +6,7 @@
+ #include "base/i2-base.hpp"
+ #include "base/object.hpp"
+ #include <boost/range/iterator.hpp>
++#include <boost/utility/string_view.hpp>
+ #include <string>
+ #include <iosfwd>
+
+@@ -71,6 +72,7 @@ public:
+ bool operator<(const String& rhs) const;
+
+ operator const std::string&() const;
++ operator boost::string_view() const;
+
+ const char *CStr() const;
+
diff --git a/net/icinga2/patches/patch-lib_base_utility.cpp b/net/icinga2/patches/patch-lib_base_utility.cpp
new file mode 100644
index 00000000000..e2d69175867
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_base_utility.cpp
@@ -0,0 +1,20 @@
+$NetBSD: patch-lib_base_utility.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Fix 'fs::copy_option' has not been declared with boost 1.74.0
+
+Upstream Issue #8185, Pull Request #8184, commit c30bae2994f1e5f33f6da51eb96d423e9bf0f75c
+
+--- lib/base/utility.cpp.orig
++++ lib/base/utility.cpp
+@@ -725,7 +725,11 @@ void Utility::CopyFile(const String& source, const String& target)
+ {
+ namespace fs = boost::filesystem;
+
++#if BOOST_VERSION >= 107400
++ fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_options::overwrite_existing);
++#else /* BOOST_VERSION */
+ fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_option::overwrite_if_exists);
++#endif /* BOOST_VERSION */
+ }
+
+ /*
diff --git a/net/icinga2/patches/patch-lib_perfdata_elasticsearchwriter.cpp b/net/icinga2/patches/patch-lib_perfdata_elasticsearchwriter.cpp
new file mode 100644
index 00000000000..2485615d4bd
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_perfdata_elasticsearchwriter.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_perfdata_elasticsearchwriter.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/perfdata/elasticsearchwriter.cpp.orig
++++ lib/perfdata/elasticsearchwriter.cpp
+@@ -494,7 +494,7 @@ void ElasticsearchWriter::SendRequest(const String& body)
+ request.set(http::field::authorization, "Basic " + Base64::Encode(username + ":" + password));
+
+ request.body() = body;
+- request.set(http::field::content_length, request.body().size());
++ request.content_length(request.body().size());
+
+ /* Don't log the request body to debug log, this is already done above. */
+ Log(LogDebug, "ElasticsearchWriter")
diff --git a/net/icinga2/patches/patch-lib_perfdata_influxdbwriter.cpp b/net/icinga2/patches/patch-lib_perfdata_influxdbwriter.cpp
new file mode 100644
index 00000000000..14c42e7469d
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_perfdata_influxdbwriter.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_perfdata_influxdbwriter.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/perfdata/influxdbwriter.cpp.orig 2020-08-03 15:43:47.000000000 +0200
++++ lib/perfdata/influxdbwriter.cpp 2021-01-14 19:25:50.874644996 +0100
+@@ -505,7 +505,7 @@
+ request.set(http::field::host, url->GetHost() + ":" + url->GetPort());
+
+ request.body() = body;
+- request.set(http::field::content_length, request.body().size());
++ request.content_length(request.body().size());
+
+ try {
+ if (stream.first) {
diff --git a/net/icinga2/patches/patch-lib_remote_configfileshandler.cpp b/net/icinga2/patches/patch-lib_remote_configfileshandler.cpp
new file mode 100644
index 00000000000..9c8504b9878
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_remote_configfileshandler.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_remote_configfileshandler.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/remote/configfileshandler.cpp.orig
++++ lib/remote/configfileshandler.cpp
+@@ -84,7 +84,7 @@ bool ConfigFilesHandler::HandleRequest(
+ response.result(http::status::ok);
+ response.set(http::field::content_type, "application/octet-stream");
+ response.body() = content;
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ } catch (const std::exception& ex) {
+ HttpUtility::SendJsonError(response, params, 500, "Could not read file.",
+ DiagnosticInformation(ex));
diff --git a/net/icinga2/patches/patch-lib_remote_httpserverconnection.cpp b/net/icinga2/patches/patch-lib_remote_httpserverconnection.cpp
new file mode 100644
index 00000000000..ff4ef95af14
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_remote_httpserverconnection.cpp
@@ -0,0 +1,53 @@
+$NetBSD: patch-lib_remote_httpserverconnection.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/remote/httpserverconnection.cpp.orig 2020-08-03 15:43:47.000000000 +0200
++++ lib/remote/httpserverconnection.cpp 2021-01-14 19:30:36.695215485 +0100
+@@ -186,7 +186,7 @@
+ } else {
+ response.set(http::field::content_type, "text/html");
+ response.body() = String("<h1>Bad Request</h1><p><pre>") + errorMsg + "</pre></p>";
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ }
+
+ response.set(http::field::connection, "close");
+@@ -259,7 +259,7 @@
+ response.set(http::field::access_control_allow_methods, "GET, POST, PUT, DELETE");
+ response.set(http::field::access_control_allow_headers, "Authorization, X-HTTP-Method-Override");
+ response.body() = "Preflight OK";
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ response.set(http::field::connection, "close");
+
+ boost::system::error_code ec;
+@@ -290,7 +290,7 @@
+ response.result(http::status::bad_request);
+ response.set(http::field::content_type, "text/html");
+ response.body() = "<h1>Accept header is missing or not set to 'application/json'.</h1>";
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ response.set(http::field::connection, "close");
+
+ boost::system::error_code ec;
+@@ -331,7 +331,7 @@
+ } else {
+ response.set(http::field::content_type, "text/html");
+ response.body() = "<h1>Unauthorized. Please check your user credentials.</h1>";
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ }
+
+ boost::system::error_code ec;
+@@ -423,7 +423,7 @@
+ } else {
+ response.set(http::field::content_type, "text/html");
+ response.body() = String("<h1>Bad Request</h1><p><pre>") + ec.message() + "</pre></p>";
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ }
+
+ response.set(http::field::connection, "close");
diff --git a/net/icinga2/patches/patch-lib_remote_httputility.cpp b/net/icinga2/patches/patch-lib_remote_httputility.cpp
new file mode 100644
index 00000000000..f3d8c5a3151
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_remote_httputility.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_remote_httputility.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/remote/httputility.cpp.orig
++++ lib/remote/httputility.cpp
+@@ -58,7 +58,7 @@ void HttpUtility::SendJsonBody(boost::beast::http::response<boost::beast::http::
+
+ response.set(http::field::content_type, "application/json");
+ response.body() = JsonEncode(val, params && GetLastParameter(params, "pretty"));
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ }
+
+ void HttpUtility::SendJsonError(boost::beast::http::response<boost::beast::http::string_body>& response,
diff --git a/net/icinga2/patches/patch-lib_remote_infohandler.cpp b/net/icinga2/patches/patch-lib_remote_infohandler.cpp
new file mode 100644
index 00000000000..235a74e3c42
--- /dev/null
+++ b/net/icinga2/patches/patch-lib_remote_infohandler.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_remote_infohandler.cpp,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Support Boost 1.74 when setting HTTP headers
+
+Upstream Issue #8185, Pull Request #8575, commit 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45
+
+--- lib/remote/infohandler.cpp.orig
++++ lib/remote/infohandler.cpp
+@@ -92,7 +92,7 @@ bool InfoHandler::HandleRequest(
+
+ body += R"(<p>More information about API requests is available in the <a href="https://icinga.com/docs/icinga2/latest/" target="_blank">documentation</a>.</p></html>)";
+ response.body() = body;
+- response.set(http::field::content_length, response.body().size());
++ response.content_length(response.body().size());
+ }
+
+ return true;
diff --git a/net/icinga2/patches/patch-third-party_cmake_FindMySQL.cmake b/net/icinga2/patches/patch-third-party_cmake_FindMySQL.cmake
new file mode 100644
index 00000000000..a5f88da80bc
--- /dev/null
+++ b/net/icinga2/patches/patch-third-party_cmake_FindMySQL.cmake
@@ -0,0 +1,42 @@
+$NetBSD: patch-third-party_cmake_FindMySQL.cmake,v 1.1 2021/01/15 00:37:17 wiz Exp $
+
+Find buildlink mysql include dir
+
+--- third-party/cmake/FindMySQL.cmake.orig 2020-08-03 15:43:47.000000000 +0200
++++ third-party/cmake/FindMySQL.cmake 2020-09-02 14:47:44.451813388 +0200
+@@ -28,32 +28,12 @@
+ ##########################################################################
+
+
+-FILE(GLOB _macports_include_dirs /opt/local/include/mysql*/mysql)
+-
+ #-------------- FIND MYSQL_INCLUDE_DIR ------------------
+-FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
+- $ENV{MYSQL_INCLUDE_DIR}
+- $ENV{MYSQL_DIR}/include
+- /usr/include/mysql
+- /usr/local/include/mysql
+- /usr/include/mariadb
+- /usr/local/include/mariadb
+- /opt/mysql/mysql/include
+- /opt/mysql/mysql/include/mysql
+- /opt/mysql/include
+- /opt/mariadb/include/mysql
+- /opt/local/include/mysql5
+- /usr/local/mysql/include
+- /usr/local/mysql/include/mysql
+- ${_macports_include_dirs}
+- $ENV{ProgramFiles}/MySQL/*/include
+- $ENV{SystemDrive}/MySQL/*/include
+- $ENV{ProgramFiles}/MariaDB*/include/mysql
+- $ENV{SystemDrive}/MariaDB*/include/mysql
++FIND_PATH(MYSQL_INCLUDE_DIR
++ NAMES mysql.h
++ PATH_SUFFIXES mysql
+ )
+
+-UNSET(_macports_include_dirs)
+-
+ #----------------- FIND MYSQL_LIB_DIR -------------------
+ IF (WIN32)
+ SET(MYSQL_CLIENT_LIBS libmysql)