unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#45151] [PATCH 0/1] Add openfortivpn
@ 2020-12-09 21:41 David Dashyan
  2020-12-09 22:55 ` [bug#45151] [PATCH 1/1] gnu: " David Dashyan
  2020-12-12 20:03 ` [bug#45151] [PATCH] " David Dashyan
  0 siblings, 2 replies; 7+ messages in thread
From: David Dashyan @ 2020-12-09 21:41 UTC (permalink / raw)
  To: 45151; +Cc: David Dashyan

base-commit: 2a23e3f582941aee3461aa7b52e0ccb78c9e540d
From 2612f19ac8d9fcc70e01de84f7a7017747bd3d83 Mon Sep 17 00:00:00 2001
Hey!  Don't know all ins and outs of this package but I'm using this package
and it works fine.

 gnu/packages/vpn.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

David Dashyan (1):
  gnu: Add openfortivpn


-- 
2.29.2

Date: Wed, 09 Dec 2020 23:56:05 +0300
Message-ID: <87sg8evguy.fsf@davie.li>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#45151] [PATCH 1/1] gnu: Add openfortivpn
  2020-12-09 21:41 [bug#45151] [PATCH 0/1] Add openfortivpn David Dashyan
@ 2020-12-09 22:55 ` David Dashyan
  2020-12-10 18:20   ` Leo Famulari
  2020-12-12 20:03 ` [bug#45151] [PATCH] " David Dashyan
  1 sibling, 1 reply; 7+ messages in thread
From: David Dashyan @ 2020-12-09 22:55 UTC (permalink / raw)
  To: 45151; +Cc: David Dashyan

---
 gnu/packages/vpn.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 04c34c3d4d..8af9b89414 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
+;;; Copyright © 2020 David Dashyan <mail@davie.li>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -287,6 +288,35 @@ and probably others.")
    (license license:lgpl2.1)
    (home-page "https://www.infradead.org/openconnect/")))
 
+(define-public openfortivpn
+  (package
+    (name "openfortivpn")
+    (version "1.15.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/adrienverge/openfortivpn")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qsfgpxg553s8rc9cyrc4k96z0pislxsdxb9wyhp8fdprkak2mw2"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("openssl" ,openssl)
+       ("autoconf" ,autoconf)
+       ("autotools" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("ppp" ,ppp)))
+    (home-page "https://openvpn.net/")
+    (synopsis "Client for PPP+SSL VPN tunnel services")
+    (description
+     "Client for PPP+SSL VPN tunnel services.  It spawns a pppd process and
+operates the communication between the gateway and this process.  It is
+compatible with Fortinet VPNs.")
+    (license license:gpl3+)))
+
 (define-public openvpn
   (package
     (name "openvpn")
-- 
2.29.2





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#45151] [PATCH 1/1] gnu: Add openfortivpn
  2020-12-09 22:55 ` [bug#45151] [PATCH 1/1] gnu: " David Dashyan
@ 2020-12-10 18:20   ` Leo Famulari
  2020-12-12 19:58     ` David Dashyan
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2020-12-10 18:20 UTC (permalink / raw)
  To: David Dashyan; +Cc: 45151

On Thu, Dec 10, 2020 at 01:55:53AM +0300, David Dashyan wrote:
> +(define-public openfortivpn

Thanks! Overall, looks good to me.

> +    (native-inputs
> +     `(("openssl" ,openssl)
> +       ("autoconf" ,autoconf)
> +       ("autotools" ,automake)
> +       ("pkg-config" ,pkg-config)))

In general, native-inputs are dependencies that are only used while
building the package. Typically, OpenSSL is also used at run-time, so it
probably should be a regular input. What do you think?

> +    (propagated-inputs
> +     `(("ppp" ,ppp)))

Propagated-inputs are dependencies that will be installed along with
your package when installing the package with e.g. `guix install
openfortivpn`. This is for situations where the dependency is needed at
run-time but for which the program lacks the ability to refer to
dependencies directly.

For example, a shell script that needs to invoke `ls` will need to find
it on $PATH. It would not be easy to automatically substitute calls to
`ls` to the full store path of `/gnu/store/...-coreutils-8.32/bin/ls`.

However, most dependencies can be regular inputs, because the built
package will refer to the full "/gnu/store/...-ppp-version/" path
wherever it needs to invoke the dependency.

So, does the package work if the openssl and ppp dependencies are just
'inputs' rather than native-inputs and propagated-inputs?

You can use `guix gc --references $(guix build openfortinet)` to see
what store references the built package has kept. These references are
literally just strings that look like filenames in /gnu/store, found by
scanning when the package build is completed. This tool can help one
decide if an input should be propagated — if the built package refers to
ppp, it likely can find it without propagation. Of course, practical
testing is still the true measure.

I hope that helps!

> +    (home-page "https://openvpn.net/")

Is this the "home-page" of this program? Usually this field points to
the site where the project is coordinated or marketed. It may even be
the GitHub repo page.

Can you send a revised patch based on this feedback? Please don't
hesitate to ask any followup questions :)




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#45151] [PATCH 1/1] gnu: Add openfortivpn
  2020-12-10 18:20   ` Leo Famulari
@ 2020-12-12 19:58     ` David Dashyan
  2020-12-12 21:57       ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: David Dashyan @ 2020-12-12 19:58 UTC (permalink / raw)
  To: Leo Famulari; +Cc: David Dashyan, 45151

[-- Attachment #1: Type: text/plain, Size: 1476 bytes --]


Hello Leo!

> I hope that helps!
This does help.  Thank you very much for detailed review and tips!  I
remember when I packaged it first it didn't run without ppp binary:

ERROR:  /usr/sbin/pppd: No such file or directory.

Mistakenly I assumed that propagated inputs is THE way to include
runtime dependencies such as commands.  I greped the binary -- is does
point to /gnu/store/xxx-ppp-2.4.8-1.yyy/sbin/pppd :) Didn't think of
that.

> So, does the package work if the openssl and ppp dependencies are just
> 'inputs' rather than native-inputs and propagated-inputs?
I've tested the package with suggested changes.  It does work with ppp
and openssl in inputs field.  ldd points to libssl okay.

$ guix environment --pure --ad-hoc openfortivpn
[env]$ /run/setuid-programs/sudo --preserve-env \
           openfortivpn -c ~/path/to/my/config

> You can use `guix gc --references $(guix build openfortinet)` to see
> what store references the built package has kept. These references are
> literally just strings that look like filenames in /gnu/store, found
> by scanning when the package build is completed.
Great I will use it!

> Is this the "home-page" of this program?
Whoops I think i copypasted from definition below.  This package doesn't
have a home page it seems.

BTW I'm what is the right way to send fixes patch? Sending the whole
thing again is easier on your side then adding commit patch on top?

-- 
David aka zzappie

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#45151] [PATCH] gnu: Add openfortivpn
  2020-12-09 21:41 [bug#45151] [PATCH 0/1] Add openfortivpn David Dashyan
  2020-12-09 22:55 ` [bug#45151] [PATCH 1/1] gnu: " David Dashyan
@ 2020-12-12 20:03 ` David Dashyan
  2020-12-12 21:56   ` bug#45151: " Leo Famulari
  1 sibling, 1 reply; 7+ messages in thread
From: David Dashyan @ 2020-12-12 20:03 UTC (permalink / raw)
  To: 45151; +Cc: David Dashyan

gnu: openfortivpn: adjust inputs and homepage
---
 gnu/packages/vpn.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 04c34c3d4d..90e6778ead 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
+;;; Copyright © 2020 David Dashyan <mail@davie.li>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -287,6 +288,35 @@ and probably others.")
    (license license:lgpl2.1)
    (home-page "https://www.infradead.org/openconnect/")))
 
+(define-public openfortivpn
+  (package
+    (name "openfortivpn")
+    (version "1.15.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/adrienverge/openfortivpn")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1qsfgpxg553s8rc9cyrc4k96z0pislxsdxb9wyhp8fdprkak2mw2"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("autotools" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("openssl" ,openssl)
+       ("ppp" ,ppp)))
+    (home-page "https://github.com/adrienverge/openfortivpn")
+    (synopsis "Client for PPP+SSL VPN tunnel services")
+    (description
+     "Client for PPP+SSL VPN tunnel services.  It spawns a pppd process and
+operates the communication between the gateway and this process.  It is
+compatible with Fortinet VPNs.")
+    (license license:gpl3+)))
+
 (define-public openvpn
   (package
     (name "openvpn")

base-commit: 91e35e32a4938e0e37499c64fa8ed3e7cf51dce3
-- 
2.29.2





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#45151: [PATCH] gnu: Add openfortivpn
  2020-12-12 20:03 ` [bug#45151] [PATCH] " David Dashyan
@ 2020-12-12 21:56   ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2020-12-12 21:56 UTC (permalink / raw)
  To: David Dashyan; +Cc: 45151-done

On Sat, Dec 12, 2020 at 11:03:03PM +0300, David Dashyan wrote:
> gnu: openfortivpn: adjust inputs and homepage

Thanks! I adjusted the commit message, made sure the description was
composed of complete sentences, and pushed as
18918ebeeb152731e06634a003e8cf3edd24f6a3.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#45151] [PATCH 1/1] gnu: Add openfortivpn
  2020-12-12 19:58     ` David Dashyan
@ 2020-12-12 21:57       ` Leo Famulari
  0 siblings, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2020-12-12 21:57 UTC (permalink / raw)
  To: David Dashyan; +Cc: 45151

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Sat, Dec 12, 2020 at 10:58:26PM +0300, David Dashyan wrote:
> BTW I'm what is the right way to send fixes patch? Sending the whole
> thing again is easier on your side then adding commit patch on top?

Yes, it's easier if you send a completely new patch rather than an
incremental patch. Thanks again!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-12 21:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 21:41 [bug#45151] [PATCH 0/1] Add openfortivpn David Dashyan
2020-12-09 22:55 ` [bug#45151] [PATCH 1/1] gnu: " David Dashyan
2020-12-10 18:20   ` Leo Famulari
2020-12-12 19:58     ` David Dashyan
2020-12-12 21:57       ` Leo Famulari
2020-12-12 20:03 ` [bug#45151] [PATCH] " David Dashyan
2020-12-12 21:56   ` bug#45151: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).