traditional man pages as sfs file

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

traditional man pages as sfs file

#1 Post by kuapao »

UPDATE 20081019:
Updated package is available here:
http://dotpups.de/kuapao_pet-sfs/man-pa ... 6-i486.pet 19-Oct-2008 09:01 4.5M http://dotpups.de/kuapao_pet-sfs/man-pa ... 6-i486.sfs 19-Oct-2008 09:01 4.2M

Details at this post
http://www.murga-linux.com/puppy/viewto ... 228#241228


=============================================================
ORIGINAL POST:
I have been able to add offline man-pages to my Puppy 4.00 Dingo, thanks to clues in this post:
http://www.murga-linux.com/puppy/viewtopic.php?t=26198

I downloaded the latest man-pages from
http://www.kernel.org/pub/linux/docs/man-pages

As of this post, the latest was version 3.10.

I only occasionally want access to these offline man pages when I am doing development work, so, I made an sfs out of it (filename: mant-pages-3.10_400.sfs). I load it with devx_400.sfs, since it contains the required groff package.

The original /usr/bin/man (from pup_400.sfs) is a shell script which attempts to display HTML based man pages (if it finds any) or directs you to a web-based man pages site. See below:
# find / -type f -name "man" -exec file {} \;
/usr/bin/man: Bourne shell script text executable
/mnt/+mnt+home+devx_400.sfs/usr/bin/man: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

I didn't want to break anything, so I simply copied over the man executable from devx_400.sfs to /usr/bin and renamed it mant (as in "man-text"):

# find / -type f -name "mant" -exec file {} \;
/usr/bin/mant: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

So, instead of typing:
man mount
I would type
mant mount

This way, both man and mant will still work (man will show online man pages, while mant will display offline man pages).

Download links:
mant-pages-3.10_400.sfs 25-Sep-2008 22:10 1.2M http://dotpups.de/kuapao_pet-sfs/man-pa ... 10_400.sfs
mant-pages-3.10_i486.pet 25-Sep-2008 22:10 1.3M http://dotpups.de/kuapao_pet-sfs/man-pa ... 0_i486.pet
Last edited by kuapao on Sun 19 Oct 2008, 21:03, edited 6 times in total.

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

new SFS file

#2 Post by kuapao »

UPDATE 20080926:
Some man pages were not in the man-pages-3.10 package from kernel.org. So, I have a new sfs file.

I downloaded an html compilation from http://www.tldp.org/manpages/man-html. Excerpt from the index page:
This compilation does not contain all manual pages on a typical Linux installation. Linux manual pages come from thousands of individual software packages, with each package typically installing one or two pages, each. This compilation includes core manual pages selected from the following sources:

* man-pages-3.09, Linux core manual pages maintained by Michael Kerrisk
* coreutils-6.12
* util-linux-2.13-pre7
* GnuTLS 2.5.4
* OpenLDAP 2.4.11
* Linux-PAM 1.0.1
* SDL trunk
* PCRE 7.7

I then created a new script manu, a modified version of Barry's man shell script. The new script manu will attempt to use mant (offline text-based man pages) first. If not successful, then the script will attempt to use the html compilation man pages. Otherwise, it will direct to online man page website:

Code: Select all

# diff man manu
7,17d6
< #2 outermost if-statements added by Marvee
< #use text-based man (renamed mant), if available
< #if mant can't find it, then use Barry's man script
< if [ $# -le 1 ]; then
< 	mant ${1}
< else
< 	mant ${1} ${2} ${3}
< fi
< 
< if [ $? -ne 0 ] && [ $# -le 1 ];then
< 
37,44d25
<  #added by Marvee
<  #check if man pages can be found in man-html
<  #man-html is a compilation from http://www.tldp.org/manpages/man-html
<  CUSTOMHTMLOC="/usr/share/doc/man-html"
<  CUSTOMSUFFIX=".?.htm*"
<  if [ "$FNDHTM" = "" ];then
< 	FNDHTM="`find "$CUSTOMHTMLOC" -maxdepth 9 -mount -xtype f -iname ${1}${CUSTOMSUFFIX}`"
<  fi
80d60
< fi
\ No newline at end of file

Code: Select all

# ls -ltra /usr/bin/*man*
-rwxr-xr-x 1 root root  3435 2007-11-06 17:17 man
-rwxr-xr-x 1 root root 33228 2008-09-24 20:23 mant
-rwxr-xr-x 1 root root  4001 2008-09-26 18:30 manu

Code: Select all

# file man manu mant
man:               Bourne shell script text executable
manu:              Bourne shell script text executable
mant:              ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped
So, now, I type something like

Code: Select all

# manu -K bash 
The resulting manpages310-manhtml20080913.sfs has been uploaded to:
http://dotpups.de/kuapao_pet-sfs/man-pa ... 080913.sfs

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Very useful :)

I have an always on connection so use the WWW
for those who need off line
info this will be invaluable :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

thanks

#4 Post by kuapao »

[quote="Lobster"]Very useful :)

I have an always-on connection so use the WWW
for those who need off line
info this will be invaluable :) ...[/quote]

Thanks for the positive feedback!

kuapao
Posts: 94
Joined: Tue 01 Jul 2008, 05:30

updated version available

#5 Post by kuapao »

Updated package is available here: Contents:
man-pages-3.11 package from kernel.org
man-html-20081011 package from tldp.org
with unchanged manu and mant

Notes:
This new package was compiled on Puppy 4.10 k2.6.25.16.
The binary file mant is a copy of /usr/bin/man from devx_400.sfs. It appears that /usr/bin/man from devx_410.sfs and devx_400.sfs are identical.

For explanation on package composition, please refer to
http://www.murga-linux.com/puppy/viewto ... 021#235021
Last edited by kuapao on Sun 19 Oct 2008, 19:20, edited 1 time in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

When you provide the latest
please mention the size as this might be very important for some :)
Another useful thing might be a list of Linux command that we have in
Puppy
For example some are slightly cut down versions that use 'busybox'
http://www.busybox.net/about.html

:)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

Post Reply