backports/mumble: new aport
This commit is contained in:
parent
85fb50911f
commit
93d0ae5d97
5 changed files with 210 additions and 0 deletions
15
backports/mumble/32-bit.patch
Normal file
15
backports/mumble/32-bit.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Fix type conversion on 32 bit targets
|
||||
|
||||
Ref https://github.com/mumble-voip/mumble/issues/6377#issuecomment-2526348545
|
||||
|
||||
--- a/src/murmur/ServerUser.h
|
||||
+++ b/src/murmur/ServerUser.h
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
unsigned int m_maxTokens;
|
||||
/// The amount of tokens currently stored
|
||||
/// (The amount of whater currently in the bucket)
|
||||
- long m_currentTokens;
|
||||
+ qint64 m_currentTokens;
|
||||
/// A timer that is used to measure time intervals. It is essential
|
||||
/// that this timer uses a monotonic clock (which is why QElapsedTimer is
|
||||
/// used instead of QTime or QDateTime).
|
131
backports/mumble/APKBUILD
Normal file
131
backports/mumble/APKBUILD
Normal file
|
@ -0,0 +1,131 @@
|
|||
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
|
||||
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
|
||||
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
pkgname=mumble
|
||||
pkgver=1.5.735
|
||||
pkgrel=0
|
||||
pkgdesc="Low-latency, high quality voice chat software"
|
||||
url="https://wiki.mumble.info/"
|
||||
arch="all"
|
||||
license="BSD-3-Clause"
|
||||
options="!check"
|
||||
depends="qt5-qtbase-sqlite"
|
||||
makedepends="
|
||||
alsa-lib-dev
|
||||
avahi-dev
|
||||
boost-dev
|
||||
cmake
|
||||
libcap-dev
|
||||
libsndfile-dev
|
||||
libxi-dev
|
||||
openssl-dev>3
|
||||
opus-dev
|
||||
poco-dev
|
||||
protobuf-dev
|
||||
qt5-qtbase-dev
|
||||
qt5-qtsvg-dev
|
||||
qt5-qttools-dev
|
||||
samurai
|
||||
speex-dev
|
||||
speexdsp-dev
|
||||
rnnoise-dev
|
||||
"
|
||||
install="murmur.pre-install"
|
||||
pkgusers="murmur"
|
||||
pkggroups="murmur"
|
||||
subpackages="
|
||||
$pkgname-doc
|
||||
murmur
|
||||
murmur-openrc
|
||||
murmur-doc:murmur_doc
|
||||
"
|
||||
source="https://github.com/mumble-voip/mumble/releases/download/v$pkgver/mumble-$pkgver.tar.gz
|
||||
murmur.initd
|
||||
|
||||
EVIO-int.patch
|
||||
32-bit.patch
|
||||
"
|
||||
|
||||
# secfixes:
|
||||
# 1.3.4-r0:
|
||||
# - CVE-2021-27229
|
||||
# 1.2.19-r9:
|
||||
# - CVE-2018-20743
|
||||
|
||||
build() {
|
||||
CFLAGS="$CFLAGS -flto=auto" \
|
||||
CXXFLAGS="$CXXFLAGS -flto=auto" \
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
-DBUILD_SHARED_LIBS=True \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-Doverlay-xcompile=OFF \
|
||||
-Dspeechd=OFF \
|
||||
-Dice=OFF \
|
||||
-Drnnoise=ON \
|
||||
-Dbundled-celt=ON \
|
||||
-Dbundle-qt-translations=OFF \
|
||||
-Dbundled-speex=OFF \
|
||||
-Dbundled-opus=OFF \
|
||||
-Dbundled-rnnoise=OFF \
|
||||
-Dupdate=OFF \
|
||||
-DBUILD_NUMBER="${pkgver##*.}"
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
# remove systemd config which we don't use
|
||||
rm -r "${pkgdir:?}"/etc
|
||||
|
||||
# license
|
||||
install -Dm644 ./LICENSE \
|
||||
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
# openrc service
|
||||
install -Dm755 "$srcdir"/murmur.initd "$pkgdir"/etc/init.d/murmur
|
||||
# server binary is in the murmur package
|
||||
rm "$pkgdir"/usr/share/man/man1/mumble-server*
|
||||
}
|
||||
|
||||
murmur() {
|
||||
pkgdesc="Murmur is the server component of Mumble"
|
||||
cd "$builddir"
|
||||
|
||||
# Regarding the murmurd <-> mumble-server naming
|
||||
# See: https://github.com/mumble-voip/mumble
|
||||
# Currently, we continue using murmurd everywhere
|
||||
# but provide a mumble-server -> murmurd symlink.
|
||||
install -o murmur -g murmur -dm755 \
|
||||
"$subpkgdir"/var/lib/murmur
|
||||
amove 'usr/bin/mumble-server*'
|
||||
ln -s mumble-server "$subpkgdir"/usr/bin/murmurd
|
||||
install -Dm644 ./auxiliary_files/mumble-server.ini \
|
||||
"$subpkgdir"/etc/murmur.ini
|
||||
|
||||
sed 's/^database=$/database=\/var\/lib\/murmur\/murmur.sqlite/;\
|
||||
s/^;uname=$/uname=murmur/;\
|
||||
s/^;logfile=murmur.log$/logfile=\/var\/log\/murmur.log/;\
|
||||
s/^;pidfile=$/pidfile=\/var\/run\/murmur\/murmur.pid/'\
|
||||
-i "$subpkgdir"/etc/murmur.ini
|
||||
}
|
||||
|
||||
murmur_doc() {
|
||||
pkgdesc="Documentation for the server component of Mumble"
|
||||
|
||||
cd "$builddir"
|
||||
install -Dm644 -t "$subpkgdir"/usr/share/man/man1/ \
|
||||
./auxiliary_files/man_files/mumble-server*.1
|
||||
ln -s mumble-server.1 "$subpkgdir"/usr/share/man/man1/murmurd.1
|
||||
install -Dm644 ./LICENSE \
|
||||
"$subpkgdir"/usr/share/licenses/murmur/LICENSE
|
||||
default_doc
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1dba58e6f39dbef88c6e0d1501530bee62af5bd6c798dcfdbe6c9d94c1ec22ab91d157ba3ccb96d810daf31907ac2bbec876be20b8c9613664488e6bb03a5b5b mumble-1.5.735.tar.gz
|
||||
1edccadd87446a6b9f5b87f19405f92e3450c48334c79fba4bc2c31224be767be084488c4352f14e64b7506b5963d1d6f3d8d4c7ea8e8276104d19a4a03892c6 murmur.initd
|
||||
959cdb890fab13573ba0fb0114556ed9f01b98e47d47a0a6430230a59aaece66286cd931aeb6ecaab20a553458e925db44488147e6ebf15fdcee236fd56d22d9 EVIO-int.patch
|
||||
f14df650e2fbeaae07cec264bb1d3a4d3aca84edcaddc909e52cae0e5f0ff9eb3078fb151f12507255351c1541a6b38e05cd9763cf0a4457773955c84820fe0b 32-bit.patch
|
||||
"
|
39
backports/mumble/EVIO-int.patch
Normal file
39
backports/mumble/EVIO-int.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
Without that we get overflow in conversion errors.
|
||||
|
||||
--- a/src/mumble/GlobalShortcut_unix.cpp
|
||||
+++ b/src/mumble/GlobalShortcut_unix.cpp
|
||||
@@ -332,7 +332,7 @@ void GlobalShortcutX::inputReadyRead(int) {
|
||||
if (!found) {
|
||||
int fd = f->handle();
|
||||
int version = 0;
|
||||
- if ((ioctl(fd, EVIOCGVERSION, &version) < 0) || (((version >> 16) & 0xFF) < 1)) {
|
||||
+ if ((ioctl(fd, (int)EVIOCGVERSION, &version) < 0) || (((version >> 16) & 0xFF) < 1)) {
|
||||
qWarning("GlobalShortcutX: Removing dead input device %s", qPrintable(f->fileName()));
|
||||
qmInputDevices.remove(f->fileName());
|
||||
qsKeyboards.remove(f->fileName());
|
||||
@@ -362,20 +362,20 @@ void GlobalShortcutX::directoryChanged(const QString &dir) {
|
||||
char name[256];
|
||||
uint8_t events[EV_MAX / 8 + 1];
|
||||
memset(events, 0, sizeof(events));
|
||||
- if ((ioctl(fd, EVIOCGVERSION, &version) >= 0) && (ioctl(fd, EVIOCGNAME(sizeof(name)), name) >= 0)
|
||||
- && (ioctl(fd, EVIOCGBIT(0, sizeof(events)), &events) >= 0) && test_bit(EV_KEY, events)
|
||||
+ if ((ioctl(fd, (int)EVIOCGVERSION, &version) >= 0) && (ioctl(fd, (int)EVIOCGNAME(sizeof(name)), name) >= 0)
|
||||
+ && (ioctl(fd, (int)EVIOCGBIT(0, sizeof(events)), &events) >= 0) && test_bit(EV_KEY, events)
|
||||
&& (((version >> 16) & 0xFF) > 0)) {
|
||||
name[255] = 0;
|
||||
qWarning("GlobalShortcutX: %s: %s", qPrintable(f->fileName()), name);
|
||||
// Is it grabbed by someone else?
|
||||
- if ((ioctl(fd, EVIOCGRAB, 1) < 0)) {
|
||||
+ if ((ioctl(fd, (int)EVIOCGRAB, 1) < 0)) {
|
||||
qWarning("GlobalShortcutX: Device exclusively grabbed by someone else (X11 using "
|
||||
"exclusive-mode evdev?)");
|
||||
delete f;
|
||||
} else {
|
||||
- ioctl(fd, EVIOCGRAB, 0);
|
||||
+ ioctl(fd, (int)EVIOCGRAB, 0);
|
||||
uint8_t keys[KEY_MAX / 8 + 1];
|
||||
- if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keys)), &keys) >= 0) && test_bit(KEY_SPACE, keys))
|
||||
+ if ((ioctl(fd, (int)EVIOCGBIT(EV_KEY, sizeof(keys)), &keys) >= 0) && test_bit(KEY_SPACE, keys))
|
||||
qsKeyboards.insert(f->fileName());
|
||||
|
||||
fcntl(f->handle(), F_SETFL, O_NONBLOCK);
|
19
backports/mumble/murmur.initd
Normal file
19
backports/mumble/murmur.initd
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
after firewall
|
||||
}
|
||||
|
||||
description="Mumble VoIP Server"
|
||||
command="/usr/bin/murmurd"
|
||||
command_args="-ini ${INI_CONFIG:-/etc/murmur.ini}"
|
||||
pidfile="/var/run/murmur/murmur.pid"
|
||||
|
||||
start_pre() {
|
||||
checkpath --owner murmur:murmur --directory ${pidfile%/*}
|
||||
}
|
||||
|
||||
# uses the openrc templates for start()/stop()
|
||||
|
||||
|
6
backports/mumble/murmur.pre-install
Executable file
6
backports/mumble/murmur.pre-install
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup -S murmur 2>/dev/null
|
||||
adduser -S -D -H -h /var/lib/murmur -s /sbin/nologin -G murmur -g "Mumble daemon" murmur 2>/dev/null
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue