Subject: Geomyidae (Gopher server)

From: ng0 <[email-masked]>
Date: Tue, 28 Nov 2017 18:54:51 +0000

So basically it works. I've just been undusting the patch
before it becomes bitrot.
To be useful in automation I'll finish my service at some
point, but the point of this small application is that
it can be run from the commandline without requiring
lots of tricky options.
It must be run as root. Example test that follows geomyidae(8):

user@abyayala ~ mkdir /tmp/gopherd ; cp ~/Downloads/geomyidae-0.29/index.gph /tmp/gopherd/
user@abyayala /gnu/store/j8q61m2wfqg2akl4y0lqacmyds9i7vc7-geomyidae-0.29/bin$ ./geomyidae -d -b /tmp/gopherd -p 70
getlistenfd4: Permission denied
user@abyayala /gnu/store/j8q61m2wfqg2akl4y0lqacmyds9i7vc7-geomyidae-0.29/bin$ sudo ./geomyidae -d -b /tmp/gopherd -p 70

# now point lynx (or another browser) to the server, in other words: lynx gopher://localhost
# output in the console where the server was started:

[Tue Nov 28 18:48:24 UTC 2017|::ffff:127.0.0.1:34650]  (serving)
-- 
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
  WWW: https://n0.is
From 8094126c54f37a95dd344869491e334c8e4c2c37 Mon Sep 17 00:00:00 2001
From: ng0 <[email-masked]>
Date: Tue, 9 May 2017 18:52:31 +0000
Subject: [PATCH 1/2] gnu: Add geomyidae.

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

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 33689042a..fdb2fcae1 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -6130,3 +6130,39 @@ based on this library, allowing Perl programmers to easily validate HTML.")
 object.  It's meant as a replacement for @code{HTML::Lint}, which is written
 in Perl but is not nearly as capable as @code{HTML::Tidy}.")
     (license l:artistic2.0)))
+
+(define-public geomyidae
+  (package
+    (name "geomyidae")
+    (version "0.29")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://git.r-36.net/geomyidae/snapshot/"
+                           "geomyidae-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "0qxgxp6psfrgfqhndyq2z54nb1qrmvvljddnxdwp207jbz366bja"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list "CC=gcc"
+                          (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:tests? #f ;No tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "http://git.r-36.net/geomyidae")
+    (synopsis "Small gopher server")
+    (description
+     "Geomyidae is a gopherd for GNU/Linux and BSD.
+Its features include:
+
+@enumerate
+@item gopher menus (see index.gph for an example)
+@item dir listings (if no index.gph was found)
+@item cgi support (.cgi files are executed)
+@item search support in CGI files
+@item logging (-l option) and loglevels (-v option)
+@end enumerate\n")
+    (license l:x11)))
-- 
2.15.0