pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/botan3
Module Name: pkgsrc
Committed By: wiz
Date: Mon Dec 30 09:40:20 UTC 2024
Modified Files:
pkgsrc/security/botan3: distinfo
Added Files:
pkgsrc/security/botan3/patches: patch-src_cli_tls__proxy.cpp
patch-src_lib_utils_socket_socket.cpp
patch-src_lib_utils_socket_socket__udp.cpp
Log Message:
ibotan3: fix build with boost 1.87 using upstream patch
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/security/botan3/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/security/botan3/patches/patch-src_cli_tls__proxy.cpp \
pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket.cpp \
pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket__udp.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/botan3/distinfo
diff -u pkgsrc/security/botan3/distinfo:1.7 pkgsrc/security/botan3/distinfo:1.8
--- pkgsrc/security/botan3/distinfo:1.7 Fri Nov 1 07:22:45 2024
+++ pkgsrc/security/botan3/distinfo Mon Dec 30 09:40:19 2024
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.7 2024/11/01 07:22:45 nros Exp $
+$NetBSD: distinfo,v 1.8 2024/12/30 09:40:19 wiz Exp $
BLAKE2s (Botan-3.6.1.tar.xz) = b3168adf972bcd88107fe963edce95a4503f911e0037c4ee0ddc522109194361
SHA512 (Botan-3.6.1.tar.xz) = 06327c55bee5e0d2e142f81b997dd8a1ef98f61ef920b57f6eb4e80ebf6b3de1c62373b889d4a32e62509495792e0b46d5dcc82a6446266974b4d4ead8d9f287
Size (Botan-3.6.1.tar.xz) = 7581864 bytes
+SHA1 (patch-src_cli_tls__proxy.cpp) = ae02215325e9f4093aa0da6293a72e063817c683
+SHA1 (patch-src_lib_utils_socket_socket.cpp) = cb478f2e81b4b1eb58c95400f975a3db71276d5e
+SHA1 (patch-src_lib_utils_socket_socket__udp.cpp) = 402015e2b6f79e88b80f8b6da7b4fd3fac44f417
SHA1 (patch-src_scripts_install.py) = c8ac2a6315e0e53a0292447e8e6b967572de9d24
Added files:
Index: pkgsrc/security/botan3/patches/patch-src_cli_tls__proxy.cpp
diff -u /dev/null pkgsrc/security/botan3/patches/patch-src_cli_tls__proxy.cpp:1.1
--- /dev/null Mon Dec 30 09:40:20 2024
+++ pkgsrc/security/botan3/patches/patch-src_cli_tls__proxy.cpp Mon Dec 30 09:40:20 2024
@@ -0,0 +1,93 @@
+$NetBSD: patch-src_cli_tls__proxy.cpp,v 1.1 2024/12/30 09:40:20 wiz Exp $
+
+https://github.com/randombit/botan/commit/2a406beab449a2cb310fa543451a7087ca7b4b1a
+
+--- src/cli/tls_proxy.cpp.orig 2024-10-26 07:00:10.000000000 +0000
++++ src/cli/tls_proxy.cpp
+@@ -106,11 +106,11 @@ class tls_proxy_session final : public s
+
+ typedef std::shared_ptr<tls_proxy_session> pointer;
+
+- static pointer create(boost::asio::io_service& io,
++ static pointer create(boost::asio::io_context& io,
+ const std::shared_ptr<Botan::TLS::Session_Manager>& session_manager,
+ const std::shared_ptr<Botan::Credentials_Manager>& credentials,
+ const std::shared_ptr<Botan::TLS::Policy>& policy,
+- const tcp::resolver::iterator& endpoints) {
++ const tcp::resolver::results_type& endpoints) {
+ auto session = std::make_shared<tls_proxy_session>(io, endpoints);
+
+ // Defer the setup of the TLS server to make use of
+@@ -144,7 +144,7 @@ class tls_proxy_session final : public s
+ }
+ }
+
+- tls_proxy_session(boost::asio::io_service& io, tcp::resolver::iterator endpoints) :
++ tls_proxy_session(boost::asio::io_context& io, tcp::resolver::results_type endpoints) :
+ m_strand(io),
+ m_server_endpoints(std::move(endpoints)),
+ m_client_socket(io),
+@@ -287,7 +287,7 @@ class tls_proxy_session final : public s
+
+ void tls_session_activated() override {
+ auto onConnect = [self = weak_from_this()](boost::system::error_code ec,
+- const tcp::resolver::iterator& /*endpoint*/) {
++ tcp::resolver::results_type::iterator /*endpoint*/) {
+ if(ec) {
+ log_error("Server connection", ec);
+ return;
+@@ -301,7 +301,7 @@ class tls_proxy_session final : public s
+ return;
+ }
+ };
+- async_connect(m_server_socket, m_server_endpoints, onConnect);
++ async_connect(m_server_socket, m_server_endpoints.begin(), m_server_endpoints.end(), onConnect);
+ }
+
+ void tls_session_established(const Botan::TLS::Session_Summary& session) override {
+@@ -315,9 +315,9 @@ class tls_proxy_session final : public s
+ }
+ }
+
+- boost::asio::io_service::strand m_strand;
++ boost::asio::io_context::strand m_strand;
+
+- tcp::resolver::iterator m_server_endpoints;
++ tcp::resolver::results_type m_server_endpoints;
+
+ tcp::socket m_client_socket;
+ tcp::socket m_server_socket;
+@@ -341,9 +341,9 @@ class tls_proxy_server final {
+ public:
+ typedef tls_proxy_session session;
+
+- tls_proxy_server(boost::asio::io_service& io,
++ tls_proxy_server(boost::asio::io_context& io,
+ unsigned short port,
+- tcp::resolver::iterator endpoints,
++ tcp::resolver::results_type endpoints,
+ std::shared_ptr<Botan::Credentials_Manager> creds,
+ std::shared_ptr<Botan::TLS::Policy> policy,
+ std::shared_ptr<Botan::TLS::Session_Manager> session_mgr,
+@@ -383,7 +383,7 @@ class tls_proxy_server final {
+ }
+
+ tcp::acceptor m_acceptor;
+- tcp::resolver::iterator m_server_endpoints;
++ tcp::resolver::results_type m_server_endpoints;
+
+ std::shared_ptr<Botan::Credentials_Manager> m_creds;
+ std::shared_ptr<Botan::TLS::Policy> m_policy;
+@@ -429,10 +429,10 @@ class TLS_Proxy final : public Command {
+
+ auto policy = load_tls_policy(get_arg("policy"));
+
+- boost::asio::io_service io;
++ boost::asio::io_context io;
+
+ tcp::resolver resolver(io);
+- auto server_endpoint_iterator = resolver.resolve({target, target_port});
++ auto server_endpoint_iterator = resolver.resolve(target, target_port);
+
+ std::shared_ptr<Botan::TLS::Session_Manager> session_mgr;
+
Index: pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket.cpp
diff -u /dev/null pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket.cpp:1.1
--- /dev/null Mon Dec 30 09:40:20 2024
+++ pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket.cpp Mon Dec 30 09:40:20 2024
@@ -0,0 +1,67 @@
+$NetBSD: patch-src_lib_utils_socket_socket.cpp,v 1.1 2024/12/30 09:40:20 wiz Exp $
+
+https://github.com/randombit/botan/commit/2a406beab449a2cb310fa543451a7087ca7b4b1a
+
+--- src/lib/utils/socket/socket.cpp.orig 2024-10-26 07:00:10.000000000 +0000
++++ src/lib/utils/socket/socket.cpp
+@@ -46,20 +46,19 @@ class Asio_Socket final : public OS::Soc
+ public:
+ Asio_Socket(std::string_view hostname, std::string_view service, std::chrono::milliseconds timeout) :
+ m_timeout(timeout), m_timer(m_io), m_tcp(m_io) {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+ check_timeout();
+
+ boost::asio::ip::tcp::resolver resolver(m_io);
+- boost::asio::ip::tcp::resolver::query query(std::string{hostname}, std::string{service});
+- boost::asio::ip::tcp::resolver::iterator dns_iter = resolver.resolve(query);
++ boost::asio::ip::tcp::resolver::results_type dns_iter = resolver.resolve(std::string{hostname}, std::string{service});
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+
+- auto connect_cb = [&ec](const boost::system::error_code& e, const boost::asio::ip::tcp::resolver::iterator&) {
++ auto connect_cb = [&ec](const boost::system::error_code& e, boost::asio::ip::tcp::resolver::results_type::iterator) {
+ ec = e;
+ };
+
+- boost::asio::async_connect(m_tcp, dns_iter, connect_cb);
++ boost::asio::async_connect(m_tcp, dns_iter.begin(), dns_iter.end(), connect_cb);
+
+ while(ec == boost::asio::error::would_block) {
+ m_io.run_one();
+@@ -74,7 +73,7 @@ class Asio_Socket final : public OS::Soc
+ }
+
+ void write(const uint8_t buf[], size_t len) override {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+
+@@ -90,7 +89,7 @@ class Asio_Socket final : public OS::Soc
+ }
+
+ size_t read(uint8_t buf[], size_t len) override {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+ size_t got = 0;
+@@ -116,7 +115,7 @@ class Asio_Socket final : public OS::Soc
+
+ private:
+ void check_timeout() {
+- if(m_tcp.is_open() && m_timer.expires_at() < std::chrono::system_clock::now()) {
++ if(m_tcp.is_open() && m_timer.expiry() < std::chrono::system_clock::now()) {
+ boost::system::error_code err;
+
+ // NOLINTNEXTLINE(bugprone-unused-return-value,cert-err33-c)
+@@ -127,7 +126,7 @@ class Asio_Socket final : public OS::Soc
+ }
+
+ const std::chrono::milliseconds m_timeout;
+- boost::asio::io_service m_io;
++ boost::asio::io_context m_io;
+ boost::asio::system_timer m_timer;
+ boost::asio::ip::tcp::socket m_tcp;
+ };
Index: pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket__udp.cpp
diff -u /dev/null pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket__udp.cpp:1.1
--- /dev/null Mon Dec 30 09:40:20 2024
+++ pkgsrc/security/botan3/patches/patch-src_lib_utils_socket_socket__udp.cpp Mon Dec 30 09:40:20 2024
@@ -0,0 +1,67 @@
+$NetBSD: patch-src_lib_utils_socket_socket__udp.cpp,v 1.1 2024/12/30 09:40:20 wiz Exp $
+
+https://github.com/randombit/botan/commit/2a406beab449a2cb310fa543451a7087ca7b4b1a
+
+--- src/lib/utils/socket/socket_udp.cpp.orig 2024-10-26 07:00:10.000000000 +0000
++++ src/lib/utils/socket/socket_udp.cpp
+@@ -46,20 +46,19 @@ class Asio_SocketUDP final : public OS::
+ public:
+ Asio_SocketUDP(std::string_view hostname, std::string_view service, std::chrono::microseconds timeout) :
+ m_timeout(timeout), m_timer(m_io), m_udp(m_io) {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+ check_timeout();
+
+ boost::asio::ip::udp::resolver resolver(m_io);
+- boost::asio::ip::udp::resolver::query query(std::string{hostname}, std::string{service});
+- boost::asio::ip::udp::resolver::iterator dns_iter = resolver.resolve(query);
++ boost::asio::ip::udp::resolver::results_type dns_iter = resolver.resolve(std::string{hostname}, std::string{service});
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+
+- auto connect_cb = [&ec](const boost::system::error_code& e, const boost::asio::ip::udp::resolver::iterator&) {
++ auto connect_cb = [&ec](const boost::system::error_code& e, boost::asio::ip::udp::resolver::results_type::iterator) {
+ ec = e;
+ };
+
+- boost::asio::async_connect(m_udp, dns_iter, connect_cb);
++ boost::asio::async_connect(m_udp, dns_iter.begin(), dns_iter.end(), connect_cb);
+
+ while(ec == boost::asio::error::would_block) {
+ m_io.run_one();
+@@ -74,7 +73,7 @@ class Asio_SocketUDP final : public OS::
+ }
+
+ void write(const uint8_t buf[], size_t len) override {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+
+@@ -90,7 +89,7 @@ class Asio_SocketUDP final : public OS::
+ }
+
+ size_t read(uint8_t buf[], size_t len) override {
+- m_timer.expires_from_now(m_timeout);
++ m_timer.expires_after(m_timeout);
+
+ boost::system::error_code ec = boost::asio::error::would_block;
+ size_t got = 0;
+@@ -116,7 +115,7 @@ class Asio_SocketUDP final : public OS::
+
+ private:
+ void check_timeout() {
+- if(m_udp.is_open() && m_timer.expires_at() < std::chrono::system_clock::now()) {
++ if(m_udp.is_open() && m_timer.expiry() < std::chrono::system_clock::now()) {
+ boost::system::error_code err;
+
+ // NOLINTNEXTLINE(bugprone-unused-return-value,cert-err33-c)
+@@ -127,7 +126,7 @@ class Asio_SocketUDP final : public OS::
+ }
+
+ const std::chrono::microseconds m_timeout;
+- boost::asio::io_service m_io;
++ boost::asio::io_context m_io;
+ boost::asio::system_timer m_timer;
+ boost::asio::ip::udp::socket m_udp;
+ };
Home |
Main Index |
Thread Index |
Old Index