gnu: sbcl-cl-cffi-gtk: Update to 20200417.
[jackhill/guix/guix.git] / gnu / packages / tor.scm
index 50295da..6c6da23 100644 (file)
@@ -1,11 +1,13 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +40,9 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages tls)
 (define-public tor
   (package
     (name "tor")
-    (version "0.3.2.9")
+    (version "0.4.2.7")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://dist.torproject.org/tor-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "03qn55c969zynnx71r82iaqnadpzq0qclq0zmjhb3n4qma8pnnj3"))))
+               "0v82ngwwmmcb7i9563bgsmrjy6xp83xyhqhaljygd0pkvlsxi886"))))
     (build-system gnu-build-system)
-    (arguments
-     `(#:configure-flags (list "--enable-gcc-hardening"
-                               "--enable-linker-hardening")))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("python" ,python-2)))  ; for tests
+       ("python" ,python-2)))           ; for tests
     (inputs
      `(("zlib" ,zlib)
        ("openssl" ,openssl)
        ("libevent" ,libevent)
        ("libseccomp" ,libseccomp)
        ("xz" ,xz)
-       ("zstd" ,zstd)))
+       ("zstd" ,zstd "lib")))
     (home-page "https://www.torproject.org/")
     (synopsis "Anonymous network router to improve privacy on the Internet")
     (description
@@ -89,27 +90,24 @@ the application layer) you need to install @code{torsocks}.")
 (define-public torsocks
   (package
     (name "torsocks")
-    (version "2.2.0")
+    (version "2.3.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://people.torproject.org/~dgoulet/"
-                                  name "/" name "-" version ".tar.xz"))
+                                  "torsocks/torsocks-" version ".tar.xz"))
               (sha256
                (base32
-                "0byr9ga9w79qz4vp0m11sbmspad7fsal9wm67r4znzb7zb7cis19"))))
+                "08inrkap29gikb6sdmb58z43hw4abwrfw7ny40c4xzdkss0vkwdr"))))
     (build-system gnu-build-system)
     (inputs
-     `(("which" ,which)
-       ("libcap" ,libcap)))
+     `(("libcap" ,libcap)))
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (add-after 'build 'absolutize
                     (lambda* (#:key inputs #:allow-other-keys)
                       (substitute* "src/bin/torsocks"
-                        (("getcap=`.*`")
-                         (string-append "getcap=" (which "getcap")))
-                        (("`which")
-                         (string-append "`" (which "which"))))
+                        (("getcap=.*")
+                         (string-append "getcap=" (which "getcap") "\n")))
                       #t)))))
     (home-page "https://www.torproject.org/")
     (synopsis "Use socks-friendly applications with Tor")
@@ -124,7 +122,7 @@ rejects UDP traffic from the application you're using.")
 (define-public privoxy
   (package
     (name "privoxy")
-    (version "3.0.26")
+    (version "3.0.28")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/ijbswa/Sources/"
@@ -132,7 +130,7 @@ rejects UDP traffic from the application you're using.")
                                  version "-stable-src.tar.gz"))
              (sha256
               (base32
-               "1n4wpxmahl8m2y3d1azxa8lrdbpaad007k458skxrpz57ss1br2p"))))
+               "0jl2yav1qzqnaqnnx8i6i53ayckkimcrs3l6ryvv7bda6v08rmxm"))))
     (build-system gnu-build-system)
     (arguments
      '(;; The default 'sysconfdir' is $out/etc; change that to
@@ -140,20 +138,13 @@ rejects UDP traffic from the application you're using.")
        #:configure-flags (list (string-append "--sysconfdir="
                                               (assoc-ref %outputs "out")
                                               "/etc/privoxy"))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'autoconf
-           (lambda _
-             ;; Unfortunately, this is not a tarball produced by
-             ;; "make dist".
-             (invoke "autoreconf" "-vfi")
-             #t)))
        #:tests? #f))
     (inputs
      `(("w3m" ,w3m)
        ("pcre" ,pcre)
-       ("zlib" ,zlib)
-       ("autoconf" ,autoconf)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
        ("automake" ,automake)))
     (home-page "https://www.privoxy.org")
     (synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
@@ -169,16 +160,16 @@ networks.")
 (define-public onionshare
   (package
     (name "onionshare")
-    (version "0.9.2")
+    (version "2.2")
     (source
       (origin
-        (method url-fetch)
-        (uri (string-append "https://github.com/micahflee/onionshare/archive/v"
-                            version ".tar.gz"))
-        (file-name (string-append name "-" version ".tar.gz"))
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/micahflee/onionshare.git")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
         (sha256
-         (base32
-          "02iv7dg15da57gy3zvfchnwwpr21n1gva7mqwpwr958ni2034smk"))))
+         (base32 "0m8ygxcyp3nfzzhxs2dfnpqwh1vx0aws44lszpnnczz4fks3a5j4"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -187,120 +178,83 @@ networks.")
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out        (assoc-ref outputs "out"))
                     (onionshare (string-append out "/share/onionshare")))
-               (substitute* "onionshare/strings.py"
-                 ;; correct the locale directory
-                 (("helpers.get_resource_path\\('locale'\\)")
-                  (string-append "'" onionshare "/locale'")))
-               (substitute* "onionshare/helpers.py"
-                 ;; correct the location of version.txt
-                 (("get_resource_path\\('version.txt'\\)")
-                  (string-append "'" onionshare "/version.txt'"))
-                 (("get_resource_path\\('wordlist.txt'\\)")
-                  (string-append "'" onionshare "/wordlist.txt'")))
-               (substitute* "onionshare/web.py"
-                 ;; fix the location of the html files
-                 (("helpers.get_resource_path\\('html/denied.html'\\)")
-                  (string-append "'" onionshare "/html/denied.html'"))
-                 (("helpers.get_resource_path\\('html/404.html'\\)")
-                  (string-append "'" onionshare "/html/404.html'"))
-                 (("helpers.get_resource_path\\('html/index.html'\\)")
-                  (string-append "'" onionshare "/html/index.html'")))
-               (substitute* "onionshare_gui/file_selection.py"
-                 ;; fancy box image in the GUI
-                 (("helpers.get_resource_path\\('images/drop_files.png'\\)")
-                  (string-append "'" onionshare "/images/drop_files.png'")))
-               (substitute* "onionshare_gui/server_status.py"
-                 (("helpers.get_resource_path\\('images/server_stopped.png'\\)")
-                  (string-append "'" onionshare "/images/server_stopped.png'"))
-                 (("helpers.get_resource_path\\('images/server_working.png'\\)")
-                  (string-append "'" onionshare "/images/server_working.png'"))
-                 (("helpers.get_resource_path\\('images/server_started.png'\\)")
-                  (string-append "'" onionshare "/images/server_started.png'")))
-               (substitute* "onionshare_gui/onionshare_gui.py"
-                  ;; for the icon on the GUI
-                 (("helpers.get_resource_path\\('images/logo.png'\\)")
-                  (string-append "'" onionshare "/images/logo.png'")))
-               (substitute* '("setup.py" "onionshare/helpers.py")
+               (substitute* '("setup.py" "onionshare/common.py")
                  (("sys.prefix,") (string-append "'" out "',")))
                (substitute* "setup.py"
-                 ;; for the nautilus plugin
+                 ;; For the nautilus plugin.
                  (("/usr/share/nautilus") "share/nautilus"))
-             #t)))
+               (substitute* "install/org.onionshare.OnionShare.desktop"
+                 (("/usr") out))
+               #t)))
          (delete 'check)
-         (add-before 'strip 'tests
+         (add-before 'strip 'check
            ;; After all the patching we run the tests after installing.
-           ;; This is also a known issue:
-           ;; https://github.com/micahflee/onionshare/issues/284
            (lambda _
-             (invoke "nosetests" "test")
+             (setenv "HOME" "/tmp")     ; Some tests need a writable homedir
+             (invoke "pytest" "tests/")
              #t)))))
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-pytest" ,python-pytest)))
     (inputs
-     `(("python-flask" ,python-flask)
+     `(("python-pycrypto" ,python-pycrypto)
+       ("python-flask" ,python-flask)
+       ("python-flask-httpauth" ,python-flask-httpauth)
        ("python-nautilus" ,python-nautilus)
        ("python-sip" ,python-sip)
        ("python-stem" ,python-stem)
+       ("python-pysocks" ,python-pysocks)
        ("python-pyqt" ,python-pyqt)))
     (home-page "https://onionshare.org/")
     (synopsis "Securely and anonymously share files")
-    (description "OnionShare lets you securely and anonymously share files of
-any size.  It works by starting a web server, making it accessible as a Tor
-hidden service, and generating an unguessable URL to access and download the
-files.  It doesn't require setting up a server on the internet somewhere or
-using a third party filesharing service.  You host the file on your own computer
-and use a Tor hidden service to make it temporarily accessible over the
-internet.  The other user just needs to use Tor Browser to download the file
-from you.")
-    (license (list license:gpl3+
-                   license:bsd-3))))    ; onionshare/socks.py
+    (description "OnionShare is a tool for securely and anonymously sending
+and receiving files using Tor onion services.  It works by starting a web
+server directly on your computer and making it accessible as an unguessable
+Tor web address that others can load in a Tor-enabled web browser to download
+files from you, or upload files to you.  It doesn't require setting up a
+separate server, using a third party file-sharing service, or even logging
+into an account.")
+    ;; Bundled, minified jquery is expat licensed.
+    (license (list license:gpl3+ license:expat))))
 
 (define-public nyx
-  ;; The last ‘arm’ relase was 5 years ago.  Meanwhile, python3 support has
-  ;; been added and the software was renamed to ‘nyx’.
-  (let ((commit "fea209127484d9b304b908a4711c9528b1d065bc")
-        (revision "1"))                 ; Guix package revision
-    (package
-      (name "nyx")
-      (version (string-append "1.9-"
-                              revision "." (string-take commit 7)))
-      (source
-       (origin
-         (method git-fetch)
-         (file-name (string-append name "-" version "-checkout"))
-         (uri (git-reference
-               (url "https://git.torproject.org/nyx.git")
-               (commit commit)))
-         (sha256
-          (base32
-           "1g0l4988076xg5gs0x0nxzlg58rfx5g5agmklvyh4yp03vxncdb9"))))
-      (build-system python-build-system)
-      (native-inputs
-       `(("python-mock" ,python-mock)
-         ("python-pep8" ,python-pep8)
-         ("python-pyflakes" ,python-pyflakes)))
-      (inputs
-       `(("python-stem" ,python-stem)))
-      (arguments
-       `(#:configure-flags
-         (list (string-append "--man-page="
-                              (assoc-ref %outputs "out")
-                              "/share/man/man1/nyx.1")
-               (string-append "--sample-path="
-                              (assoc-ref %outputs "out")
-                              "/share/doc/nyx/nyxrc.sample"))
-         #:use-setuptools? #f           ; setup.py still uses distutils
-         #:phases
-         (modify-phases %standard-phases
-           (replace 'check
-             (lambda _
-               (zero? (system* "./run_tests.py" "--unit")))))))
-      ;; A Nyx home page is ‘being worked on’.  Use Arm's for now, which at
-      ;; least mentions the new source repository:
-      (home-page "http://www.atagar.com/arm/")
-      (synopsis "Tor relay status monitor")
-      (description "Nyx (formerly Anonymizing Relay Monitor or \"arm\")
-monitors the performance of relays participating in the
+  (package
+    (name "nyx")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri name version))
+       (sha256
+        (base32
+         "02rrlllz2ci6i6cs3iddyfns7ang9a54jrlygd2jw1f9s6418ll8"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-stem" ,python-stem)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-man-page
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man")))
+               (install-file "nyx.1" (string-append man "/man1"))
+               #t)))
+         (add-after 'install 'install-sample-configuration
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (string-append out "/share/doc/" ,name "-" ,version)))
+               (install-file "web/nyxrc.sample" doc)
+               #t))))
+       ;; XXX The tests seem to require more of a real terminal than the build
+       ;; environment provides:
+       ;;   _curses.error: setupterm: could not find terminal
+       ;; With TERM=linux, the tests try to move the cursor and still fail:
+       ;;   _curses.error: cbreak() returned ERR
+       #:tests? #f))
+    (home-page "https://nyx.torproject.org/")
+    (synopsis "Tor relay status monitor")
+    (description
+     "Nyx monitors the performance of relays participating in the
 @uref{https://www.torproject.org/, Tor anonymity network}.  It displays this
 information visually and in real time, using a curses-based terminal interface.
 This makes Nyx well-suited for remote shell connections and servers without a
@@ -316,4 +270,4 @@ statistics and status reports on:
 @end enumerate
 
 Potential client and exit connections are scrubbed of sensitive information.")
-      (license license:gpl3+))))
+    (license license:gpl3+)))