aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2019-06-04 21:48:12 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-06-05 13:02:38 +0000
commit34001bbdeb45f402e36725c2b6abb29d2b4d267f (patch)
treed10f31416c8c94c78c3e0ff7869792a816d64d5f /community
parentab2e689ca265277d183ddcd729af431ee0f75456 (diff)
downloadaports-34001bbdeb45f402e36725c2b6abb29d2b4d267f.tar.bz2
aports-34001bbdeb45f402e36725c2b6abb29d2b4d267f.tar.xz
community/mumble: update to 1.3.0_rc1 and move to Qt5
Diffstat (limited to 'community')
-rw-r--r--community/mumble/APKBUILD56
-rw-r--r--community/mumble/CVE-2018-20743.1.patch197
-rw-r--r--community/mumble/CVE-2018-20743.2.patch25
-rw-r--r--community/mumble/boost-1.66.patch32
4 files changed, 20 insertions, 290 deletions
diff --git a/community/mumble/APKBUILD b/community/mumble/APKBUILD
index 33f749a4f6..0d1ea0585f 100644
--- a/community/mumble/APKBUILD
+++ b/community/mumble/APKBUILD
@@ -2,49 +2,37 @@
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr>
pkgname=mumble
-pkgver=1.2.19
-pkgrel=9
+pkgver=1.3.0_rc1
+_pkgver=${pkgver/_/-}
+__pkgver=${pkgver/_rc1/}
+pkgrel=0
pkgdesc="Low-latency, high quality voice chat software"
url="https://wiki.mumble.info"
arch="all"
license="BSD-3-Clause"
options="!check"
-depends="qt-sqlite"
-depends_dev=""
-makedepends="qt-dev libsndfile-dev boost-dev avahi-dev protobuf-dev
- libxi-dev speex-dev speexdsp-dev libcap-dev"
+depends="qt5-qtbase-sqlite"
+makedepends="qt5-qtbase-dev libsndfile-dev boost-dev avahi-dev protobuf-dev
+ libxi-dev speex-dev speexdsp-dev libcap-dev alsa-lib-dev qt5-qtsvg-dev
+ qt5-qttools-dev opus-dev
+ "
install="murmur.pre-install"
pkgusers="murmur"
pkggroups="murmur"
subpackages="$pkgname-doc murmur murmur-doc:murmur_doc:noarch"
-source="https://github.com/mumble-voip/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
- CVE-2018-20743.1.patch
- CVE-2018-20743.2.patch
- boost-1.66.patch
+source="https://github.com/mumble-voip/$pkgname/releases/download/$_pkgver/$pkgname-$_pkgver.tar.gz
murmur.initd"
-builddir="$srcdir"/$pkgname-$pkgver
-
-# secfixes:
-# 1.2.19-r9:
-# - CVE-2018-20743
+builddir="$srcdir/$pkgname-${pkgver/_rc1/}"
build() {
- cd "$builddir"
-
- CXXFLAGS="-std=c++11"
- qmake -recursive main.pro \
- CONFIG+="no-speechd no-g15 no-update no-ice bundled-celt no-embed-qt-translations no-bundled-speex"
-
- # qmake-qt4 ignores complation *FLAGS thus patch the Makefiles directly
- sed -i "s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \
- */Makefile* */*/Makefile*
+ qmake-qt5 -recursive main.pro \
+ CONFIG+="no-speechd no-g15 no-ice bundled-celt no-embed-qt-translations no-bundled-speex no-bundled-opus no-rnnoise" \
+ DEFINES+="PLUGIN_PATH=/usr/lib/mumble"
make release
}
package() {
- cd "$builddir"
-
# Binaries.
install -Dm755 ./release/mumble \
"$pkgdir"/usr/bin/mumble
@@ -52,16 +40,14 @@ package() {
"$pkgdir"/usr/bin/mumble-overlay
# Libraries.
- install -Dm755 ./release/libmumble.so.$pkgver \
- "$pkgdir"/usr/lib/mumble/libmumble.so.$pkgver
+ install -Dm755 ./release/libmumble.so.$__pkgver \
+ "$pkgdir"/usr/lib/mumble/libmumble.so.$__pkgver
for lib in libmumble.so libmumble.so.1 libmumble.so.1.2; do
- ln -s libmumble.so.$pkgver \
+ ln -s libmumble.so.$__pkgver \
"$pkgdir"/usr/lib/mumble/$lib
done
install -Dm755 ./release/plugins/liblink.so \
"$pkgdir"/usr/lib/mumble/liblink.so
- install -Dm755 ./release/plugins/libmanual.so \
- "$pkgdir"/usr/lib/mumble/libmanual.so
install -Dm755 ./release/libcelt* \
"$pkgdir"/usr/lib/mumble/
@@ -110,13 +96,11 @@ murmur_doc() {
cd "$builddir"
install -Dm644 ./man/murmurd.1 \
"$subpkgdir"/usr/share/man/man1/murmurd.1
+ gzip "$subpkgdir"/usr/share/man/man1/murmurd.1
+
install -Dm644 ./LICENSE \
"$subpkgdir"/usr/share/licenses/murmur/LICENSE
- default_doc
}
-sha512sums="f91111194a899149b500a94afcf7cc5b9691c7ce8669f07fca2c66adbb3916ddb863bf703d04fb8387133fb75f3c8edb52974d1acf3febfafa1f73da19946de4 mumble-1.2.19.tar.gz
-6a3c78a479c795f91fabd557c34249308e1032be51ee668a9576cb8d2f7028526c4d79895b5053822c05f998e147a0577e801e8a27c9a454a4473193f16de943 CVE-2018-20743.1.patch
-9e2b0dcb5ca34aea1607e0561446bced93e13ce296df986855299f7b652e99db8f9504e0dfa6544e8f443996b8a78a912328f4924813a4716028a8323c70d6d0 CVE-2018-20743.2.patch
-fcdaf2a3575e3871fe4003b93364a70a7c7029beb64ba5e24931abbe3898b72791848b5cf78ccf48eee5942a37f696a5134d061c2b8d60b66913abd701758330 boost-1.66.patch
+sha512sums="e993b18b0ecf620d3a9a89f145c18b9ecde3aaf9b7217e235b7472908c81a365323c8683dd6fc9ed14b108160f8bf5244369c2a9ee57c22595550220d158516c mumble-1.3.0-rc1.tar.gz
c74ade232146a180448cb0027503f59642000bee50613a1fb99162cdc4bc81089ab4e84e51b0bbdac5c176eb52b76e6bd2b3ec790a9148135a1fc050569921c3 murmur.initd"
diff --git a/community/mumble/CVE-2018-20743.1.patch b/community/mumble/CVE-2018-20743.1.patch
deleted file mode 100644
index c9d381200f..0000000000
--- a/community/mumble/CVE-2018-20743.1.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From 0daec57f5cfc4225aa4527b537b4ec4fbbc35635 Mon Sep 17 00:00:00 2001
-From: MadMaurice <madmaurice@zom.bi>
-Date: Thu, 30 Aug 2018 15:08:01 +0200
-Subject: [PATCH] Prevent instability and crash due to message flood
-
-This patch adds a rate limiting to selected patches. The underlying rate limiter
-used is the Leaky-Bucket algorithm. It allows for a burst of messages, but
-limits them after a specified amount of messages within a time frame.
----
- src/murmur/Messages.cpp | 17 ++++++++++++
- src/murmur/ServerUser.cpp | 58 +++++++++++++++++++++++++++++++++++++++
- src/murmur/ServerUser.h | 29 ++++++++++++++++++++
- 3 files changed, 104 insertions(+)
-
-diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
-index 967cff794..1739378e1 100644
---- a/src/murmur/Messages.cpp
-+++ b/src/murmur/Messages.cpp
-@@ -42,6 +42,11 @@
- #include "ServerUser.h"
- #include "Version.h"
-
-+#define RATELIMIT(user) \
-+ if (user->leakyBucket.ratelimit(1)) { \
-+ return; \
-+ }
-+
- #define MSG_SETUP(st) \
- if (uSource->sState != st) { \
- return; \
-@@ -679,6 +684,10 @@
- bBroadcast = true;
- }
-
-+ if (uSource == pDstServerUser) {
-+ RATELIMIT(uSource);
-+ }
-+
- if (msg.has_channel_id()) {
- Channel *c = qhChannels.value(msg.channel_id());
-
-@@ -791,6 +800,8 @@
- c = qhChannels.value(msg.channel_id());
- if (! c)
- return;
-+ } else {
-+ RATELIMIT(uSource);
- }
-
- // Check if the parent exists
-@@ -1074,6 +1076,8 @@
- QSet<ServerUser *> users;
- QQueue<Channel *> q;
-
-+ RATELIMIT(uSource);
-+
- QString text = u8(msg.message());
- bool changed = false;
-
-@@ -1241,6 +1254,8 @@ void Server::msgACL(ServerUser *uSource, MumbleProto::ACL &msg) {
- return;
- }
-
-+ RATELIMIT(uSource);
-+
- if (msg.has_query() && msg.query()) {
- QStack<Channel *> chans;
- Channel *p;
-@@ -1497,6 +1512,8 @@ void Server::msgContextAction(ServerUser *uSource, MumbleProto::ContextAction &m
- }
-
- void Server::msgVersion(ServerUser *uSource, MumbleProto::Version &msg) {
-+ RATELIMIT(uSource);
-+
- if (msg.has_version())
- uSource->uiVersion=msg.version();
- if (msg.has_release())
-diff --git a/src/murmur/ServerUser.cpp b/src/murmur/ServerUser.cpp
-index c851d86d8..e5c570d47 100644
---- a/src/murmur/ServerUser.cpp
-+++ b/src/murmur/ServerUser.cpp
-@@ -112,3 +112,61 @@ int BandwidthRecord::bandwidth() const {
- return static_cast<int>((sum * 1000000ULL) / elapsed);
- }
-
-+#if __cplusplus > 199711LL
-+
-+inline static
-+time_point now() {
-+ return std::chrono::steady_clock::now();
-+}
-+
-+inline static
-+unsigned long millisecondsBetween(time_point start, time_point end) {
-+ return std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
-+}
-+
-+#else
-+
-+inline static
-+time_point now() {
-+ return clock();
-+}
-+
-+inline static
-+unsigned long millisecondsBetween(time_point start, time_point end) {
-+ return 1000 * (end - start) / CLOCKS_PER_SEC;
-+}
-+
-+#endif
-+
-+// Rate limiting: burst up to 30, 4 message per sec limit over longer time
-+LeakyBucket::LeakyBucket() : tokensPerSec(4), maxTokens(30), currentTokens(0) {
-+ lastUpdate = now();
-+}
-+
-+bool LeakyBucket::ratelimit(int tokens) {
-+ // First remove tokens we leaked over time
-+ time_point tnow = now();
-+ long ms = millisecondsBetween(lastUpdate, tnow);
-+
-+ long drainTokens = (ms * tokensPerSec) / 1000;
-+
-+ // Prevent constant starvation due to too many updates
-+ if (drainTokens > 0) {
-+ this->lastUpdate = tnow;
-+
-+ this->currentTokens -= drainTokens;
-+ if (this->currentTokens < 0) {
-+ this->currentTokens = 0;
-+ }
-+ }
-+
-+ // Then try to add tokens
-+ bool limit = this->currentTokens > ((static_cast<long>(maxTokens)) - tokens);
-+
-+ // If the bucket is not overflowed, allow message and add tokens
-+ if (!limit) {
-+ this->currentTokens += tokens;
-+ }
-+
-+ return limit;
-+}
-diff --git a/src/murmur/ServerUser.h b/src/murmur/ServerUser.h
-index 28e582739..0a3828205 100644
---- a/src/murmur/ServerUser.h
-+++ b/src/murmur/ServerUser.h
-@@ -14,6 +14,13 @@
- #include <winsock2.h>
- #endif
-
-+// <chrono> was introduced in C++11
-+#if __cplusplus > 199711LL
-+#include <chrono>
-+#else
-+#include <ctime>
-+#endif
-+
- #include "Connection.h"
- #include "Timer.h"
- #include "User.h"
-@@ -55,6 +62,26 @@ struct WhisperTarget {
-
- class Server;
-
-+#if __cplusplus > 199711L
-+ typedef std::chrono::time_point<std::chrono::steady_clock> time_point;
-+#else
-+ typedef clock_t time_point;
-+#endif
-+
-+// Simple algorithm for rate limiting
-+class LeakyBucket {
-+ private:
-+ unsigned int tokensPerSec, maxTokens;
-+ long currentTokens;
-+ time_point lastUpdate;
-+
-+ public:
-+ // Returns true if packets should be dropped
-+ bool ratelimit(int tokens);
-+
-+ LeakyBucket();
-+};
-+
- class ServerUser : public Connection, public User {
- private:
- Q_OBJECT
-@@ -103,6 +130,8 @@ class ServerUser : public Connection, public User {
- QMap<int, TargetCache> qmTargetCache;
- QMap<QString, QString> qmWhisperRedirect;
-
-+ LeakyBucket leakyBucket;
-+
- int iLastPermissionCheck;
- QMap<int, unsigned int> qmPermissionSent;
- #ifdef Q_OS_UNIX
diff --git a/community/mumble/CVE-2018-20743.2.patch b/community/mumble/CVE-2018-20743.2.patch
deleted file mode 100644
index 9a7118b87c..0000000000
--- a/community/mumble/CVE-2018-20743.2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 4761ca41ab1f611cd4a6d117f9f6cfd7c64f6b55 Mon Sep 17 00:00:00 2001
-From: MadMaurice <madmaurice@zom.bi>
-Date: Fri, 31 Aug 2018 00:01:40 +0200
-Subject: [PATCH] Lower bucket params
-
-Use 1 tokens per second and 5 burst instead of 4 tokens per second and 30 burst
----
- src/murmur/ServerUser.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/murmur/ServerUser.cpp b/src/murmur/ServerUser.cpp
-index e5c570d47..5356690de 100644
---- a/src/murmur/ServerUser.cpp
-+++ b/src/murmur/ServerUser.cpp
-@@ -138,8 +138,8 @@ unsigned long millisecondsBetween(time_point start, time_point end) {
-
- #endif
-
--// Rate limiting: burst up to 30, 4 message per sec limit over longer time
--LeakyBucket::LeakyBucket() : tokensPerSec(4), maxTokens(30), currentTokens(0) {
-+// Rate limiting: burst up to 5, 1 message per sec limit over longer time
-+LeakyBucket::LeakyBucket() : tokensPerSec(1), maxTokens(5), currentTokens(0) {
- lastUpdate = now();
- }
-
diff --git a/community/mumble/boost-1.66.patch b/community/mumble/boost-1.66.patch
deleted file mode 100644
index cf61106ce6..0000000000
--- a/community/mumble/boost-1.66.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ea861fe86743c8402bbad77d8d1dd9de8dce447e Mon Sep 17 00:00:00 2001
-From: Mikkel Krautz <mikkel@krautz.dk>
-Date: Fri, 29 Dec 2017 14:47:25 +0100
-Subject: [PATCH] AudioOutput: do not use non-existant template version of
- std::abs.
-
-This change fixes AudioOutput to use the float overload of std::abs:
-
- float std::abs(float);
-
-instead of a non-existant template version.
-
-Fixes mumble-voip/mumble#3281
-
-Needs-Backport: 1.2.x
----
- src/mumble/AudioOutput.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp
-index cbe0c0e2b..7a0a5e2ab 100644
---- a/src/mumble/AudioOutput.cpp
-+++ b/src/mumble/AudioOutput.cpp
-@@ -437,7 +437,7 @@ bool AudioOutput::mix(void *outbuff, unsigned int nsamp) {
- top[2] = 0.0f;
- }
-
-- if (std::abs<float>(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) {
-+ if (std::abs(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) {
- // Not perpendicular. Assume Y up and rotate 90 degrees.
-
- float azimuth = 0.0f;