git: 0bdbff31c50d - main - devel/busd: unbreak runtime after a6a8cadce02a

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 01 May 2024 19:47:51 UTC
The branch main has been updated by jbeich:

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

commit 0bdbff31c50d12c07ba5370bf524d8ea86f9097a
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-05-01 19:40:28 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-05-01 19:47:34 +0000

    devel/busd: unbreak runtime after a6a8cadce02a
---
 devel/busd/Makefile         |  3 +--
 devel/busd/files/patch-zbus | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/devel/busd/Makefile b/devel/busd/Makefile
index 42cbc9341a6b..76cd7bdd7bf8 100644
--- a/devel/busd/Makefile
+++ b/devel/busd/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	busd
 DISTVERSION=	0.3.0
+PORTREVISION=	1
 CATEGORIES=	devel
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -9,8 +10,6 @@ WWW=		https://github.com/dbus2/busd
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE-MIT
 
-IGNORE=		https://github.com/dbus2/busd/issues/86
-
 USES=		cargo
 USE_GITHUB=	yes
 GH_ACCOUNT=	dbus2
diff --git a/devel/busd/files/patch-zbus b/devel/busd/files/patch-zbus
new file mode 100644
index 000000000000..f6d1c1014e41
--- /dev/null
+++ b/devel/busd/files/patch-zbus
@@ -0,0 +1,28 @@
+https://github.com/dbus2/zbus/pull/757
+
+--- cargo-crates/zbus-4.2.0/src/connection/handshake/common.rs.orig	2006-07-24 01:21:28 UTC
++++ cargo-crates/zbus-4.2.0/src/connection/handshake/common.rs
+@@ -122,17 +122,13 @@ impl Common {
+                 if self.first_command {
+                     // The first command is sent by the client so we can assume it's the server.
+                     self.first_command = false;
+-                    // leading 0 is sent separately for `freebsd` and `dragonfly`.
+-                    #[cfg(not(any(target_os = "freebsd", target_os = "dragonfly")))]
+-                    {
+-                        if self.recv_buffer[0] != b'\0' {
+-                            return Err(Error::Handshake(
+-                                "First client byte is not NUL!".to_string(),
+-                            ));
+-                        }
+-
+-                        start_index = 1;
++                    if self.recv_buffer[0] != b'\0' {
++                        return Err(Error::Handshake(
++                            "First client byte is not NUL!".to_string(),
++                        ));
+                     }
++
++                    start_index = 1;
+                 };
+ 
+                 let line_bytes = self.recv_buffer.drain(..=lf_index);