[comp.unix.xenix] How to fix SCO man. Was:

root@conexch.UUCP (Larry Dighera) (07/10/88)

Written by Bill Matill at telcomm.UUCP!wrm in cpe:comp.unix.xenix
>>SCO Xenix 2.2.X with the updated Text processing system has man pages
>>for the usual commands. I am trying to add smail, pathalias etc to
>>the pages on file. The manual says that "man" formatted document is
>>to go in /usr/man/man.LOCAL and the "catable" document is to go in
>>/usr/man/cat.LOCAL. The problem is that either these directories are
>>not getting searched (LOCAL is included in /etc/default/man) or that
>>the extension for the files is not correct. If I add the files to
>>/usr/man/cat.C with the extension ".C" the pages are then available.

[chip@vector.UUCP (Chip Rosenthal) wrote in article <385@vector.UUCP>:]
>>As a side issue, I've never understood why XENIX took one suitably crummy
>>convention (1 2 3 ... 8) and replaced it with another crummy convention
>>(C F M S ...).  

[tif@cpe.UUCP responded with a useful summary of the difficulty & a fix]
>A man entry in man.NAME must have the filename cmd.NAME (i.e.
>/usr/man/man.LOCAL/readnews.LOCAL)  This is a stupid convention,
>why would you need the extension at all?  For compatability, it
>really ought to accept ANY filename extension.
>
>Now to top it off, how about "compressdir?"  The filename is
>/usr/man/man.LOCAL/compressdir.LOCAL.  Unfortunately this gets
>saved as compressdir.LO (14 chars) and can't be found by man!
>
>The best idea I have is to make /usr/man/man.L and /usr/man/cat.L.
>Then the names of the man pages can be up to 12 characters.  So you
>have /usr/man/man.L/compressdir.L.
>
>Also if you change MANPATH to include another directory like /usr/local/man,
>man will give an error message when you ask for a topic which is listed
>under two or more names.
>
                        >Paul Chamberlain
                        >Computer Product Engineering, Tandy Corp.
                        >ihnp4!sys1!cpe!tif


Here is the way I partially solved the difficulty of integrating the 
standard man directory hierarchy into the SCO Xenix 2.3.0 man structure:

The standard convention is to have a directory structure like this:

        /usr/man/man1/command.1
                      anothercommand.1
                      commandN.1
                
        /usr/man/man2/command.2
                      anothercommand.2
                      commandN.2

        /usr/man/man3/command.3
                        ...

and so on, where /usr/man/man[1-8] are directories containing nroff formatted
manual-page files, command.[1-8], respectively.

In order to preserve some semblance of this standard convention, I moved 
all the man[1-8] directories (and their contents) to /usr/man/man.[1-8]
(placed a '.' between the 'man' and the numbered suffix of the directory).
Then, created their counterpart cat directories: cat.[1-8], so that the 
man command would have a place to store the pre-processed man-pages once 
they had been read.  So now, I have these additional directories containing 
local man pages:

        /usr/man/man.1/command.1
		       commandN.1
                        ...

        /usr/man/man.2/command.2
                        ...

and so on.

As the standard man-page text files already have a '.[1-8]' suffix,
SCO's man program seems to find them without difficulty.  

Now when I enter 'man local-command-name' for the first time for any 
given local-command-name, man formats the text, displays it, and 
writes a copy in the cat.[1-8] directory, so that it doesn't have to 
format subsequent man invocations of this particular man-page.  
Unfortunately, man neglects to pack the preformatted file it places 
in the cat.[1-8] directory.  

As distributed, SCO's man-pages reside in the cat* directories in
pack format.  The man program is smart enough to know to pcat files
with a .z suffix.  (Although they do now include compress in the 
distribution, its superior capabilities aren't yet employed by man.)
But, you have to manually pack the files it automatically places in
the cat* directories as a result of running man on your local man-pages.
I put an entry in root's crontab to attend to this periodically. 
Perhpas future releases will run pack asynchronously while displaying
the man-page.

Surely there is a better solution to compatiblity with the existing
standard than this.  If symbolic links were supported, it would only 
be necessary to link the man[1-8] directories to the man.[1-8] 
directories to provide completely transparent compatibility.  With 
the proposed method, you'll have to edit every makefile that places 
its man-pages in /usr/man/man[1-8] so that it will place them in 
/usr/man/man.[1-8].

Larry Dighera
-- 
USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA  92712
TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71)
UUCP: conexch Any ACU 2400 17148425851 "" "" ogin:-""-ogin:-""-ogin: nuucp
UUCP: ...!uunet!turnkey!conexch!root || ...!trwrb!ucla-an!conexch!root