Subject: bug#41431: closed (Re: [bug#41431] [PATCH] gnu: Add protonvpn-cli.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 24 May 2020 20:03:02 +0000

Your bug report

#41431: [PATCH] gnu: Add protonvpn-cli.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
41431: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41431
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#41431] [PATCH] gnu: Add protonvpn-cli.
From: Ludovic Courtès <[email-masked]>
To: Ryan Prior <[email-masked]>
Cc: [email-masked]
Date: Sun, 24 May 2020 22:02:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Ryan Prior <[email-masked]> skribis:

> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Saturday, May 23, 2020 2:17 PM, Ludovic Courtès <[email-masked]> wrote:
>
>> there are definitely tests
>
> What makes you so sure? `grep -r '\Wtest' .` suggests that the only reference to testing in the whole repo is in protonvpn_cli/utils.py (wait_for_network) which tests for a network connection at runtime. I don't think they are shipping any tests; setup.py can test to make sure you can actually install your dependencies, but that's not a meaningful upstream test, it's a default behavior.

Oh my bad.  I was fooled by the fact that “something” seemed to be
happening when enabling tests.

>> > -   (license license:gpl3)))
>>
>> This is ‘gpl3+’ AFAICS since nothing says “version 3 only.”
>
> Nothing says "or any later version" either—I had been under the impression that the "plus" was opt-in, but reading GPLv3 again it appears to be opt-out. I don't know, that's not my area of expertise. I've updated the patch to gpl3+ with your recommendation in any case.

Right, there’s this paragraph in the license:

    Each version is given a distinguishing version number.  If the
  Program specifies that a certain numbered version of the GNU General
  Public License "or any later version" applies to it, you have the
  option of following the terms and conditions either of that numbered
  version or of any later version published by the Free Software
  Foundation.  If the Program does not specify a version number of the
  GNU General Public License, you may choose any version ever published
  by the Free Software Foundation.

In Guix we encode it by adding “+” as in “or any later version”.

> From: Ryan Prior <[email-masked]>
> Date: Wed, 20 May 2020 22:28:11 -0500
> Subject: [PATCH] gnu: Add protonvpn-cli.
>
> * gnu/packages/vpn.scm (protonvpn-cli): New variable.

Applied, thanks!

Ludo’.

Subject: [PATCH] gnu: Add protonvpn-cli.
From: Ryan Prior <[email-masked]>
To: [email-masked]
Date: Thu, 21 May 2020 03:29:46 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/vpn.scm (protonvpn-cli): New variable.
---
 gnu/packages/vpn.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index da881493bf..b47cad2ae0 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2019 Rutger Helling <[email-masked]>
 ;;; Copyright © 2019 Ricardo Wurmus <[email-masked]>
 ;;; Copyright © 2020 Brice Waegeneire <[email-masked]>
+;;; Copyright © 2020 Ryan Prior <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -55,6 +56,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml))
 
@@ -311,6 +313,38 @@ security protocol that utilizes SSL/TLS for key exchange.  It is capable of
 traversing network address translators (@dfn{NAT}s) and firewalls.")
     (license license:gpl2)))
 
+(define-public protonvpn-cli
+  (package
+    (name "protonvpn-cli")
+    (version "2.2.2")
+    (source
+     (origin
+       ;; PyPI has a ".whl" file but not a proper source release.
+       ;; Thus, fetch code from Git.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ProtonVPN/linux-cli.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ixjb02kj4z79whm1izd8mrn2h0rp9cmw4im1qvp93rahqxdd4n8"))))
+    (build-system python-build-system)
+    (arguments '(#:tests? #f))
+    (native-inputs
+     `(("docopt" ,python-docopt)))
+    (inputs
+     `(("pythondialog" ,python-pythondialog)
+       ("requests" ,python-requests)))
+    (propagated-inputs
+     `(("openvpn" ,openvpn)))
+    (synopsis "Command-line client for ProtonVPN")
+    (description
+     "ProtonVPN is a secure point-to-point virtual private networking service
+with a gratis tier.")
+    (home-page "https://github.com/ProtonVPN/linux-cli")
+    (license license:gpl3)))
+
 (define-public tinc
   (package
     (name "tinc")
-- 
2.26.2