Complete.Org: Mailing Lists: Archives: gopher: September 2006:
[gopher] Re: embedded gopher servers
Home

[gopher] Re: embedded gopher servers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: gopher@xxxxxxxxxxxx
Subject: [gopher] Re: embedded gopher servers
From: "Richard Roberts" <rich@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Sep 2006 01:23:58 +0100
Reply-to: gopher@xxxxxxxxxxxx

On 9/11/06, Richard Roberts <richard.roberts@xxxxxxxxxx> wrote:
> On 9/11/06, Cameron Kaiser <spectre@xxxxxxxxxxxx> wrote:
> > > Possibly a glaring oversight on the part of the openwrt distribution
> > > people- they include an http server to run on the router, yet there
> > > seems to be no trace of a gopher server for said distro.
> > >
> > > Does anybody have any idea if such a package might exist for it? If
> > > not, I'm not beyond poking at source code, but I'd rather not
> > > re-invent the wheel
> >
> > UMN gopherd is pretty much dead, but depending on your proclivities,
> >
> > Python fiends like pyGopher: gopher://gopher.quux.org/
> > Perl demons might like Bucktooth (shameless plug):
> >         gopher://gopher.floodgap.com/
> >
> > Both of these are relatively small and should fit within the firmware 
> > confines
> > of an embedded system like this (you may need to cross-configure Bucktooth
> > on a bigger box and import the outputted object, though).
>
> I bit the bullet and gave bucktooth a shot...
>
> As far as I can make out, the only perl avaliable for openwrt is
> microperl, which configure is happy with.
> Having installed xinetd, run microperl configure.xinetd (ln'ing
> microperl to perl to stop it gasping at the fact that there's no perl
> in the path) and sorting out the directory, all seems well.
>
> However... Pointing firefox (for want of a better client) at
> gopher://192.168.3.1 gives me an empty index, but neither top/ps -A
> seem to see buckd or microperl startup.
>
> Now. Interestingly, an http request to the same address, but port 70,
> causes the browser to choke. In my mind, that meant that buckd was
> having a go at something but was being foiled.
>
> So, I run buckd from the command line and I get the following:
>
> Unsupported socket function "getpeername" called at ./buckd line 29.
>
> Soooo. I believe the issue lies with the fact that microperl is
> *exactly* what is says on the tin. So, all I need to do to get things
> running is to cross compile perl with the appropriate bits.
> Heh. You see that? I say it like it might be easy!
> Allegedly there is a way to get microperl to load other stuff in,
> however, I've not worked it out yet. But it does seem promising to at
> least see an index page off the ickle router.
>
>
> Rich (playing at being a programmer...)
>

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.

So, for posterity (will assume a passing knowledge of configuring
openwrt- a couple of hours fiddling should be more than plenty)...

1. Aquire linksys wrt** router and install openwrt. (http://openwrt.org).

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

(this info from http://forum.openwrt.org/viewtopic.php?id=4122 -except
the 'packages needed', that was trial and error!)

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.

xinetd
ibgcc   

As far as I can recall, these are the only packages I installed above
and beyond the base 'White Russian' install.

4. Install bucktooth as per the xinetd instructions. You will probably
need to create a
/usr/local path, but beyond that, all is expected.

And that, allegedly, is that.

The result can be seen (give me 10 minutes to sort the port forwarding
out...) at gopher://gopher.multijoy.com

The gophermap is the sample one with a modified header (to prove it's
not a fake!), because it's getting a bit late.

Hope someone might find this useful at some point.

Rich
*look ma, someone's embedded a danged gopher in ma router*



[Prev in Thread] Current Thread [Next in Thread]