The package rpms/mumble.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/mumble.git/commit/?id=b9f51d73720d04... https://src.fedoraproject.org/cgit/rpms/mumble.git/commit/?id=d6249fe8f770a0....
Change: +ExcludeArch: %{ix86} +%ifarch x86_64
Thanks.
Full change: ============
commit b9f51d73720d04b626588157f795f0271110bcd9 Author: Carl George carl@george.computer Date: Tue Aug 9 19:53:23 2022 -0500
Drop i686 build
diff --git a/mumble.spec b/mumble.spec index 9004b93..fa90852 100644 --- a/mumble.spec +++ b/mumble.spec @@ -141,6 +141,8 @@ Provides: bundled(qqbonjour) # modified version of vorbis's smallft Provides: bundled(smallft)
+ExcludeArch: %{ix86} + %global _privatelibs libcelt0[.]so.* %global __provides_exclude ^(%{_privatelibs})$ %global __requires_exclude ^(%{_privatelibs})$ @@ -343,6 +345,7 @@ fi - Rename mumur to mumble-server - Create mumble-server user with sysusers - Run test suite on x86_64 +- Drop i686 build
* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
commit d6249fe8f770a03940b3e95d4191cb8634b8669c Author: Carl George carl@george.computer Date: Tue Aug 9 19:53:07 2022 -0500
Run test suite on x86_64
diff --git a/mumble.spec b/mumble.spec index ee78529..9004b93 100644 --- a/mumble.spec +++ b/mumble.spec @@ -1,3 +1,9 @@ +# Test suite only works on x86_64 +# https://github.com/mumble-voip/mumble/issues/3845 +%ifarch x86_64 +%bcond_without tests +%endif + %global build_number 230
Name: mumble @@ -94,6 +100,11 @@ BuildRequires: pipewire-devel BuildRequires: portaudio-devel BuildRequires: pulseaudio-libs-devel
+%if %{with tests} +# src/tests/CMakeLists.txt +BuildRequires: cmake(Qt5Test) +%endif + # multiple files in 3rdparty/celt-0.7.0-src BuildRequires: libogg-devel
@@ -218,6 +229,7 @@ sed \ %build %cmake \ -DBUILD_NUMBER=%{build_number} \ + %{?with_tests:-Dtests=ON} \ -Dupdate=OFF \ -Dbundled-opus=OFF \ -Dbundled-speex=OFF \ @@ -256,6 +268,10 @@ ln -s %{_sysconfdir}/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.mumble_voip.mumble.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/org.mumble_voip.mumble.desktop
+%if %{with tests} +%ctest +%endif +
%pre server # relocation of config file @@ -326,6 +342,7 @@ fi - Move murmur config file from /etc/murmur/murmur.ini to /etc/murmur.ini - Rename mumur to mumble-server - Create mumble-server user with sysusers +- Run test suite on x86_64
* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
commit 988b3a6d25cffde1da21549559368e6df26b9bfc Author: Carl George carl@george.computer Date: Tue Aug 9 19:52:58 2022 -0500
Create mumble-server user with sysusers
diff --git a/mumble-server.sysusers b/mumble-server.sysusers new file mode 100644 index 0000000..7204ae9 --- /dev/null +++ b/mumble-server.sysusers @@ -0,0 +1 @@ +u mumble-server - "Mumble server (murmur)" /var/lib/mumble-server /sbin/nologin diff --git a/mumble.spec b/mumble.spec index 7dbfca2..ee78529 100644 --- a/mumble.spec +++ b/mumble.spec @@ -14,6 +14,7 @@ License: BSD and 0BSD and GPLv2+ URL: https://www.mumble.info Source: https://github.com/mumble-voip/mumble/releases/download/v%%7Bversion%7D/mumb... Source1: murmur.service +Source2: mumble-server.sysusers
# patches from the upstream master branch # https://github.com/mumble-voip/mumble/commit/f4cea62ed95e4967d8591f25e903f5e... @@ -154,11 +155,13 @@ BuildRequires: libcap-devel BuildRequires: pkgconfig(avahi-compat-libdns_sd) BuildRequires: cmake(Qt5DBus)
-Requires(pre): shadow-utils +BuildRequires: systemd-rpm-macros + # To be able to announce the presence of the server via Bonjour. Recommends: avahi
%{?systemd_requires} +%{?sysusers_requires_compat}
%description server @@ -235,6 +238,7 @@ install -p -m 0644 %{_vpath_builddir}/src/mumble/*.qm %{buildroot}%{_datadir}/mu
install -D -p -m 0664 scripts/murmur.ini %{buildroot}%{_sysconfdir}/murmur.ini install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/murmur.service +install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/mumble-server.conf install -D -p -m 0755 scripts/mumble-server-user-wrapper %{buildroot}%{_bindir}/mumble-server-user-wrapper
# dir for mumble-server.sqlite @@ -259,11 +263,7 @@ if [ -f %{_sysconfdir}/murmur/murmur.ini ]; then mv %{_sysconfdir}/murmur/murmur.ini %{_sysconfdir}/murmur.ini fi
-getent group mumble-server >/dev/null || groupadd -r mumble-server -getent passwd mumble-server >/dev/null || \ - useradd -r -g mumble-server -d %{_localstatedir}/lib/mumble-server/ -s /sbin/nologin \ - -c "Mumble-server (murmur) user" mumble-server -exit 0 +%sysusers_create_compat %{SOURCE3}
%post server @@ -302,6 +302,7 @@ exit 0 %{_mandir}/man1/mumble-server-user-wrapper.1* %{_sbindir}/murmurd %{_unitdir}/murmur.service +%{_sysusersdir}/mumble-server.conf %config(noreplace) %attr(664,mumble-server,mumble-server) %{_sysconfdir}/murmur.ini %{_sysconfdir}/murmur/murmur.ini %{_sysconfdir}/mumble-server.ini @@ -324,6 +325,7 @@ exit 0 - Latest upstream, resolves rhbz#2036444 - Move murmur config file from /etc/murmur/murmur.ini to /etc/murmur.ini - Rename mumur to mumble-server +- Create mumble-server user with sysusers
* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
commit c4ac1424f241ea796bb6c45c9216695e99f4fc5c Author: Carl George carl@george.computer Date: Tue Aug 9 19:52:40 2022 -0500
Rename mumur to mumble-server
diff --git a/mumble.spec b/mumble.spec index a34099d..7dbfca2 100644 --- a/mumble.spec +++ b/mumble.spec @@ -139,9 +139,14 @@ Mumble is an Open Source, low-latency and high-quality voice-chat program written on top of Qt and Opus.
-%package -n murmur +%package server Summary: Mumble voice chat server -Provides: mumble-server = %{version}-%{release} + +# Renamed from murmur to mumble-server, per upstream preference. Obsoletes +# added in F37, can be removed in F39. +# https://github.com/mumble-voip/mumble/issues/5436#issuecomment-1084917505 +Provides: murmur = %{version}-%{release} +Obsoletes: murmur < 1.3.4-10
# src/murmur/CMakeLists.txt BuildRequires: cmake(Qt5Sql) @@ -156,9 +161,9 @@ Recommends: avahi %{?systemd_requires}
-%description -n murmur -Murmur(also called mumble-server) is part of the VoIP suite Mumble primarily -aimed at gamers. Murmur is the server component of the suite. +%description server +mumble-server (also called murmur) is part of the VoIP suite Mumble primarily +aimed at gamers.
%package plugins @@ -248,7 +253,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.mumble_voi desktop-file-validate %{buildroot}%{_datadir}/applications/org.mumble_voip.mumble.desktop
-%pre -n murmur +%pre server # relocation of config file if [ -f %{_sysconfdir}/murmur/murmur.ini ]; then mv %{_sysconfdir}/murmur/murmur.ini %{_sysconfdir}/murmur.ini @@ -261,15 +266,15 @@ getent passwd mumble-server >/dev/null || \ exit 0
-%post -n murmur +%post server %systemd_post murmur.service
-%preun -n murmur +%preun server %systemd_preun murmur.service
-%postun -n murmur +%postun server %systemd_postun_with_restart murmur.service
@@ -288,7 +293,7 @@ exit 0 %{_libdir}/mumble/libcelt0.so.0.7.0
-%files -n murmur +%files server %license LICENSE %doc README.md CHANGES %{_bindir}/mumble-server @@ -318,6 +323,7 @@ exit 0 * Tue Aug 09 2022 Carl George carl@george.computer - 1.4.230-1 - Latest upstream, resolves rhbz#2036444 - Move murmur config file from /etc/murmur/murmur.ini to /etc/murmur.ini +- Rename mumur to mumble-server
* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
commit 01a80884b4ceb7e624672907d9286dff8cc8ee74 Author: Carl George carl@george.computer Date: Tue Aug 9 19:51:50 2022 -0500
Move murmur config file from /etc/murmur/murmur.ini to /etc/murmur.ini
diff --git a/mumble.spec b/mumble.spec index 4f67ca8..a34099d 100644 --- a/mumble.spec +++ b/mumble.spec @@ -228,7 +228,7 @@ sed \ install -d -m 0755 %{buildroot}%{_datadir}/mumble/translations install -p -m 0644 %{_vpath_builddir}/src/mumble/*.qm %{buildroot}%{_datadir}/mumble/translations
-install -D -p -m 0664 scripts/murmur.ini %{buildroot}%{_sysconfdir}/murmur/murmur.ini +install -D -p -m 0664 scripts/murmur.ini %{buildroot}%{_sysconfdir}/murmur.ini install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/murmur.service install -D -p -m 0755 scripts/mumble-server-user-wrapper %{buildroot}%{_bindir}/mumble-server-user-wrapper
@@ -238,7 +238,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/mumble-server/ # compatibility symlinks mkdir -p %{buildroot}%{_sbindir} ln -s %{_bindir}/mumble-server %{buildroot}%{_sbindir}/murmurd -ln -s murmur/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini +mkdir -p %{buildroot}%{_sysconfdir}/murmur +ln -s %{_sysconfdir}/murmur.ini %{buildroot}%{_sysconfdir}/murmur/murmur.ini +ln -s %{_sysconfdir}/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini
%check @@ -247,6 +249,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.mumble_voip.mumbl
%pre -n murmur +# relocation of config file +if [ -f %{_sysconfdir}/murmur/murmur.ini ]; then + mv %{_sysconfdir}/murmur/murmur.ini %{_sysconfdir}/murmur.ini +fi + getent group mumble-server >/dev/null || groupadd -r mumble-server getent passwd mumble-server >/dev/null || \ useradd -r -g mumble-server -d %{_localstatedir}/lib/mumble-server/ -s /sbin/nologin \ @@ -290,7 +297,8 @@ exit 0 %{_mandir}/man1/mumble-server-user-wrapper.1* %{_sbindir}/murmurd %{_unitdir}/murmur.service -%config(noreplace) %attr(664,mumble-server,mumble-server) %{_sysconfdir}/murmur/murmur.ini +%config(noreplace) %attr(664,mumble-server,mumble-server) %{_sysconfdir}/murmur.ini +%{_sysconfdir}/murmur/murmur.ini %{_sysconfdir}/mumble-server.ini %dir %attr(-,mumble-server,mumble-server) %{_localstatedir}/lib/mumble-server/
@@ -309,6 +317,7 @@ exit 0 %changelog * Tue Aug 09 2022 Carl George carl@george.computer - 1.4.230-1 - Latest upstream, resolves rhbz#2036444 +- Move murmur config file from /etc/murmur/murmur.ini to /etc/murmur.ini
* Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/murmur.service b/murmur.service index 440500c..d6b3b1d 100644 --- a/murmur.service +++ b/murmur.service @@ -7,7 +7,7 @@ After=network.target User=mumble-server Group=mumble-server Type=exec -ExecStart=/usr/bin/mumble-server -fg -ini /etc/murmur/murmur.ini +ExecStart=/usr/bin/mumble-server -fg -ini /etc/murmur.ini Restart=always PrivateDevices=true PrivateTmp=true
commit 89615466e8a7839848b0222fc84d37ca01289a64 Author: Carl George carl@george.computer Date: Tue Aug 9 19:47:16 2022 -0500
Latest upstream, resolves rhbz#2036444
diff --git a/0001-Added-DBus-calls-to-activate-and-deactivate-push-to-talk.patch b/0001-Added-DBus-calls-to-activate-and-deactivate-push-to-talk.patch deleted file mode 100644 index 151cbb3..0000000 --- a/0001-Added-DBus-calls-to-activate-and-deactivate-push-to-talk.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 03dbea56f650bba4f1aa0c54d02b6e8c3639d04f Mon Sep 17 00:00:00 2001 -From: Robby Zampino robozman@gmail.com -Date: Mon, 22 Apr 2019 22:04:36 -0600 -Subject: [PATCH] Added DBus calls to activate and deactivate push to talk - ---- - src/mumble/DBus.cpp | 8 ++++++++ - src/mumble/DBus.h | 2 ++ - 2 files changed, 10 insertions(+) - -diff --git a/src/mumble/DBus.cpp b/src/mumble/DBus.cpp -index 6fcde04b..5260e1b2 100644 ---- a/src/mumble/DBus.cpp -+++ b/src/mumble/DBus.cpp -@@ -97,3 +97,11 @@ bool MumbleDBus::isSelfMuted() { - bool MumbleDBus::isSelfDeaf() { - return g.s.bDeaf; - } -+ -+void MumbleDBus::startTalking() { -+ g.mw->on_PushToTalk_triggered(true, QVariant()); -+} -+ -+void MumbleDBus::stopTalking () { -+ g.mw->on_PushToTalk_triggered(false, QVariant()); -+} -diff --git a/src/mumble/DBus.h b/src/mumble/DBus.h -index 1505017c..bd28e5f0 100644 ---- a/src/mumble/DBus.h -+++ b/src/mumble/DBus.h -@@ -28,6 +28,8 @@ class MumbleDBus : public QDBusAbstractAdaptor { - void setSelfDeaf(bool deafen); - bool isSelfMuted(); - bool isSelfDeaf(); -+ void startTalking(); -+ void stopTalking(); - }; - - #endif --- -2.26.2 - diff --git a/0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch b/0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch new file mode 100644 index 0000000..3615182 --- /dev/null +++ b/0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch @@ -0,0 +1,555 @@ +From 026d36eba37cd3611f19002def92a92275009ebf Mon Sep 17 00:00:00 2001 +From: Terry Geng terry@terriex.com +Date: Mon, 6 Dec 2021 10:45:11 -0500 +Subject: [PATCH 1/9] BUILD(crypto): Migrate to OpenSSL 3.0-compatible API + +OpenSSL 3.0 deprecated several low-level APIs and the usage of them +caused errors/warnings that prevent the binary from being built against +OpenSSL 3.0. +Some primitive efforts have been made in #5317 but were incomplete. +This commit follows https://www.openssl.org/docs/man3.0/man7/migration_guide.html, +https://code.woboq.org/qt6/qtopcua/src/opcua/x509/qopcuakeypair_openssl.cpp...., +and clears all errors/warnings related to the usage of deprecated APIs. + +Fixes #5277 +Fixes #4266 + +(cherry picked from commit f4cea62ed95e4967d8591f25e903f5e8fc2e2a30) +--- + src/SelfSignedCertificate.cpp | 235 +++++++++++----------------------- + src/SelfSignedCertificate.h | 5 + + src/crypto/CryptStateOCB2.cpp | 53 +++++--- + src/crypto/CryptStateOCB2.h | 9 +- + 4 files changed, 121 insertions(+), 181 deletions(-) + +diff --git a/src/SelfSignedCertificate.cpp b/src/SelfSignedCertificate.cpp +index a77e5fad9..ea0dec4cc 100644 +--- a/src/SelfSignedCertificate.cpp ++++ b/src/SelfSignedCertificate.cpp +@@ -5,8 +5,6 @@ + + #include "SelfSignedCertificate.h" + +-#include <openssl/x509v3.h> +- + #define SSL_STRING(x) QString::fromLatin1(x).toUtf8().data() + + static int add_ext(X509 *crt, int nid, char *value) { +@@ -28,108 +26,86 @@ static int add_ext(X509 *crt, int nid, char *value) { + return 1; + } + +-bool SelfSignedCertificate::generate(CertificateType certificateType, QString clientCertName, QString clientCertEmail, +- QSslCertificate &qscCert, QSslKey &qskKey) { +- bool ok = true; +- X509 *x509 = nullptr; +- EVP_PKEY *pkey = nullptr; +- RSA *rsa = nullptr; +- BIGNUM *e = nullptr; +- X509_NAME *name = nullptr; +- ASN1_INTEGER *serialNumber = nullptr; +- ASN1_TIME *notBefore = nullptr; +- ASN1_TIME *notAfter = nullptr; +- QString commonName; +- bool isServerCert = certificateType == CertificateTypeServerCertificate; +- +- if (CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) == -1) { +- ok = false; +- goto out; ++EVP_PKEY *SelfSignedCertificate::generate_rsa_keypair() { ++ EVP_PKEY *pkey = EVP_PKEY_new(); ++ if (!pkey) { ++ return nullptr; + } + +- x509 = X509_new(); +- if (!x509) { +- ok = false; +- goto out; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr); ++ if (!ctx) { ++ return nullptr; + } +- +- pkey = EVP_PKEY_new(); +- if (!pkey) { +- ok = false; +- goto out; ++ if (EVP_PKEY_keygen_init(ctx) <= 0) { ++ return nullptr; + } +- +- rsa = RSA_new(); ++ if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, 2048) <= 0) { ++ return nullptr; ++ } ++ if (EVP_PKEY_keygen(ctx, &pkey) <= 0) { ++ return nullptr; ++ } ++ EVP_PKEY_CTX_free(ctx); ++#else ++ RSA *rsa = RSA_new(); ++ BIGNUM *e = BN_new(); + if (!rsa) { +- ok = false; +- goto out; ++ return nullptr; + } +- +- e = BN_new(); + if (!e) { +- ok = false; +- goto out; ++ return nullptr; + } + if (BN_set_word(e, 65537) == 0) { +- ok = false; +- goto out; ++ return nullptr; + } +- + if (RSA_generate_key_ex(rsa, 2048, e, nullptr) == 0) { +- ok = false; +- goto out; ++ return nullptr; + } +- + if (EVP_PKEY_assign_RSA(pkey, rsa) == 0) { +- ok = false; +- goto out; ++ return nullptr; + } ++ BN_free(e); ++ RSA_free(rsa); ++#endif ++ return pkey; ++} + +- if (X509_set_version(x509, 2) == 0) { +- ok = false; +- goto out; ++#define CHECK(statement) \ ++ if (!(statement)) { \ ++ ok = false; \ ++ goto out; \ + } + +- serialNumber = X509_get_serialNumber(x509); +- if (!serialNumber) { +- ok = false; +- goto out; +- } +- if (ASN1_INTEGER_set(serialNumber, 1) == 0) { +- ok = false; +- goto out; +- } + +- notBefore = X509_get_notBefore(x509); +- if (!notBefore) { +- ok = false; +- goto out; +- } +- if (!X509_gmtime_adj(notBefore, 0)) { +- ok = false; +- goto out; +- } ++bool SelfSignedCertificate::generate(CertificateType certificateType, QString clientCertName, QString clientCertEmail, ++ QSslCertificate &qscCert, QSslKey &qskKey) { ++ bool ok = true; ++ EVP_PKEY *pkey = nullptr; ++ X509 *x509 = nullptr; ++ X509_NAME *name = nullptr; ++ ASN1_INTEGER *serialNumber = nullptr; ++ ASN1_TIME *notBefore = nullptr; ++ ASN1_TIME *notAfter = nullptr; ++ QString commonName; ++ bool isServerCert = certificateType == CertificateTypeServerCertificate; + +- notAfter = X509_get_notAfter(x509); +- if (!notAfter) { +- ok = false; +- goto out; +- } +- if (!X509_gmtime_adj(notAfter, 60 * 60 * 24 * 365 * 20)) { +- ok = false; +- goto out; +- } ++ // In Qt 5.15, a class was added to wrap up the procedures of generating a self-signed certificate. ++ // See https://doc.qt.io/qt-5/qopcuax509certificatesigningrequest.html. ++ // We should consider migrating to this class after switching to Qt 5.15. + +- if (X509_set_pubkey(x509, pkey) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(pkey = generate_rsa_keypair()); + +- name = X509_get_subject_name(x509); +- if (!name) { +- ok = false; +- goto out; +- } ++ CHECK(x509 = X509_new()); ++ CHECK(X509_set_version(x509, 2)); ++ CHECK(serialNumber = X509_get_serialNumber(x509)); ++ CHECK(ASN1_INTEGER_set(serialNumber, 1)); ++ CHECK(notBefore = X509_get_notBefore(x509)); ++ CHECK(X509_gmtime_adj(notBefore, 0)); ++ CHECK(notAfter = X509_get_notAfter(x509)); ++ CHECK(X509_gmtime_adj(notAfter, 60 * 60 * 24 * 365 * 20)) ++ CHECK(X509_set_pubkey(x509, pkey)); ++ CHECK(name = X509_get_subject_name(x509)); + + if (isServerCert) { + commonName = QLatin1String("Murmur Autogenerated Certificate v2"); +@@ -141,120 +117,63 @@ bool SelfSignedCertificate::generate(CertificateType certificateType, QString cl + } + } + +- if (X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_UTF8, +- reinterpret_cast< unsigned char * >(commonName.toUtf8().data()), -1, -1, 0) +- == 0) { +- ok = false; +- goto out; +- } ++ CHECK(X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_UTF8, ++ reinterpret_cast< unsigned char * >(commonName.toUtf8().data()), -1, -1, 0)); + +- if (X509_set_issuer_name(x509, name) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(X509_set_issuer_name(x509, name)); + +- if (add_ext(x509, NID_basic_constraints, SSL_STRING("critical,CA:FALSE")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_basic_constraints, SSL_STRING("critical,CA:FALSE"))); + + if (isServerCert) { +- if (add_ext(x509, NID_ext_key_usage, SSL_STRING("serverAuth,clientAuth")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_ext_key_usage, SSL_STRING("serverAuth,clientAuth"))) + } else { +- if (add_ext(x509, NID_ext_key_usage, SSL_STRING("clientAuth")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_ext_key_usage, SSL_STRING("clientAuth"))); + } + +- if (add_ext(x509, NID_subject_key_identifier, SSL_STRING("hash")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_subject_key_identifier, SSL_STRING("hash"))); + + if (isServerCert) { +- if (add_ext(x509, NID_netscape_comment, SSL_STRING("Generated from murmur")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_netscape_comment, SSL_STRING("Generated from murmur"))); + } else { +- if (add_ext(x509, NID_netscape_comment, SSL_STRING("Generated by Mumble")) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_netscape_comment, SSL_STRING("Generated by Mumble"))); + } + + if (!isServerCert) { + if (!clientCertEmail.trimmed().isEmpty()) { +- if (add_ext(x509, NID_subject_alt_name, +- QString::fromLatin1("email:%1").arg(clientCertEmail).toUtf8().data()) +- == 0) { +- ok = false; +- goto out; +- } ++ CHECK(add_ext(x509, NID_subject_alt_name, ++ QString::fromLatin1("email:%1").arg(clientCertEmail).toUtf8().data())); + } + } + +- if (X509_sign(x509, pkey, EVP_sha1()) == 0) { +- ok = false; +- goto out; +- } ++ CHECK(X509_sign(x509, pkey, EVP_sha1())); + + { + QByteArray crt; + int len = i2d_X509(x509, nullptr); +- if (len <= 0) { +- ok = false; +- goto out; +- } ++ CHECK(len > 0); + crt.resize(len); + + unsigned char *dptr = reinterpret_cast< unsigned char * >(crt.data()); +- if (i2d_X509(x509, &dptr) != len) { +- ok = false; +- goto out; +- } ++ CHECK(i2d_X509(x509, &dptr) == len); + + qscCert = QSslCertificate(crt, QSsl::Der); +- if (qscCert.isNull()) { +- ok = false; +- goto out; +- } ++ CHECK(!qscCert.isNull()); + } + + { + QByteArray key; + int len = i2d_PrivateKey(pkey, nullptr); +- if (len <= 0) { +- ok = false; +- goto out; +- } ++ CHECK(len > 0); + key.resize(len); + + unsigned char *dptr = reinterpret_cast< unsigned char * >(key.data()); +- if (i2d_PrivateKey(pkey, &dptr) != len) { +- ok = false; +- goto out; +- } ++ CHECK(i2d_PrivateKey(pkey, &dptr) == len); + + qskKey = QSslKey(key, QSsl::Rsa, QSsl::Der); +- if (qskKey.isNull()) { +- ok = false; +- goto out; +- } ++ CHECK(!qskKey.isNull()); + } + + out: +- if (e) { +- BN_free(e); +- } +- // We only need to free the pkey pointer, +- // not the RSA pointer. We have assigned +- // our RSA key to pkey, and it will be freed +- // once we free pkey. + if (pkey) { + EVP_PKEY_free(pkey); + } +diff --git a/src/SelfSignedCertificate.h b/src/SelfSignedCertificate.h +index b85a8752b..7c5f59e9c 100644 +--- a/src/SelfSignedCertificate.h ++++ b/src/SelfSignedCertificate.h +@@ -6,6 +6,10 @@ + #ifndef MUMBLE_SELFSIGNEDCERTIFICATE_H_ + #define MUMBLE_SELFSIGNEDCERTIFICATE_H_ + ++#include <openssl/evp.h> ++#include <openssl/rsa.h> ++#include <openssl/x509v3.h> ++ + #include <QtCore/QString> + #include <QtNetwork/QSslCertificate> + #include <QtNetwork/QSslKey> +@@ -16,6 +20,7 @@ class SelfSignedCertificate { + private: + static bool generate(CertificateType certificateType, QString clientCertName, QString clientCertEmail, + QSslCertificate &qscCert, QSslKey &qskKey); ++ static EVP_PKEY *generate_rsa_keypair(); + + public: + static bool generateMumbleCertificate(QString name, QString email, QSslCertificate &qscCert, QSslKey &qskKey); +diff --git a/src/crypto/CryptStateOCB2.cpp b/src/crypto/CryptStateOCB2.cpp +index 2176d6488..640fdedac 100644 +--- a/src/crypto/CryptStateOCB2.cpp ++++ b/src/crypto/CryptStateOCB2.cpp +@@ -30,7 +30,7 @@ + #include <cstring> + #include <openssl/rand.h> + +-CryptStateOCB2::CryptStateOCB2() : CryptState() { ++CryptStateOCB2::CryptStateOCB2() : CryptState(), enc_ctx(EVP_CIPHER_CTX_new()), dec_ctx(EVP_CIPHER_CTX_new()) { + for (int i = 0; i < 0x100; i++) + decrypt_history[i] = 0; + memset(raw_key, 0, AES_KEY_SIZE_BYTES); +@@ -38,6 +38,11 @@ CryptStateOCB2::CryptStateOCB2() : CryptState() { + memset(decrypt_iv, 0, AES_BLOCK_SIZE); + } + ++CryptStateOCB2::~CryptStateOCB2() noexcept { ++ EVP_CIPHER_CTX_free(enc_ctx); ++ EVP_CIPHER_CTX_free(dec_ctx); ++} ++ + bool CryptStateOCB2::isValid() const { + return bInit; + } +@@ -46,8 +51,6 @@ void CryptStateOCB2::genKey() { + CryptographicRandom::fillBuffer(raw_key, AES_KEY_SIZE_BYTES); + CryptographicRandom::fillBuffer(encrypt_iv, AES_BLOCK_SIZE); + CryptographicRandom::fillBuffer(decrypt_iv, AES_BLOCK_SIZE); +- AES_set_encrypt_key(raw_key, AES_KEY_SIZE_BITS, &encrypt_key); +- AES_set_decrypt_key(raw_key, AES_KEY_SIZE_BITS, &decrypt_key); + bInit = true; + } + +@@ -56,8 +59,6 @@ bool CryptStateOCB2::setKey(const std::string &rkey, const std::string &eiv, con + memcpy(raw_key, rkey.data(), AES_KEY_SIZE_BYTES); + memcpy(encrypt_iv, eiv.data(), AES_BLOCK_SIZE); + memcpy(decrypt_iv, div.data(), AES_BLOCK_SIZE); +- AES_set_encrypt_key(raw_key, AES_KEY_SIZE_BITS, &encrypt_key); +- AES_set_decrypt_key(raw_key, AES_KEY_SIZE_BITS, &decrypt_key); + bInit = true; + return true; + } +@@ -256,10 +257,24 @@ static void inline ZERO(keyblock &block) { + block[i] = 0; + } + +-#define AESencrypt(src, dst, key) \ +- AES_encrypt(reinterpret_cast< const unsigned char * >(src), reinterpret_cast< unsigned char * >(dst), key); +-#define AESdecrypt(src, dst, key) \ +- AES_decrypt(reinterpret_cast< const unsigned char * >(src), reinterpret_cast< unsigned char * >(dst), key); ++#define AESencrypt(src, dst, key) \ ++ { \ ++ int outlen = 0; \ ++ EVP_EncryptInit_ex(enc_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ ++ EVP_CIPHER_CTX_set_padding(enc_ctx, 0); \ ++ EVP_EncryptUpdate(enc_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ ++ reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ ++ EVP_EncryptFinal_ex(enc_ctx, reinterpret_cast< unsigned char * >(dst + outlen), &outlen); \ ++ } ++#define AESdecrypt(src, dst, key) \ ++ { \ ++ int outlen = 0; \ ++ EVP_DecryptInit_ex(dec_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ ++ EVP_CIPHER_CTX_set_padding(dec_ctx, 0); \ ++ EVP_DecryptUpdate(dec_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ ++ reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ ++ EVP_DecryptFinal_ex(dec_ctx, reinterpret_cast< unsigned char * >(dst + outlen), &outlen); \ ++ } + + bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encrypted, unsigned int len, + const unsigned char *nonce, unsigned char *tag, bool modifyPlainOnXEXStarAttack) { +@@ -267,7 +282,7 @@ bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encr + bool success = true; + + // Initialize +- AESencrypt(nonce, delta, &encrypt_key); ++ AESencrypt(nonce, delta, raw_key); + ZERO(checksum); + + while (len > AES_BLOCK_SIZE) { +@@ -299,7 +314,7 @@ bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encr + if (flipABit) { + *reinterpret_cast< unsigned char * >(tmp) ^= 1; + } +- AESencrypt(tmp, tmp, &encrypt_key); ++ AESencrypt(tmp, tmp, raw_key); + XOR(reinterpret_cast< subblock * >(encrypted), delta, tmp); + XOR(checksum, checksum, reinterpret_cast< const subblock * >(plain)); + if (flipABit) { +@@ -315,7 +330,7 @@ bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encr + ZERO(tmp); + tmp[BLOCKSIZE - 1] = SWAPPED(len * 8); + XOR(tmp, tmp, delta); +- AESencrypt(tmp, pad, &encrypt_key); ++ AESencrypt(tmp, pad, raw_key); + memcpy(tmp, plain, len); + memcpy(reinterpret_cast< unsigned char * >(tmp) + len, reinterpret_cast< const unsigned char * >(pad) + len, + AES_BLOCK_SIZE - len); +@@ -325,7 +340,7 @@ bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encr + + S3(delta); + XOR(tmp, delta, checksum); +- AESencrypt(tmp, tag, &encrypt_key); ++ AESencrypt(tmp, tag, raw_key); + + return success; + } +@@ -336,13 +351,13 @@ bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char * + bool success = true; + + // Initialize +- AESencrypt(nonce, delta, &encrypt_key); ++ AESencrypt(nonce, delta, raw_key); + ZERO(checksum); + + while (len > AES_BLOCK_SIZE) { + S2(delta); + XOR(tmp, delta, reinterpret_cast< const subblock * >(encrypted)); +- AESdecrypt(tmp, tmp, &decrypt_key); ++ AESdecrypt(tmp, tmp, raw_key); + XOR(reinterpret_cast< subblock * >(plain), delta, tmp); + XOR(checksum, checksum, reinterpret_cast< const subblock * >(plain)); + len -= AES_BLOCK_SIZE; +@@ -354,7 +369,7 @@ bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char * + ZERO(tmp); + tmp[BLOCKSIZE - 1] = SWAPPED(len * 8); + XOR(tmp, tmp, delta); +- AESencrypt(tmp, pad, &encrypt_key); ++ AESencrypt(tmp, pad, raw_key); + memset(tmp, 0, AES_BLOCK_SIZE); + memcpy(tmp, encrypted, len); + XOR(tmp, tmp, pad); +@@ -372,7 +387,7 @@ bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char * + + S3(delta); + XOR(tmp, delta, checksum); +- AESencrypt(tmp, tag, &encrypt_key); ++ AESencrypt(tmp, tag, raw_key); + + return success; + } +@@ -381,5 +396,5 @@ bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char * + #undef SHIFTBITS + #undef SWAPPED + #undef HIGHBIT +-#undef AES_encrypt +-#undef AES_decrypt ++#undef AESencrypt ++#undef AESdecrypt +diff --git a/src/crypto/CryptStateOCB2.h b/src/crypto/CryptStateOCB2.h +index 53d4b4b6a..cc3f1c0bc 100644 +--- a/src/crypto/CryptStateOCB2.h ++++ b/src/crypto/CryptStateOCB2.h +@@ -8,8 +8,9 @@ + + #include "CryptState.h" + +-#include <openssl/aes.h> ++#include <openssl/evp.h> + ++#define AES_BLOCK_SIZE 16 + #define AES_KEY_SIZE_BITS 128 + #define AES_KEY_SIZE_BYTES (AES_KEY_SIZE_BITS / 8) + +@@ -17,7 +18,7 @@ + class CryptStateOCB2 : public CryptState { + public: + CryptStateOCB2(); +- ~CryptStateOCB2(){}; ++ ~CryptStateOCB2() noexcept override; + + virtual bool isValid() const Q_DECL_OVERRIDE; + virtual void genKey() Q_DECL_OVERRIDE; +@@ -43,8 +44,8 @@ private: + unsigned char decrypt_iv[AES_BLOCK_SIZE]; + unsigned char decrypt_history[0x100]; + +- AES_KEY encrypt_key; +- AES_KEY decrypt_key; ++ EVP_CIPHER_CTX *enc_ctx; ++ EVP_CIPHER_CTX *dec_ctx; + }; + + +-- +2.35.3 + diff --git a/0001-FIX-client-Update-rnnoise-src-submodule.patch b/0001-FIX-client-Update-rnnoise-src-submodule.patch deleted file mode 100644 index 5c2b866..0000000 --- a/0001-FIX-client-Update-rnnoise-src-submodule.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 503c2b8c41161abd35813f9cec9723059da1d841 Mon Sep 17 00:00:00 2001 -From: Davide Beatrici git@davidebeatrici.dev -Date: Thu, 11 Mar 2021 20:19:42 +0100 -Subject: [PATCH] FIX(client): Update rnnoise-src submodule - -This fixes a heap corruption that was originally discovered by PaulDana on #mumble-dev. - -In addition to that, all upstream changes are integrated. - -Fixes #4842. ---- - src/mumble/AudioInput.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/mumble/AudioInput.cpp b/src/mumble/AudioInput.cpp -index e3b631af6..646d9f357 100644 ---- a/src/mumble/AudioInput.cpp -+++ b/src/mumble/AudioInput.cpp -@@ -106,7 +106,7 @@ AudioInput::AudioInput() : opusBuffer(g.s.iFramesPerPacket * (SAMPLE_RATE / 100) - #endif - - #ifdef USE_RNNOISE -- denoiseState = rnnoise_create(); -+ denoiseState = rnnoise_create(nullptr); - #endif - - qWarning("AudioInput: %d bits/s, %d hz, %d sample", iAudioQuality, iSampleRate, iFrameSize); --- -2.30.2 - diff --git a/0002-FIX-crypto-Sharing-EVP-context-between-threads-crush.patch b/0002-FIX-crypto-Sharing-EVP-context-between-threads-crush.patch new file mode 100644 index 0000000..b696d62 --- /dev/null +++ b/0002-FIX-crypto-Sharing-EVP-context-between-threads-crush.patch @@ -0,0 +1,140 @@ +From f904130935f251e246fa6a5e62c146e3dc494ab0 Mon Sep 17 00:00:00 2001 +From: Terry Geng terry@terriex.com +Date: Sun, 12 Dec 2021 22:39:38 -0500 +Subject: [PATCH 2/9] FIX(crypto): Sharing EVP context between threads crushes + Mumble + +Functions ocb_encrypt and ocb_decrypt share the same set +of encrypt and decrypt contexts. However, they are invoked +in different threads (audio input thread and server +handler thread). +This may lead to conflicts that would crash Mumble. +This patch separates contexts used in these two functions +to avoid such conflicts. + +Fixes #5361 + +(cherry picked from commit f8d47db318f302f5a7d343f15c9936c7030c49c4) +--- + src/crypto/CryptStateOCB2.cpp | 55 ++++++++++++++++++++++------------- + src/crypto/CryptStateOCB2.h | 6 ++-- + 2 files changed, 38 insertions(+), 23 deletions(-) + +diff --git a/src/crypto/CryptStateOCB2.cpp b/src/crypto/CryptStateOCB2.cpp +index 640fdedac..3b3473ffe 100644 +--- a/src/crypto/CryptStateOCB2.cpp ++++ b/src/crypto/CryptStateOCB2.cpp +@@ -30,7 +30,9 @@ + #include <cstring> + #include <openssl/rand.h> + +-CryptStateOCB2::CryptStateOCB2() : CryptState(), enc_ctx(EVP_CIPHER_CTX_new()), dec_ctx(EVP_CIPHER_CTX_new()) { ++CryptStateOCB2::CryptStateOCB2() ++ : CryptState(), enc_ctx_ocb_enc(EVP_CIPHER_CTX_new()), dec_ctx_ocb_enc(EVP_CIPHER_CTX_new()), ++ enc_ctx_ocb_dec(EVP_CIPHER_CTX_new()), dec_ctx_ocb_dec(EVP_CIPHER_CTX_new()) { + for (int i = 0; i < 0x100; i++) + decrypt_history[i] = 0; + memset(raw_key, 0, AES_KEY_SIZE_BYTES); +@@ -39,8 +41,10 @@ CryptStateOCB2::CryptStateOCB2() : CryptState(), enc_ctx(EVP_CIPHER_CTX_new()), + } + + CryptStateOCB2::~CryptStateOCB2() noexcept { +- EVP_CIPHER_CTX_free(enc_ctx); +- EVP_CIPHER_CTX_free(dec_ctx); ++ EVP_CIPHER_CTX_free(enc_ctx_ocb_enc); ++ EVP_CIPHER_CTX_free(dec_ctx_ocb_enc); ++ EVP_CIPHER_CTX_free(enc_ctx_ocb_dec); ++ EVP_CIPHER_CTX_free(dec_ctx_ocb_dec); + } + + bool CryptStateOCB2::isValid() const { +@@ -257,25 +261,28 @@ static void inline ZERO(keyblock &block) { + block[i] = 0; + } + +-#define AESencrypt(src, dst, key) \ +- { \ +- int outlen = 0; \ +- EVP_EncryptInit_ex(enc_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ +- EVP_CIPHER_CTX_set_padding(enc_ctx, 0); \ +- EVP_EncryptUpdate(enc_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ +- reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ +- EVP_EncryptFinal_ex(enc_ctx, reinterpret_cast< unsigned char * >(dst + outlen), &outlen); \ ++#define AESencrypt_ctx(src, dst, key, enc_ctx) \ ++ { \ ++ int outlen = 0; \ ++ EVP_EncryptInit_ex(enc_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ ++ EVP_CIPHER_CTX_set_padding(enc_ctx, 0); \ ++ EVP_EncryptUpdate(enc_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ ++ reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ ++ EVP_EncryptFinal_ex(enc_ctx, reinterpret_cast< unsigned char * >((dst) + outlen), &outlen); \ + } +-#define AESdecrypt(src, dst, key) \ +- { \ +- int outlen = 0; \ +- EVP_DecryptInit_ex(dec_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ +- EVP_CIPHER_CTX_set_padding(dec_ctx, 0); \ +- EVP_DecryptUpdate(dec_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ +- reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ +- EVP_DecryptFinal_ex(dec_ctx, reinterpret_cast< unsigned char * >(dst + outlen), &outlen); \ ++#define AESdecrypt_ctx(src, dst, key, dec_ctx) \ ++ { \ ++ int outlen = 0; \ ++ EVP_DecryptInit_ex(dec_ctx, EVP_aes_128_ecb(), NULL, key, NULL); \ ++ EVP_CIPHER_CTX_set_padding(dec_ctx, 0); \ ++ EVP_DecryptUpdate(dec_ctx, reinterpret_cast< unsigned char * >(dst), &outlen, \ ++ reinterpret_cast< const unsigned char * >(src), AES_BLOCK_SIZE); \ ++ EVP_DecryptFinal_ex(dec_ctx, reinterpret_cast< unsigned char * >((dst) + outlen), &outlen); \ + } + ++#define AESencrypt(src, dst, key) AESencrypt_ctx(src, dst, key, enc_ctx_ocb_enc) ++#define AESdecrypt(src, dst, key) AESdecrypt_ctx(src, dst, key, dec_ctx_ocb_enc) ++ + bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encrypted, unsigned int len, + const unsigned char *nonce, unsigned char *tag, bool modifyPlainOnXEXStarAttack) { + keyblock checksum, delta, tmp, pad; +@@ -345,6 +352,12 @@ bool CryptStateOCB2::ocb_encrypt(const unsigned char *plain, unsigned char *encr + return success; + } + ++#undef AESencrypt ++#undef AESdecrypt ++ ++#define AESencrypt(src, dst, key) AESencrypt_ctx(src, dst, key, enc_ctx_ocb_dec) ++#define AESdecrypt(src, dst, key) AESdecrypt_ctx(src, dst, key, dec_ctx_ocb_dec) ++ + bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char *plain, unsigned int len, + const unsigned char *nonce, unsigned char *tag) { + keyblock checksum, delta, tmp, pad; +@@ -392,9 +405,9 @@ bool CryptStateOCB2::ocb_decrypt(const unsigned char *encrypted, unsigned char * + return success; + } + ++#undef AESencrypt ++#undef AESdecrypt + #undef BLOCKSIZE + #undef SHIFTBITS + #undef SWAPPED + #undef HIGHBIT +-#undef AESencrypt +-#undef AESdecrypt +diff --git a/src/crypto/CryptStateOCB2.h b/src/crypto/CryptStateOCB2.h +index cc3f1c0bc..0fd3000ad 100644 +--- a/src/crypto/CryptStateOCB2.h ++++ b/src/crypto/CryptStateOCB2.h +@@ -44,8 +44,10 @@ private: + unsigned char decrypt_iv[AES_BLOCK_SIZE]; + unsigned char decrypt_history[0x100]; + +- EVP_CIPHER_CTX *enc_ctx; +- EVP_CIPHER_CTX *dec_ctx; ++ EVP_CIPHER_CTX *enc_ctx_ocb_enc; ++ EVP_CIPHER_CTX *dec_ctx_ocb_enc; ++ EVP_CIPHER_CTX *enc_ctx_ocb_dec; ++ EVP_CIPHER_CTX *dec_ctx_ocb_dec; + }; + + +-- +2.35.3 + diff --git a/0003-FIX-client-Fix-PipeWire-not-being-usable-in-Flatpaks.patch b/0003-FIX-client-Fix-PipeWire-not-being-usable-in-Flatpaks.patch new file mode 100644 index 0000000..8511f28 --- /dev/null +++ b/0003-FIX-client-Fix-PipeWire-not-being-usable-in-Flatpaks.patch @@ -0,0 +1,41 @@ +From fbce11400cdb8141301df22ab6143e3571f1b090 Mon Sep 17 00:00:00 2001 +From: Gert Gert-dev@users.noreply.github.com +Date: Thu, 27 Jan 2022 20:38:08 +0100 +Subject: [PATCH 3/9] FIX(client): Fix PipeWire not being usable in Flatpaks + +PipeWire is correctly built and enabled in a Flatpak runtime, but does +not properly intialize because the .so filename of the library is named +slightly differently there. + +See also https://github.com/flathub/info.mumble.Mumble/issues/19#issuecomment-1023001... + +(cherry picked from commit 29eb97cf1defd6fce90fe5db5df4879663aceea6) +(cherry picked from commit 200e6ee7536bf4804ab221ba5a96aee73956f8e8) +--- + src/mumble/PipeWire.cpp | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/mumble/PipeWire.cpp b/src/mumble/PipeWire.cpp +index 79f5a9483..a06087585 100644 +--- a/src/mumble/PipeWire.cpp ++++ b/src/mumble/PipeWire.cpp +@@ -128,7 +128,15 @@ void PipeWireInit::destroy() { + static PipeWireInit pwi; + + PipeWireSystem::PipeWireSystem() : m_ok(false), m_users(0) { +- const QStringList names{ "libpipewire.so", "libpipewire-0.3.so" }; ++ // clang-format off ++ const QStringList names { ++ // Common names used by Linux distributions. ++ "libpipewire.so", ++ "libpipewire-0.3.so", ++ // Name used by the Flatpak FreeDesktop runtime. ++ "libpipewire-0.3.so.0" ++ }; ++ // clang-format on + + for (const auto &name : names) { + m_lib.setFileName(name); +-- +2.35.3 + diff --git a/0004-BUILD-positional-audio-Fix-missing-memory-include.patch b/0004-BUILD-positional-audio-Fix-missing-memory-include.patch new file mode 100644 index 0000000..6150f7f --- /dev/null +++ b/0004-BUILD-positional-audio-Fix-missing-memory-include.patch @@ -0,0 +1,39 @@ +From ed84e5f2e23a1eaef440ffd05a905d9f18d6bbb7 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich slyich@gmail.com +Date: Sun, 27 Feb 2022 10:59:57 +0000 +Subject: [PATCH 4/9] BUILD(positional-audio): Fix missing <memory> include + +Without the change the build fails on upcoming gcc-12 as: + + /build/mumble/plugins/gtav/gtav.cpp:13:13: + error: 'unique_ptr' in namespace 'std' does not name a template type + 13 | static std::unique_ptr< Game > game; + | ^~~~~~~~~~ + /build/mumble/plugins/gtav/gtav.cpp:12:1: + note: 'std::unique_ptr' is defined in header '<memory>'; + did you forget to '#include <memory>'? + 11 | #include <cstring> + +++ |+#include <memory> + 12 | + +(cherry picked from commit 36398fb3b293fc889bbc38df29665359f5c2a0ca) +(cherry picked from commit a2a2aabdf535cb7f09dfa1c2d4e10566246b06a9) +--- + plugins/gtav/gtav.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/gtav/gtav.cpp b/plugins/gtav/gtav.cpp +index 0402f65b6..9134c5e57 100644 +--- a/plugins/gtav/gtav.cpp ++++ b/plugins/gtav/gtav.cpp +@@ -9,6 +9,7 @@ + #include "mumble_positional_audio_utils.h" + + #include <cstring> ++#include <memory> + + static std::unique_ptr< Game > game; + +-- +2.35.3 + diff --git a/0005-BUILD-client-RNNoise-Support-linking-against-the-sys.patch b/0005-BUILD-client-RNNoise-Support-linking-against-the-sys.patch new file mode 100644 index 0000000..8a034a9 --- /dev/null +++ b/0005-BUILD-client-RNNoise-Support-linking-against-the-sys.patch @@ -0,0 +1,108 @@ +From 017dfd5e44b6b322b8ea5e221258d962e7c91041 Mon Sep 17 00:00:00 2001 +From: Klemens Nanni klemens@posteo.de +Date: Thu, 13 Jan 2022 08:52:42 +0100 +Subject: [PATCH 5/9] BUILD(client): RNNoise: Support linking against the + system library + +OS packages (at least on Linux and BSDs) prefer prepackaged libraries to +bundled/statically linked versions where possible. + +Introduce `rnnoise` (default `ON`) and make `bundled-rnnoise` default to +it's value; this retains current behaviour. + +This way, `rnnoise=OFF` disables use of RNNoise completely and a simple +`bundled-rnnoise=OFF` requires the system's library. + +Tested on OpenBSD 7.0-CURRENT. + +(cherry picked from commit 96e644a37d43aa26600e0078836ca686c48d6883) +--- + docs/dev/build-instructions/cmake_options.md | 7 +++- + src/mumble/CMakeLists.txt | 34 ++++++++++++-------- + 2 files changed, 27 insertions(+), 14 deletions(-) + +diff --git a/docs/dev/build-instructions/cmake_options.md b/docs/dev/build-instructions/cmake_options.md +index e86218426..7a710629b 100644 +--- a/docs/dev/build-instructions/cmake_options.md ++++ b/docs/dev/build-instructions/cmake_options.md +@@ -39,6 +39,11 @@ Build the included version of CELT instead of looking for one on the system. + Build the included version of Opus instead of looking for one on the system. + (Default: ON) + ++### bundled-rnnoise ++ ++Build the included version of RNNoise instead of looking for one on the system. ++(Default: ${rnnoise}) ++ + ### bundled-speex + + Build the included version of Speex instead of looking for one on the system. +@@ -196,7 +201,7 @@ Build redacted (outdated) plugins as well + + ### rnnoise + +-Build RNNoise for machine learning noise reduction ++Use RNNoise for machine learning noise reduction. + (Default: ON) + + ### server +diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt +index 8b3293281..4530dc753 100644 +--- a/src/mumble/CMakeLists.txt ++++ b/src/mumble/CMakeLists.txt +@@ -25,7 +25,8 @@ option(bundle-qt-translations "Bundle Qt's translations as well" ${static}) + option(bundled-opus "Build the included version of Opus instead of looking for one on the system." ON) + option(bundled-celt "Build the included version of CELT instead of looking for one on the system." ON) + option(bundled-speex "Build the included version of Speex instead of looking for one on the system." ON) +-option(rnnoise "Build RNNoise for machine learning noise reduction" ON) ++option(rnnoise "Use RNNoise for machine learning noise reduction." ON) ++option(bundled-rnnoise "Build the included version of RNNoise instead of looking for one on the system." ${rnnoise}) + + option(manual-plugin "Include the built-in "manual" positional audio plugin." ON) + +@@ -703,23 +704,30 @@ else() + endif() + + if(rnnoise) +- add_subdirectory("${3RDPARTY_DIR}/rnnoise-build" "${CMAKE_CURRENT_BINARY_DIR}/rnnoise") ++ target_compile_definitions(mumble PRIVATE "USE_RNNOISE") + +- # Disable all warnings that the RNNoise code may emit +- disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/rnnoise-build") ++ if(bundled-rnnoise) ++ add_subdirectory("${3RDPARTY_DIR}/rnnoise-build" "${CMAKE_CURRENT_BINARY_DIR}/rnnoise") + +- target_compile_definitions(mumble PRIVATE "USE_RNNOISE") +- target_link_libraries(mumble PRIVATE rnnoise) ++ # Disable all warnings that the RNNoise code may emit ++ disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/rnnoise-build") + +- if(WIN32) +- # Shared library on Windows (e.g. ".dll") +- set_target_properties(rnnoise PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) ++ target_link_libraries(mumble PRIVATE rnnoise) ++ ++ if(WIN32) ++ # Shared library on Windows (e.g. ".dll") ++ set_target_properties(rnnoise PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) ++ else() ++ # Shared library on UNIX (e.g. ".so") ++ set_target_properties(rnnoise PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) ++ endif() ++ ++ install_library(rnnoise mumble_client) + else() +- # Shared library on UNIX (e.g. ".so") +- set_target_properties(rnnoise PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +- endif() ++ find_pkg(rnnoise REQUIRED) + +- install_library(rnnoise mumble_client) ++ target_link_libraries(mumble PRIVATE ${rnnoise_LIBRARIES}) ++ endif() + endif() + + if(qtspeech) +-- +2.35.3 + diff --git a/0006-MAINT-manpages-Replace-murmur-with-mumble-server.patch b/0006-MAINT-manpages-Replace-murmur-with-mumble-server.patch new file mode 100644 index 0000000..3f40791 --- /dev/null +++ b/0006-MAINT-manpages-Replace-murmur-with-mumble-server.patch @@ -0,0 +1,240 @@ +From 94339ff47431c1134774bc00a5202dd02d739b8a Mon Sep 17 00:00:00 2001 +From: Felix Singer felixsinger@posteo.net +Date: Sun, 6 Feb 2022 22:18:31 +0100 +Subject: [PATCH 6/9] MAINT(manpages): Replace `murmur` with `mumble-server` + +The name `murmur` is deprecated and shouldn't be used anymore, as +decided by the Mumble project. While the server binary already uses the +"new" name, the man pages don't. Thus, rework the man pages so that its +successor `mumble-server` instead `murmur` is used and rename the +filenames of the man pages accordingly. + +Also, rename the script `murmur-user-wrapper` to +`mumble-server-user-wrapper`, since also its man page is renamed. + +Signed-off-by: Felix Singer felixsinger@posteo.net +(cherry picked from commit 9326037e8388cdfd97a4a81ef6a2682bf3d5b67a) +--- + ...wrapper.1 => mumble-server-user-wrapper.1} | 28 +++++----- + man/{murmurd.1 => mumble-server.1} | 52 +++++++++---------- + ...ser-wrapper => mumble-server-user-wrapper} | 0 + src/murmur/CMakeLists.txt | 4 +- + 4 files changed, 42 insertions(+), 42 deletions(-) + rename man/{murmur-user-wrapper.1 => mumble-server-user-wrapper.1} (53%) + rename man/{murmurd.1 => mumble-server.1} (65%) + rename scripts/{murmur-user-wrapper => mumble-server-user-wrapper} (100%) + +diff --git a/man/murmur-user-wrapper.1 b/man/mumble-server-user-wrapper.1 +similarity index 53% +rename from man/murmur-user-wrapper.1 +rename to man/mumble-server-user-wrapper.1 +index fdbdfe2fb..8afd9d70f 100644 +--- a/man/murmur-user-wrapper.1 ++++ b/man/mumble-server-user-wrapper.1 +@@ -1,23 +1,23 @@ +-.TH murmur-user-wrapper 1 "2015 December 27" ++.TH mumble-server-user-wrapper 1 "2015 December 27" + .SH NAME +-murmur-user-wrapper - User wrapper for murmurd. ++mumble-server-user-wrapper - User wrapper for mumble-server. + .SH SYNOPSIS +-.B murmur-user-wrapper ++.B mumble-server-user-wrapper + .RI [ options ] + .SH DESCRIPTION +-Murmur is the server component of Mumble, a low-latency, high quality VoIP +-application. Murmur-wrapper is a wrapper script to make it easier for normal +-users to set up their own, private murmur server. ++mumble-server is the server component of Mumble, a low-latency, high quality VoIP ++application. mumble-server-wrapper is a wrapper script to make it easier for normal ++users to set up their own, private Mumble server. + .SH OPTIONS + .TP + .BI -d \ "directory" + Set directory to use. By default, the wrapper script uses $HOME/murmur + .TP + .B -s +-Check if murmur process is running. ++Check if mumble-server process is running. + .TP + .B -k +-Terminate running murmur process. ++Terminate running mumble-server process. + .TP + .B -i + Initialize only, do not start the server. +@@ -29,26 +29,26 @@ restrictions. + .SH NOTES + To create your own private server, you first want to run + .IP +-murmur-user-wrapper -i ++mumble-server-user-wrapper -i + .LP + Then edit ~/murmur/murmur.ini to set the various configuration settings. The +-most important is probably the port; unless you're the only murmur process ++most important is probably the port; unless you're the only mumble-server process + running on this server, you'll need to change it. + + When you're happy with your settings, you need to set the password for + SuperUser, which is your administrator account. + .IP +-murmur-user-wrapper -p ++mumble-server-user-wrapper -p + .I "<password>" + .LP + + Once this is done, simply run + .IP +-murmur-user-wrapper ++mumble-server-user-wrapper + .LP + to start the server. + .SH SEE ALSO +-.BR murmurd (1). ++.BR mumble-server (1). + .br + .SH AUTHORS +-mumble and murmurd were written by The Mumble Developers. ++mumble and mumble-server were written by The Mumble Developers. +diff --git a/man/murmurd.1 b/man/mumble-server.1 +similarity index 65% +rename from man/murmurd.1 +rename to man/mumble-server.1 +index ab1975aeb..72cb902b0 100644 +--- a/man/murmurd.1 ++++ b/man/mumble-server.1 +@@ -1,37 +1,37 @@ +-.TH murmurd 1 "2016 May 9" ++.TH mumble-server 1 "2016 May 9" + .SH NAME +-murmurd - VoIP server. ++mumble-server - VoIP server. + .SH SYNOPSIS +-.B murmurd ++.B mumble-server + [\fB-ini \fIinifile\fR] [\fB-fg\fR] [\fB-v\fR] + .br +-.B murmurd -supw\fR \fIpassword\fR [\fIserverid\fR] ++.B mumble-server -supw\fR \fIpassword\fR [\fIserverid\fR] + .br +-.B murmurd -readsupw\fR [\fIserverid\fR] ++.B mumble-server -readsupw\fR [\fIserverid\fR] + .br +-.B murmurd -disablesu\fR [\fIserverid\fR] ++.B mumble-server -disablesu\fR [\fIserverid\fR] + .br +-.B murmurd -limits ++.B mumble-server -limits + .br +-.B murmurd -wipessl ++.B mumble-server -wipessl + .br +-.B murmurd -wipelogs ++.B mumble-server -wipelogs + .br +-.B murmurd -loggroups ++.B mumble-server -loggroups + .br +-.B murmurd -logacls ++.B mumble-server -logacls + .br +-.B murmurd -license ++.B mumble-server -license + .br +-.B murmurd -authors ++.B mumble-server -authors + .br +-.B murmurd -third-party-licenses ++.B mumble-server -third-party-licenses + .br +-.B murmurd -version\fR|\fB--version ++.B mumble-server -version\fR|\fB--version + .br +-.B murmurd -h\fR|\fB-help\fR|\fB--help ++.B mumble-server -h\fR|\fB-help\fR|\fB--help + .SH DESCRIPTION +-Murmur is the server component of Mumble, a low-latency, high quality VoIP ++mumble-server is the server component of Mumble, a low-latency, high quality VoIP + application. + .SH OPTIONS + .TP +@@ -39,7 +39,7 @@ application. + Show a summary of the options. + .TP + .B -ini \fIinifile +-Specify which ini file to use. Without this option, murmur will search for ++Specify which ini file to use. Without this option, mumble-server will search for + a murmur.ini file and will fall back to builtin defaults if one isn't found. + .TP + .B -fg +@@ -68,8 +68,8 @@ until a new password is set. You can set a new SuperUser password with the + .TP + .B -limits + Tests and shows how many file descriptors and threads can be created. The +-purpose of this option is to test how many clients Murmur can handle. Murmur +-will exit after this test. ++purpose of this option is to test how many clients the server can handle. The ++server will exit after this test. + .TP + .B -wipessl + Remove SSL certificates from database. +@@ -84,13 +84,13 @@ Turns on logging for group changes for all servers. + Turns on logging for ACL changes for all servers. + .TP + .B -license +-Show Murmur's license. ++Show mumble-server's license. + .TP + .B -authors +-Show Murmur's authors. ++Show mumble-server's authors. + .TP + .B -third-party-licenses +-Show licenses for third-party software used by Murmur. ++Show licenses for third-party software used by mumble-server. + .TP + .B -version, --version + Show version information. +@@ -98,12 +98,12 @@ Show version information. + .TP + .BR SIGHUP + Perform a log rotation. +-This causes murmurd to re-open its log file. ++This causes mumble-server to re-open its log file. + .TP + .BR SIGUSR1 + Gracefully reload the TLS settings specified in murmur.ini without interrupting service. + +-When this signal is received, Murmur will apply the new TLS settings (certificate, ++When this signal is received, the server will apply the new TLS settings (certificate, + private key, and Diffie-Hellman parameters) to all virtual servers that use the TLS settings + from murmur.ini. + +@@ -114,4 +114,4 @@ be affected by this signal. Those servers can be updated using the updateCertifi + .BR murmur-user-wrapper (1). + .br + .SH AUTHORS +-mumble and murmurd were written by The Mumble Developers. ++mumble and mumble-server were written by The Mumble Developers. +diff --git a/scripts/murmur-user-wrapper b/scripts/mumble-server-user-wrapper +similarity index 100% +rename from scripts/murmur-user-wrapper +rename to scripts/mumble-server-user-wrapper +diff --git a/src/murmur/CMakeLists.txt b/src/murmur/CMakeLists.txt +index 112c919c0..f4aa3ea57 100644 +--- a/src/murmur/CMakeLists.txt ++++ b/src/murmur/CMakeLists.txt +@@ -338,8 +338,8 @@ file(COPY "${CMAKE_SOURCE_DIR}/scripts/murmur.ini" DESTINATION ${CMAKE_BINARY_DI + + if(UNIX) + # Install Murmur man files +- install(FILES "${CMAKE_SOURCE_DIR}/man/murmurd.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc) +- install(FILES "${CMAKE_SOURCE_DIR}/man/murmur-user-wrapper.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc) ++ install(FILES "${CMAKE_SOURCE_DIR}/man/mumble-server.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc) ++ install(FILES "${CMAKE_SOURCE_DIR}/man/mumble-server-user-wrapper.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc) + endif() + + if(packaging) +-- +2.35.3 + diff --git a/0007-BUILD-cmake-Find-and-link-Poco-XML.patch b/0007-BUILD-cmake-Find-and-link-Poco-XML.patch new file mode 100644 index 0000000..c7bef83 --- /dev/null +++ b/0007-BUILD-cmake-Find-and-link-Poco-XML.patch @@ -0,0 +1,44 @@ +From 6d54bacf7bc98e3e0341e47b741cb5c41457f0da Mon Sep 17 00:00:00 2001 +From: Carl George carl@george.computer +Date: Tue, 5 Apr 2022 18:49:13 -0500 +Subject: [PATCH 7/9] BUILD(cmake): Find and link Poco::XML + +Without this, building against the latest poco snapshot results in +errors like: + +/usr/bin/ld: /builddir/build/BUILD/mumble-1.4.230.src/src/mumble/PluginManifest.cpp:72: undefined reference to `typeinfo for Poco::XML::Element' + +(cherry picked from commit fefdd79ebcd53a3035967789d004938ee39e2030) + +# Conflicts: +# src/mumble/CMakeLists.txt +(cherry picked from commit 5e0962474cbed1dbfea34afd8eeb6cd71dc518d3) +--- + src/mumble/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt +index 4530dc753..be37fd674 100644 +--- a/src/mumble/CMakeLists.txt ++++ b/src/mumble/CMakeLists.txt +@@ -384,11 +384,16 @@ target_include_directories(mumble + "${PLUGINS_DIR}" + ) + +-find_pkg(Poco COMPONENTS Zip) ++find_pkg(Poco ++ COMPONENTS ++ XML ++ Zip ++) + + if(TARGET Poco::Zip) + target_link_libraries(mumble + PRIVATE ++ Poco::XML + Poco::Zip + ) + else() +-- +2.35.3 + diff --git a/0008-CHANGE-server-Default-to-system-crypto-policy.patch b/0008-CHANGE-server-Default-to-system-crypto-policy.patch new file mode 100644 index 0000000..ccc9c03 --- /dev/null +++ b/0008-CHANGE-server-Default-to-system-crypto-policy.patch @@ -0,0 +1,40 @@ +From 3309af97f598b5bf72c3ffe46f1b00e29c49afc6 Mon Sep 17 00:00:00 2001 +From: Carl George carl@george.computer +Date: Wed, 6 Apr 2022 19:31:23 -0500 +Subject: [PATCH 8/9] CHANGE(server): Default to system crypto policy + +https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/ +--- + scripts/murmur.ini | 2 +- + src/SSL.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/murmur.ini b/scripts/murmur.ini +index de224847b..91ab67d64 100644 +--- a/scripts/murmur.ini ++++ b/scripts/murmur.ini +@@ -303,7 +303,7 @@ allowping=true + ; Note: Changing this option may impact the backwards compatibility of your + ; Murmur server, and can remove the ability for older Mumble clients to be able + ; to connect to it. +-;sslCiphers=EECDH+AESGCM:EDH+aRSA+AESGCM:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA ++;sslCiphers="PROFILE=SYSTEM" + + ; If Murmur is started as root, which user should it switch to? + ; This option is ignored if Murmur isn't started with root privileges. +diff --git a/src/SSL.cpp b/src/SSL.cpp +index 0d1e526be..04f554ffc 100644 +--- a/src/SSL.cpp ++++ b/src/SSL.cpp +@@ -43,7 +43,7 @@ void MumbleSSL::destroy() { + } + + QString MumbleSSL::defaultOpenSSLCipherString() { +- return QLatin1String("EECDH+AESGCM:EDH+aRSA+AESGCM:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"); ++ return QLatin1String("PROFILE=SYSTEM"); + } + + QList< QSslCipher > MumbleSSL::ciphersFromOpenSSLCipherString(QString cipherString) { +-- +2.35.3 + diff --git a/0009-FIX-client-Avoid-loading-unversioned-libraries.patch b/0009-FIX-client-Avoid-loading-unversioned-libraries.patch new file mode 100644 index 0000000..7728277 --- /dev/null +++ b/0009-FIX-client-Avoid-loading-unversioned-libraries.patch @@ -0,0 +1,67 @@ +From 8e905af93415577496967f4560f0121b038fbc84 Mon Sep 17 00:00:00 2001 +From: Carl George carl@george.computer +Date: Wed, 6 Apr 2022 20:07:28 -0500 +Subject: [PATCH 9/9] FIX(client): Avoid loading unversioned libraries + +--- + src/mumble/JackAudio.cpp | 1 - + src/mumble/PAAudio.cpp | 1 - + src/mumble/PipeWire.cpp | 4 ---- + src/mumble/PulseAudio.cpp | 2 +- + 4 files changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/mumble/JackAudio.cpp b/src/mumble/JackAudio.cpp +index cd1072218..0c5132fda 100644 +--- a/src/mumble/JackAudio.cpp ++++ b/src/mumble/JackAudio.cpp +@@ -199,7 +199,6 @@ JackAudioSystem::JackAudioSystem() : bAvailable(false), users(0), client(nullptr + alternatives << QLatin1String("libjack.dylib"); + alternatives << QLatin1String("libjack.0.dylib"); + #else +- alternatives << QLatin1String("libjack.so"); + alternatives << QLatin1String("libjack.so.0"); + #endif + for (const QString &lib : alternatives) { +diff --git a/src/mumble/PAAudio.cpp b/src/mumble/PAAudio.cpp +index cdcfd12d8..b1c6960b9 100644 +--- a/src/mumble/PAAudio.cpp ++++ b/src/mumble/PAAudio.cpp +@@ -127,7 +127,6 @@ PortAudioSystem::PortAudioSystem() : bOk(false) { + alternatives << QLatin1String("libportaudio.dylib"); + alternatives << QLatin1String("libportaudio.2.dylib"); + #else +- alternatives << QLatin1String("libportaudio.so"); + alternatives << QLatin1String("libportaudio.so.2"); + #endif + for (const auto &lib : alternatives) { +diff --git a/src/mumble/PipeWire.cpp b/src/mumble/PipeWire.cpp +index a06087585..206d61330 100644 +--- a/src/mumble/PipeWire.cpp ++++ b/src/mumble/PipeWire.cpp +@@ -130,10 +130,6 @@ static PipeWireInit pwi; + PipeWireSystem::PipeWireSystem() : m_ok(false), m_users(0) { + // clang-format off + const QStringList names { +- // Common names used by Linux distributions. +- "libpipewire.so", +- "libpipewire-0.3.so", +- // Name used by the Flatpak FreeDesktop runtime. + "libpipewire-0.3.so.0" + }; + // clang-format on +diff --git a/src/mumble/PulseAudio.cpp b/src/mumble/PulseAudio.cpp +index 521ea1e73..3da9e1957 100644 +--- a/src/mumble/PulseAudio.cpp ++++ b/src/mumble/PulseAudio.cpp +@@ -1008,7 +1008,7 @@ void PulseAudioOutput::run() { + } + + PulseAudio::PulseAudio() : m_ok(false) { +- const QStringList alternatives{ QLatin1String("libpulse.so"), QLatin1String("libpulse.so.0") }; ++ const QStringList alternatives{ QLatin1String("libpulse.so.0") }; + + for (const QString &alternative : alternatives) { + m_lib.setFileName(alternative); +-- +2.35.3 + diff --git a/mumble-1.3.0-fedora-crypto-policy-cipher-list.patch b/mumble-1.3.0-fedora-crypto-policy-cipher-list.patch deleted file mode 100644 index 1d173c5..0000000 --- a/mumble-1.3.0-fedora-crypto-policy-cipher-list.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mumble-1.3.0/scripts/murmur.ini.fedora-crypto-policy-cipher-list mumble-1.3.0/scripts/murmur.ini ---- mumble-1.3.0/scripts/murmur.ini.fedora-crypto-policy-cipher-list 2019-10-24 13:55:41.505251692 +0200 -+++ mumble-1.3.0/scripts/murmur.ini 2019-10-24 13:56:38.853142219 +0200 -@@ -246,6 +246,7 @@ allowping=true - ; Murmur server, and can remove the ability for older Mumble clients to be able - ; to connect to it. - ;sslCiphers=EECDH+AESGCM:EDH+aRSA+AESGCM:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA -+sslCiphers="PROFILE=SYSTEM" - - ; If Murmur is started as root, which user should it switch to? - ; This option is ignored if Murmur isn't started with root privileges. diff --git a/mumble.appdata.xml b/mumble.appdata.xml deleted file mode 100644 index 467d068..0000000 --- a/mumble.appdata.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<application> - <id type="desktop">mumble.desktop</id> - <metadata_license>CC0-1.0</metadata_license> - <project_license>BSD-3-Clause</project_license> - <title>Mumble</title> - <summary>Voice Chat Software</summary> - <description> - <p>Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.</p> - </description> - <url type="homepage">https://wiki.mumble.info</url> - <screenshots> - <screenshot type="default"> - <image>https://screenshots.debian.net/screenshots/000/001/906/large.png</image> - </screenshot> - </screenshots> -</application> diff --git a/mumble.spec b/mumble.spec index 30623c7..4f67ca8 100644 --- a/mumble.spec +++ b/mumble.spec @@ -1,62 +1,99 @@ +%global build_number 230 + Name: mumble -Version: 1.3.4 -Release: 9%{?dist} +Version: 1.4.%{build_number} +Release: 1%{?dist} Summary: Low-latency and high-quality voice-chat program # The main source code is BSD licensed. # The bundled libraries used are licensed as follows: -# - arc4random: ISC -# - celt-*: BSD, except for tools/getopt* files which are GPLv2+ +# - arc4random: 0BSD +# - celt: BSD, except for tools/getopt* files which are GPLv2+ # - qqbonjour: BSD # - smallft: BSD -License: BSD and ISC and GPLv2+ +License: BSD and 0BSD and GPLv2+ URL: https://www.mumble.info -Source0: https://github.com/mumble-voip/mumble/releases/download/%%7Bversion%7D/mumbl... -Source2: murmur.service -Source3: mumble.appdata.xml - -# downstream only patch +Source: https://github.com/mumble-voip/mumble/releases/download/v%%7Bversion%7D/mumb... +Source1: murmur.service + +# patches from the upstream master branch +# https://github.com/mumble-voip/mumble/commit/f4cea62ed95e4967d8591f25e903f5e... +Patch: 0001-BUILD-crypto-Migrate-to-OpenSSL-3.0-compatible-API.patch +# https://github.com/mumble-voip/mumble/commit/f8d47db318f302f5a7d343f15c9936c... +Patch: 0002-FIX-crypto-Sharing-EVP-context-between-threads-crush.patch + +# patches from the upstream 1.4.x branch +# https://github.com/mumble-voip/mumble/commit/200e6ee7536bf4804ab221ba5a96aee... +Patch: 0003-FIX-client-Fix-PipeWire-not-being-usable-in-Flatpaks.patch +# https://github.com/mumble-voip/mumble/commit/a2a2aabdf535cb7f09dfa1c2d4e1056... +Patch: 0004-BUILD-positional-audio-Fix-missing-memory-include.patch +# https://github.com/mumble-voip/mumble/commit/96e644a37d43aa26600e0078836ca68... +Patch: 0005-BUILD-client-RNNoise-Support-linking-against-the-sys.patch +# https://github.com/mumble-voip/mumble/commit/9326037e8388cdfd97a4a81ef6a2682... +Patch: 0006-MAINT-manpages-Replace-murmur-with-mumble-server.patch +# https://github.com/mumble-voip/mumble/commit/5e0962474cbed1dbfea34afd8eeb6cd... +Patch: 0007-BUILD-cmake-Find-and-link-Poco-XML.patch + +# downstream-only patches # https://docs.fedoraproject.org/en-US/packaging-guidelines/CryptoPolicies/ -Patch0: mumble-1.3.0-fedora-crypto-policy-cipher-list.patch - -# https://github.com/mumble-voip/mumble/pull/3675 -Patch1: 0001-Added-DBus-calls-to-activate-and-deactivate-push-to-talk.patch - -# https://github.com/mumble-voip/mumble/commit/a8e0797f51877db699d01c37d962a75... -Patch2: 0001-FIX-client-Update-rnnoise-src-submodule.patch +Patch: 0008-CHANGE-server-Default-to-system-crypto-policy.patch +Patch: 0009-FIX-client-Avoid-loading-unversioned-libraries.patch + +BuildRequires: cmake +BuildRequires: gcc-c++ + +# Referencing build requirements: +# +# - Find instances of find_pkg in the mumble source code. +# - Check if anything provides cmake(<name>). If found use that. +# - Check the modules from cmake-data (/usr/share/cmake/Modules/) to see if any +# locate it by a file path. If found use exact package name. +# - Check if anything provides pkgconfig(<name>). If found, use that. +# +# That should cover all scenarios. If you are working on this spec file and +# find another scenario, please add it to this list. + +# cmake/os.cmake +BuildRequires: pkgconfig(openssl) +BuildRequires: cmake(Qt5) + +# cmake/qt-utils.cmake +BuildRequires: cmake(Qt5LinguistTools) +BuildRequires: python3
-BuildRequires: make -BuildRequires: qt5-qtbase-devel -# qmake/lrelease.pri -BuildRequires: qt5-linguist -# qmake/openssl.pri -BuildRequires: pkgconfig(openssl) < 3 -# qmake/protobuf.pri +# src/CMakeLists.txt +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Network) +BuildRequires: cmake(Qt5Xml) +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(protobuf) -# qmake/protoc.pri -BuildRequires: protobuf-compiler -# qmake/python.pri -BuildRequires: python3 -# src/mumble/AudioInput.cpp -BuildRequires: rnnoise-devel -# src/mumble/GlobalShortcut_unix.h -BuildRequires: libXi-devel -# src/mumble/main.cpp -BuildRequires: qt5-qtsvg-devel -# src/mumble/mumble_pch.hpp + +# src/mumble/CMakeLists.txt +BuildRequires: cmake(Qt5Concurrent) +BuildRequires: cmake(Qt5Sql) +BuildRequires: cmake(Qt5Svg) +BuildRequires: cmake(Qt5Widgets) +BuildRequires: cmake(PocoXML) +BuildRequires: cmake(PocoZip) +BuildRequires: pkgconfig(sndfile) BuildRequires: boost-devel -# src/mumble/mumble.pro +BuildRequires: libXext-devel +BuildRequires: libXi-devel +BuildRequires: glibc-devel +BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(speexdsp) -BuildRequires: pkgconfig(opus) -BuildRequires: pkgconfig(sndfile) -BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(alsa) -BuildRequires: pkgconfig(libpulse) -BuildRequires: pkgconfig(avahi-compat-libdns_sd) -BuildRequires: pkgconfig(avahi-client) +BuildRequires: pkgconfig(rnnoise) BuildRequires: pkgconfig(speech-dispatcher) +BuildRequires: cmake(Qt5DBus) +BuildRequires: pkgconfig(avahi-compat-libdns_sd) +BuildRequires: alsa-lib-devel +BuildRequires: pipewire-jack-audio-connection-kit-devel +BuildRequires: pipewire-devel +BuildRequires: portaudio-devel +BuildRequires: pulseaudio-libs-devel
-# multiple files in 3rdparty/celt-0.7.0-src and 3rdparty/celt-0.11.0-src +# multiple files in 3rdparty/celt-0.7.0-src BuildRequires: libogg-devel
# appstream-util in %%check @@ -64,12 +101,38 @@ BuildRequires: libappstream-glib # desktop-file-validate in %%check BuildRequires: desktop-file-utils
+# There are multiple available audio backends which are opened at runtime. +# They aren't linked against, but they are opened by the library name. +# https://github.com/mumble-voip/mumble/issues/3794 +%if 0%{?__isa_bits} == 32 +%global libsymbolsuffix %{nil} +%else +%global libsymbolsuffix ()(%{__isa_bits}bit) +%endif +# src/mumble/JackAudio.cpp +Recommends: libjack.so.0%{libsymbolsuffix} +# to prefer the pipewire implementation of libjack +Suggests: pipewire-jack-audio-connection-kit +# src/mumble/PAAudio.cpp +Recommends: libportaudio.so.2%{libsymbolsuffix} +# src/mumble/PipeWire.cpp +Recommends: libpipewire-0.3.so.0%{libsymbolsuffix} +# src/mumble/PulseAudio.cpp +Recommends: libpulse.so.0%{libsymbolsuffix} + +# modified version of OpenBSD's arc4random Provides: bundled(arc4random) +# old version of celt for compatibility Provides: bundled(celt) = 0.7.0 -Provides: bundled(celt) = 0.11.0 +# modified version of Qt Quarterly example code Provides: bundled(qqbonjour) +# modified version of vorbis's smallft Provides: bundled(smallft)
+%global _privatelibs libcelt0[.]so.* +%global __provides_exclude ^(%{_privatelibs})$ +%global __requires_exclude ^(%{_privatelibs})$ +
%description Mumble is an Open Source, low-latency and high-quality voice-chat program @@ -79,8 +142,13 @@ written on top of Qt and Opus. %package -n murmur Summary: Mumble voice chat server Provides: mumble-server = %{version}-%{release} -# src/murmur/murmur_pch.h + +# src/murmur/CMakeLists.txt +BuildRequires: cmake(Qt5Sql) BuildRequires: libcap-devel +BuildRequires: pkgconfig(avahi-compat-libdns_sd) +BuildRequires: cmake(Qt5DBus) + Requires(pre): shadow-utils # To be able to announce the presence of the server via Bonjour. Recommends: avahi @@ -115,90 +183,67 @@ starting your game with this script will enable an ingame Mumble overlay.
%prep -%autosetup -p 1 +%autosetup -p 1 -n mumble-%{version}.src
pushd 3rdparty
# remove bundled libraries that we have system copies of -rm -r opus-src rnnoise-src speex-src speexdsp-src +rm -r jack opus pipewire portaudio pulseaudio rnnoise* speex*
# remove bundled libraries for windows -rm -r GL minhook-src xinputcheck-src +rm -r GL minhook xinputcheck*
# remove bundled libraries for mac -rm -r mach-override-src +rm -r mach-override*
popd
-# fix https://github.com/mumble-voip/mumble/issues/4857 -sed -e '/VERSION = / s/1.3.3/1.3.4/' -i overlay_gl/overlay_gl.pro +# use system headers for audio backends +sed \ + -e 's|"${3RDPARTY_DIR}/jack"|"%{_includedir}/jack"|' \ + -e 's|"${3RDPARTY_DIR}/portaudio"|"%{_includedir}"|' \ + -e 's|"${3RDPARTY_DIR}/pipewire"|"%{_includedir}/pipewire-0.3" "%{_includedir}/spa-0.2"|' \ + -e 's|"${3RDPARTY_DIR}/pulseaudio"|"%{_includedir}/pulse"|' \ + -i src/mumble/CMakeLists.txt
%build -%{qmake_qt5} \ -CONFIG+=no-bundled-speex \ -CONFIG+=no-bundled-opus \ -CONFIG+=no-bundled-rnnoise \ -CONFIG+=no-g15 \ -CONFIG+=no-oss \ -CONFIG+=no-update \ -CONFIG+=no-embed-qt-translations \ -CONFIG+=no-ice \ -CONFIG+=packaged \ -CONFIG+=c++11 \ -CONFIG+=no-pch \ -DEFINES+="PLUGIN_PATH=%{_libdir}/mumble" \ -main.pro - -%make_build release +%cmake \ + -DBUILD_NUMBER=%{build_number} \ + -Dupdate=OFF \ + -Dbundled-opus=OFF \ + -Dbundled-speex=OFF \ + -Dbundled-rnnoise=OFF \ + -Dice=OFF \ + -Doverlay-xcompile=OFF \ + -DCMAKE_BUILD_TYPE=Release + +%cmake_build
%install -install -D -p -m 0755 release/mumble %{buildroot}%{_bindir}/mumble -install -D -p -m 0755 release/murmurd %{buildroot}%{_sbindir}/murmurd -ln -s murmurd %{buildroot}%{_sbindir}/mumble-server +%cmake_install
# translations install -d -m 0755 %{buildroot}%{_datadir}/mumble/translations -install -p -m 0644 src/mumble/*.qm %{buildroot}%{_datadir}/mumble/translations - -# libraries -install -d -m 0755 %{buildroot}%{_libdir}/mumble -for f in release/*.so* release/plugins/*.so; do - if [[ -L "$f" ]]; then - cp -P "$f" %{buildroot}%{_libdir}/mumble/ - else - install -p -m 0755 "$f" %{buildroot}%{_libdir}/mumble/ - fi -done +install -p -m 0644 %{_vpath_builddir}/src/mumble/*.qm %{buildroot}%{_datadir}/mumble/translations
install -D -p -m 0664 scripts/murmur.ini %{buildroot}%{_sysconfdir}/murmur/murmur.ini -ln -s murmur/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini -install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/murmur.service - -install -D -p -m 0755 scripts/mumble-overlay %{buildroot}%{_bindir}/mumble-overlay - -# man pages -install -D -p -m 0644 man/mumble.1 %{buildroot}%{_mandir}/man1/mumble.1 -install -D -p -m 0644 man/murmurd.1 %{buildroot}%{_mandir}/man1/murmurd.1 -install -D -p -m 0644 man/mumble-overlay.1 %{buildroot}%{_mandir}/man1/mumble-overlay.1 - -# icons -install -D -p -m 0644 icons/mumble.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/mumble.svg - -# desktop file -install -D -p -m 0644 scripts/mumble.desktop %{buildroot}%{_datadir}/applications/mumble.desktop - -# appdata -install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_metainfodir}/mumble.appdata.xml +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/murmur.service +install -D -p -m 0755 scripts/mumble-server-user-wrapper %{buildroot}%{_bindir}/mumble-server-user-wrapper
# dir for mumble-server.sqlite mkdir -p %{buildroot}%{_localstatedir}/lib/mumble-server/
+# compatibility symlinks +mkdir -p %{buildroot}%{_sbindir} +ln -s %{_bindir}/mumble-server %{buildroot}%{_sbindir}/murmurd +ln -s murmur/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini +
%check -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/mumble.appdata.xml -desktop-file-validate %{buildroot}%{_datadir}/applications/mumble.desktop +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.mumble_voip.mumble.appdata.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/org.mumble_voip.mumble.desktop
%pre -n murmur @@ -223,48 +268,48 @@ exit 0
%files %license LICENSE -%doc README README.Linux CHANGES +%doc README.md CHANGES %{_bindir}/mumble %{_mandir}/man1/mumble.1* +%{_datadir}/icons/hicolor/256x256/apps/mumble.png %{_datadir}/icons/hicolor/scalable/apps/mumble.svg -%{_datadir}/applications/mumble.desktop -%{_metainfodir}/mumble.appdata.xml +%{_datadir}/applications/org.mumble_voip.mumble.desktop +%{_metainfodir}/org.mumble_voip.mumble.appdata.xml %{_datadir}/mumble/ -%dir %{_libdir}/mumble +%dir %{_libdir}/mumble/ %{_libdir}/mumble/libcelt0.so -%{_libdir}/mumble/libcelt0.so.0 -%{_libdir}/mumble/libcelt0.so.0.7* -%{_libdir}/mumble/libcelt0.so.0.11* +%{_libdir}/mumble/libcelt0.so.0.7.0
%files -n murmur %license LICENSE -%doc README README.Linux CHANGES +%doc README.md CHANGES +%{_bindir}/mumble-server +%{_bindir}/mumble-server-user-wrapper +%{_mandir}/man1/mumble-server.1* +%{_mandir}/man1/mumble-server-user-wrapper.1* %{_sbindir}/murmurd %{_unitdir}/murmur.service -%{_sbindir}/mumble-server %config(noreplace) %attr(664,mumble-server,mumble-server) %{_sysconfdir}/murmur/murmur.ini -%config(noreplace) %{_sysconfdir}/mumble-server.ini -%{_mandir}/man1/murmurd.1* +%{_sysconfdir}/mumble-server.ini %dir %attr(-,mumble-server,mumble-server) %{_localstatedir}/lib/mumble-server/
%files plugins -%{_libdir}/mumble/libl4d2.so -%{_libdir}/mumble/liblink.so -%{_libdir}/mumble/librl.so +%{_libdir}/mumble/plugins/
%files overlay %{_bindir}/mumble-overlay -%{_libdir}/mumble/libmumble.so -%{_libdir}/mumble/libmumble.so.1 -%{_libdir}/mumble/libmumble.so.1.3 -%{_libdir}/mumble/libmumble.so.%{version} %{_mandir}/man1/mumble-overlay.1* +%{_libdir}/mumble/libmumbleoverlay.so +%{_libdir}/mumble/libmumbleoverlay.so.%{version}
%changelog +* Tue Aug 09 2022 Carl George carl@george.computer - 1.4.230-1 +- Latest upstream, resolves rhbz#2036444 + * Thu Jul 21 2022 Fedora Release Engineering releng@fedoraproject.org - 1.3.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
diff --git a/murmur.service b/murmur.service index 5d8ac8d..440500c 100644 --- a/murmur.service +++ b/murmur.service @@ -1,14 +1,13 @@ [Unit] -Description=Mumble Daemon - VoIP Server +Description=Mumble Daemon Documentation=man:murmurd(1) http://www.mumble.info -After=network.target mysqld.service +After=network.target
[Service] User=mumble-server Group=mumble-server -Type=simple -ExecStart=/usr/sbin/murmurd -fg -ini /etc/murmur/murmur.ini -RestartSec=2100msec +Type=exec +ExecStart=/usr/bin/mumble-server -fg -ini /etc/murmur/murmur.ini Restart=always PrivateDevices=true PrivateTmp=true diff --git a/sources b/sources index bdb2a94..aedf555 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mumble-1.3.4.tar.gz) = e2dde5aad30d1a931e7acd8d7db0b8c785d3a268d0b8cf5626fa03953a51bcadb719c6682c440d02524e83beee13d73d8f5bb3fdf98ab1c82d3ecf824cc25f68 +SHA512 (mumble-1.4.230.tar.gz) = 6cffc7a95d88b33876f4093b99266468210f5c14f190fbd2fbe4991bef91a567e55296e7c8c6cc99e19c054853211085cc3cc08109e367e6776afb70766b3a53
arch-excludes@lists.fedoraproject.org