Discussion:
[9fans] formatting the manual from plan9 ports?
(too old to reply)
Aharon Robbins
2012-05-24 19:03:25 UTC
Permalink
Is there a simple recipe to use p9p troff to format the manual pages
from the plan 9 dist? I.e.:

Install Plan 9 Ports
wget plan9.iso from bell labs
mount said iso /some/where
9 rc
cd /some/where/sys/man
# magic stuff here

(Or tar off the dist to regular files where things are writable.)

Thanks!

Arnold
pmarin
2012-05-25 19:08:18 UTC
Permalink
See the example in tr2post(1)
Post by Aharon Robbins
Is there a simple recipe to use p9p troff to format the manual pages
       Install Plan 9 Ports
       wget plan9.iso from bell labs
       mount said iso /some/where
       9 rc
       cd /some/where/sys/man
       # magic stuff here
(Or tar off the dist to regular files where things are writable.)
Thanks!
Arnold
Aharon Robbins
2012-05-29 20:46:50 UTC
Permalink
Hi.

Thanks. I did see that. I was wondering more about all the hardcoded
path names in the various scripts in /sys/man and /sys/lib/man and
also getting p9p mk to use rc instead of sh to run commands.

I suppose that I will just manually "nerd through it" (as a friend
used to say).

Thanks,

Arnold
Date: Fri, 25 May 2012 21:08:18 +0200
Subject: Re: [9fans] formatting the manual from plan9 ports?
See the example in tr2post(1)
Post by Aharon Robbins
Is there a simple recipe to use p9p troff to format the manual pages
?? ?? ?? ??Install Plan 9 Ports
?? ?? ?? ??wget plan9.iso from bell labs
?? ?? ?? ??mount said iso /some/where
?? ?? ?? ??9 rc
?? ?? ?? ??cd /some/where/sys/man
?? ?? ?? ??# magic stuff here
(Or tar off the dist to regular files where things are writable.)
Thanks!
Arnold
erik quanstrom
2012-05-29 21:05:28 UTC
Permalink
Post by Aharon Robbins
Hi.
Thanks. I did see that. I was wondering more about all the hardcoded
path names in the various scripts in /sys/man and /sys/lib/man and
also getting p9p mk to use rc instead of sh to run commands.
I suppose that I will just manually "nerd through it" (as a friend
used to say).
why don't you just put the files where the script expects, either
by making /sys for real and putting the files there, or mount --bind'ing?

- erik
c***@gmx.de
2012-05-30 03:44:41 UTC
Permalink
short hardcoded paths are an advantage. this is not linux. this
is plan9. there are rules. the kernel already provides a way for
indirection that works for *everything*. mount/bind and private
namespaces.

no need to reimplement indirection in every program over and
over again.

a hardcoded path expresses an intent. you can look at it and you
know what it expects because ususly the stuff it points to is
already there or has an established meaning. (read namespace(4))

this is better than enviroment variables like $FOOBARBAZPATH
because it hides the default somewhere in the program, or it will
just fail when not specified giving me no clue what $FOOBARBAZPATH
is supposed to be. theres also complexity involved in the
implementatoin. using a hardcoded paths is great. you just let
the program fail with sysfatal("%r"); and it will show the path
it tired to open in the error message giving immidiate clue what
it needs.

--
cinap
erik quanstrom
2012-05-30 04:03:09 UTC
Permalink
Post by c***@gmx.de
short hardcoded paths are an advantage. this is not linux. this
is plan9. there are rules. the kernel already provides a way for
indirection that works for *everything*. mount/bind and private
namespaces.
while this is all true, and i agree with you, the problem at hand it
to get things formatted on linux.

- erik
a***@skeeve.com
2012-05-30 06:11:12 UTC
Permalink
Thanks to everyone for the advice.
Post by erik quanstrom
Post by c***@gmx.de
short hardcoded paths are an advantage. this is not linux. this
is plan9. there are rules. the kernel already provides a way for
indirection that works for *everything*. mount/bind and private
namespaces.
while this is all true, and i agree with you, the problem at hand it
to get things formatted on linux.
Right. The problem is that Linux already has a /sys directory. Who knows
what would break if I mount over that.

Thanks,

Arnold
erik quanstrom
2012-05-30 12:38:47 UTC
Permalink
Post by a***@skeeve.com
Thanks to everyone for the advice.
Post by erik quanstrom
Post by c***@gmx.de
short hardcoded paths are an advantage. this is not linux. this
is plan9. there are rules. the kernel already provides a way for
indirection that works for *everything*. mount/bind and private
namespaces.
while this is all true, and i agree with you, the problem at hand it
to get things formatted on linux.
Right. The problem is that Linux already has a /sys directory. Who knows
what would break if I mount over that.
you won't know if you don't try. :-) chroot yourself or something.

or, you can do it in the source pretty easily. awk is the perfect tool
for the job. :-) you could change every /sys/... to /9/sys/...

- erik

Continue reading on narkive:
Loading...