Hi, I'd like to build and package the server component of Mumble too. Since users usually either want the client or the server, I made audio/mumble a multi-package for this. While there I also removed some references to non-installed manpages from the manpages that are installed. Tested and works on amd64. However, this changes the pkgpath of the Mumble client. How do I make `make update`/`pkg_add -u` aware of this? I already tried using -main instead of -client, but it seems this doesn't do the trick.
Kind regards, Thomas diff --git audio/mumble/Makefile audio/mumble/Makefile index 963c8976ad2..b4c0ce3824f 100644 --- audio/mumble/Makefile +++ audio/mumble/Makefile @@ -1,9 +1,13 @@ # $OpenBSD: Makefile,v 1.45 2020/04/09 18:18:06 tb Exp $ -COMMENT = low-latency voice chat client +COMMENT-client = 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-client = mumble-${VERSION} +PKGNAME-server = murmur-${VERSION} +REVISION-client = 6 CATEGORIES = audio @@ -14,9 +18,13 @@ MASTER_SITES = https://github.com/mumble-voip/mumble/releases/download/1.3.0/ # 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-client += ${COMPILER_LIBCXX} GL Qt5Core Qt5DBus Qt5Gui Qt5Network +WANTLIB-client += Qt5Sql Qt5Svg Qt5Widgets Qt5Xml X11 Xi c crypto +WANTLIB-client += 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 = -client -server DEBUG_PACKAGES = ${BUILD_PACKAGES} @@ -24,14 +32,16 @@ MODULES = devel/qmake x11/qt5 BUILD_DEPENDS = devel/boost -LIB_DEPENDS = audio/libsndfile>=1.0.25p0 \ +LIB_DEPENDS-client = 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-client = devel/desktop-file-utils \ x11/gtk+3,-guic # CONFIG+=c++11 because of protobuf @@ -40,6 +50,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 +61,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 \ @@ -77,13 +87,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 +104,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> diff --git audio/mumble/patches/patch-man_mumble_1 audio/mumble/patches/patch-man_mumble_1 new file mode 100644 index 00000000000..3a49ffa1c3f --- /dev/null +++ audio/mumble/patches/patch-man_mumble_1 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Remove reference to non-installed manpage. + +Index: man/mumble.1 +--- man/mumble.1.orig ++++ man/mumble.1 +@@ -48,7 +48,6 @@ Deafen self + Undeafen self + .RE + .SH SEE ALSO +-.BR mumble\-overlay (1), + .BR murmurd (1). + .SH AUTHORS + mumble and murmurd were written by The Mumble Developers. diff --git audio/mumble/patches/patch-man_murmurd_1 audio/mumble/patches/patch-man_murmurd_1 new file mode 100644 index 00000000000..5160a8bbbbd --- /dev/null +++ audio/mumble/patches/patch-man_murmurd_1 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Remove reference to non-installed manpage. + +Index: man/murmurd.1 +--- man/murmurd.1.orig ++++ man/murmurd.1 +@@ -86,7 +86,6 @@ Virtual servers that have overridden the settings from + be affected by this signal. Those servers can be updated using the updateCertificate RPC call. + .SH SEE ALSO + .BR mumble (1), +-.BR murmur\-user\-wrapper (1). + .br + .SH AUTHORS + mumble and murmurd were written by The Mumble Developers. diff --git audio/mumble/patches/patch-scripts_murmur_ini audio/mumble/patches/patch-scripts_murmur_ini new file mode 100644 index 00000000000..c2cdfc91ba5 --- /dev/null +++ audio/mumble/patches/patch-scripts_murmur_ini @@ -0,0 +1,90 @@ +$OpenBSD$ + +Remove 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=/var/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 +@@ -57,38 +57,6 @@ database= + ; murmurd processes connected to the same D-Bus daemon. + ;dbusservice=net.sourceforge.mumble.murmur + +-; If you want to use ZeroC Ice to communicate with Murmur, you need +-; to specify the endpoint to use. Since there is no authentication +-; 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 primarily uses local sockets. This means anyone who has a +-; user account on your machine can connect to the Ice services. +-; You can set a plaintext "secret" on the Ice connection, and +-; any script attempting to access must then have this secret +-; (as context with name "secret"). +-; Access is split in read (look only) and write (modify) +-; operations. Write access always includes read access, +-; unless read is explicitly denied (see note below). +-; +-; Note that if this is uncommented and with empty content, +-; access will be denied. +- +-;icesecretread= +-icesecretwrite= +- +-; If you want to expose Murmur's experimental gRPC API, you +-; need to specify an address to bind on. +-; Note: not all builds of Murmur support gRPC. If gRPC is not +-; available, Murmur will warn you in its log output. +-;grpc="127.0.0.1:50051" +-; Specifying both a certificate and key file below will cause gRPC to use +-; secured, TLS connections. +-;grpccert="" +-;grpckey="" +- + ; How many login attempts do we tolerate from one IP + ; inside a given timeframe before we ban the connection? + ; Note that this is global (shared between all virtual servers), and that +@@ -102,7 +70,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=/var/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 +@@ -203,13 +171,6 @@ allowping=true + ;registerUrl=http://www.mumble.info/ + ;registerHostname= + +-; If this option is enabled, the server will announce its presence via the +-; bonjour service discovery protocol. To change the name announced by bonjour +-; adjust the registerName variable. +-; See http://developer.apple.com/networking/bonjour/index.html for more information +-; about bonjour. +-;bonjour=True +- + ; If you have a proper SSL certificate, you can provide the filenames here. + ; Otherwise, Murmur will create its own certificate automatically. + ;sslCert= +@@ -267,11 +228,3 @@ allowping=true + ; overrides the automatic benchmark and forces a specific number of iterations. + ; (Note that you should only change this value if you know what you are doing) + ;kdfIterations=-1 +- +-; You can configure any of the configuration options for Ice here. We recommend +-; 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 diff --git audio/mumble/pkg/DESCR audio/mumble/pkg/DESCR-client similarity index 100% rename from audio/mumble/pkg/DESCR rename to audio/mumble/pkg/DESCR-client diff --git audio/mumble/pkg/DESCR-server audio/mumble/pkg/DESCR-server new file mode 100644 index 00000000000..a9b0e073fe7 --- /dev/null +++ audio/mumble/pkg/DESCR-server @@ -0,0 +1,2 @@ +Murmur is the server component of Mumble, a low-latency, high quality +VoIP application. diff --git audio/mumble/pkg/PLIST audio/mumble/pkg/PLIST-client similarity index 100% rename from audio/mumble/pkg/PLIST rename to audio/mumble/pkg/PLIST-client diff --git audio/mumble/pkg/PLIST-server audio/mumble/pkg/PLIST-server new file mode 100644 index 00000000000..c0f489f13eb --- /dev/null +++ audio/mumble/pkg/PLIST-server @@ -0,0 +1,15 @@ +@comment $OpenBSD: PLIST,v$ +@newgroup _murmurd:854 +@newuser _murmurd:854:_murmurd:daemon:murmurd user:/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 /var/murmur/ +@extraunexec rm -rf /var/murmur/* diff --git audio/mumble/pkg/murmurd.rc audio/mumble/pkg/murmurd.rc new file mode 100644 index 00000000000..d49051002e8 --- /dev/null +++ audio/mumble/pkg/murmurd.rc @@ -0,0 +1,16 @@ +#!/bin/ksh +# +# $OpenBSD: murmurd.rc,v$ + +daemon="${TRUEPREFIX}/sbin/murmurd" +daemon_flags="-ini /etc/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 diff --git infrastructure/db/user.list infrastructure/db/user.list index 49a1301289c..40081188496 100644 --- infrastructure/db/user.list +++ infrastructure/db/user.list @@ -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