git: 8b8f18da222d - main - devel/busd: unbreak without XDG_RUNTIME_DIR
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 May 2024 13:01:17 UTC
The branch main has been updated by jbeich:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8b8f18da222dc7c8a23c73bf40f9d09924e436ea
commit 8b8f18da222dc7c8a23c73bf40f9d09924e436ea
Author: Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-05-01 12:15:42 +0000
Commit: Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-05-01 13:00:52 +0000
devel/busd: unbreak without XDG_RUNTIME_DIR
$ busd
Error: No such file or directory (os error 2)
$ truss busd
[...]
socket(PF_LOCAL,SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK,0) = 9 (0x9)
bind(9,{ AF_UNIX "/run/user/1234/busd-session" },30) ERR#2 'No such file or directory'
[...]
May still fail if /var/run/user doesn't exist e.g., if neither pam_xdg
nor consolekit2 are installed. FreeBSD >= 14.1 always sets XDG_RUNTIME_DIR.
---
devel/busd/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devel/busd/Makefile b/devel/busd/Makefile
index a9b3f8805a5f..e84bf9cc22f3 100644
--- a/devel/busd/Makefile
+++ b/devel/busd/Makefile
@@ -1,6 +1,6 @@
PORTNAME= busd
DISTVERSION= 0.2.0
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= devel
MAINTAINER= jbeich@FreeBSD.org
@@ -15,4 +15,9 @@ USE_GITHUB= yes
GH_ACCOUNT= dbus2
PLIST_FILES= bin/${PORTNAME}
+post-patch:
+# Respect consolekit2 as XDG_RUNTIME_DIR fallback
+ @${REINPLACE_CMD} 's,/run,/var&,' \
+ ${WRKSRC}/src/bus/mod.rs
+
.include <bsd.port.mk>