Mark Glenda Down for some Perl

2008-10-30 17:49

I’ve developed an addiction to Markdown after a few weeks using it here to write posts. So I want markdown for some chores on my main system, which is generally Plan 9. This means I need Perl to interpret the markdown.pl script.

There is a Perl for Plan 9, in sources/extra/perl.iso.bz2. These replica(1) ISO images are tricky, because they contain replica scripts for kfs(4) file systems, rather than the newer fossil(4). Editing the scripts for fossil is no big deal - but the iso is obviously a read-only mount, so putting the edited script back “in place” is a perfect job for name space manipulation - copy the perl replica script elsewhere, edit and put, then bind(1) the edited perl over the distributed script. Andrey Mirtchovski covered the gist of this procedure (for TeX) long ago on 9fans, but I was missing something:

% 9660srv
9660srv 33605: serving /srv/9660
% mount /srv/9660 /n/dist /tmp/perl.iso
% cp /n/dist/perl /usr/josh/tmp/perl
... [edit perl:12 to replace kfs call with " status '' " ...
% cd /n/dist
% bind /usr/josh/tmp/perl /n/dist/perl
% bind /root /n/kfs
% /n/dist/perl.setup
% replica/pull -v /n/dist/perl
no such replica /n/dist/perl

I eventually figured out that the replica script needs to be executable. If you bind an edited perl of mode 0664, you’ll see the error string above. So:

% chmod +x perl
% replica/pull -v /n/dist/perl
... much install noise ...
% perl -v

This is perl, v5.8.0 built for 386
...

Voila.

Side note: gabidiaz has Perl in his contrib(1) repo on sources, but missing read permission on some of the files.

Side note #2: steve has TeX (another of the “extra” ISOs) in his contrib(1) repo, but you get oodles of errors of the following ilk at the end of contrib/install steve/tex:

error: copying /sys/lib/texmf/tex/latex/base/gglo.ist: 
'/n/sources/contrib/steve/root/sys/lib/texmf/tex/latex/base/gglo.ist' does not exist

Neither really provides an alternative to the old sources/extra/*.iso.bz2 images and the procedure above.


Pages

Syndicate (Atom)

Small Talk

at labs.utopian.net/mux
  • "We don't care [why]. We just want her gone." - an Alaska waitress @ Sat Jul 04 22:49:15 +0000 2009