Gentoo Archives: gentoo-dev

From: Karl Trygve Kalleberg <karltk@×××××××.no>
To: gentoo-dev@g.o
Subject: [gentoo-dev] Woes with .so in man files
Date: Wed, 03 Oct 2001 06:30:37
1 Hi gang.
3 (This problem is with the .so directive in man files which includes other
4 man
5 files into the current document, much like #include in C; if the included
6 file
7 is gzipped, man breaks down. Check man zshall (zsh) for example).
9 As far as I can see, nobody else has figured this one out yet, so I did a
10 little digging today. I didn't resolve the problem, but here are my
11 findings:
13 ) An example .so directive:
14 .so man1/zshftp.1
16 ) The .so directive is by default interpreted by troff, not any external
17 program.
18 In the above case, troff does not find zshftp.1 (since it's only available
19 as zshftp.1.gz), and an error is printed to stderr.
21 ) We can replace .so with .pso, which will allow us to use zcat, thus:
22 .pso zcat $MANDIR/man1/zshftp.1.gz
23 but this has two problems. First off, troff is by default running in safe
24 mode, and will not invoke any untrusted external programs, such as zcat;
25 this can be turned off with the -U switch to troff, but I don't like that.
26 Secondly, $MANDIR isn't really one directory, it is many, so we'd have
27 write a script that traverses the manpath to find the proper
28 man1/zshftp.1.gz file.
30 ) I have not had the chance to see how this is resolved in other distros.
31 I would assume they either have enabled some configure option to troff, or
32 that they don't package all their man files.
34 ) Current workaround; unpack all man files that are includees. Includers
35 do not need to be unpacked.
38 I will look into the configure switches for man once I get net access
39 working again.
42 Kind regards,
44 Karl T