<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Text File" newcontext="true">
<p>
Received: with ECARTIS (v1.0.0; list gopher);
 Mon, 11 Sep 2006 19:24:07 -0500 (CDT)
Received: from wx-out-0506.google.com ([66.249.82.228])
	by glockenspiel.complete.org with esmtp
	(Exim 4.50)
	id 1GMw4H-0000sj-TX
	for gopher@complete.org; Mon, 11 Sep 2006 19:24:06 -0500
Received: by wx-out-0506.google.com with SMTP id i26so2049344wxd
        for &lt;gopher@complete.org&gt;; Mon, 11 Sep 2006 17:23:59 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth;
        b=F1aNIs/Jq0PHvjTCLttaArnUUJOqeZUuSdpHPhEEnEJeidozwJ294PxyyuCNFhkIavuFD9VHzLxyveJjv1bSKOqCQO5TouGrYNCujplXkhc1N3VDT9NsxmXM7RWk7vE/O5UGIkTxb16Ziv72hNckkG/We681eCQSpFtXlq9Udpw=
Received: by 10.70.32.6 with SMTP id f6mr7181249wxf;
        Mon, 11 Sep 2006 17:23:58 -0700 (PDT)
Received: by 10.70.66.7 with HTTP; Mon, 11 Sep 2006 17:23:58 -0700 (PDT)
Message-ID: &lt;2c02a9ac0609111723i379110bvc17841ab9352fb25@mail.gmail.com&gt;
Date: Tue, 12 Sep 2006 01:23:58 +0100
From: &quot;Richard Roberts&quot; &lt;rich@jesusstolemymoped.com&gt;
To: gopher@complete.org
Subject: [gopher] Re: embedded gopher servers
In-Reply-To: &lt;2c02a9ac0609111455w51abb9eat5d411b05f28df424@mail.gmail.com&gt;
MIME-Version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
References: &lt;2c02a9ac0609110659m14203736nabfd2166d2b0ef81@mail.gmail.com&gt;
	 &lt;200609111440.k8BEegUe014284@floodgap.com&gt;
	 &lt;2c02a9ac0609111455w51abb9eat5d411b05f28df424@mail.gmail.com&gt;
X-Google-Sender-Auth: bad847af7898d7ab
X-Spam-Status: No (score 0.9): AWL=0.916, RCVD_BY_IP=0.024
X-Virus-Scanned: by Exiscan on glockenspiel.complete.org at Mon,
 11 Sep 2006 19:24:06 -0500
X-archive-position: 1389
X-ecartis-version: Ecartis v1.0.0
Sender: gopher-bounce@complete.org
Errors-to: gopher-bounce@complete.org
X-original-sender: rich@jesusstolemymoped.com
Precedence: bulk
Reply-to: gopher@complete.org
List-help: &lt;mailto:ecartis@complete.org?Subject=help&gt;
List-unsubscribe: &lt;mailto:gopher-request@complete.org?Subject=unsubscribe&gt;
List-software: Ecartis version 1.0.0
List-Id: Gopher &lt;gopher.complete.org&gt;
X-List-ID: Gopher &lt;gopher.complete.org&gt;
List-subscribe: &lt;mailto:gopher-request@complete.org?Subject=subscribe&gt;
List-owner: &lt;mailto:jgoerzen@complete.org&gt;
List-post: &lt;mailto:gopher@complete.org&gt;
List-archive: &lt;http://www.complete.org/mailinglists/archives/&gt;
X-list: gopher
</p>
<p>On 9/11/06, Richard Roberts &lt;richard.roberts@port.ac.uk&gt; wrote:
&gt; On 9/11/06, Cameron Kaiser &lt;spectre@floodgap.com&gt; wrote:
&gt; &gt; &gt; Possibly a glaring oversight on the part of the openwrt distribution
&gt; &gt; &gt; people- they include an http server to run on the router, yet there
&gt; &gt; &gt; seems to be no trace of a gopher server for said distro.
&gt; &gt; &gt;
&gt; &gt; &gt; Does anybody have any idea if such a package might exist for it? If
&gt; &gt; &gt; not, I&#x27;m not beyond poking at source code, but I&#x27;d rather not
&gt; &gt; &gt; re-invent the wheel
&gt; &gt;
&gt; &gt; UMN gopherd is pretty much dead, but depending on your proclivities,
&gt; &gt;
&gt; &gt; Python fiends like pyGopher: gopher://gopher.quux.org/
&gt; &gt; Perl demons might like Bucktooth (shameless plug):
&gt; &gt;         gopher://gopher.floodgap.com/
&gt; &gt;
&gt; &gt; Both of these are relatively small and should fit within the firmware confines
&gt; &gt; of an embedded system like this (you may need to cross-configure Bucktooth
&gt; &gt; on a bigger box and import the outputted object, though).
&gt;
&gt; I bit the bullet and gave bucktooth a shot...
&gt;
&gt; As far as I can make out, the only perl avaliable for openwrt is
&gt; microperl, which configure is happy with.
&gt; Having installed xinetd, run microperl configure.xinetd (ln&#x27;ing
&gt; microperl to perl to stop it gasping at the fact that there&#x27;s no perl
&gt; in the path) and sorting out the directory, all seems well.
&gt;
&gt; However... Pointing firefox (for want of a better client) at
&gt; gopher://192.168.3.1 gives me an empty index, but neither top/ps -A
&gt; seem to see buckd or microperl startup.
&gt;
&gt; Now. Interestingly, an http request to the same address, but port 70,
&gt; causes the browser to choke. In my mind, that meant that buckd was
&gt; having a go at something but was being foiled.
&gt;
&gt; So, I run buckd from the command line and I get the following:
&gt;
&gt; Unsupported socket function &quot;getpeername&quot; called at ./buckd line 29.
&gt;
&gt; Soooo. I believe the issue lies with the fact that microperl is
&gt; *exactly* what is says on the tin. So, all I need to do to get things
&gt; running is to cross compile perl with the appropriate bits.
&gt; Heh. You see that? I say it like it might be easy!
&gt; Allegedly there is a way to get microperl to load other stuff in,
&gt; however, I&#x27;ve not worked it out yet. But it does seem promising to at
&gt; least see an index page off the ickle router.
&gt;
&gt;
&gt; Rich (playing at being a programmer...)
&gt;
</p>
<p>Well, stone the crows. My little linksys router *is* running buckd
now. Turns out someone had already done the hard work for me and cross
compiled perl.
</p>
<p>So, for posterity (will assume a passing knowledge of configuring
openwrt- a couple of hours fiddling should be more than plenty)...
</p>
<p>1. Aquire linksys wrt** router and install openwrt. (http://openwrt.org).
</p>
<p>2. From ftp://ftp.riss-telecom.ru/pub/openwrt/local/whiterussian/packages/perl/,
wget the following packages to your router:
perl
perlbase-essential
perlbase-file
perlbase-locale
perlbase-text
perlbase-xsloader
</p>
<p>(this info from http://forum.openwrt.org/viewtopic.php?id=4122 -except
the &#x27;packages needed&#x27;, that was trial and error!)
</p>
<p>3. using ipkg, (or from the openwrt interface) make sure that the
following are installed, and then install the perl packages you
downloaded in the last step.
</p>
<p>xinetd
ibgcc
</p>
<p>As far as I can recall, these are the only packages I installed above
and beyond the base &#x27;White Russian&#x27; install.
</p>
<p>4. Install bucktooth as per the xinetd instructions. You will probably
need to create a
/usr/local path, but beyond that, all is expected.
</p>
<p>And that, allegedly, is that.
</p>
<p>The result can be seen (give me 10 minutes to sort the port forwarding
out...) at gopher://gopher.multijoy.com
</p>
<p>The gophermap is the sample one with a modified header (to prove it&#x27;s
not a fake!), because it&#x27;s getting a bit late.
</p>
<p>Hope someone might find this useful at some point.
</p>
<p>Rich
*look ma, someone&#x27;s embedded a danged gopher in ma router*
</p>
<p></p>
</card>
</wml>
