Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/files/
Date: Sun, 13 Aug 2017 11:31:50
Message-Id: 1502623721.bb0af1cc7a9f95428a46884d0cb841bbe1360ce4.soap@gentoo
1 commit: bb0af1cc7a9f95428a46884d0cb841bbe1360ce4
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Fri Aug 11 14:53:14 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 13 11:28:41 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb0af1cc
7
8 net-p2p/transmission: remove unused patches/files
9
10 Closes: https://github.com/gentoo/gentoo/pull/5390
11
12 .../transmission/files/2.84-libevent-2.1.5.patch | 112 ---------------------
13 net-p2p/transmission/files/2.84-miniupnp14.patch | 18 ----
14 .../files/2.84-node_alloc-segfault.patch | 55 ----------
15 .../transmission-2.80-translations-path-fix.patch | 17 ----
16 .../transmission/files/transmission-daemon.initd.9 | 72 -------------
17 5 files changed, 274 deletions(-)
18
19 diff --git a/net-p2p/transmission/files/2.84-libevent-2.1.5.patch b/net-p2p/transmission/files/2.84-libevent-2.1.5.patch
20 deleted file mode 100644
21 index 48101ebfb77..00000000000
22 --- a/net-p2p/transmission/files/2.84-libevent-2.1.5.patch
23 +++ /dev/null
24 @@ -1,112 +0,0 @@
25 -Fix runtime issues with libevent-2.1.5
26 -
27 -Bug: https://bugs.gentoo.org/536922
28 -Index: libtransmission/peer-io.c
29 -===================================================================
30 ---- libtransmission/peer-io.c (revision 14541)
31 -+++ libtransmission/peer-io.c (revision 14545)
32 -@@ -1041,6 +1041,33 @@
33 - ***
34 - **/
35 -
36 -+static inline void
37 -+processBuffer (tr_crypto * crypto,
38 -+ struct evbuffer * buffer,
39 -+ size_t offset,
40 -+ size_t size,
41 -+ void (* callback) (tr_crypto *, size_t, const void *, void *))
42 -+{
43 -+ struct evbuffer_ptr pos;
44 -+ struct evbuffer_iovec iovec;
45 -+
46 -+ evbuffer_ptr_set (buffer, &pos, offset, EVBUFFER_PTR_SET);
47 -+
48 -+ do
49 -+ {
50 -+ if (evbuffer_peek (buffer, size, &pos, &iovec, 1) <= 0)
51 -+ break;
52 -+
53 -+ callback (crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base);
54 -+
55 -+ assert (size >= iovec.iov_len);
56 -+ size -= iovec.iov_len;
57 -+ }
58 -+ while (!evbuffer_ptr_set (buffer, &pos, iovec.iov_len, EVBUFFER_PTR_ADD));
59 -+
60 -+ assert (size == 0);
61 -+}
62 -+
63 - static void
64 - addDatatype (tr_peerIo * io, size_t byteCount, bool isPieceData)
65 - {
66 -@@ -1051,19 +1078,14 @@
67 - peer_io_push_datatype (io, d);
68 - }
69 -
70 --static void
71 --maybeEncryptBuffer (tr_peerIo * io, struct evbuffer * buf)
72 -+static inline void
73 -+maybeEncryptBuffer (tr_peerIo * io,
74 -+ struct evbuffer * buf,
75 -+ size_t offset,
76 -+ size_t size)
77 - {
78 - if (io->encryption_type == PEER_ENCRYPTION_RC4)
79 -- {
80 -- struct evbuffer_ptr pos;
81 -- struct evbuffer_iovec iovec;
82 -- evbuffer_ptr_set (buf, &pos, 0, EVBUFFER_PTR_SET);
83 -- do {
84 -- evbuffer_peek (buf, -1, &pos, &iovec, 1);
85 -- tr_cryptoEncrypt (&io->crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base);
86 -- } while (!evbuffer_ptr_set (buf, &pos, iovec.iov_len, EVBUFFER_PTR_ADD));
87 -- }
88 -+ processBuffer (&io->crypto, buf, offset, size, &tr_cryptoEncrypt);
89 - }
90 -
91 - void
92 -@@ -1070,7 +1092,7 @@
93 - tr_peerIoWriteBuf (tr_peerIo * io, struct evbuffer * buf, bool isPieceData)
94 - {
95 - const size_t byteCount = evbuffer_get_length (buf);
96 -- maybeEncryptBuffer (io, buf);
97 -+ maybeEncryptBuffer (io, buf, 0, byteCount);
98 - evbuffer_add_buffer (io->outbuf, buf);
99 - addDatatype (io, byteCount, isPieceData);
100 - }
101 -@@ -1126,6 +1148,16 @@
102 - ****
103 - ***/
104 -
105 -+static inline void
106 -+maybeDecryptBuffer (tr_peerIo * io,
107 -+ struct evbuffer * buf,
108 -+ size_t offset,
109 -+ size_t size)
110 -+{
111 -+ if (io->encryption_type == PEER_ENCRYPTION_RC4)
112 -+ processBuffer (&io->crypto, buf, offset, size, &tr_cryptoDecrypt);
113 -+}
114 -+
115 - void
116 - tr_peerIoReadBytesToBuf (tr_peerIo * io, struct evbuffer * inbuf, struct evbuffer * outbuf, size_t byteCount)
117 - {
118 -@@ -1141,17 +1173,7 @@
119 - evbuffer_add_buffer (outbuf, tmp);
120 - evbuffer_free (tmp);
121 -
122 -- /* decrypt if needed */
123 -- if (io->encryption_type == PEER_ENCRYPTION_RC4) {
124 -- struct evbuffer_ptr pos;
125 -- struct evbuffer_iovec iovec;
126 -- evbuffer_ptr_set (outbuf, &pos, old_length, EVBUFFER_PTR_SET);
127 -- do {
128 -- evbuffer_peek (outbuf, byteCount, &pos, &iovec, 1);
129 -- tr_cryptoDecrypt (&io->crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base);
130 -- byteCount -= iovec.iov_len;
131 -- } while (!evbuffer_ptr_set (outbuf, &pos, iovec.iov_len, EVBUFFER_PTR_ADD));
132 -- }
133 -+ maybeDecryptBuffer (io, outbuf, old_length, byteCount);
134 - }
135 -
136 - void
137
138 diff --git a/net-p2p/transmission/files/2.84-miniupnp14.patch b/net-p2p/transmission/files/2.84-miniupnp14.patch
139 deleted file mode 100644
140 index cdf64e10d93..00000000000
141 --- a/net-p2p/transmission/files/2.84-miniupnp14.patch
142 +++ /dev/null
143 @@ -1,18 +0,0 @@
144 -https://bugs.gentoo.org/562020
145 -
146 -Index: libtransmission/upnp.c
147 -===================================================================
148 ---- libtransmission/upnp.c (revision 14564)
149 -+++ libtransmission/upnp.c (revision 14565)
150 -@@ -88,7 +88,11 @@
151 -
152 - #if (MINIUPNPC_API_VERSION >= 8) /* adds ipv6 and error args */
153 - int err = UPNPDISCOVER_SUCCESS;
154 -+ #if (MINIUPNPC_API_VERSION >= 14) /* adds ttl */
155 -+ ret = upnpDiscover (msec, NULL, NULL, 0, 0, 2, &err);
156 -+ #else
157 - ret = upnpDiscover (msec, NULL, NULL, 0, 0, &err);
158 -+ #endif
159 - have_err = err != UPNPDISCOVER_SUCCESS;
160 - #else
161 - ret = upnpDiscover (msec, NULL, NULL, 0);
162
163 diff --git a/net-p2p/transmission/files/2.84-node_alloc-segfault.patch b/net-p2p/transmission/files/2.84-node_alloc-segfault.patch
164 deleted file mode 100644
165 index 717242879a7..00000000000
166 --- a/net-p2p/transmission/files/2.84-node_alloc-segfault.patch
167 +++ /dev/null
168 @@ -1,55 +0,0 @@
169 -Index: libtransmission/list.c
170 -===================================================================
171 ---- libtransmission/list.c (revision 14318)
172 -+++ libtransmission/list.c (revision 14319)
173 -@@ -30,20 +30,24 @@
174 - static tr_list*
175 - node_alloc (void)
176 - {
177 -- tr_list * ret;
178 -+ tr_list * ret = NULL;
179 -+ tr_lock * lock = getRecycledNodesLock ();
180 -
181 -- if (recycled_nodes == NULL)
182 -+ tr_lockLock (lock);
183 -+
184 -+ if (recycled_nodes != NULL)
185 - {
186 -- ret = tr_new (tr_list, 1);
187 -- }
188 -- else
189 -- {
190 -- tr_lockLock (getRecycledNodesLock ());
191 - ret = recycled_nodes;
192 - recycled_nodes = recycled_nodes->next;
193 -- tr_lockUnlock (getRecycledNodesLock ());
194 - }
195 -
196 -+ tr_lockUnlock (lock);
197 -+
198 -+ if (ret == NULL)
199 -+ {
200 -+ ret = tr_new (tr_list, 1);
201 -+ }
202 -+
203 - *ret = TR_LIST_CLEAR;
204 - return ret;
205 - }
206 -@@ -51,13 +55,15 @@
207 - static void
208 - node_free (tr_list* node)
209 - {
210 -+ tr_lock * lock = getRecycledNodesLock ();
211 -+
212 - if (node != NULL)
213 - {
214 - *node = TR_LIST_CLEAR;
215 -- tr_lockLock (getRecycledNodesLock ());
216 -+ tr_lockLock (lock);
217 - node->next = recycled_nodes;
218 - recycled_nodes = node;
219 -- tr_lockUnlock (getRecycledNodesLock ());
220 -+ tr_lockUnlock (lock);
221 - }
222 - }
223 -
224
225 diff --git a/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch b/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch
226 deleted file mode 100644
227 index 48638010f96..00000000000
228 --- a/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch
229 +++ /dev/null
230 @@ -1,17 +0,0 @@
231 -This patch was adapted from -2.77-transmations-path-fix.patch for 2.80
232 -
233 -Fix path for finding locale-specific files:
234 -QCoreApplication::applicationDirPath() transforms to '/usr/bin'
235 -and locale files are in '/usr/share/qt4/translations'
236 -
237 ---- qt/app.cc
238 -+++ qt/app.cc
239 -@@ -98,7 +98,7 @@
240 - installTranslator (&qtTranslator);
241 -
242 - // install the transmission translator
243 -- appTranslator.load (QString (MY_CONFIG_NAME) + "_" + QLocale::system ().name (), QCoreApplication::applicationDirPath () + "/translations");
244 -+ appTranslator.load (QString (MY_CONFIG_NAME) + "_" + QLocale::system ().name (), QLibraryInfo::location(QLibraryInfo::TranslationsPath) );
245 - installTranslator (&appTranslator);
246 -
247 - Formatter::initUnits ();
248
249 diff --git a/net-p2p/transmission/files/transmission-daemon.initd.9 b/net-p2p/transmission/files/transmission-daemon.initd.9
250 deleted file mode 100644
251 index 7a4acc98918..00000000000
252 --- a/net-p2p/transmission/files/transmission-daemon.initd.9
253 +++ /dev/null
254 @@ -1,72 +0,0 @@
255 -#!/sbin/openrc-run
256 -# Copyright 1999-2013 Gentoo Foundation
257 -# Distributed under the terms of the GNU General Public License v2
258 -
259 -extra_started_commands="reload"
260 -description="Transmission is a fast, easy and free bittorrent client"
261 -description_start="Start transmission-daemon server and web interface"
262 -description_stop="Stop transmission-daemon server and web interface"
263 -description_reload="Reload transmission-daemon settings"
264 -
265 -rundir=${rundir:-/var/run/transmission}
266 -pidfile=${pidfile:-${rundir}/transmission.pid}
267 -config_dir=${config_dir:-/var/lib/transmission/config}
268 -download_dir=${download_dir:-/var/lib/transmission/downloads}
269 -logfile=${logfile:-/var/log/transmission/transmission.log}
270 -runas_user=${runas_user:-transmission:transmission}
271 -
272 -SSD_OPTIONS=""
273 -
274 -depend() {
275 - need net
276 -}
277 -
278 -check_config() {
279 - if [ ! -d "${rundir}" ]; then
280 - mkdir "${rundir}"
281 - if [ -n "${runas_user}" ]; then
282 - chown -R ${runas_user} "${rundir}"
283 - fi
284 - fi
285 -
286 - # In case no config directory option passed use default
287 - if ! $(echo ${TRANSMISSION_OPTIONS} | grep -q -e '\B-g' -e '\B--config-dir'); then
288 - TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --config-dir ${config_dir}"
289 - # put download dir location on first run (and take it from config later)
290 - if [ ! -f ${config_dir}/settings.json ]; then
291 - TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --download-dir ${download_dir}"
292 - fi
293 - fi
294 -
295 - if [ -n "${runas_user}" ]; then
296 - if [ -f /etc/init.d/sysfs ]; then
297 - SSD_OPTIONS="${SSD_OPTIONS} --user ${runas_user}"
298 - else
299 - SSD_OPTIONS="${SSD_OPTIONS} --chuid ${runas_user}"
300 - fi
301 - fi
302 -}
303 -
304 -start() {
305 - check_config
306 -
307 - ebegin "Starting transmission daemon"
308 - start-stop-daemon --start --quiet --pidfile ${pidfile} ${SSD_OPTIONS} \
309 - --exec /usr/bin/transmission-daemon -- --pid-file ${pidfile} \
310 - $(test ${logfile} != "syslog" && echo --logfile ${logfile}) \
311 - ${TRANSMISSION_OPTIONS}
312 - eend $?
313 -}
314 -
315 -stop() {
316 - ebegin "Stopping transmission daemon"
317 - start-stop-daemon --stop --quiet --retry TERM/45/QUIT/15 --pidfile ${pidfile}
318 - eend $?
319 -}
320 -
321 -reload() {
322 - ebegin "Reloading transmission configuration"
323 - start-stop-daemon --signal HUP --pidfile ${pidfile}
324 - eend $?
325 -}
326 -