Accepting request 62325 from home:lnussel:branches:games:tools

ok

OBS-URL: https://build.opensuse.org/request/show/62325
OBS-URL: https://build.opensuse.org/package/show/games:tools/mumble?expand=0&rev=6
This commit is contained in:
Ludwig Nussel 2011-02-21 14:45:43 +00:00 committed by Git OBS Bridge
parent 2e28560a3c
commit 2af2f9b568
15 changed files with 185 additions and 433 deletions

View File

@ -1,7 +1,7 @@
From 18b8b6d42c9e8ed2964a312a8134adb482585e03 Mon Sep 17 00:00:00 2001
From 72d7a63286539dee07d962c8f2abf2867efa7d6a Mon Sep 17 00:00:00 2001
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Thu, 23 Dec 2010 14:03:56 +0100
Subject: [PATCH] fix build error with capability.h
Subject: [PATCH 1/2] fix build error with capability.h
---
src/murmur/murmur_pch.h | 1 +

View File

@ -0,0 +1,130 @@
From 41006c79225199fb6faaed3bc0228a35e9e51514 Mon Sep 17 00:00:00 2001
From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Fri, 24 Dec 2010 18:20:34 +0100
Subject: [PATCH 2/2] fix user switching
- don't keep saved uid 0. That's bad as an attacker that manages to
execute code could switch back to uid 0
- set $HOME as Qt doesn't look at passwd information
- initialize supplementary groups
- use "mumble-server" as fallback if no user is specified
---
src/murmur/Meta.cpp | 19 +++++++++++++------
src/murmur/Meta.h | 4 ++++
src/murmur/UnixMurmur.cpp | 12 ++++++++++--
src/murmur/main.cpp | 4 +++-
src/murmur/murmur_pch.h | 1 +
5 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/src/murmur/Meta.cpp b/src/murmur/Meta.cpp
index 05cd03e..5efc52a 100644
--- a/src/murmur/Meta.cpp
+++ b/src/murmur/Meta.cpp
@@ -264,15 +264,22 @@ void MetaParams::read(QString fname) {
iBanTime = qsSettings->value("autobanTime", iBanTime).toInt();
#ifdef Q_OS_UNIX
- const QString uname = qsSettings->value("uname").toString();
- if (! uname.isEmpty() && (geteuid() == 0)) {
- struct passwd *pw = getpwnam(qPrintable(uname));
+ qsName = qsSettings->value("uname").toString();
+ if (geteuid() == 0) {
+ // TODO: remove this silent fallback to enforce running as non-root
+ bool requested = true;
+ if (qsName.isEmpty()) {
+ // default server user name
+ qsName = "mumble-server";
+ requested = false;
+ }
+ struct passwd *pw = getpwnam(qPrintable(qsName));
if (pw) {
uiUid = pw->pw_uid;
uiGid = pw->pw_gid;
- }
- if (uiUid == 0) {
- qFatal("Cannot find username %s", qPrintable(uname));
+ qsHome = pw->pw_dir;
+ } else if (requested) {
+ qFatal("Cannot find username %s", qPrintable(qsName));
}
endpwent();
}
diff --git a/src/murmur/Meta.h b/src/murmur/Meta.h
index 7924640..1ec2d2b 100644
--- a/src/murmur/Meta.h
+++ b/src/murmur/Meta.h
@@ -96,7 +96,11 @@ struct MetaParams {
QMap<QString, QString> qmConfig;
+#ifdef Q_OS_UNIX
unsigned int uiUid, uiGid;
+ QString qsHome;
+ QString qsName;
+#endif
QSettings *qsSettings;
diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp
index eeeb67c..773701c 100644
--- a/src/murmur/UnixMurmur.cpp
+++ b/src/murmur/UnixMurmur.cpp
@@ -231,14 +231,22 @@ void UnixMurmur::setuid() {
} else
qFatal("Couldn't switch uid/gid.");
#else
- if (setregid(Meta::mp.uiGid, Meta::mp.uiGid) != 0)
+ if (::initgroups(qPrintable(Meta::mp.qsName), Meta::mp.uiGid) != 0)
+ qCritical("Can't initialize supplementary groups");
+ if (::setgid(Meta::mp.uiGid) != 0)
qCritical("Failed to switch to gid %d", Meta::mp.uiGid);
- if (setresuid(Meta::mp.uiUid, Meta::mp.uiUid, 0) != 0) {
+ if (::setuid(Meta::mp.uiUid) != 0) {
qFatal("Failed to become uid %d", Meta::mp.uiUid);
} else {
qCritical("Successfully switched to uid %d", Meta::mp.uiUid);
initialcap();
}
+ if (!Meta::mp.qsHome.isEmpty()) {
+ // QDir::homePath is broken. It only looks at $HOME
+ // instead of getpwuid() so we have to set our home
+ // ourselves
+ ::setenv("HOME", qPrintable(Meta::mp.qsHome), 1);
+ }
#endif
} else if (bRoot) {
qCritical("WARNING: You are running murmurd as root, without setting a uname in the ini file. This might be a security risk.");
diff --git a/src/murmur/main.cpp b/src/murmur/main.cpp
index 7a11250..5a4810d 100644
--- a/src/murmur/main.cpp
+++ b/src/murmur/main.cpp
@@ -272,11 +272,13 @@ int main(int argc, char **argv) {
Meta::mp.read(inifile);
- MumbleSSL::addSystemCA();
#ifdef Q_OS_UNIX
unixhandler.setuid();
#endif
+
+ MumbleSSL::addSystemCA();
+
ServerDB db;
meta = new Meta();
diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h
index 27c38a1..c36d5ae 100644
--- a/src/murmur/murmur_pch.h
+++ b/src/murmur/murmur_pch.h
@@ -61,6 +61,7 @@ extern "C" {
#include <sys/prctl.h>
#endif
#include <pwd.h>
+#include <grp.h>
#ifdef __FreeBSD__
#include <netinet/in_systm.h>
#endif
--
1.7.1

View File

@ -1,42 +0,0 @@
commit 6b33dda344f89e5a039b7d79eb43925040654242
Author: Benjamin Jemlich <pcgod@users.sourceforge.net>
Date: Tue Jun 29 14:49:14 2010 +0200
Don't crash on long usernames
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
index f12867a..de307ea 100644
--- a/src/murmur/Messages.cpp
+++ b/src/murmur/Messages.cpp
@@ -1231,6 +1231,9 @@ void Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {
for (int i=0;i<msg.names_size();++i) {
QString name = u8(msg.names(i));
+ if (!validateUserName(name)) {
+ continue;
+ }
int id = getUserID(name);
if (id >= 0) {
name = getUserName(id);
diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp
index 11b6906..7e15def 100644
--- a/src/murmur/ServerDB.cpp
+++ b/src/murmur/ServerDB.cpp
@@ -810,7 +810,7 @@ int Server::authenticate(QString &name, const QString &pw, const QStringList &em
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;
- SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
+ SQLPREP("SELECT `user_id`,`name`,`pw` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
query.addBindValue(iServerNum);
query.addBindValue(name);
SQLEXEC();
@@ -1051,7 +1051,7 @@ int Server::getUserID(const QString &name) {
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;
- SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND `name` like ?");
+ SQLPREP("SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND LOWER(`name`) = LOWER(?)");
query.addBindValue(iServerNum);
query.addBindValue(name);
SQLEXEC();

View File

@ -1,36 +0,0 @@
commit 5c40cfeb4b5f8911df926c19f2dd628703840f64
Author: Stefan Hacker <dd0t@users.sourceforge.net>
Date: Tue Jun 29 23:39:16 2010 +0200
Don't validate the name before we are sure it wasn't already validated by an authenticator
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp
index de307ea..f12867a 100644
--- a/src/murmur/Messages.cpp
+++ b/src/murmur/Messages.cpp
@@ -1231,9 +1231,6 @@ void Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {
for (int i=0;i<msg.names_size();++i) {
QString name = u8(msg.names(i));
- if (!validateUserName(name)) {
- continue;
- }
int id = getUserID(name);
if (id >= 0) {
name = getUserName(id);
diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp
index 7e15def..70b4ca4 100644
--- a/src/murmur/ServerDB.cpp
+++ b/src/murmur/ServerDB.cpp
@@ -1048,6 +1048,11 @@ int Server::getUserID(const QString &name) {
qhUserNameCache.insert(id, name);
return id;
}
+
+ if (!validateUserName(name)) {
+ return id;
+ }
+
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
size 0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
size 0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
size 0

View File

@ -1,273 +0,0 @@
Change Certificate Wizard page order to work around bug in Qt 4.4
Index: mumble-1.2.1/src/mumble/Cert.ui
===================================================================
--- mumble-1.2.1.orig/src/mumble/Cert.ui
+++ mumble-1.2.1/src/mumble/Cert.ui
@@ -141,6 +141,76 @@
</item>
</layout>
</widget>
+ <widget class="CompletablePage" name="qwpNew">
+ <property name="title">
+ <string>New Certificate</string>
+ </property>
+ <property name="subTitle">
+ <string>Generate a new certificate for strong authentication</string>
+ </property>
+ <attribute name="pageId">
+ <string notr="true">1</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="qlNewText">
+ <property name="text">
+ <string>&lt;p&gt;Mumble will now generate a strong certificate for authentication to servers.&lt;/p&gt;&lt;p&gt;If you wish, you may provide some additional information to be stored in the certificate, which will be presented to servers when you connect. If you provide a valid email address, you can upgrade to a CA issued email certificate later on, which provides strong identification.&lt;/p&gt;</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="qlName">
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="buddy">
+ <cstring>qleName</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="qlEmail">
+ <property name="text">
+ <string>Email</string>
+ </property>
+ <property name="buddy">
+ <cstring>qleEmail</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="qleEmail">
+ <property name="toolTip">
+ <string>Your email address (e.g. johndoe@mumble.info)</string>
+ </property>
+ <property name="whatsThis">
+ <string>This is your email address. It is strongly recommended to provide a valid email address, as this will allow you to upgrade to a strong certificate without authentication problems.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="qlError">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="qleName">
+ <property name="toolTip">
+ <string>Your name (e.g. John Doe)</string>
+ </property>
+ <property name="whatsThis">
+ <string>This is your name, and will be filled out in the certificate. This field is entirely optional.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
<widget class="CompletablePage" name="qwpImport">
<property name="title">
<string>Import Certificate</string>
@@ -234,78 +304,6 @@
</item>
</layout>
</widget>
- <widget class="QWizardPage" name="qwpReplace">
- <property name="title">
- <string>Replace Certificate</string>
- </property>
- <property name="subTitle">
- <string>Replace existing certificate with new certificate?</string>
- </property>
- <attribute name="pageId">
- <string notr="true">4</string>
- </attribute>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0" colspan="2">
- <widget class="QLabel" name="qlReplace">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>&lt;p&gt;You already have a certificate stored in Mumble, and you are about to replace it.&lt;/p&gt;
-&lt;p&gt;If you are upgrading to a certificate issued to you by a trusted CA and the email addresses match your current certificate, this is completely safe, and servers you connect to will automatically recognize the strong certificate for your email address.
-&lt;/p&gt;
-&lt;p&gt;If this is not the case, you will no longer be recognized by any server you previously have authenticated with. If you haven't been registered on any server yet, this is nothing to worry about.
-&lt;/p&gt;
-&lt;p&gt;
-Are you sure you wish to replace your certificate?
-&lt;/p&gt;
-</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="CertView" name="cvCurrent">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Current certificate</string>
- </property>
- <property name="whatsThis">
- <string>This is the certificate Mumble currently uses. It will be replaced.</string>
- </property>
- <property name="title">
- <string>Current Certificate</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="CertView" name="cvNew">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>New certificate</string>
- </property>
- <property name="whatsThis">
- <string>This is the new certificate that will replace the old one.</string>
- </property>
- <property name="title">
- <string>New Certificate</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
<widget class="CompletablePage" name="qwpExport">
<property name="title">
<string>Export Certificate</string>
@@ -374,21 +372,32 @@ Are you sure you wish to replace your ce
</item>
</layout>
</widget>
- <widget class="CompletablePage" name="qwpNew">
+ <widget class="QWizardPage" name="qwpReplace">
<property name="title">
- <string>New Certificate</string>
+ <string>Replace Certificate</string>
</property>
<property name="subTitle">
- <string>Generate a new certificate for strong authentication</string>
+ <string>Replace existing certificate with new certificate?</string>
</property>
<attribute name="pageId">
- <string notr="true">1</string>
+ <string notr="true">4</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_3">
+ <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
- <widget class="QLabel" name="qlNewText">
+ <widget class="QLabel" name="qlReplace">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="text">
- <string>&lt;p&gt;Mumble will now generate a strong certificate for authentication to servers.&lt;/p&gt;&lt;p&gt;If you wish, you may provide some additional information to be stored in the certificate, which will be presented to servers when you connect. If you provide a valid email address, you can upgrade to a CA issued email certificate later on, which provides strong identification.&lt;/p&gt;</string>
+ <string>&lt;p&gt;You already have a certificate stored in Mumble, and you are about to replace it.&lt;/p&gt;
+&lt;p&gt;If you are upgrading to a certificate issued to you by a trusted CA and the email addresses match your current certificate, this is completely safe, and servers you connect to will automatically recognize the strong certificate for your email address.
+&lt;/p&gt;
+&lt;p&gt;If this is not the case, you will no longer be recognized by any server you previously have authenticated with. If you haven't been registered on any server yet, this is nothing to worry about.
+&lt;/p&gt;
+&lt;p&gt;
+Are you sure you wish to replace your certificate?
+&lt;/p&gt;
+</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -396,49 +405,40 @@ Are you sure you wish to replace your ce
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="qlName">
- <property name="text">
- <string>Name</string>
- </property>
- <property name="buddy">
- <cstring>qleName</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="qlEmail">
- <property name="text">
- <string>Email</string>
- </property>
- <property name="buddy">
- <cstring>qleEmail</cstring>
+ <widget class="CertView" name="cvCurrent">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="qleEmail">
<property name="toolTip">
- <string>Your email address (e.g. johndoe@mumble.info)</string>
+ <string>Current certificate</string>
</property>
<property name="whatsThis">
- <string>This is your email address. It is strongly recommended to provide a valid email address, as this will allow you to upgrade to a strong certificate without authentication problems.</string>
+ <string>This is the certificate Mumble currently uses. It will be replaced.</string>
</property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="qlError">
- <property name="text">
- <string/>
+ <property name="title">
+ <string>Current Certificate</string>
</property>
</widget>
</item>
<item row="1" column="1">
- <widget class="QLineEdit" name="qleName">
+ <widget class="CertView" name="cvNew">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip">
- <string>Your name (e.g. John Doe)</string>
+ <string>New certificate</string>
</property>
<property name="whatsThis">
- <string>This is your name, and will be filled out in the certificate. This field is entirely optional.</string>
+ <string>This is the new certificate that will replace the old one.</string>
+ </property>
+ <property name="title">
+ <string>New Certificate</string>
</property>
</widget>
</item>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2c564e3d5b7481129482f2365375a2dc77e134c0c00012073cfdfbeadaa49be8
size 2920587

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEABECAAYFAktxjq8ACgkQ8Jse7d66bz5X8gCcDp7ujA+YzxOq4jjeU7rRibYl
5IwAoJMNucEbXcC3RudF0RaIRHTUCVnE
=qXyQ
-----END PGP SIGNATURE-----

3
mumble-1.2.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05895122ae4abec3fb62ef24ed9d167ffd768e7080ed179c8bf3afca96d18a5c
size 3448053

7
mumble-1.2.3.tar.gz.sig Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAk1gN5sACgkQ8Jse7d66bz4OKACfSpEhcg1nuxOlcBxKi0Zcb08M
sQIAoIYq1K6Ncv/dVjDxt+01HG3tZXuU
=zdmP
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
size 0

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Feb 21 13:19:50 UTC 2011 - lnussel@suse.de
- avoid duplicate libcelt libs
-------------------------------------------------------------------
Mon Feb 21 10:07:20 UTC 2011 - lnussel@suse.de
- new version 1.2.3
- Improved Voice Activity Detection
- Customizable Overlay with FPS counter
- Recording
- Priority speaker
- Updated CELT Codec to version 0.11.0
-------------------------------------------------------------------
Thu Jan 27 08:36:21 UTC 2011 - lnussel@suse.de

View File

@ -1,20 +1,3 @@
#
# spec file for package mumble
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%if 0%{?suse_version} > 1100
@ -36,10 +19,14 @@
%bcond_without mumble11x
%bcond_without bonjour
# mumble must be able to talk to other clients which may use
# differnt versions of celt. Since each celt release is
# incompatible to each other mumble bundles some specific
# versions.
%bcond_with system_celt
%bcond_without system_speex
Name: mumble
Name: mumble%{?snapshot:-unstable}
BuildRequires: protobuf-devel
%if %{with bonjour}
%if 0%{?suse_version}
@ -62,41 +49,37 @@ BuildRequires: speex-devel
%endif
BuildRequires: boost-devel gcc-c++
%if 0%{?suse_version}
BuildRequires: alsa-devel libqt4-devel pkg-config update-desktop-files
BuildRequires: libqt4-devel pkg-config update-desktop-files alsa-devel
%if 0%{?suse_version} > 1020
BuildRequires: libopenssl-devel
BuildRequires: libopenssl-devel
%else
BuildRequires: openssl-devel
BuildRequires: openssl-devel
%endif
%endif
%if 0%{?fedora_version}
BuildRequires: alsa-lib-devel libXevie-devel openssl-devel pkgconfig qt4-devel
BuildRequires: qt4-devel pkgconfig libXevie-devel openssl-devel alsa-lib-devel
%endif
%if %{with ice}
BuildRequires: ice-devel
%endif
%if 0%{?mandriva_version}
BuildRequires: -alsa-plugins alsa-lib-devel libxevie-devel openssl-devel pkgconfig qt4-devel qt4-linguist
BuildRequires: qt4-devel qt4-linguist pkgconfig openssl-devel libxevie-devel alsa-lib-devel -alsa-plugins
BuildRequires: libxi-devel
%endif
%if %{with pulseaudio}
BuildRequires: pulseaudio-devel
%endif
Version: 1.2.2%{?snapshot:_%snapshot}
Version: 1.2.3%{?snapshot:_%snapshot}
Release: 1
License: BSD3c
Group: Productivity/Multimedia/Sound/Utilities
%if 0%{?snapshot:1}
Source: mumble-unstable-%{version}.tar.bz2
%else
%if 0%{!?snapshot:1}
Source: http://downloads.sourceforge.net/project/mumble/Mumble/%{version}/mumble-%{version}.tar.gz
Source1: http://downloads.sourceforge.net/project/mumble/Mumble/%{version}/mumble-%{version}.tar.gz.sig
%endif
Source2: mumble-server.init
Patch0: mumble-1.2.1-wizardpageorder.diff
Patch1: 0003-fix-long-username-query.patch
Patch2: 0004-fix-username-validation.patch
Patch3: 0001-fix-build-error-with-capability.h.diff
Patch0: 0001-fix-build-error-with-capability.h.diff
Patch1: 0001-fix-user-switching.diff
Patch50: mumble-1.2.2-buildcompare.diff
# hack, no clue about glx so no idea to fix this properly
Patch99: mumble-1.1.4-sle10glx.diff
@ -111,7 +94,7 @@ Requires: libqt4 > 4.3.1-23
%endif # 10.3
%if 0%{?suse_version} == 1100
# the version shipped on 11.0 is insufficient
Requires: libspeex > 1.1.99.3
Requires: libspeex > 1.1.99.3
%endif # 11.0
%endif # suse_version
%if 0%{?fedora_version}
@ -132,12 +115,8 @@ Conflicts: %{name}-64bit < %{version}
Conflicts: mumble < %version
Provides: mumble = %version
#
%if !%{with system_celt}
Source50: http://downloads.xiph.org/releases/celt/celt-0.7.0.tar.gz
Source51: http://downloads.xiph.org/releases/celt/celt-0.9.0.tar.gz
Source52: http://downloads.xiph.org/releases/celt/celt-0.10.0.tar.gz
%endif
%endif
#
%description
Low-latency, high-quality voice communication for gamers. Includes game
@ -146,14 +125,13 @@ characters, and has echo cancellation so the sound from your loudspeakers
won't be audible to other players.
%package server
License: BSD3c
Summary: Voice Communication Server for Gamers
Group: Productivity/Multimedia/Sound/Utilities
Requires: qt-sql-sqlite
PreReq: /usr/sbin/useradd
%if 0%{?snapshot:1}
Conflicts: mumble-server < %version
Provides: mumble-server = %version
Conflicts: mumble-server < %version
Provides: mumble-server = %version
%endif
%description server
@ -166,22 +144,16 @@ won't be audible to other players.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
#
%patch50 -p1
%if 0%{?suse_version} && 0%{?suse_version} < 1020
%patch99 -p1
%endif
%if %{with system_celt}
# XXX celt 0.6 vs celt 0.7
#sed -i -e 's/celt_int32/celt_int32_t/g' src/mumble/Audio.*
#sed -i -e 's/celt_int16/celt_int16_t/g' src/mumble/Audio.*
%else
%if !%{with system_celt}
%if 0%{?snapshot:1}
tar -xzf %SOURCE50
sed -i -e 's/celt-0.6.1-build//;s/celt-0.6.2-build//' main.pro
for v in 0.7.0 0.9.0 0.10.0; do
tar -xzf %SOURCE51
for v in 0.7.0 0.11.0; do
rmdir celt-$v-src
mv celt-$v celt-$v-src
done
@ -193,7 +165,6 @@ done
sed -i -e '/QT_REQUIRE_VERSION/d' src/mumble/main.cpp src/mumble11x/main.cpp
%endif
#
%build
%if 0%{?fedora_version}
ln -s /usr/bin/qmake-qt4 qmake
@ -223,8 +194,8 @@ fi
# temporary hack, remove!
sed -i -e '/QMAKE_CFLAGS/s/-Woverloaded-virtual -Wold-style-cast//' compiler.pri
qmake \
QMAKE_CFLAGS_RELEASE="%{optflags} -Wall" \
QMAKE_CXXFLAGS_RELEASE="%{optflags} -Wall" \
QMAKE_CFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \
QMAKE_CXXFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \
DEFINES*=NO_UPDATE_CHECK \
DEFINES*=MUMBLE_VERSION=%version \
DEFINES*=PLUGIN_PATH=%{_libdir}/mumble \
@ -288,9 +259,6 @@ install -d -m 0755 "%{buildroot}%{_bindir}"
install -D -m 0755 release/mumble %{buildroot}%{_bindir}/mumble
install -d -m 0755 "%{buildroot}%{_libdir}/mumble/plugins"
install -m 0755 release/plugins/*.so "%{buildroot}%{_libdir}/mumble/plugins"
%if !%{with system_celt}
cp -a release/libcelt0.so.* "%{buildroot}%{_libdir}/mumble"
%endif
install -m 755 scripts/mumble-overlay "%{buildroot}%{_bindir}/mumble-overlay"
install -d -m 0755 "%{buildroot}%{_mandir}/man1"
install -m 0644 man/*.1 "%{buildroot}%{_mandir}/man1"
@ -305,6 +273,11 @@ install -D -m 0644 icons/mumble.svg "%{buildroot}%{_datadir}/icons/hicolor/scala
install -d -m0755 "%{buildroot}%{_libdir}/mumble"
install -m0755 release/libmumble.so.*.*.* "%{buildroot}%{_libdir}/mumble"
/sbin/ldconfig -n "%{buildroot}%{_libdir}/mumble"
# do this after ldconfig as we don't need the links
%if !%{with system_celt}
install -m 644 release/libcelt0.so.0.*.* "%{buildroot}%{_libdir}/mumble"
%endif
#
%if %{with mumble11x}
install -D -m 0755 release/mumble11x %{buildroot}%{_bindir}/mumble11x
@ -364,7 +337,6 @@ cat >> %buildroot/etc/tmpfiles.d/mumble-server.conf <<EOF
d /var/run/mumble-server 0755 mumble-server mumble-server -
EOF
%endif
%clean
rm -rf "%{buildroot}"
@ -425,5 +397,3 @@ getent passwd mumble-server >/dev/null || \
%endif
%config /etc/tmpfiles.d/mumble-server.conf
%endif
%changelog