gnu: Transmission: Fix CVE-2018-10756.
[jackhill/guix/guix.git] / gnu / packages / bittorrent.scm
CommitLineData
3963a729 1;;; GNU Guix --- Functional package management for GNU
df66fee7 2;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
07366434 3;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
55fe9abd 4;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>
7b6a8e23 5;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
4b67098d 6;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
dbd0b46d 7;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4e58e9d0 8;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
f8fbe376 9;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
39da44c2 10;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
8322ecb0 11;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
4b3ff362 12;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
3963a729
LC
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages bittorrent)
30 #:use-module (guix packages)
31 #:use-module (guix download)
e906f4e1 32 #:use-module (guix git-download)
3963a729 33 #:use-module (guix build-system gnu)
feb767b2 34 #:use-module (guix build-system python)
4cdec09a 35 #:use-module (guix build-system glib-or-gtk)
b5b73a82 36 #:use-module ((guix licenses) #:prefix l:)
3c569804 37 #:use-module (gnu packages)
f66842dc 38 #:use-module (gnu packages adns)
4e58e9d0 39 #:use-module (gnu packages boost)
f66842dc
EF
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
4b67098d 42 #:use-module (gnu packages crypto)
3963a729 43 #:use-module (gnu packages curl)
f66842dc 44 #:use-module (gnu packages cyrus-sasl)
3963a729 45 #:use-module (gnu packages file)
c2be790f 46 #:use-module (gnu packages freedesktop)
3963a729 47 #:use-module (gnu packages glib)
4b67098d
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages gstreamer)
df66fee7 51 #:use-module (gnu packages gtk)
f66842dc
EF
52 #:use-module (gnu packages libevent)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages multiprecision)
55 #:use-module (gnu packages nettle)
2d8dc79c 56 #:use-module (gnu packages ncurses)
f66842dc 57 #:use-module (gnu packages pkg-config)
feb767b2 58 #:use-module (gnu packages python)
c2be790f 59 #:use-module (gnu packages python-crypto)
44d10b1f 60 #:use-module (gnu packages python-xyz)
f8fbe376 61 #:use-module (gnu packages qt)
cd0322a3 62 #:use-module (gnu packages sqlite)
f66842dc
EF
63 #:use-module (gnu packages ssh)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages xml))
3963a729
LC
66
67(define-public transmission
68 (package
69 (name "transmission")
0aa23e02 70 (version "2.94")
3963a729
LC
71 (source (origin
72 (method url-fetch)
73 (uri (string-append
547c4bd2
LF
74 "https://github.com/transmission/transmission-releases/raw/"
75 "master/transmission-" version ".tar.xz"))
0d796201 76 (patches (search-patches "transmission-CVE-2018-10756.patch"))
3963a729
LC
77 (sha256
78 (base32
0aa23e02 79 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
4cdec09a 80 (build-system glib-or-gtk-build-system)
3963a729
LC
81 (outputs '("out" ; library and command-line interface
82 "gui")) ; graphical user interface
83 (arguments
4cdec09a 84 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
dc1d3cde
KK
85 #:phases
86 (modify-phases %standard-phases
87 (add-after 'install 'move-gui
88 (lambda* (#:key outputs #:allow-other-keys)
89 ;; Move the GUI to its own output, so that "out" doesn't
90 ;; depend on GTK+.
91 (let ((out (assoc-ref outputs "out"))
92 (gui (assoc-ref outputs "gui")))
93 (mkdir-p (string-append gui "/bin"))
94 (rename-file (string-append out "/bin/transmission-gtk")
95 (string-append gui
96 "/bin/transmission-gtk"))
07366434 97
bf155ce3 98 ;; Move the '.desktop' and icon files as well.
dc1d3cde 99 (mkdir (string-append gui "/share"))
bf155ce3
PN
100 (for-each
101 (lambda (dir)
102 (rename-file (string-append out "/share/" dir)
103 (string-append gui "/share/" dir)))
104 '("applications" "icons" "pixmaps")))
dc1d3cde 105 #t)))))
3963a729
LC
106 (inputs
107 `(("inotify-tools" ,inotify-tools)
108 ("libevent" ,libevent)
109 ("curl" ,curl)
4f55441f 110 ("cyrus-sasl" ,cyrus-sasl)
3963a729
LC
111 ("openssl" ,openssl)
112 ("file" ,file)
113 ("zlib" ,zlib)
114 ("gtk+" ,gtk+)))
115 (native-inputs
116 `(("intltool" ,intltool)
117 ("pkg-config" ,pkg-config)))
c4cfa9c6 118 (home-page "https://transmissionbt.com/")
3963a729
LC
119 (synopsis "Fast and easy BitTorrent client")
120 (description
121 "Transmission is a BitTorrent client that comes with graphical,
122textual, and Web user interfaces. Transmission also has a daemon for
e881752c 123unattended operations. It supports local peer discovery, full encryption,
3963a729
LC
124DHT, µTP, PEX and Magnet Links.")
125
126 ;; COPYING reads:
127 ;;
128 ;; Transmission can be redistributed and/or modified under the terms of
129 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
130 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
131 ;; or any future license endorsed by Mnemosyne LLC.
132 ;;
133 ;; A few files files carry an MIT/X11 license header.
134 (license l:gpl3+)))
df66fee7
LC
135
136(define-public libtorrent
137 (package
138 (name "libtorrent")
9e171634 139 (version "0.13.8")
df66fee7
LC
140 (source (origin
141 (method url-fetch)
142 (uri (string-append
29b4c57b 143 "http://rtorrent.net/downloads/libtorrent-"
df66fee7
LC
144 version ".tar.gz"))
145 (sha256
146 (base32
9e171634 147 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
df66fee7
LC
148 (build-system gnu-build-system)
149 (inputs `(("openssl" ,openssl)
150 ("zlib" ,zlib)))
151 (native-inputs `(("pkg-config" ,pkg-config)
29b4c57b 152 ("cppunit" ,cppunit)))
df66fee7
LC
153 (synopsis "BitTorrent library of rtorrent")
154 (description
155 "LibTorrent is a BitTorrent library used by and developed in parallel
156with the BitTorrent client rtorrent. It is written in C++ with emphasis on
157speed and efficiency.")
9db04bf5 158 (home-page "https://github.com/rakshasa/libtorrent")
df66fee7 159 (license l:gpl2+)))
2d8dc79c
TUBK
160
161(define-public rtorrent
162 (package
163 (name "rtorrent")
0cbec2aa 164 (version "0.9.8")
2d8dc79c
TUBK
165 (source (origin
166 (method url-fetch)
167 (uri (string-append
9fbd458b 168 "http://rtorrent.net/downloads/rtorrent-"
2d8dc79c
TUBK
169 version ".tar.gz"))
170 (sha256
171 (base32
0cbec2aa 172 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
2d8dc79c
TUBK
173 (build-system gnu-build-system)
174 (inputs `(("libtorrent" ,libtorrent)
175 ("ncurses" ,ncurses)
176 ("curl" ,curl)
177 ("cyrus-sasl" ,cyrus-sasl)
178 ("openssl" ,openssl)
179 ("zlib" ,zlib)))
180 (native-inputs `(("pkg-config" ,pkg-config)
181 ("cppunit" ,cppunit)))
182 (synopsis "BitTorrent client with ncurses interface")
183 (description
184 "rTorrent is a BitTorrent client with an ncurses interface. It supports
185full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
186XML-RPC over SCGI.")
9db04bf5 187 (home-page "https://github.com/rakshasa/rtorrent")
2d8dc79c 188 (license l:gpl2+)))
e906f4e1
LF
189
190(define-public tremc
55fe9abd
LF
191 (let ((commit "4d50dab7376601daca13f7be6eabc0eaa057c1b0")
192 (revision "0"))
193 (package
194 (name "tremc")
195 (version (git-version "0.9.1" revision commit))
196 (source
197 (origin
198 (method git-fetch)
199 (uri (git-reference
200 (url "https://github.com/tremc/tremc.git")
201 (commit commit)))
202 (file-name (git-file-name name version))
203 (sha256
204 (base32
205 "0qpi65n8rv7l9mg8qyqx70z83inkl8v5r5nks65c99lhscdki0w7"))))
206 (build-system gnu-build-system)
207 (arguments
208 `(#:tests? #f ; no test suite
209 #:make-flags
210 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
211 #:phases
212 (modify-phases %standard-phases
213 ;; The software is just a Python script that must be copied into place.
214 (delete 'configure)
215 (delete 'build))))
216 (inputs
217 `(("python" ,python)))
218 (synopsis "Console client for the Transmission BitTorrent daemon")
219 (description "Tremc is a console client, with a curses interface, for the
e906f4e1 220Transmission BitTorrent daemon.")
55fe9abd
LF
221 (home-page "https://github.com/tremc/tremc")
222 (license l:gpl3+))))
feb767b2
LF
223
224(define-public transmission-remote-cli
225 (package
226 (name "transmission-remote-cli")
227 (version "1.7.1")
228 (source (origin
8322ecb0
RW
229 (method git-fetch)
230 (uri (git-reference
231 (url "https://github.com/fagga/transmission-remote-cli.git")
232 (commit (string-append "v" version))))
233 (file-name (git-file-name name version))
feb767b2
LF
234 (sha256
235 (base32
8322ecb0 236 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
feb767b2
LF
237 (build-system python-build-system)
238 (arguments
239 `(#:python ,python-2 ; only supports Python 2
240 #:tests? #f ; no test suite
241 #:phases (modify-phases %standard-phases
242 ;; The software is just a Python script that must be
243 ;; copied into place.
244 (delete 'build)
245 (replace 'install
246 (lambda* (#:key outputs #:allow-other-keys)
247 (let* ((out (assoc-ref outputs "out"))
248 (bin (string-append out "/bin"))
249 (man (string-append out "/share/man/man1"))
250 ;; FIXME install zsh completions
251 (completions (string-append out "/etc/bash_completion.d")))
252 (install-file "transmission-remote-cli" bin)
253 (install-file "transmission-remote-cli.1" man)
254 (install-file
255 (string-append
256 "completion/bash/"
257 "transmission-remote-cli-bash-completion.sh")
258 completions)))))))
259 (synopsis "Console client for the Transmission BitTorrent daemon")
260 (description "Transmission-remote-cli is a console client, with a curses
aaf111a2
LF
261interface, for the Transmission BitTorrent daemon. This package is no longer
262maintained upstream.")
feb767b2 263 (home-page "https://github.com/fagga/transmission-remote-cli")
aaf111a2
LF
264 (license l:gpl3+)
265 (properties `((superseded . ,tremc)))))
f66842dc
EF
266
267(define-public aria2
268 (package
269 (name "aria2")
7b6a8e23 270 (version "1.35.0")
f66842dc
EF
271 (source (origin
272 (method url-fetch)
7b6a8e23
EF
273 (uri (string-append "https://github.com/aria2/aria2/releases/"
274 "download/release-" version
275 "/aria2-" version ".tar.xz"))
f66842dc
EF
276 (sha256
277 (base32
7b6a8e23 278 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
f66842dc
EF
279 (build-system gnu-build-system)
280 (arguments
d2a7a145
EF
281 `(#:configure-flags (list "--enable-libaria2"
282 (string-append "--with-bashcompletiondir="
283 %output "/etc/bash_completion.d/"))
f66842dc
EF
284 #:phases
285 (modify-phases %standard-phases
286 (add-after 'unpack 'delete-socket-tests
287 (lambda _
288 (substitute* "test/LpdMessageDispatcherTest.cc"
289 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
290 (string-append "// " text)))
291 (substitute* "test/LpdMessageReceiverTest.cc"
292 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
9c64f76e
EF
293 (string-append "// " text)))
294 #t)))))
f66842dc 295 (native-inputs
5bed95ef
EF
296 `(("cppunit" ,cppunit) ; for the tests
297 ("pkg-config" ,pkg-config)))
f66842dc
EF
298 (inputs
299 `(("c-ares" ,c-ares)
f66842dc
EF
300 ("gnutls" ,gnutls)
301 ("gmp" ,gmp)
302 ("libssh2" ,libssh2)
303 ("libxml2" ,libxml2)
304 ("nettle" ,nettle)
305 ("sqlite" ,sqlite)
306 ("zlib" ,zlib)))
5bed95ef 307 (home-page "https://aria2.github.io/")
f66842dc
EF
308 (synopsis "Utility for parallel downloading files")
309 (description
310 "Aria2 is a lightweight, multi-protocol & multi-source command-line
311download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
312Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
313 (license l:gpl2+)))
4b67098d 314
4b67098d
315(define-public uget
316 (package
317 (name "uget")
b2d35dd9
NG
318 (version "2.2.0")
319 (source
320 (origin
321 (method url-fetch)
322 (uri (string-append "mirror://sourceforge/urlget/"
323 "uget%20%28stable%29/" version "/uget-"
324 version ".tar.gz"))
325 (sha256
326 (base32 "0rg2mr2cndxvnjib8zm5dp7y2hgbvnqkz2j2jmg0xlzfh9d34b2m"))))
4b67098d 327 (build-system gnu-build-system)
4b67098d
328 (inputs
329 `(("curl" ,curl)
330 ("gtk+" ,gtk+)
331 ("glib" ,glib)
332 ("gnutls" ,gnutls)
333 ("gstreamer" ,gstreamer)
334 ("libgcrypt" ,libgcrypt)
335 ("libnotify" ,libnotify)
336 ("openssl" ,openssl)))
337 (native-inputs
c7ad32d9
EF
338 `(("intltool" ,intltool)
339 ("pkg-config" ,pkg-config)))
950f1697 340 (home-page "https://ugetdm.com/")
4b67098d
341 (synopsis "Universal download manager with GTK+ interface")
342 (description
343 "uGet is portable download manager with GTK+ interface supporting
344HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
345downloads, download scheduling, download rate limiting.")
346 (license l:lgpl2.1+)))
8975d00c
TGR
347
348(define-public mktorrent
349 (package
350 (name "mktorrent")
fd90e396 351 (version "1.1")
8975d00c 352 (source (origin
4342a046
RW
353 (method git-fetch)
354 (uri (git-reference
355 (url "https://github.com/Rudde/mktorrent.git")
356 (commit (string-append "v" version))))
357 (file-name (git-file-name name version))
8975d00c
TGR
358 (sha256
359 (base32
4342a046 360 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
8975d00c
TGR
361 (build-system gnu-build-system)
362 (arguments
363 `(#:phases (modify-phases %standard-phases
364 (delete 'configure)) ; no configure script
365 #:make-flags (list "CC=gcc"
366 (string-append "PREFIX=" (assoc-ref %outputs "out"))
367 "NO_HASH_CHECK=1"
368 "USE_LARGE_FILES=1"
369 "USE_LONG_OPTIONS=1"
370 "USE_PTHREADS=1")
371 #:tests? #f)) ; no tests
fd90e396 372 (home-page "https://github.com/Rudde/mktorrent")
8975d00c 373 (synopsis "Utility to create BitTorrent metainfo files")
897bd0b5
TGR
374 (description
375 "mktorrent is a simple command-line utility to create BitTorrent
376@dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
377files and whole directories. It can add multiple trackers and web seed URLs,
378and set the @code{private} flag to disallow advertisement through the
379distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
8975d00c
TGR
380and will take advantage of multiple processor cores where possible.")
381 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
382 l:gpl2+)))) ; with permission to link with OpenSSL
4e58e9d0
JL
383
384(define-public libtorrent-rasterbar
385 (package
386 (name "libtorrent-rasterbar")
9a232125 387 (version "1.1.14")
4e58e9d0
JL
388 (source (origin
389 (method url-fetch)
390 (uri
391 (string-append
3fde051b 392 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
3c569804
MB
393 (string-join (string-split version #\.) "_")
394 "/libtorrent-rasterbar-" version ".tar.gz"))
4e58e9d0
JL
395 (sha256
396 (base32
9a232125 397 "0sn3ingmk1lk9p56f9ifgdwhjg0qizcfgv15wyc9s71nm5fya7sc"))))
4e58e9d0
JL
398 (build-system gnu-build-system)
399 (arguments
400 `(#:configure-flags
401 (list (string-append "--with-boost-libdir="
402 (assoc-ref %build-inputs "boost")
403 "/lib")
404 "--enable-python-binding"
7960bb27 405 "--enable-tests")
4e58e9d0
JL
406 #:make-flags (list
407 (string-append "LDFLAGS=-Wl,-rpath="
0fe041bd 408 (assoc-ref %outputs "out") "/lib"))))
4e58e9d0
JL
409 (inputs `(("boost" ,boost)
410 ("openssl" ,openssl)))
e22c2c78 411 (native-inputs `(("python" ,python-wrapper)
4e58e9d0 412 ("pkg-config" ,pkg-config)))
9270b2fb 413 (home-page "https://www.libtorrent.org/")
4e58e9d0
JL
414 (synopsis "Feature complete BitTorrent implementation")
415 (description
416 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
417focusing on efficiency and scalability. It runs on embedded devices as well as
418desktops.")
419 (license l:bsd-2)))
420
f8fbe376
FT
421(define-public qbittorrent
422 (package
423 (name "qbittorrent")
dbd0b46d 424 (version "4.2.1")
0748a7b2
TGR
425 (source
426 (origin
427 (method git-fetch)
428 (uri (git-reference
429 (url "https://github.com/qbittorrent/qBittorrent.git")
430 (commit (string-append "release-" version))))
431 (file-name (git-file-name name version))
432 (sha256
dbd0b46d 433 (base32 "0bz4l7awkx4qf3gh9c8gj8fab989439zj8qy4x9r36wxdjg5cxil"))))
f8fbe376
FT
434 (build-system gnu-build-system)
435 (arguments
436 `(#:configure-flags
437 (list (string-append "--with-boost-libdir="
438 (assoc-ref %build-inputs "boost")
439 "/lib")
440 "--enable-debug"
aaa88937
GLV
441 "QMAKE_LRELEASE=lrelease")
442 #:modules ((guix build gnu-build-system)
443 (guix build qt-utils)
444 (guix build utils))
445 #:imported-modules (,@%gnu-build-system-modules
446 (guix build qt-utils))
447 #:phases
448 (modify-phases %standard-phases
449 (add-after 'install 'wrap-qt
450 (lambda* (#:key outputs #:allow-other-keys)
451 (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
452 #t)))))
f8fbe376
FT
453 (native-inputs
454 `(("pkg-config" ,pkg-config)
455 ("qttools" ,qttools)))
456 (inputs
457 `(("boost" ,boost)
458 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
459 ("openssl" ,openssl)
ea236462 460 ("python" ,python-wrapper)
f8fbe376
FT
461 ("qtbase" ,qtbase)
462 ("qtsvg" ,qtsvg)
463 ("zlib" ,zlib)))
464 (home-page "https://www.qbittorrent.org/")
465 (synopsis "Graphical BitTorrent client")
466 (description
467 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
468libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
4e58e9d0 469
f8fbe376
FT
470It aims to be a good alternative to all other BitTorrent clients out there.
471qBittorrent is fast, stable and provides unicode support as well as many
472features.")
473 (license l:gpl2+)))
c2be790f
NN
474
475(define-public deluge
476 (package
477 (name "deluge")
478 (version "1.3.15")
479 (source
480 (origin
481 (method url-fetch)
482 (uri (string-append
483 "http://download.deluge-torrent.org/source/deluge-"
484 version ".tar.xz"))
485 (sha256
486 (base32
487 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
488 (build-system python-build-system)
489 (inputs
490 `(("libtorrent" ,libtorrent-rasterbar)
491 ("python2-chardet" ,python2-chardet)
492 ("python2-pygtk" ,python2-pygtk)
493 ("python2-pyopenssl" ,python2-pyopenssl)
494 ("python2-pyxdg" ,python2-pyxdg)
495 ("python2-service-identity" ,python2-service-identity)
496 ("python2-twisted" ,python2-twisted)))
497 (native-inputs
498 `(("intltool" ,intltool)))
499 (arguments
500 `(#:python ,python-2))
501 (home-page "https://www.deluge-torrent.org/")
502 (synopsis "Fully-featured cross-platform ​BitTorrent client")
503 (description
504 "Deluge contains the common features to BitTorrent clients such as
505Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
506(PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
507speed limits. Deluge heavily utilises the ​libtorrent library. It is
508designed to run as both a normal standalone desktop application and as a
509​client-server.")
510 (license l:gpl3+)))