git: 0eb1f53af37d - main - net-mgmt/icinga2: Update to 2.15.0

From: Florian Smeets <flo_at_FreeBSD.org>
Date: Wed, 16 Jul 2025 20:03:10 UTC
The branch main has been updated by flo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0eb1f53af37d4b6b8702580765ecf761deb3b153

commit 0eb1f53af37d4b6b8702580765ecf761deb3b153
Author:     Florian Smeets <flo@FreeBSD.org>
AuthorDate: 2025-07-16 18:25:13 +0000
Commit:     Florian Smeets <flo@FreeBSD.org>
CommitDate: 2025-07-16 19:40:49 +0000

    net-mgmt/icinga2: Update to 2.15.0
---
 net-mgmt/icinga2/Makefile                          |   3 +-
 net-mgmt/icinga2/distinfo                          |   6 +-
 net-mgmt/icinga2/files/patch-boost-1.87.diff       | 341 ---------------------
 .../patch-third-party_cmake_GNUInstallDirs.cmake   |  20 --
 net-mgmt/icinga2/pkg-plist                         |   4 +-
 5 files changed, 6 insertions(+), 368 deletions(-)

diff --git a/net-mgmt/icinga2/Makefile b/net-mgmt/icinga2/Makefile
index 9b4bc260b983..594b7d666efe 100644
--- a/net-mgmt/icinga2/Makefile
+++ b/net-mgmt/icinga2/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	icinga2
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.14.6
-PORTREVISION=	1
+DISTVERSION=	2.15.0
 CATEGORIES=	net-mgmt
 
 MAINTAINER=	flo@FreeBSD.org
diff --git a/net-mgmt/icinga2/distinfo b/net-mgmt/icinga2/distinfo
index 67e35613bb64..25900f90e356 100644
--- a/net-mgmt/icinga2/distinfo
+++ b/net-mgmt/icinga2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1748378912
-SHA256 (icinga-icinga2-v2.14.6_GH0.tar.gz) = b4b7f88637a8735d40da2e8f79ea80990f620882b4fa2daab80c96a2fb24e420
-SIZE (icinga-icinga2-v2.14.6_GH0.tar.gz) = 9414315
+TIMESTAMP = 1752686110
+SHA256 (icinga-icinga2-v2.15.0_GH0.tar.gz) = ebe2b13a156179a415831fe06445577222029a1d0369c8bb6fba1de30317b4a1
+SIZE (icinga-icinga2-v2.15.0_GH0.tar.gz) = 9446841
diff --git a/net-mgmt/icinga2/files/patch-boost-1.87.diff b/net-mgmt/icinga2/files/patch-boost-1.87.diff
deleted file mode 100644
index 831c3b9d1e3a..000000000000
--- a/net-mgmt/icinga2/files/patch-boost-1.87.diff
+++ /dev/null
@@ -1,341 +0,0 @@
-diff --git a/lib/base/io-engine.hpp b/lib/base/io-engine.hpp
-index 55a06fb6a6..37ba434761 100644
---- lib/base/io-engine.hpp
-+++ lib/base/io-engine.hpp
-@@ -16,11 +16,16 @@
- #include <utility>
- #include <vector>
- #include <stdexcept>
-+#include <boost/context/fixedsize_stack.hpp>
- #include <boost/exception/all.hpp>
- #include <boost/asio/deadline_timer.hpp>
- #include <boost/asio/io_context.hpp>
- #include <boost/asio/spawn.hpp>
- 
-+#if BOOST_VERSION >= 108000
-+#	include <boost/asio/detached.hpp>
-+#endif // BOOST_VERSION >= 108000
-+
- namespace icinga
- {
- 
-@@ -102,6 +107,10 @@ class IoEngine
- 	static void SpawnCoroutine(Handler& h, Function f) {
- 
- 		boost::asio::spawn(h,
-+#if BOOST_VERSION >= 108000
-+			std::allocator_arg_t(),
-+			boost::context::fixedsize_stack(GetCoroutineStackSize()),
-+#endif // BOOST_VERSION >= 108000
- 			[f](boost::asio::yield_context yc) {
- 
- 				try {
-@@ -119,7 +128,11 @@ class IoEngine
- 					throw;
- 				}
- 			},
-+#if BOOST_VERSION >= 108000
-+			boost::asio::detached
-+#else // BOOST_VERSION >= 108000
- 			boost::coroutines::attributes(GetCoroutineStackSize()) // Set a pre-defined stack size.
-+#endif // BOOST_VERSION >= 108000
- 		);
- 	}
- 
-diff --git a/test/base-io-engine.cpp b/test/base-io-engine.cpp
-index 869688b1a6..3a251b1b42 100644
---- test/base-io-engine.cpp
-+++ test/base-io-engine.cpp
-@@ -17,7 +17,7 @@ BOOST_AUTO_TEST_CASE(timeout_run)
- 	boost::asio::io_context::strand strand (io);
- 	int called = 0;
- 
--	boost::asio::spawn(strand, [&](boost::asio::yield_context yc) {
-+	IoEngine::SpawnCoroutine(strand, [&](boost::asio::yield_context yc) {
- 		boost::asio::deadline_timer timer (io);
- 
- 		Timeout timeout (strand, boost::posix_time::millisec(300), [&called] { ++called; });
-@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE(timeout_cancelled)
- 	boost::asio::io_context::strand strand (io);
- 	int called = 0;
- 
--	boost::asio::spawn(strand, [&](boost::asio::yield_context yc) {
-+	IoEngine::SpawnCoroutine(strand, [&](boost::asio::yield_context yc) {
- 		boost::asio::deadline_timer timer (io);
- 		Timeout timeout (strand, boost::posix_time::millisec(300), [&called] { ++called; });
- 
-@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(timeout_scope)
- 	boost::asio::io_context::strand strand (io);
- 	int called = 0;
- 
--	boost::asio::spawn(strand, [&](boost::asio::yield_context yc) {
-+	IoEngine::SpawnCoroutine(strand, [&](boost::asio::yield_context yc) {
- 		boost::asio::deadline_timer timer (io);
- 
- 		{
-@@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(timeout_due_cancelled)
- 	boost::asio::io_context::strand strand (io);
- 	int called = 0;
- 
--	boost::asio::spawn(strand, [&](boost::asio::yield_context yc) {
-+	IoEngine::SpawnCoroutine(strand, [&](boost::asio::yield_context yc) {
- 		boost::asio::deadline_timer timer (io);
- 		Timeout timeout (strand, boost::posix_time::millisec(300), [&called] { ++called; });
- 
-@@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(timeout_due_scope)
- 	boost::asio::io_context::strand strand (io);
- 	int called = 0;
- 
--	boost::asio::spawn(strand, [&](boost::asio::yield_context yc) {
-+	IoEngine::SpawnCoroutine(strand, [&](boost::asio::yield_context yc) {
- 		boost::asio::deadline_timer timer (io);
- 
- 		{
-diff --git a/lib/base/io-engine.hpp b/lib/base/io-engine.hpp
-index 0350d45b83..55a06fb6a6 100644
---- lib/base/io-engine.hpp
-+++ lib/base/io-engine.hpp
-@@ -106,14 +106,17 @@ class IoEngine
- 
- 				try {
- 					f(yc);
--				} catch (const boost::coroutines::detail::forced_unwind &) {
--					// Required for proper stack unwinding when coroutines are destroyed.
--					// https://github.com/boostorg/coroutine/issues/39
--					throw;
- 				} catch (const std::exception& ex) {
- 					Log(LogCritical, "IoEngine") << "Exception in coroutine: " << DiagnosticInformation(ex);
- 				} catch (...) {
--					Log(LogCritical, "IoEngine", "Exception in coroutine!");
-+					try {
-+						Log(LogCritical, "IoEngine", "Exception in coroutine!");
-+					} catch (...) {
-+					}
-+
-+					// Required for proper stack unwinding when coroutines are destroyed.
-+					// https://github.com/boostorg/coroutine/issues/39
-+					throw;
- 				}
- 			},
- 			boost::coroutines::attributes(GetCoroutineStackSize()) // Set a pre-defined stack size.
-diff --git a/lib/icingadb/redisconnection.cpp b/lib/icingadb/redisconnection.cpp
-index a6b82187dd..c1f73f5a0e 100644
---- lib/icingadb/redisconnection.cpp
-+++ lib/icingadb/redisconnection.cpp
-@@ -377,8 +377,6 @@ void RedisConnection::Connect(asio::yield_context& yc)
- 			}
- 
- 			break;
--		} catch (const boost::coroutines::detail::forced_unwind&) {
--			throw;
- 		} catch (const std::exception& ex) {
- 			Log(LogCritical, "IcingaDB")
- 				<< "Cannot connect to " << m_Host << ":" << m_Port << ": " << ex.what();
-@@ -408,17 +406,10 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
- 						for (auto i (item.Amount); i; --i) {
- 							ReadOne(yc);
- 						}
--					} catch (const boost::coroutines::detail::forced_unwind&) {
--						throw;
- 					} catch (const std::exception& ex) {
- 						Log(LogCritical, "IcingaDB")
- 							<< "Error during receiving the response to a query which has been fired and forgotten: " << ex.what();
- 
--						continue;
--					} catch (...) {
--						Log(LogCritical, "IcingaDB")
--							<< "Error during receiving the response to a query which has been fired and forgotten";
--
- 						continue;
- 					}
- 
-@@ -432,9 +423,7 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
- 
- 						try {
- 							reply = ReadOne(yc);
--						} catch (const boost::coroutines::detail::forced_unwind&) {
--							throw;
--						} catch (...) {
-+						} catch (const std::exception&) {
- 							promise.set_exception(std::current_exception());
- 
- 							continue;
-@@ -455,9 +444,7 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
- 						for (auto i (item.Amount); i; --i) {
- 							try {
- 								replies.emplace_back(ReadOne(yc));
--							} catch (const boost::coroutines::detail::forced_unwind&) {
--								throw;
--							} catch (...) {
-+							} catch (const std::exception&) {
- 								promise.set_exception(std::current_exception());
- 								break;
- 							}
-@@ -551,19 +538,11 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
- 
- 		try {
- 			WriteOne(item, yc);
--		} catch (const boost::coroutines::detail::forced_unwind&) {
--			throw;
- 		} catch (const std::exception& ex) {
- 			Log msg (LogCritical, "IcingaDB", "Error during sending query");
- 			LogQuery(item, msg);
- 			msg << " which has been fired and forgotten: " << ex.what();
- 
--			return;
--		} catch (...) {
--			Log msg (LogCritical, "IcingaDB", "Error during sending query");
--			LogQuery(item, msg);
--			msg << " which has been fired and forgotten";
--
- 			return;
- 		}
- 
-@@ -587,19 +566,11 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
- 				WriteOne(query, yc);
- 				++i;
- 			}
--		} catch (const boost::coroutines::detail::forced_unwind&) {
--			throw;
- 		} catch (const std::exception& ex) {
- 			Log msg (LogCritical, "IcingaDB", "Error during sending query");
- 			LogQuery(item[i], msg);
- 			msg << " which has been fired and forgotten: " << ex.what();
- 
--			return;
--		} catch (...) {
--			Log msg (LogCritical, "IcingaDB", "Error during sending query");
--			LogQuery(item[i], msg);
--			msg << " which has been fired and forgotten";
--
- 			return;
- 		}
- 
-@@ -618,9 +589,7 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
- 
- 		try {
- 			WriteOne(item.first, yc);
--		} catch (const boost::coroutines::detail::forced_unwind&) {
--			throw;
--		} catch (...) {
-+		} catch (const std::exception&) {
- 			item.second.set_exception(std::current_exception());
- 
- 			return;
-@@ -645,9 +614,7 @@ void RedisConnection::WriteItem(boost::asio::yield_context& yc, RedisConnection:
- 			for (auto& query : item.first) {
- 				WriteOne(query, yc);
- 			}
--		} catch (const boost::coroutines::detail::forced_unwind&) {
--			throw;
--		} catch (...) {
-+		} catch (const std::exception&) {
- 			item.second.set_exception(std::current_exception());
- 
- 			return;
-diff --git a/lib/icingadb/redisconnection.hpp b/lib/icingadb/redisconnection.hpp
-index 3f963f3d37..2386a1e36e 100644
---- lib/icingadb/redisconnection.hpp
-+++ lib/icingadb/redisconnection.hpp
-@@ -389,9 +389,7 @@ RedisConnection::Reply RedisConnection::ReadOne(StreamPtr& stream, boost::asio::
- 
- 	try {
- 		return ReadRESP(*strm, yc);
--	} catch (const boost::coroutines::detail::forced_unwind&) {
--		throw;
--	} catch (...) {
-+	} catch (const std::exception&) {
- 		if (m_Connecting.exchange(false)) {
- 			m_Connected.store(false);
- 			stream = nullptr;
-@@ -403,6 +401,8 @@ RedisConnection::Reply RedisConnection::ReadOne(StreamPtr& stream, boost::asio::
- 			}
- 		}
- 
-+		throw;
-+	} catch (...) {
- 		throw;
- 	}
- }
-@@ -427,9 +427,7 @@ void RedisConnection::WriteOne(StreamPtr& stream, RedisConnection::Query& query,
- 	try {
- 		WriteRESP(*strm, query, yc);
- 		strm->async_flush(yc);
--	} catch (const boost::coroutines::detail::forced_unwind&) {
--		throw;
--	} catch (...) {
-+	} catch (const std::exception&) {
- 		if (m_Connecting.exchange(false)) {
- 			m_Connected.store(false);
- 			stream = nullptr;
-@@ -441,6 +439,8 @@ void RedisConnection::WriteOne(StreamPtr& stream, RedisConnection::Query& query,
- 			}
- 		}
- 
-+		throw;
-+	} catch (...) {
- 		throw;
- 	}
- }
-diff --git a/lib/remote/jsonrpcconnection.cpp b/lib/remote/jsonrpcconnection.cpp
-index d49c0b359a..8e95325feb 100644
---- lib/remote/jsonrpcconnection.cpp
-+++ lib/remote/jsonrpcconnection.cpp
-@@ -212,7 +212,7 @@ void JsonRpcConnection::SendMessage(const Dictionary::Ptr& message)
- 
- 	Ptr keepAlive (this);
- 
--	m_IoStrand.post([this, keepAlive, message]() { SendMessageInternal(message); });
-+	boost::asio::post(m_IoStrand, [this, keepAlive, message] { SendMessageInternal(message); });
- }
- 
- void JsonRpcConnection::SendRawMessage(const String& message)
-@@ -223,7 +223,7 @@ void JsonRpcConnection::SendRawMessage(const String& message)
- 
- 	Ptr keepAlive (this);
- 
--	m_IoStrand.post([this, keepAlive, message]() {
-+	boost::asio::post(m_IoStrand, [this, keepAlive, message] {
- 		if (m_ShuttingDown) {
- 			return;
- 		}
-diff --git a/lib/base/tcpsocket.hpp b/lib/base/tcpsocket.hpp
-index 471ad8d239..1cf1a23501 100644
---- lib/base/tcpsocket.hpp
-+++ lib/base/tcpsocket.hpp
-@@ -41,8 +41,7 @@ void Connect(Socket& socket, const String& node, const String& service)
- 	using boost::asio::ip::tcp;
- 
- 	tcp::resolver resolver (IoEngine::Get().GetIoContext());
--	tcp::resolver::query query (node, service);
--	auto result (resolver.resolve(query));
-+	auto result (resolver.resolve(node.CStr(), service.CStr()));
- 	auto current (result.begin());
- 
- 	for (;;) {
-@@ -72,8 +71,7 @@ void Connect(Socket& socket, const String& node, const String& service, boost::a
- 	using boost::asio::ip::tcp;
- 
- 	tcp::resolver resolver (IoEngine::Get().GetIoContext());
--	tcp::resolver::query query (node, service);
--	auto result (resolver.async_resolve(query, yc));
-+	auto result (resolver.async_resolve(node.CStr(), service.CStr(), yc));
- 	auto current (result.begin());
- 
- 	for (;;) {
-diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp
-index 519469aafa..7ef3acddda 100644
---- lib/remote/apilistener.cpp
-+++ lib/remote/apilistener.cpp
-@@ -439,9 +439,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
- 
- 	try {
- 		tcp::resolver resolver (io);
--		tcp::resolver::query query (node, service, tcp::resolver::query::passive);
--
--		auto result (resolver.resolve(query));
-+		auto result (resolver.resolve(node.CStr(), service.CStr(), tcp::resolver::passive));
- 		auto current (result.begin());
- 
- 		for (;;) {
-
diff --git a/net-mgmt/icinga2/files/patch-third-party_cmake_GNUInstallDirs.cmake b/net-mgmt/icinga2/files/patch-third-party_cmake_GNUInstallDirs.cmake
deleted file mode 100644
index 03246563e110..000000000000
--- a/net-mgmt/icinga2/files/patch-third-party_cmake_GNUInstallDirs.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
---- third-party/cmake/GNUInstallDirs.cmake.orig	2024-03-20 11:52:57 UTC
-+++ third-party/cmake/GNUInstallDirs.cmake
-@@ -172,7 +172,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "(DragonFly|FreeBSD|OpenB
-     set(CMAKE_INSTALL_INFODIR "info")
-   endif()
- 
--  if(NOT CMAKE_INSTALL_MANDDIR)
-+  if(NOT CMAKE_INSTALL_MANDIR)
-     set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (man)")
-     set(CMAKE_INSTALL_MANDIR "man")
-   endif()
-@@ -182,7 +182,7 @@ else()
-     set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
-   endif()
- 
--  if(NOT CMAKE_INSTALL_MANDDIR)
-+  if(NOT CMAKE_INSTALL_MANDIR)
-     set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
-     set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
-   endif()
diff --git a/net-mgmt/icinga2/pkg-plist b/net-mgmt/icinga2/pkg-plist
index c91e8400a676..02aeaa780359 100644
--- a/net-mgmt/icinga2/pkg-plist
+++ b/net-mgmt/icinga2/pkg-plist
@@ -38,9 +38,9 @@ etc/bash_completion.d/icinga2
 @sample %%ETCDIR%%/zones.conf.sample
 %%ETCDIR%%/zones.d/README
 %%MYSQL%%lib/icinga2/libmysql_shim.so
-%%MYSQL%%lib/icinga2/libmysql_shim.so.2.14.6
+%%MYSQL%%lib/icinga2/libmysql_shim.so.2.15.0
 %%PGSQL%%lib/icinga2/libpgsql_shim.so
-%%PGSQL%%lib/icinga2/libpgsql_shim.so.2.14.6
+%%PGSQL%%lib/icinga2/libpgsql_shim.so.2.15.0
 lib/icinga2/sbin/icinga2
 libexec/nagios/check_nscp_api
 sbin/icinga2