public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] bzipped manpages
@ 2017-01-09  8:08 Jan Stary
  2017-01-09  9:30 ` Mike Auty
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Jan Stary @ 2017-01-09  8:08 UTC (permalink / raw
  To: gentoo-dev

This is Gentoo 2.2 (4.4.6-gentoo x86_64).
The system manpages seem to be bzipped as in
/usr/share/man/man1/ls.1.bz2

Why is that? Is there any benefit to compressing the manpages nowadays?
IMHO it only adds a layer of complexity, for very questionable benefit
(i.e. disk space): how much of the overal system do _manpages_ take?

The particular problem I am having is that http://mdocml.bsd.lv/ ,
my manpage formatter of choice, does deliberately not support bzip
(or any other outside decompressors for that matter).

Would you please consider distributing plain *.{123456789} manpages
and getting rid of the bzip layer?

	Thank you

		Jan



> I am using mdocml on other systems beside OpenBSD.
> On most linuxes, it works just fine, including gzipped manpages
> such as /usr/share/man/man1/ls.1.gz od Debian.
> 
> Now I found myself on a Gentoo linux, where manpages are bzipped,
> like /usr/share/man/man1/ls.1.bz2; on this system man(1) displays
> what seems to be the verbatim 'bz2' file, unbziped (attached).
> See below for the out put of 'man ls'.
> 
> Is it because mdocml does not support bzip?

Yes.  Neither does it support piping through external unpackers.

> If so, should man rather fail than display the page?

No.  It's a feature that mandoc(1) and man(1) never fail, no matter
what the input is.  It is a convenience for arbitrary, very serious
bugs in otherwise half-sane manuals.  I spent a lot of time archieving
that feature.  It is not a security risk even when you do garbage
in - garbage out.  It still doesn't write to disk, it still doesn't
access arbitrary files, it still doesn't print control codes to the
terminal - you see all those harmless question marks in there?

> I don't know why any system would bzip it's manpages,
> but apparently Gentoo does.

Exactly.  It is completely stupid nowadays.  Just tell them to stop
doing such nonsense and install uncompressed.  Manual pages are small
compared to libraries:

schwarze@isnote $ du -sk /usr/share/man                                        
40472   /usr/share/man
schwarze@isnote $ du -sk /usr/lib       
229516  /usr/lib
schwarze@isnote $ du -sk /usr/local/man 
50022   /usr/local/man
schwarze@isnote $ du -sk /usr/local/lib 
2576778 /usr/local/lib

That's *uncompressed* mind you, and extensive, high quality OpenBSD
manuals.  Tell me, which system is unable to afford 100 Megabyte
of disk space for manual pages?  In this day and age?  An embedded
system?  Right, you certainly have manual pages there.

Compressing that stuff just makes life harder for absolutely no benefit
whatsoever.

> Are there any plans to support bzip beside the ubuquituous gzip?
> (I understand if you don't want that in your code.)

No plans, and some opposition to trying.

Even supporting *.gz is kind of stupid, but that stupidy is widespread
enough that i bowed to the pressure.  It's implemented in the safest
possible way by linking directly against the time proven and no
longer much changing libz.  I'm very reluctant to resurrect the
code to spawn external decompressors - even in portable mandoc.
It is messy and potentially risky.


So, you want to hear something constructive?  Your best option is to
just decompress that stuff on your system.  (Gentoo is famous for
its excessive configurability - maybe there is even an option?)
Otherwise, you can set up a small shell script to recursive run
bunzip2(1) across the directories in question and run it whenever
you are shown garbage after installing new stuff.  Bonus:  Manuals
never get deleted even after uninstalling stuff, so you can still
look things up to find out whether it might be worth reinstalling
a package that you once had.

If you are unable or unwilling to do that, just use a different
man(1) implementation and use mandoc(1) the traditional way as a
groff drop-in replacement.  All you lose that way is apropos(1).

Yours,
  Ingo


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-01-17 19:18 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09  8:08 [gentoo-dev] bzipped manpages Jan Stary
2017-01-09  9:30 ` Mike Auty
2017-01-09 21:17   ` Kent Fredric
2017-01-10 11:54   ` Jan Stary
2017-01-10 11:59     ` Jan Stary
2017-01-10 12:04     ` Vadim A. Misbakh-Soloviov
2017-01-10 12:08       ` Jan Stary
2017-01-10 12:19         ` Vadim A. Misbakh-Soloviov
2017-01-10 12:36           ` Jan Stary
2017-01-11 12:34             ` Sven Eden
2017-01-11 16:15               ` Jan Stary
2017-01-13  0:08                 ` Walter Dnes
2017-01-13  7:45                   ` Sven Eden
2017-01-13 16:06                     ` james
2017-01-17  6:05                       ` Daniel Campbell
2017-01-17 14:08                         ` james
     [not found]                           ` <20170117182639.1d0eed6a.mgorny@gentoo.org>
2017-01-17 19:18                             ` james
2017-01-10 13:01           ` Mart Raudsepp
2017-01-10 13:39             ` Ulrich Mueller
2017-01-10 14:02               ` Mart Raudsepp
2017-01-10 14:21             ` Michał Górny
2017-01-10 14:06     ` Michał Górny
2017-01-17  2:31       ` Kent Fredric
2017-01-11 14:20     ` Michael Orlitzky
2017-01-09 21:49 ` Jeroen Roovers
2017-01-10 12:05   ` Jan Stary
2017-01-14 12:52     ` Kent Fredric
2017-01-10 13:16 ` Fabian Groffen
2017-01-16 17:20   ` Jan Stary
2017-01-17  6:13   ` Daniel Campbell
2017-01-17  8:06     ` Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox