all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add sslh.
@ 2016-09-12  0:32 Tobias Geerinckx-Rice
  2016-09-12  3:23 ` Leo Famulari
  2016-09-12 10:03 ` Efraim Flashner
  0 siblings, 2 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-09-12  0:32 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/networking.scm (sslh): New variable.
---
 gnu/packages/networking.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index c4edbc3..1818b62 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages flex)
@@ -54,7 +55,9 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages textutils)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages valgrind))
 
 (define-public macchanger
   (package
@@ -824,3 +827,69 @@ in dynamically linked programs and redirects them through one or more SOCKS or
 HTTP proxies.")
     (home-page "https://github.com/rofl0r/proxychains-ng")
     (license license:gpl2+)))
+
+(define-public sslh
+  (package
+    (name "sslh")
+    (version "1.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/yrutschle/sslh/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1vzw7a7s9lhspbn5zn3hw8hir4pkjgbd68yys4hfsnjp1h7bzjpn"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (add-before 'check 'fix-tests
+                     (lambda* _
+                       (substitute* "./t"
+                         (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
+                         (("ip6-localhost") "localhost"))))
+         ;; Many of these files are mentioned in the man page. Install them.
+         (add-after 'install 'install-documentation
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (doc (string-append out "/share/doc")))
+                        (install-file "README.md" doc)
+                        (for-each
+                         (lambda (file)
+                           (install-file file (string-append doc "/examples")))
+                         (append (find-files "." "\\.cfg")
+                                 (find-files "scripts" ".*"))))
+                      #t)))
+       #:make-flags (list "CC=gcc"
+                          "USELIBCAP=1"
+                          "USELIBWRAP=1"
+                          (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:test-target "test"))
+    (native-inputs
+     ;; Tests dependencies.
+     `(("lcov" ,lcov)
+       ("perl" ,perl)
+       ("perl-io-socket-inet6" ,perl-io-socket-inet6)
+       ("perl-socket6" ,perl-socket6)
+       ("psmisc" ,psmisc)
+       ("valgrind" ,valgrind)))
+    (inputs
+     `(("libcap" ,libcap)
+       ("libconfig" ,libconfig)
+       ("tcp-wrappers" ,tcp-wrappers)))
+    (home-page "http://www.rutschle.net/tech/sslh.shtml")
+    (synopsis "Applicative network protocol demultiplexer")
+    (description
+     "sslh is a network protocol demultiplexer.  It acts like a switchboard,
+accepting connections from clients on one port and forwarding them to different
+servers based on the contents of the first received data packet.  Detection of
+common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
+implemented, but any other protocol that matches a regular expression can be
+added.  sslh's name comes from its original application of serving both SSH and
+HTTPS on port 443, allowing SSH connections from inside corporate firewalls
+that block port 22.")
+    (license (list license:bsd-2        ; tls.[ch]
+                   license:gpl2+))))    ; everything else
-- 
2.7.4

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12  0:32 [PATCH] gnu: Add sslh Tobias Geerinckx-Rice
@ 2016-09-12  3:23 ` Leo Famulari
  2016-09-12  4:20   ` Tobias Geerinckx-Rice
  2016-09-12 10:03 ` Efraim Flashner
  1 sibling, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-09-12  3:23 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

On Mon, Sep 12, 2016 at 02:32:08AM +0200, Tobias Geerinckx-Rice wrote:
> * gnu/packages/networking.scm (sslh): New variable.

Interesting package!

> +         ;; Many of these files are mentioned in the man page. Install them.
> +         (add-after 'install 'install-documentation
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let* ((out (assoc-ref outputs "out"))
> +                             (doc (string-append out "/share/doc")))
> +                        (install-file "README.md" doc)
> +                        (for-each
> +                         (lambda (file)
> +                           (install-file file (string-append doc "/examples")))
> +                         (append (find-files "." "\\.cfg")
> +                                 (find-files "scripts" ".*"))))

Rather than '/share/doc', I think the doc variable should use
'/share/doc/sslh'. Otherwise, when installed into a profile, the
examples will be in '~/.guix-profile/share/doc'. It would be better if
they were in '~/.guix-profile/share/doc/sslh'.

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12  3:23 ` Leo Famulari
@ 2016-09-12  4:20   ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-09-12  4:20 UTC (permalink / raw)
  To: leo; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 302 bytes --]

Leo,

Thanks!

On Mon, Sep 12, 2016 at 02:32:08AM +0200, Tobias Geerinckx-Rice wrote:
> (doc (string-append out "/share/doc")

And for catching this.

What's annoying is that I *always* miss this, I *know* that I always
miss this, and I keep missing it anyway...

Kind regards,

T G-R


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12  0:32 [PATCH] gnu: Add sslh Tobias Geerinckx-Rice
  2016-09-12  3:23 ` Leo Famulari
@ 2016-09-12 10:03 ` Efraim Flashner
  2016-09-12 12:33   ` Tobias Geerinckx-Rice
  1 sibling, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2016-09-12 10:03 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

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

On Mon, Sep 12, 2016 at 02:32:08AM +0200, Tobias Geerinckx-Rice wrote:
> * gnu/packages/networking.scm (sslh): New variable.
> ---
>  gnu/packages/networking.scm | 71 ++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 70 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index c4edbc3..1818b62 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -40,6 +40,7 @@
>    #:use-module (gnu packages audio)
>    #:use-module (gnu packages bison)
>    #:use-module (gnu packages check)
> +  #:use-module (gnu packages code)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages databases)
>    #:use-module (gnu packages flex)
> @@ -54,7 +55,9 @@
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages pkg-config)
>    #:use-module (gnu packages python)
> -  #:use-module (gnu packages tls))
> +  #:use-module (gnu packages textutils)
> +  #:use-module (gnu packages tls)
> +  #:use-module (gnu packages valgrind))
>  
>  (define-public macchanger
>    (package
> @@ -824,3 +827,69 @@ in dynamically linked programs and redirects them through one or more SOCKS or
>  HTTP proxies.")
>      (home-page "https://github.com/rofl0r/proxychains-ng")
>      (license license:gpl2+)))
> +
> +(define-public sslh
> +  (package
> +    (name "sslh")
> +    (version "1.18")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/yrutschle/sslh/archive/v"
> +                           version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1vzw7a7s9lhspbn5zn3hw8hir4pkjgbd68yys4hfsnjp1h7bzjpn"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)            ; no configure script
> +         (add-before 'check 'fix-tests
> +                     (lambda* _
                                ^^^
               Don't need the underscore here

> +                       (substitute* "./t"
> +                         (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
> +                         (("ip6-localhost") "localhost"))))

            return #t on the substitute

> +         ;; Many of these files are mentioned in the man page. Install them.
> +         (add-after 'install 'install-documentation
> +                    (lambda* (#:key outputs #:allow-other-keys)
> +                      (let* ((out (assoc-ref outputs "out"))
> +                             (doc (string-append out "/share/doc")))
> +                        (install-file "README.md" doc)
> +                        (for-each
> +                         (lambda (file)
> +                           (install-file file (string-append doc "/examples")))
> +                         (append (find-files "." "\\.cfg")
> +                                 (find-files "scripts" ".*"))))
> +                      #t)))
> +       #:make-flags (list "CC=gcc"
> +                          "USELIBCAP=1"
> +                          "USELIBWRAP=1"
> +                          (string-append "PREFIX=" (assoc-ref %outputs "out")))
> +       #:test-target "test"))
> +    (native-inputs
> +     ;; Tests dependencies.
> +     `(("lcov" ,lcov)
> +       ("perl" ,perl)
> +       ("perl-io-socket-inet6" ,perl-io-socket-inet6)
> +       ("perl-socket6" ,perl-socket6)
> +       ("psmisc" ,psmisc)
> +       ("valgrind" ,valgrind)))
> +    (inputs
> +     `(("libcap" ,libcap)
> +       ("libconfig" ,libconfig)
> +       ("tcp-wrappers" ,tcp-wrappers)))
> +    (home-page "http://www.rutschle.net/tech/sslh.shtml")
> +    (synopsis "Applicative network protocol demultiplexer")
> +    (description

Is the name specifically lowercase? Otherwise it should be a capital S,
and again a few lines down.

> +     "sslh is a network protocol demultiplexer.  It acts like a switchboard,
> +accepting connections from clients on one port and forwarding them to different
> +servers based on the contents of the first received data packet.  Detection of
> +common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
> +implemented, but any other protocol that matches a regular expression can be
> +added.  sslh's name comes from its original application of serving both SSH and
> +HTTPS on port 443, allowing SSH connections from inside corporate firewalls
> +that block port 22.")
> +    (license (list license:bsd-2        ; tls.[ch]
> +                   license:gpl2+))))    ; everything else
> -- 
> 2.7.4
> 
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12 10:03 ` Efraim Flashner
@ 2016-09-12 12:33   ` Tobias Geerinckx-Rice
  2016-09-12 13:52     ` Efraim Flashner
  2016-09-12 21:14     ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-09-12 12:33 UTC (permalink / raw)
  To: efraim; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 680 bytes --]

Efraim,

Thanks!

On 12/09/16 12:03, Efraim Flashner wrote:
>> +                     (lambda* _
>                                 ^^^
>                Don't need the underscore here

I don't see how that could work. Did you mean to drop the asterisk?
If not, I'll need a bit more info.

>             return #t on the substitute

Done.

> Is the name specifically lowercase? Otherwise it should be a capital S,
> and again a few lines down.

Yes. See the README.

Now, grepping reveals a single ‘Sslh’ in there, but all other instances
are lowercase. That seems to be the preferred form. I have no preference
in the matter.

Kind regards,

T G-R


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12 12:33   ` Tobias Geerinckx-Rice
@ 2016-09-12 13:52     ` Efraim Flashner
  2016-09-12 21:14     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2016-09-12 13:52 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

You don't need both the asterisk and the underscore for the lambda. I'm not sure of the guile reason, but when you have a 'let*' then you use 'lambda'. For setenv or zero, for example, you'd use 'lambda _'


On September 12, 2016 3:33:42 PM GMT+03:00, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>Efraim,
>
>Thanks!
>
>On 12/09/16 12:03, Efraim Flashner wrote:
>>> +                     (lambda* _
>>                                 ^^^
>>                Don't need the underscore here
>
>I don't see how that could work. Did you mean to drop the asterisk?
>If not, I'll need a bit more info.
>
>>             return #t on the substitute
>
>Done.
>
>> Is the name specifically lowercase? Otherwise it should be a capital
>S,
>> and again a few lines down.
>
>Yes. See the README.
>
>Now, grepping reveals a single ‘Sslh’ in there, but all other instances
>are lowercase. That seems to be the preferred form. I have no
>preference
>in the matter.
>
>Kind regards,
>
>T G-R

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

* Re: [PATCH] gnu: Add sslh.
  2016-09-12 12:33   ` Tobias Geerinckx-Rice
  2016-09-12 13:52     ` Efraim Flashner
@ 2016-09-12 21:14     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-09-12 21:14 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> On 12/09/16 12:03, Efraim Flashner wrote:
>>> +                     (lambda* _
>>                                 ^^^
>>                Don't need the underscore here
>
> I don't see how that could work. Did you mean to drop the asterisk?
> If not, I'll need a bit more info.

You’re right, Tobias.

The underscore has no special meaning; it’s just a conventional name for
unused variables.  You could write (lambda args …) or (lambda hello! …)
and that would work equally well.

‘lambda*’ is a variant of ‘lambda’ that supports keyword and optional
parameter, something you definitely don’t need here (info "(guile)
lambda* and define*").

Ludo’.

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

end of thread, other threads:[~2016-09-12 21:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12  0:32 [PATCH] gnu: Add sslh Tobias Geerinckx-Rice
2016-09-12  3:23 ` Leo Famulari
2016-09-12  4:20   ` Tobias Geerinckx-Rice
2016-09-12 10:03 ` Efraim Flashner
2016-09-12 12:33   ` Tobias Geerinckx-Rice
2016-09-12 13:52     ` Efraim Flashner
2016-09-12 21:14     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.