[PATCH 0/1] Add openfortivpn

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • David Dashyan
Owner
unassigned
Submitted by
David Dashyan
Severity
normal

Debbugs page

David Dashyan wrote 4 years ago
(address . guix-patches@gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201209214123.27762-1-mail@davie.li
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>
David Dashyan wrote 4 years ago
[PATCH 1/1] gnu: Add openfortivpn
(address . 45151@debbugs.gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201209225553.28596-1-mail@davie.li
---
gnu/packages/vpn.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
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
Leo Famulari wrote 4 years ago
(name . David Dashyan)(address . mail@davie.li)(address . 45151@debbugs.gnu.org)
X9JnCm5SHyM2KoLI@jasmine.lan
On Thu, Dec 10, 2020 at 01:55:53AM +0300, David Dashyan wrote:
Toggle quote (2 lines)
> +(define-public openfortivpn

Thanks! Overall, looks good to me.

Toggle quote (6 lines)
> + (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?

Toggle quote (3 lines)
> + (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!

Toggle quote (2 lines)
> + (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 :)
David Dashyan wrote 4 years ago
(name . Leo Famulari)(address . leo@famulari.name)
87mtyilrtp.fsf@davie.li
Hello Leo!

Toggle quote (1 lines)
> 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.

Toggle quote (2 lines)
> 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

Toggle quote (4 lines)
> 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!

Toggle quote (1 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEO/jjc8vL6ogZzi191p8mXoi/t8oFAl/VIOUACgkQ1p8mXoi/
t8rXLw//VafPtXNLlQ+VQzKhxySh27mA+AA+ZQdIzjtcSBtmDJ4OZLvb7LmQ0/Zk
m/TxEnbml5r8hZtkOY+Pr6m9Y+tGpzPwqGZmbZopbiarniTP49bnLpbhOMEXjkBR
ymt8BNn3EAWKWO25GLD3byccBXkE+epWnbA3PCVFopvh39rfZ1Uw/uaq2fxA/v+U
a9yxcye3uDliwJI+TsaVeaL0O18wcp8VYNKE2XLZQiG2iWICf0cNROyhgu3GmZT3
hW7ex1uvDNSYAZBSB1as6DNRr69rd90DKPZ/QRROA0t88ebptAcbWxQbq849sl7M
Xd6dQXB4t3KBrEvTnhgNE8l6ZvGCGQiKIiS/GEkxlcxnBunqCZby0XM0Ky3sXR/A
Djtlk56cChlXnCEjx2C2QU8UNCRtm/R5DdMEksinmxgCTUiOGhkNZVfN5WtevlKi
Nchom/pBWnFogmk4+fc5gsBJ62vty+aaBwiWCoerGPG6vLMablnGylDJZcDlOqy2
1qQSwCLj1B5EEJjOpuAaich/1b6vmk9y3aGn1KJZy6UKHsx6nVFukBwyiwji3I+H
ORsR2/kBfsKcGyXxHnMUddnp5t8fDNCSyD1Gd+WmpqXjZXgsP2naCJy6gSRXfNtH
EqpnOCu/ecdBDCgSzsLs85SHeZN0occd4Cy2BgDudPxR6voMM3g=
=iOzU
-----END PGP SIGNATURE-----

David Dashyan wrote 4 years ago
[PATCH] gnu: Add openfortivpn
(address . 45151@debbugs.gnu.org)(name . David Dashyan)(address . mail@davie.li)
20201212200303.13683-1-mail@davie.li
gnu: openfortivpn: adjust inputs and homepage
---
gnu/packages/vpn.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (52 lines)
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
Leo Famulari wrote 4 years ago
Re: [bug#45151] [PATCH 1/1] gnu: Add openfortivpn
(name . David Dashyan)(address . mail@davie.li)(address . 45151@debbugs.gnu.org)
X9U8z7eiPEvGERQd@jasmine.lan
On Sat, Dec 12, 2020 at 10:58:26PM +0300, David Dashyan wrote:
Toggle quote (3 lines)
> 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!
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl/VPM8ACgkQJkb6MLrK
fwhWQQ//ZVGJMaVEfJQ3hyo7pxWJKg2B9+Ke7UBs2t7paBWQw4Cm6fLqfBHxYo6I
OHizIHDYxXkmqImECuxlcIw7jummB3bJ6yK717wTFZ4wiyms8AvES8XmuVTP4SA5
BvisJt5gZ6mEzq97NZ++yH5ySqF2rKL4U2DydbM8X4BP60A4ayPWCLCXMAwv7Dxp
YAH7vhPFthLJGmAgSwMLWbPX5rMHSVYaVJjUjizpbrG7RyanBvUpbLHVXQ+bp/3+
ogxtLpEOUAm8LhvJ9PUdlaf9zoZXbb6I1fD3HcbwBNY1DSoc51tLuzAuAR2w0soV
Gc3bSTKUoKlSzY5QHBkC07OUgG54eZvXWE7KSNf2E1ch2W3uwIiNdfi4rQFpYzub
g6xqBCOOlPCzoqov3E9eMugntci38Tv1Nis7mA0/3mDIJjF34dcdnYTSU551OO4R
XqQsa2AerOkf3VTjHBTkVaXHBtOrdfQYy9svabpk1msYxqKykYJizRieKlsKAUZy
gmsG2IFEZsseOy04jy0Iz8Vd682mX7VN8OD1t8MDkEYM72+/HFpxaD2kMRcl1Y7L
KMpQNP/30SjdUeg1+NGVsWOMYS+b29YzVvkamYpps9El3YAerMLtuioAqtAJIHDV
YDLH2Z+gtm0sGX7PNz6Uj1U11ybWs1lHO2jznT/PZGX0NCztXTg=
=XTO9
-----END PGP SIGNATURE-----


Leo Famulari wrote 4 years ago
Re: [bug#45151] [PATCH] gnu: Add openfortivpn
(name . David Dashyan)(address . mail@davie.li)(address . 45151-done@debbugs.gnu.org)
X9U8q9UkOQmj88Mp@jasmine.lan
On Sat, Dec 12, 2020 at 11:03:03PM +0300, David Dashyan wrote:
Toggle quote (2 lines)
> 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.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 45151@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 45151
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help