On Sat, Apr 11, 2020 at 10:08:55PM +0200, Thomas L. wrote:
> Patch with suggested improvements below. I left the REVISION-client,
> since I noted that pkg_add considers the old package with REVISION
> newer otherwise (come to think of it pkg_add doesn't know whether we go
> package->multipackage or reverse, so probably needs REVISION).
Your git diff fails to apply, it seems to be mangled by the MUA.

Looks all good except -client should be -main and your murmur.ini patch
needs SUBST_CMD in post-patch so the config file ends up with actual
values not variables.

I've already tested both client and server after this diff on amd64
and `pkg_add murmur && rcctl start murmurd` just works, I can talk to
people over both TCP and UDP.

Below is a CVS diff that should work.
I'd like to commit this on your behalf.
More feedback? OK?


Index: infrastructure/db/user.list
===================================================================
RCS file: /cvs/ports/infrastructure/db/user.list,v
retrieving revision 1.365
diff -u -p -r1.365 user.list
--- infrastructure/db/user.list 7 Apr 2020 21:04:03 -0000       1.365
+++ infrastructure/db/user.list 11 Apr 2020 20:21:21 -0000
@@ -362,3 +362,4 @@ id  user            group           port
 851 _whatsapp          _whatsapp       net/mautrix-whatsapp
 852 _inetsim           _inetsim        net/inetsim
 853 _sniproxy          _sniproxy       net/sniproxy
+854 _murmurd           _murmurd        audio/mumble,-server
Index: audio/mumble//Makefile
===================================================================
RCS file: /cvs/ports/audio/mumble/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- audio/mumble//Makefile      9 Apr 2020 18:18:06 -0000       1.45
+++ audio/mumble//Makefile      11 Apr 2020 21:17:24 -0000
@@ -1,11 +1,14 @@
 # $OpenBSD: Makefile,v 1.45 2020/04/09 18:18:06 tb Exp $
 
-COMMENT =              low-latency voice chat client
+COMMENT-main =         low-latency voice chat client
+COMMENT-server =       low-latency voice chat server
 
-DISTNAME =             mumble-1.3.0
-REVISION =             5
+VERSION =              1.3.0
+DISTNAME =             mumble-${VERSION}
+PKGNAME-server =       murmur-${VERSION}
+REVISION-main =        6
 
-CATEGORIES =           audio
+CATEGORIES =           audio net
 
 HOMEPAGE =             https://www.mumble.info/
 
@@ -14,9 +17,13 @@ MASTER_SITES =               https://github.com/mumbl
 # BSD3
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5DBus Qt5Gui Qt5Network
-WANTLIB += Qt5Sql Qt5Svg Qt5Widgets Qt5Xml X11 Xi c crypto
-WANTLIB += m opus portaudio protobuf sndfile speex speexdsp ssl
+WANTLIB-main += ${COMPILER_LIBCXX} GL Qt5Core Qt5DBus Qt5Gui Qt5Network
+WANTLIB-main += Qt5Sql Qt5Svg Qt5Widgets Qt5Xml X11 Xi c crypto
+WANTLIB-main += m opus portaudio protobuf sndfile speex speexdsp ssl
+WANTLIB-server += ${COMPILER_LIBCXX} Qt5Core Qt5DBus Qt5Network Qt5Sql
+WANTLIB-server += Qt5Xml c crypto m protobuf ssl
+
+MULTI_PACKAGES =       -main -server
 
 DEBUG_PACKAGES =       ${BUILD_PACKAGES}
 
@@ -24,14 +31,16 @@ MODULES =           devel/qmake x11/qt5
 
 BUILD_DEPENDS =                devel/boost
 
-LIB_DEPENDS =          audio/libsndfile>=1.0.25p0 \
+LIB_DEPENDS-main =     audio/libsndfile>=1.0.25p0 \
                        audio/opus \
                        audio/portaudio-svn \
                        audio/speex \
                        devel/protobuf \
                        x11/qt5/qtsvg
+LIB_DEPENDS-server =   devel/protobuf \
+                       x11/qt5/qtbase
 
-RUN_DEPENDS =          devel/desktop-file-utils \
+RUN_DEPENDS-main =     devel/desktop-file-utils \
                        x11/gtk+3,-guic
 
 # CONFIG+=c++11 because of protobuf
@@ -40,6 +49,7 @@ MODQMAKE_ARGS =               MUMBLE_PREFIX=${PREFIX}
                        CONFIG+=c++11 \
                        CONFIG+=no-11x \
                        CONFIG+=no-alsa \
+                       CONFIG+=no-ice \
                        CONFIG+=no-bonjour \
                        CONFIG+=no-bundled-opus \
                        CONFIG+=no-bundled-speex \
@@ -50,7 +60,6 @@ MODQMAKE_ARGS =               MUMBLE_PREFIX=${PREFIX}
                        CONFIG+=no-oss \
                        CONFIG+=no-overlay \
                        CONFIG+=no-pulseaudio \
-                       CONFIG+=no-server \
                        CONFIG+=no-speechd \
                        CONFIG+=no-update \
                        CONFIG+=bundled-celt \
@@ -70,6 +79,9 @@ NO_TEST =             Yes
 MODQMAKE_ARGS +=       CONFIG+=no-pch
 .endif
 
+post-patch:
+       ${SUBST_CMD} ${WRKSRC}/scripts/murmur.ini
+
 pre-configure:
        cd ${WRKSRC}/src/mumble/ && QTDIR=${WRKDIR}/bin \
                ${MODQT_LRELEASE} *.ts
@@ -77,13 +89,16 @@ pre-configure:
 do-install:
        ${INSTALL_PROGRAM} ${WRKBUILD}/mumble \
                ${PREFIX}/bin/mumble
+       ${INSTALL_PROGRAM} ${WRKBUILD}/murmurd \
+               ${PREFIX}/sbin/murmurd
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/mumble
        ${INSTALL_DATA} ${WRKBUILD}/plugins/lib*.so \
                ${PREFIX}/lib/mumble/
        ${INSTALL_DATA_DIR} ${PREFIX}/share/mumble/locale
        ${INSTALL_DATA} ${WRKSRC}/src/mumble/*.qm \
                ${PREFIX}/share/mumble/locale/
-       ${INSTALL_MAN} ${WRKSRC}/man/mumble.1 ${PREFIX}/man/man1/
+       ${INSTALL_MAN} ${WRKSRC}/man/{mumble,murmurd}.1 \
+               ${PREFIX}/man/man1/
        ${INSTALL_DATA_DIR} \
                ${PREFIX}/share/icons/hicolor/scalable/apps
        ${INSTALL_DATA} ${WRKSRC}/icons/mumble.svg \
@@ -91,5 +106,8 @@ do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
        ${INSTALL_DATA} ${WRKSRC}/scripts/mumble.desktop \
                ${PREFIX}/share/applications/
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/murmur
+       ${INSTALL_DATA} ${WRKSRC}/scripts/murmur.ini \
+               ${PREFIX}/share/examples/murmur/
 
 .include <bsd.port.mk>
Index: audio/mumble//patches/patch-scripts_murmur_ini
===================================================================
RCS file: audio/mumble//patches/patch-scripts_murmur_ini
diff -N audio/mumble//patches/patch-scripts_murmur_ini
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//patches/patch-scripts_murmur_ini      11 Apr 2020 20:21:21 
-0000
@@ -0,0 +1,62 @@
+$OpenBSD$
+
+Comment unavailable options and set default database and log locations.
+
+Index: scripts/murmur.ini
+--- scripts/murmur.ini.orig
++++ scripts/murmur.ini
+@@ -13,7 +13,7 @@
+
+ ; Path to database. If blank, will search for
+ ; murmur.sqlite in default locations or create it if not found.
+-database=
++database=${LOCALSTATEDIR}/murmur/murmur.sqlite
+
+ ; Murmur defaults to using SQLite with its default rollback journal.
+ ; In some situations, using SQLite's write-ahead log (WAL) can be
+@@ -51,7 +51,7 @@ database=
+ ; Murmur defaults to not using D-Bus. If you wish to use dbus, which is one 
of the
+ ; RPC methods available in Murmur, please specify so here.
+ ;
+-;dbus=session
++;dbus=system
+
+ ; Alternate D-Bus service name. Only use if you are running distinct
+ ; murmurd processes connected to the same D-Bus daemon.
+@@ -62,7 +62,7 @@ database=
+ ; with ICE, you should only use it if you trust all the users who have
+ ; shell access to your machine.
+ ; Please see the ICE documentation on how to specify endpoints.
+-ice="tcp -h 127.0.0.1 -p 6502"
++;ice="tcp -h 127.0.0.1 -p 6502"
+
+ ; Ice primarily uses local sockets. This means anyone who has a
+ ; user account on your machine can connect to the Ice services.
+@@ -77,7 +77,7 @@ ice="tcp -h 127.0.0.1 -p 6502"
+ ; access will be denied.
+
+ ;icesecretread=
+-icesecretwrite=
++;icesecretwrite=
+
+ ; If you want to expose Murmur's experimental gRPC API, you
+ ; need to specify an address to bind on.
+@@ -102,7 +102,7 @@ icesecretwrite=
+ ; logs to the file 'murmur.log'. If you leave this field blank
+ ; on Unix-like systems, Murmur will force itself into foreground
+ ; mode which logs to the console.
+-;logfile=murmur.log
++logfile=${LOCALSTATEDIR}/murmur/murmur.log
+
+ ; If set, Murmur will write its process ID to this file
+ ; when running in daemon mode (when the -fg flag is not
+@@ -272,6 +272,6 @@ allowping=true
+ ; leave the defaults as they are.
+ ; Please note that this section has to be last in the configuration file.
+ ;
+-[Ice]
+-Ice.Warn.UnknownProperties=1
+-Ice.MessageSizeMax=65536
++;[Ice]
++;Ice.Warn.UnknownProperties=1
++;Ice.MessageSizeMax=65536
Index: audio/mumble//patches/patch-scripts_murmur_ini.orig
===================================================================
RCS file: audio/mumble//patches/patch-scripts_murmur_ini.orig
diff -N audio/mumble//patches/patch-scripts_murmur_ini.orig
Index: audio/mumble//pkg/DESCR
===================================================================
RCS file: audio/mumble//pkg/DESCR
diff -N audio/mumble//pkg/DESCR
--- audio/mumble//pkg/DESCR     1 Oct 2013 10:28:43 -0000       1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-Mumble is an open source, low-latency, high quality voice chat
-application for groups.
-
-Mumble is the client for the (u)Murmur VoIP communication server.
Index: audio/mumble//pkg/DESCR-main
===================================================================
RCS file: audio/mumble//pkg/DESCR-main
diff -N audio/mumble//pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//pkg/DESCR-main        11 Apr 2020 20:21:21 -0000
@@ -0,0 +1,4 @@
+Mumble is an open source, low-latency, high quality voice chat
+application for groups.
+
+Mumble is the client for the (u)Murmur VoIP communication server.
Index: audio/mumble//pkg/DESCR-server
===================================================================
RCS file: audio/mumble//pkg/DESCR-server
diff -N audio/mumble//pkg/DESCR-server
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//pkg/DESCR-server      11 Apr 2020 20:21:21 -0000
@@ -0,0 +1,2 @@
+Murmur is the server component of Mumble, a low-latency, high quality
+VoIP application.
Index: audio/mumble//pkg/PLIST
===================================================================
RCS file: audio/mumble//pkg/PLIST
diff -N audio/mumble//pkg/PLIST
--- audio/mumble//pkg/PLIST     25 Feb 2020 05:14:52 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,56 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.6 2020/02/25 05:14:52 rsadowski Exp $
-@bin bin/mumble
-lib/mumble/
-@so lib/mumble/liblink.so
-@man man/man1/mumble.1
-share/applications/mumble.desktop
-share/icons/hicolor/scalable/apps/mumble.svg
-share/mumble/
-share/mumble/locale/
-share/mumble/locale/mumble_ar.qm
-share/mumble/locale/mumble_be.qm
-share/mumble/locale/mumble_bg.qm
-share/mumble/locale/mumble_br.qm
-share/mumble/locale/mumble_cs.qm
-share/mumble/locale/mumble_cy.qm
-share/mumble/locale/mumble_da.qm
-share/mumble/locale/mumble_de.qm
-share/mumble/locale/mumble_el.qm
-share/mumble/locale/mumble_el_GR.qm
-share/mumble/locale/mumble_en.qm
-share/mumble/locale/mumble_en_GB.qm
-share/mumble/locale/mumble_eo.qm
-share/mumble/locale/mumble_es.qm
-share/mumble/locale/mumble_eu.qm
-share/mumble/locale/mumble_fa_IR.qm
-share/mumble/locale/mumble_fi.qm
-share/mumble/locale/mumble_fr.qm
-share/mumble/locale/mumble_gl.qm
-share/mumble/locale/mumble_he.qm
-share/mumble/locale/mumble_hi.qm
-share/mumble/locale/mumble_hu.qm
-share/mumble/locale/mumble_it.qm
-share/mumble/locale/mumble_ja.qm
-share/mumble/locale/mumble_ko.qm
-share/mumble/locale/mumble_lt.qm
-share/mumble/locale/mumble_nb_NO.qm
-share/mumble/locale/mumble_nl.qm
-share/mumble/locale/mumble_nl_BE.qm
-share/mumble/locale/mumble_no.qm
-share/mumble/locale/mumble_pl.qm
-share/mumble/locale/mumble_pt_BR.qm
-share/mumble/locale/mumble_pt_PT.qm
-share/mumble/locale/mumble_ro.qm
-share/mumble/locale/mumble_ru.qm
-share/mumble/locale/mumble_sk.qm
-share/mumble/locale/mumble_sv.qm
-share/mumble/locale/mumble_te.qm
-share/mumble/locale/mumble_th.qm
-share/mumble/locale/mumble_tr.qm
-share/mumble/locale/mumble_uk.qm
-share/mumble/locale/mumble_vi.qm
-share/mumble/locale/mumble_zh_CN.qm
-share/mumble/locale/mumble_zh_HK.qm
-share/mumble/locale/mumble_zh_TW.qm
-@tag gtk-update-icon-cache %D/share/icons/hicolor
-@tag update-desktop-database
Index: audio/mumble//pkg/PLIST-main
===================================================================
RCS file: audio/mumble//pkg/PLIST-main
diff -N audio/mumble//pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//pkg/PLIST-main        11 Apr 2020 20:21:21 -0000
@@ -0,0 +1,57 @@
+@comment $OpenBSD: PLIST,v 1.6 2020/02/25 05:14:52 rsadowski Exp $
+@pkgpath audio/mumble
+@bin bin/mumble
+lib/mumble/
+@so lib/mumble/liblink.so
+@man man/man1/mumble.1
+share/applications/mumble.desktop
+share/icons/hicolor/scalable/apps/mumble.svg
+share/mumble/
+share/mumble/locale/
+share/mumble/locale/mumble_ar.qm
+share/mumble/locale/mumble_be.qm
+share/mumble/locale/mumble_bg.qm
+share/mumble/locale/mumble_br.qm
+share/mumble/locale/mumble_cs.qm
+share/mumble/locale/mumble_cy.qm
+share/mumble/locale/mumble_da.qm
+share/mumble/locale/mumble_de.qm
+share/mumble/locale/mumble_el.qm
+share/mumble/locale/mumble_el_GR.qm
+share/mumble/locale/mumble_en.qm
+share/mumble/locale/mumble_en_GB.qm
+share/mumble/locale/mumble_eo.qm
+share/mumble/locale/mumble_es.qm
+share/mumble/locale/mumble_eu.qm
+share/mumble/locale/mumble_fa_IR.qm
+share/mumble/locale/mumble_fi.qm
+share/mumble/locale/mumble_fr.qm
+share/mumble/locale/mumble_gl.qm
+share/mumble/locale/mumble_he.qm
+share/mumble/locale/mumble_hi.qm
+share/mumble/locale/mumble_hu.qm
+share/mumble/locale/mumble_it.qm
+share/mumble/locale/mumble_ja.qm
+share/mumble/locale/mumble_ko.qm
+share/mumble/locale/mumble_lt.qm
+share/mumble/locale/mumble_nb_NO.qm
+share/mumble/locale/mumble_nl.qm
+share/mumble/locale/mumble_nl_BE.qm
+share/mumble/locale/mumble_no.qm
+share/mumble/locale/mumble_pl.qm
+share/mumble/locale/mumble_pt_BR.qm
+share/mumble/locale/mumble_pt_PT.qm
+share/mumble/locale/mumble_ro.qm
+share/mumble/locale/mumble_ru.qm
+share/mumble/locale/mumble_sk.qm
+share/mumble/locale/mumble_sv.qm
+share/mumble/locale/mumble_te.qm
+share/mumble/locale/mumble_th.qm
+share/mumble/locale/mumble_tr.qm
+share/mumble/locale/mumble_uk.qm
+share/mumble/locale/mumble_vi.qm
+share/mumble/locale/mumble_zh_CN.qm
+share/mumble/locale/mumble_zh_HK.qm
+share/mumble/locale/mumble_zh_TW.qm
+@tag gtk-update-icon-cache %D/share/icons/hicolor
+@tag update-desktop-database
Index: audio/mumble//pkg/PLIST-server
===================================================================
RCS file: audio/mumble//pkg/PLIST-server
diff -N audio/mumble//pkg/PLIST-server
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//pkg/PLIST-server      11 Apr 2020 20:37:37 -0000
@@ -0,0 +1,15 @@
+@comment $OpenBSD: PLIST,v$
+@newgroup _murmurd:854
+@newuser _murmurd:854:_murmurd:daemon:Mumble server:/nonexistent:/sbin/nologin
+@rcscript ${RCDIR}/murmurd
+@man man/man1/murmurd.1
+@bin sbin/murmurd
+share/examples/murmur/
+share/examples/murmur/murmur.ini
+@mode 640
+@group _murmurd
+@sample ${SYSCONFDIR}/murmur.ini
+@mode
+@owner _murmurd
+@sample ${LOCALSTATEDIR}/murmur/
+@extraunexec rm -rf ${LOCALSTATEDIR}/murmur/*
Index: audio/mumble//pkg/murmurd.rc
===================================================================
RCS file: audio/mumble//pkg/murmurd.rc
diff -N audio/mumble//pkg/murmurd.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ audio/mumble//pkg/murmurd.rc        11 Apr 2020 20:21:21 -0000
@@ -0,0 +1,16 @@
+#!/bin/ksh
+#
+# $OpenBSD: murmurd.rc,v$
+
+daemon="${TRUEPREFIX}/sbin/murmurd"
+daemon_flags="-ini ${SYSCONFDIR}/murmur.ini"
+daemon_user="_murmurd"
+
+. /etc/rc.d/rc.subr
+
+# only reloads TLS settings
+rc_reload() {
+       pkill -USR1 -T "${daemon_rtable}" -xf "${pexp}"
+}
+
+rc_cmd $1

Reply via email to