diff mbox series

[bug#38059,2/2] gnu: Add pagekite.

Message ID bba0c677-768f-4a8c-b734-18bd2331eeac@www.fastmail.com
State Accepted
Headers show
Series gnu: Add pagekite. | expand

Commit Message

Alex Griffin Nov. 4, 2019, 2:47 p.m. UTC

Comments

Ludovic Courtès Nov. 10, 2019, 11:22 a.m. UTC | #1
"Alex Griffin" <a@ajgrf.com> skribis:

> From 835678c62d341ea4cd8d93f6475ac955198ef276 Mon Sep 17 00:00:00 2001
> From: Alex Griffin <a@ajgrf.com>
> Date: Sat, 2 Nov 2019 14:11:51 -0500
> Subject: [PATCH 2/2] gnu: Add pagekite.
>
> * gnu/packages/web.scm (pagekite): New variable.

[...]

> +    (arguments
> +     `(#:python ,python-2

Can it work with Python 3.x?  It would be really great.  Perhaps there
are not-yet-upstreamed patches floating around for that?

> +    (synopsis "Make localhost servers publicly visible")
> +    (description
> +     "PageKite implements a tunneled reverse proxy which makes it easy to make
> +a service (such as an HTTP or SSH server) on localhost visible to the wider
> +Internet, even behind NAT or restrictive firewalls.  A managed front-end relay
> +service is available at https://pagekite.net/, or you can run your own.")
                           ^
Use @url here.

Thanks,
Ludo’.
Alex Griffin Nov. 11, 2019, 1:05 a.m. UTC | #2
On Sun, Nov 10, 2019, at 11:22 AM, Ludovic Courtès wrote:
> "Alex Griffin" <a@ajgrf.com> skribis:
> > +    (arguments
> > +     `(#:python ,python-2
> 
> Can it work with Python 3.x?  It would be really great.  Perhaps there
> are not-yet-upstreamed patches floating around for that?

There are indeed some [WIP patches][1], but I couldn't get them working. I think it's likely that PageKite will get Python 3 support before Python 2 is EOL. There's a discussion [here][2] with maintainers from both Fedora and Debian expressing concern. At the moment, though, I don't think I can package it with Python 3 unless I finish porting it myself.

[1]: https://github.com/pagekite/PyPagekite/pull/71
[2]: https://github.com/pagekite/PyPagekite/issues/40
Ludovic Courtès Nov. 11, 2019, 2:02 p.m. UTC | #3
Hi Alex,

"Alex Griffin" <a@ajgrf.com> skribis:

> On Sun, Nov 10, 2019, at 11:22 AM, Ludovic Courtès wrote:
>> "Alex Griffin" <a@ajgrf.com> skribis:
>> > +    (arguments
>> > +     `(#:python ,python-2
>> 
>> Can it work with Python 3.x?  It would be really great.  Perhaps there
>> are not-yet-upstreamed patches floating around for that?
>
> There are indeed some [WIP patches][1], but I couldn't get them working. I think it's likely that PageKite will get Python 3 support before Python 2 is EOL. There's a discussion [here][2] with maintainers from both Fedora and Debian expressing concern. At the moment, though, I don't think I can package it with Python 3 unless I finish porting it myself.
>
> [1]: https://github.com/pagekite/PyPagekite/pull/71
> [2]: https://github.com/pagekite/PyPagekite/issues/40

OK, sounds good.  Perhaps just add a comment referring to these two URLs
for future reference, and we’ll leave at that for now.

Thank you,
Ludo’.
diff mbox series

Patch

From 835678c62d341ea4cd8d93f6475ac955198ef276 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Sat, 2 Nov 2019 14:11:51 -0500
Subject: [PATCH 2/2] gnu: Add pagekite.

* gnu/packages/web.scm (pagekite): New variable.
---
 gnu/packages/networking.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 9173871497..703c3e744c 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -32,6 +32,7 @@ 
 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2019 Tonton <tonton@riseup.net>
+;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2676,3 +2677,39 @@  maximum extent possible.")
 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
 module @code{batman-adv}, for Layer 2.")
    (license license:gpl2+)))
+
+(define-public pagekite
+  (package
+    (name "pagekite")
+    (version "1.0.0.190721")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://pagekite.net/pk/src/pagekite-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0y4vaqd3pjr6if8jcnhjwignkxgrajmnx1rd1p37anj8xjg7l8zh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-man-page
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (man (string-append out "/share/man")))
+               (invoke "make"
+                       (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
+                       "doc/pagekite.1")
+               (install-file "doc/pagekite.1" (string-append man "/man1"))
+               #t))))))
+    (inputs
+     `(("python2-socksipychain" ,python2-socksipychain)))
+    (home-page "https://pagekite.net/")
+    (synopsis "Make localhost servers publicly visible")
+    (description
+     "PageKite implements a tunneled reverse proxy which makes it easy to make
+a service (such as an HTTP or SSH server) on localhost visible to the wider
+Internet, even behind NAT or restrictive firewalls.  A managed front-end relay
+service is available at https://pagekite.net/, or you can run your own.")
+    (license license:agpl3+)))
-- 
2.23.0