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 ; 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: <2c02a9ac0609111723i379110bvc17841ab9352fb25@mail.gmail.com> Date: Tue, 12 Sep 2006 01:23:58 +0100 From: "Richard Roberts" To: gopher@complete.org Subject: [gopher] Re: embedded gopher servers In-Reply-To: <2c02a9ac0609111455w51abb9eat5d411b05f28df424@mail.gmail.com> MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline References: <2c02a9ac0609110659m14203736nabfd2166d2b0ef81@mail.gmail.com> <200609111440.k8BEegUe014284@floodgap.com> <2c02a9ac0609111455w51abb9eat5d411b05f28df424@mail.gmail.com> 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: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: Gopher X-List-ID: Gopher List-subscribe: List-owner: List-post: List-archive: X-list: gopher On 9/11/06, Richard Roberts wrote: > On 9/11/06, Cameron Kaiser 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*