Gentoo Archives: gentoo-commits

From: "Amadeusz Piotr Żołnowski" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/gajim/files/, net-im/gajim/
Date: Mon, 29 May 2017 16:24:39
Message-Id: 1496075070.24bd054fa98b2a95f355ab3471470bbb000c488a.aidecoe@gentoo
1 commit: 24bd054fa98b2a95f355ab3471470bbb000c488a
2 Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 29 16:24:07 2017 +0000
4 Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
5 CommitDate: Mon May 29 16:24:30 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24bd054f
7
8 net-im/gajim: Fix CVE-2016-10376
9
10 Gentoo-Bug: 620146
11 Package-Manager: Portage-2.3.5, Repoman-2.3.2
12
13 ...01-Add-config-option-to-activate-XEP-0146.patch | 45 ++++++++
14 net-im/gajim/gajim-0.16.6-r1.ebuild | 125 +++++++++++++++++++++
15 2 files changed, 170 insertions(+)
16
17 diff --git a/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch b/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch
18 new file mode 100644
19 index 00000000000..046c72c0ca2
20 --- /dev/null
21 +++ b/net-im/gajim/files/0.16.6-0001-Add-config-option-to-activate-XEP-0146.patch
22 @@ -0,0 +1,45 @@
23 +From 285392b27db7cb01b0566b4bda3920e6559b75e4 Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <forenjunkie@××××××.at>
25 +Date: Fri, 26 May 2017 23:10:05 +0200
26 +Subject: [PATCH] Add config option to activate XEP-0146 commands
27 +
28 +Some of the Commands have security implications, thats why we disable them per default
29 +Fixes #8378
30 +---
31 + src/common/commands.py | 7 ++++---
32 + src/common/config.py | 1 +
33 + 2 files changed, 5 insertions(+), 3 deletions(-)
34 +
35 +diff --git a/src/common/commands.py b/src/common/commands.py
36 +index 40d700710..46d6947f8 100644
37 +--- a/src/common/commands.py
38 ++++ b/src/common/commands.py
39 +@@ -345,9 +345,10 @@ class ConnectionCommands:
40 + def __init__(self):
41 + # a list of all commands exposed: node -> command class
42 + self.__commands = {}
43 +- for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
44 +- LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
45 +- self.__commands[cmdobj.commandnode] = cmdobj
46 ++ if gajim.config.get('remote_commands'):
47 ++ for cmdobj in (ChangeStatusCommand, ForwardMessagesCommand,
48 ++ LeaveGroupchatsCommand, FwdMsgThenDisconnectCommand):
49 ++ self.__commands[cmdobj.commandnode] = cmdobj
50 +
51 + # a list of sessions; keys are tuples (jid, sessionid, node)
52 + self.__sessions = {}
53 +diff --git a/src/common/config.py b/src/common/config.py
54 +index 3884d9e1d..7c1313fc4 100644
55 +--- a/src/common/config.py
56 ++++ b/src/common/config.py
57 +@@ -313,6 +313,7 @@ class Config:
58 + 'ignore_incoming_attention': [opt_bool, False, _('If True, Gajim will ignore incoming attention requestd ("wizz").')],
59 + 'remember_opened_chat_controls': [ opt_bool, True, _('If enabled, Gajim will reopen chat windows that were opened last time Gajim was closed.')],
60 + 'positive_184_ack': [ opt_bool, False, _('If enabled, Gajim will show an icon to show that sent message has been received by your contact')],
61 ++ 'remote_commands': [opt_bool, False, _('If True, Gajim will execute XEP-0146 Commands.')],
62 + }, {})
63 +
64 + __options_per_key = {
65 +--
66 +2.12.2
67 +
68
69 diff --git a/net-im/gajim/gajim-0.16.6-r1.ebuild b/net-im/gajim/gajim-0.16.6-r1.ebuild
70 new file mode 100644
71 index 00000000000..7fc7796b975
72 --- /dev/null
73 +++ b/net-im/gajim/gajim-0.16.6-r1.ebuild
74 @@ -0,0 +1,125 @@
75 +# Copyright 1999-2017 Gentoo Foundation
76 +# Distributed under the terms of the GNU General Public License v2
77 +
78 +EAPI=5
79 +
80 +PYTHON_COMPAT=( python2_7 )
81 +PYTHON_REQ_USE="sqlite,xml"
82 +
83 +AUTOTOOLS_AUTORECONF=true
84 +
85 +inherit autotools-utils python-r1 versionator
86 +
87 +MY_PV=${PV/_/-}
88 +MY_P="${PN}-${MY_PV}"
89 +
90 +DESCRIPTION="Jabber client written in PyGTK"
91 +HOMEPAGE="http://www.gajim.org/"
92 +SRC_URI="
93 + http://www.gajim.org/downloads/$(get_version_component_range 1-2)/${MY_P}.tar.bz2"
94 +# test? ( https://dev.gentoo.org/~jlec/distfiles/${PN}-tests-${PV}.tar.xz )"
95 +
96 +LICENSE="GPL-3"
97 +SLOT="0"
98 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
99 +IUSE="crypt dbus gnome gnome-keyring kde idle jingle libnotify networkmanager nls spell +srv test X xhtml zeroconf"
100 +
101 +REQUIRED_USE="
102 + ${PYTHON_REQUIRED_USE}
103 + libnotify? ( dbus )
104 + gnome? ( gnome-keyring )
105 + zeroconf? ( dbus )"
106 +
107 +COMMON_DEPEND="
108 + ${PYTHON_DEPS}
109 + dev-python/pygtk:2[${PYTHON_USEDEP}]
110 + x11-libs/gtk+:2"
111 +DEPEND="${COMMON_DEPEND}
112 + >=dev-util/intltool-0.40.1
113 + virtual/pkgconfig
114 + >=sys-devel/gettext-0.17-r1"
115 +RDEPEND="${COMMON_DEPEND}
116 + dev-python/pyasn1[${PYTHON_USEDEP}]
117 + >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
118 + >=dev-python/python-nbxmpp-0.5.3[${PYTHON_USEDEP}]
119 + crypt? (
120 + app-crypt/gnupg
121 + dev-python/pycrypto[${PYTHON_USEDEP}]
122 + )
123 + dbus? (
124 + dev-python/dbus-python[${PYTHON_USEDEP}]
125 + dev-libs/dbus-glib
126 + libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
127 + zeroconf? ( net-dns/avahi[dbus,gtk,python,${PYTHON_USEDEP}] )
128 + )
129 + gnome? (
130 + dev-python/libgnome-python[${PYTHON_USEDEP}]
131 + dev-python/egg-python[${PYTHON_USEDEP}]
132 + )
133 + gnome-keyring? ( dev-python/gnome-keyring-python[${PYTHON_USEDEP}] )
134 + idle? ( x11-libs/libXScrnSaver )
135 + jingle? ( net-libs/farstream:0.1[python,${PYTHON_USEDEP}] )
136 + kde? ( kde-apps/kwalletmanager )
137 + networkmanager? (
138 + dev-python/dbus-python[${PYTHON_USEDEP}]
139 + net-misc/networkmanager
140 + )
141 + spell? ( app-text/gtkspell:2 )
142 + srv? (
143 + || (
144 + dev-python/libasyncns-python[${PYTHON_USEDEP}]
145 + net-dns/bind-tools
146 + )
147 + )
148 + xhtml? ( dev-python/docutils[${PYTHON_USEDEP}] )"
149 +
150 +RESTRICT="test"
151 +
152 +PATCHES=(
153 + "${FILESDIR}/${PV}-0001-Add-config-option-to-activate-XEP-0146.patch" )
154 +
155 +S="${WORKDIR}"/${MY_P}
156 +
157 +src_prepare() {
158 + autotools-utils_src_prepare
159 + python_copy_sources
160 +}
161 +
162 +src_configure() {
163 + configuration() {
164 + local myeconfargs=(
165 + $(use_enable nls)
166 + $(use_with X x)
167 + --docdir="/usr/share/doc/${PF}"
168 + --libdir="$(python_get_sitedir)"
169 + --enable-site-packages
170 + )
171 + run_in_build_dir autotools-utils_src_configure
172 + }
173 + python_foreach_impl configuration
174 +}
175 +
176 +src_compile() {
177 + compilation() {
178 + run_in_build_dir autotools-utils_src_compile
179 + }
180 + python_foreach_impl compilation
181 +}
182 +
183 +src_test() {
184 + testing() {
185 + run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
186 + }
187 + python_foreach_impl testing
188 +}
189 +
190 +src_install() {
191 + installation() {
192 + run_in_build_dir autotools-utils_src_install
193 + python_optimize
194 + }
195 + python_foreach_impl installation
196 +
197 + rm "${ED}/usr/share/doc/${PF}/README.html" || die
198 + dohtml README.html
199 +}