Skip to content

Instantly share code, notes, and snippets.

@kythyria
Created February 15, 2015 01:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kythyria/a7474d32daa994a781c2 to your computer and use it in GitHub Desktop.
Save kythyria/a7474d32daa994a781c2 to your computer and use it in GitHub Desktop.
fedora21-pkg-mumble.patch
From 0e6a5cfe49959da3fa984b9f96bfc4c6660eb028 Mon Sep 17 00:00:00 2001
From: Kythyria Tieran <kythyria@berigora.net>
Date: Sun, 15 Feb 2015 01:10:06 +0000
Subject: [PATCH] Update to Mumble 1.2.8
This is against git://pkgs.fedoraproject.org/mumble.git revision 926d2952df868236260c10c452fa18ad73086f0c
---
...-Qt-AutoConnection-for-BonjourServiceReso.patch | 86 ----------------------
mumble.spec | 8 +-
2 files changed, 2 insertions(+), 92 deletions(-)
delete mode 100644 0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
diff --git a/0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch b/0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
deleted file mode 100644
index a30ba53..0000000
--- a/0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From dee463ef52d8406d0a925facfabead616f0f9dc2 Mon Sep 17 00:00:00 2001
-From: Mikkel Krautz <mikkel@krautz.dk>
-Date: Sat, 8 Jun 2013 14:35:34 +0200
-Subject: [PATCH] bonjour: use Qt::AutoConnection for BonjourServiceResolver's
- QSocketNotifier slot.
-
-Using a QueuedConnection for the slot had the unpleasant
-side effect that the QSocketNotifier could have its activated()
-slot invoked even though no data was waiting to be read.
-
-In our case, this could cause a deadlock inside Avahi's
-libdns_sd compatibility library.
-
-I've settled on using Qt::AutoConnection to be consitent
-with the rest of the code base. The Bonjour code should
-always be invoked from the main thread, so in this case
-Qt::AutoConnection will always mean Qt::DirectConnection.
-
-Why does this happen? Qt seems to process events before
-invoking queued slot invocations. If the Qt event loop
-finds that the file descriptor that our QSocketNotifier
-is providing notification for is ready for reading, it
-queues up an invocation of the activated() slot for the
-next event loop iteration (because we use a QueuedConnection).
-
-As mentioned above, because Qt seems to poll() FDs before
-invoking queued-up slots, the end result is that an
-invocation of the activated() slot for a given
-QSocketNotifier's file descriptor can be queued up in
-the very same event loop iteration that a read() is
-performed for the exact same file descriptor.
-
-After performing the read(), the queued-up activated()
-slot invocation is no longer valid, and can wreak havoc,
-which in our case causes a deadlock in the Avahi libdns_sd
-code.
-
-The flow below describes the event loop iterations
-in more detail:
-
-1st event loop iteration
-------------------------
-* poll() is invoked; the QSocketNotifier's FD is
- ready for reading.
-* An invocation of the activated() slot is queued
- up, to be executed next time we enter the event
- loop (due to Qt::QueuedConnection).
-
-2nd event loop iteration
-------------------------
-* poll() is invoked; the QSocketNotifier's FD is
- _still_ ready for reading.
-* An invocation of the activated() slot is again
- queued up, to be executed in the 3rd iteration.
-* The queued-up slot invocation from the 1st iteration
- is invoked. (read() is called.)
-
-3rd event loop iteration
-------------------------
-* poll is invoked(); the QSocketNotifier's FD has
- nothing to read anymore. Everything was read in
- the activated() slot that was invoked in the
- 2nd iteration.
-* The queued-up slot invocation from the 2nd iteration
- is invoked. This time, the read() syscall will block,
- because there is nothing to read.
----
- src/bonjour/BonjourServiceResolver.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/bonjour/BonjourServiceResolver.cpp b/src/bonjour/BonjourServiceResolver.cpp
-index 7b5f632..99f2bc1 100644
---- a/src/bonjour/BonjourServiceResolver.cpp
-+++ b/src/bonjour/BonjourServiceResolver.cpp
-@@ -63,7 +63,7 @@ void BonjourServiceResolver::resolveBonjourRecord(const BonjourRecord &record) {
- err = kDNSServiceErr_Invalid;
- } else {
- rr->bonjourSocket = new QSocketNotifier(sockfd, QSocketNotifier::Read, this);
-- connect(rr->bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead(int)), Qt::QueuedConnection);
-+ connect(rr->bonjourSocket, SIGNAL(activated(int)), this, SLOT(bonjourSocketReadyRead(int)));
- qmResolvers.insert(sockfd, rr);
- return;
- }
---
-1.8.3.1
-
diff --git a/mumble.spec b/mumble.spec
index f67955d..c5a9a76 100644
--- a/mumble.spec
+++ b/mumble.spec
@@ -1,6 +1,6 @@
Name: mumble
-Version: 1.2.6
-Release: 4%{?dist}
+Version: 1.2.8
+Release: 1%{?dist}
Summary: Voice chat suite aimed at gamers
Group: Applications/Internet
@@ -15,9 +15,6 @@ Patch1: %{name}-1.2.4-celt_include_dir.patch
# Fix broken logrotate script (start-stop-daemon not available anymore), BZ 730129
Patch3: mumble-1.2.3-logrotate.patch
Patch4: mumble-fixspeechd.patch
-# Upstream patch to fix hang on startup
-# https://github.com/mumble-voip/mumble/commit/dee463ef52d8406d0a925facfabead616f0f9dc2
-Patch5: 0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
# Fix compile error with g++ 4.9.0
# https://github.com/mumble-voip/mumble/pull/1243
Patch6: %{name}-1.2.5-compile-fix.patch
@@ -105,7 +102,6 @@ exit 0
%patch1 -p1
%patch3 -p1
%patch4 -p1 -F 2
-%patch5 -p1
%patch6 -p1
%build
--
2.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment