* [ITA] dbus
@ 2024-02-22 10:33 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2024-02-22 10:33 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 77 bytes --]
I'd like to adopt dbus package.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
[-- Attachment #2: 1.10.8-cygwin-credentials.patch --]
[-- Type: text/plain, Size: 1607 bytes --]
FIXME: in theory this *should* work but it clearly is not.
--- origsrc/dbus-1.10.8/configure.ac 2016-03-07 10:06:22.000000000 -0600
+++ src/dbus-1.10.8/configure.ac 2016-05-06 14:25:35.816044900 -0500
@@ -137,7 +137,7 @@ fi
# For best security, assume that all non-Windows platforms can do
# credentials-passing.
-AS_IF([test "$dbus_win" = yes],
+AS_IF([test "$dbus_cygwin$dbus_win" != nono],
[DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL="<!--<auth>EXTERNAL</auth>-->"],
[DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL="<auth>EXTERNAL</auth>"])
AC_SUBST([DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL])
--- origsrc/dbus-1.10.12/bus/system.conf.in 2015-10-22 12:34:22.000000000 -0500
+++ src/dbus-1.10.12/bus/system.conf.in 2016-10-10 13:32:37.353222600 -0500
@@ -32,8 +32,15 @@
<!-- Enable logging to syslog -->
<syslog/>
- <!-- Only allow socket-credentials-based authentication -->
- <auth>EXTERNAL</auth>
+ <!-- On Unix systems, the most secure authentication mechanism is
+ EXTERNAL, which uses credential-passing over Unix sockets.
+
+ This authentication mechanism is not available on Windows,
+ is not suitable for use with the tcp: or nonce-tcp: transports,
+ and will not work on obscure flavours of Unix that do not have
+ a supported credentials-passing mechanism. On those platforms/transports,
+ comment out the <auth> element to allow fallback to DBUS_COOKIE_SHA1. -->
+ @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
[-- Attachment #3: dbus.cygport --]
[-- Type: text/plain, Size: 2336 bytes --]
NAME="dbus"
VERSION=1.14.10
RELEASE=1
LICENSE="(AFL-2.1 OR GPL-2.0-or-later) AND GPL-2.0-or-later"
CATEGORY="System"
SUMMARY="Freedesktop message bus system"
DESCRIPTION="D-BUS is a message bus system, a simple way for applications to
talk to one another. D-BUS supplies both a system daemon (for events such as
'new hardware device added' or 'printer queue changed') and a per-login-session
daemon (for general IPC needs among user applications). Also, the message bus
is built on top of a general one-to-one message passing framework, which can be
used by any two apps to communicate directly (without going through the message
bus daemon)."
HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus"
SRC_URI="https://dbus.freedesktop.org/releases/dbus/dbus-${VERSION}.tar.xz"
SRC_URI+=" https://src.fedoraproject.org/rpms/dbus/raw/f40/f/00-start-message-bus.sh"
SRC_URI+=" messagebus.init"
PATCH_URI="1.10.8-cygwin-credentials.patch"
PKG_NAMES="dbus dbus-doc dbus-x11 libdbus1_3 libdbus1-devel"
dbus_REQUIRES="csih"
dbus_CONTENTS="
--exclude=dbus-launch.*
etc/dbus-1/
etc/p*
etc/rc.d/
usr/bin/*.exe
usr/libexec/
usr/share/dbus-1/
usr/share/doc/dbus/[ACHNRT]*
usr/share/man/
usr/share/xml/dbus-1/
"
dbus_doc_CATEGORY="Doc"
dbus_doc_CONTENTS="--exclude=[ACHNRT]* usr/share/doc/dbus/"
dbus_x11_CATEGORY="X11"
dbus_x11_REQUIRES=${NAME}
dbus_x11_CONTENTS="etc/X11/xinit/ usr/bin/dbus-launch.exe usr/share/man/man1/dbus-launch.*"
libdbus1_3_CATEGORY="Libs"
libdbus1_3_CONTENTS="usr/bin/cygdbus-1-3.dll"
libdbus1_devel_CATEGORY="Libs"
libdbus1_devel_CONTENTS='--exclude=*.exe usr/include/ usr/lib/'
DIFF_EXCLUDES="debug-*.conf org.*.service dbus-daemon.1 dbus-arch-deps.h"
# https://bugs.freedesktop.org/show_bug.cgi?id=71297
CPPFLAGS+=" -DFD_SETSIZE=1024"
CYGCONF_ARGS="
--with-x
--with-xml=expat
--with-dbus-user=SYSTEM
--with-init-scripts=cygwin
--with-session-socket-dir=/tmp
"
src_install() {
cd ${B}
cyginstall
exeinto /etc/rc.d/init.d
newexe ${S}/messagebus.init messagebus
exeinto /etc/X11/xinit/xinitrc.d
doexe ${S}/00-start-message-bus.sh
}
DOCS="doc/TODO README.cygwin"
HTMLDOCS="doc/*.html"
KEEPDIRS="
/usr/share/dbus-1/session.d
/usr/share/dbus-1/system.d
/usr/share/dbus-1/services
/usr/share/dbus-1/system-services
"
[-- Attachment #4: dbus-1.14.10-1.cygwin.patch --]
[-- Type: text/plain, Size: 1215 bytes --]
--- origsrc/dbus-1.14.10/CYGWIN-PATCHES/dbus.postinstall 1970-01-01 09:00:00.000000000 +0900
+++ src/dbus-1.14.10/CYGWIN-PATCHES/dbus.postinstall 2024-02-22 16:33:57.571707900 +0900
@@ -0,0 +1,13 @@
+mkdir -p /var/lib/dbus
+/usr/bin/dbus-uuidgen --ensure
+
+if [ -x /usr/bin/xmlcatalog ] ; then
+ /usr/bin/xmlcatalog --noout --add "system" \
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd" \
+ /usr/share/xml/dbus-1/busconfig.dtd \
+ /etc/xml/catalog
+ /usr/bin/xmlcatalog --noout --add "system" \
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" \
+ /usr/share/xml/dbus-1/introspect.dtd \
+ /etc/xml/catalog
+fi
--- origsrc/dbus-1.14.10/CYGWIN-PATCHES/dbus.preremove 1970-01-01 09:00:00.000000000 +0900
+++ src/dbus-1.14.10/CYGWIN-PATCHES/dbus.preremove 2024-02-22 16:34:11.364251400 +0900
@@ -0,0 +1,13 @@
+if /usr/bin/cygrunsrv -Q messagebus &>/dev/null
+then
+ /usr/bin/cygrunsrv -E messagebus
+fi
+
+if [ -x /usr/bin/xmlcatalog ] ; then
+ /usr/bin/xmlcatalog --noout --del \
+ /usr/share/xml/dbus-1/busconfig.dtd \
+ /etc/xml/catalog
+ /usr/bin/xmlcatalog --noout --del \
+ /usr/share/xml/dbus-1/introspect.dtd \
+ /etc/xml/catalog
+fi
[-- Attachment #5: dbus-1.14.10-1.src.patch --]
[-- Type: text/plain, Size: 518 bytes --]
--- origsrc/dbus-1.14.10/doc/Makefile.am 2022-10-02 23:06:53.000000000 +0900
+++ src/dbus-1.14.10/doc/Makefile.am 2024-02-22 16:18:41.109397800 +0900
@@ -93,10 +93,10 @@ if DBUS_XML_DOCS_ENABLED
html_DATA += $(XMLTO_HTML)
%.html: %.xml
- $(XMLTO) --stringparam generate.consistent.ids=1 html-nochunks $<
+ $(XMLTO) --skip-validation --stringparam generate.consistent.ids=1 html-nochunks $<
%.1: %.1.xml
- $(XMLTO) man $<
+ $(XMLTO) --skip-validation man $<
endif
if DBUS_DOXYGEN_DOCS_ENABLED
[-- Attachment #6: messagebus.init --]
[-- Type: text/plain, Size: 2887 bytes --]
#! /bin/bash
#
# messagebus Start/Stop the DBus system bus
# v1.0 2018-03-04 Yaakov Selkowitz
#
# chkconfig: 2345 90 60
# description: DBus system bus
# processname: dbus-daemon
# config: /etc/dbus-1/system.conf
# pidfile: /var/run/dbus/pid
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PREFIX=/usr
CONFIG=/etc/dbus-1/system.conf
PIDFILE=/var/run/dbus/pid
LOGFILE=/var/log/dbus-daemon.log
SOCKET=/var/run/dbus/system_bus_socket
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
fi
RETVAL=0
# See how we were called.
prog="messagebus"
progdir="/usr/bin"
DAEMON="$progdir/dbus-daemon.exe"
test -f $DAEMON || exit 0
# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi
start() {
echo -n $"Starting $prog: "
# check if cygrunsrv process
cygrunsrv --start $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $PIDFILE && echo "done."
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
cygrunsrv --stop $prog
if test -r $PIDFILE; then
kill `cat $PIDFILE` 2> /dev/null || echo -n " failed"
else
echo -n " no PID file"
fi
# this really needs a long time to stop.
RETVAL=$?
echo "."
[ $RETVAL -eq 0 ] && rm -f $PIDFILE $SOCKET && echo "done."
return $RETVAL
}
rhstatus() {
# service status
cygrunsrv -Q $prog
}
restart() {
echo -n $"Restarting $prog: "
$0 stop
sleep 1
$0 start
echo "done."
}
install() {
echo -n $"Installing $prog daemon: "
# some safety measures
touch $LOGFILE $PIDFILE
chgrp 18 $LOGFILE $PIDFILE
chmod g+w $LOGFILE $PIDFILE
rm -f $SOCKET
#it was compiled with uid=18
cygrunsrv --install $prog --path $DAEMON --args "--nofork --system" --disp "CYGWIN D-Bus system service"
echo "done."
}
uninstall() {
echo -n $"Uninstalling $prog daemon: "
stop
cygrunsrv --remove $prog
echo "done."
}
reload() {
echo -n $"Reloading $prog daemon configuration: "
echo "unsupported. $0 restart"
return 1
/usr/bin/kill -HUP `cat $PIDFILE`
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "done."
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
install)
install
;;
uninstall)
uninstall
;;
status)
rhstatus
;;
condrestart)
[ -f $PIDFILE ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|install|uninstall|restart|condrestart}"
exit 1
esac
exit $?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-22 10:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 10:33 [ITA] dbus Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).