discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* supporting bzip
@ 2017-01-09  6:54 Jan Stary
  2017-01-09  7:42 ` Ingo Schwarze
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stary @ 2017-01-09  6:54 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 5747 bytes --]

Hi Ingo,

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?
If so, should man rather fail than display the page?

I don't know why any system would bzip it's manpages,
but apparently Gentoo does. Are there any plans to
support bzip beside the ubuquituous gzip?
(I understand if you don't want that in your code.)

	Jan




()                                                                          ()



BZh91AY&SY'¨d???ß�??qÿÿßÿÿþþ¿ÿÿõ`?°
?A}îøáïQÕ�¦�$ö£%ÆvÀt4Ò?F�4ÓFE6h�?SÆ)êOSÚ§�õ?I?õ'¨ô�!?M?M?h��Éè�Ê6�?Ð??hÐ4ÐÐ??HÑOH�¦��A�z�¦Ôb?�Ú�???
     5"?SÚ)§ªz��6PÉ ??????s    4?�?F�?¦&LM?? d?&?D�2#M?
     ��6¦�"hõ??ê? ?içÕã³w�ÄeãKÏÐý?�.ÚP¸CÙë?[øæ{�[��_9?0æ®8æº�<µm�|?�Yµ?H�?/ZpÁë�Ì/?Z?ÈÍ�®O±�#�
     ?Ò8 ÿ��Ì?,G�ý}=¸Ç��û"#ß�1�À1?ù�].
c�­�»?�Î@�#?1M??ï1Ó}tåèÕt.]Ô1bu¦��»Lû?ë¢Zn,zùõ]~ß-b¸�Û£�VP²Õ¸îÆ�N^-<Íéòq-�­zË_Í�GA&òX==>��uÏ?W¤¹Ï?Úê�§t(?%�Á�ãI,y??
     ?�ÔØ°ê|MäÚHÛÚÇôÕzï+ºÌz.=Z?¾½?xm�;#S??¼Ã"S®ù<.??��ã/?��%AóSÉe?¿�?�½Ü?U?q?¯?�³?9=7�
:w­96HÝÊúû;V?ó£u?u?Âf�éÎH×j.#¿i??­Á8¬®²?R�¡ÓÊh¼¥@`P(�Eßg
�å4XùOÅ�?àÚ#�ëvèá?G·L%F�Th¡Ñk5ÏHR¶<?úã  3�CÏ¢v?òõ!�Àu?Û8e?D �ð>ãÞáïÌ �óÖÛS²¦Ê
6?/RÉ?É»q�ªñõ�nQPV�A�Ð7n?�¾2ÕzðîsCì4?à?,1)ÊJ0Ë1
D»r?�?­é°ï´ó>r£Jë?F_Y?»)?{FåØâÁV?J�?{ïñMnE7ß®ó×®�QçU;Em�Ç�µ³�?fsvnÙÉè=á?�iù7ÝWx8%
¢?!???¢`Óä�d,ÇÏ?FT´©¤>ýÔé7?~5KZ×�´�?�a?z5<H×�°å�'-bû?°@¨-ÐÁ?n�íi×g??Ø?»�Ó�0??IºS×VL�®¯?p�´cª:L=È?Hñê8®cÒ???È(·à'�©:{h�¹oVC?­Bá?h??å¶p[�-�?rõ�00T?Þeû»­�`C?[-ñã
     ?�F?|Tf??ZÔ3�&?qǵ�t©??r�ö(��Ï'?�þïöÔ�´
     Ý?l�ïj$�g��°½ê?ìë?Ú�?K¹w8Ë?ë?¤ó?�haüñ�5k·¶z�>ÎùË, ®ðÜÎâ?Å>¦/?_ÌÈ¿H�×��¨iZ+??�Ôé�ïvüG$L0}?Yi?êåª+È�#?Ú$ÈÑ1�¤�M?êÏM�õ?ðqZ¼Px¥çÖÖòRC?�Cé�?$y?�ÙÇÈ!¤
9Â?»B]?¬VÍvÏ?u�%�-âÛK¬­I)|"fáÆ�¶·|�9�uþ{�!%@ëÄ7XÐ&©J/ßJí?lÁ¡ÄS7»»z1¾v
óÆ5?ÆKéø¡/�?+{ë�???î`9?RÕ?}>&.��?äiv?"#�¥îÂc*�¥??ð(¡>�aæáöéTâa4r¼¹ê¥Õ�¹?§îÀQ?¡?U�HRÅ�DbÅF2ª¤d���4©!F±¼??�Ô'ÙÇù[?8(?Î:ôËú[\�eÌNû6íë;?³-æZ¡Sk?¼8^ö<P±ÿ?�?�àuìf¹1WrYÛ?SM4½û¾?¨òôÏ«mü½:{r}·Y�³mi£�¡z?äæ2?`§:?$��ªV~cq4u�¶SjG?~Þ?�CâîTK�2m�p??tq¸øN
�ã ²?Pâ�3&O?ÀÑ� ?ÖÀ²o³J¢1¤Û[¶��K?*¤¤¢ÉýÒ¡èùùP?ÖÓ0×/Uä?�!´ ²bÄi
î�e?�k"�FÎ�û�><¾O�LÎ?Ïc¸¸µ&wN?kÍÔ©Ux�ßp,�"®?|')�/S
¯V¦§4Ú*��?OTº¥��èÆS:?X?Z�ð��_|H?16Æ¿^ó#X�Ì�HjÐ����Îw?ãÊ¥"hF�µ?ciÕ¨�(O³_E'�æi¬-Ú?«LÀª6´òZBª�3wçVPQ4rÖw÷p:ð?ëkíõ·(Ú)9qhkÝʦÎJ{?:�b?åÑ
�j3A�+Ui?°Uy�U?S��ªòd¹�£æR®!»/0Ô?6Û�ôËÌ@eKèÏÈfð&è¡NýbÕ¥'9Ùh®Í?�¨6¬¼þ¬M#Fk+�?R�l�òq"¬7$Ã7Я:°�Â6�ç
¹G*;p
     t9�9¡�³*:"0Uûóà�lÑů»Yî?(?BIÄ?�V�vkÑ<H?�ºRð�èæÎ÷�Å)¾�7ð�?Ás:>^§råZ8?�M�@o?Î?ËÃ?önMW?Ip�È*¾/Ð�
w{$æÃ?hC³?¥%_�L�
     ?�Å?<(®+�d?µ?T?ô�Ùg�eOI�·?B�·fCÊfk�W«Ba??-?¡Í?]?i��uY?í¹R?*?��FVÀ½zÿÕ;Ñç~èõwû?$h»×�>?ôóëÆúæs^�
¨`¸÷·½q0QÓ�d²?m#`??�¦ý??,?­É|�^?Ï�`�-Y?ÈXÎéoA¤?xÆY4Òm6¢g³
     .�+föbÞÜAU¨t�Í�ÀGf??�'S�?�?%ksv��ë®I¤ùÙIö?¾hìÌåB�Ú�M��®íÒ�Ñ;!`±r?�-Ó.ÿÁ?Ø¥µA0ãi|!º�)¶=6�?C�oDã�xÖ(/ÕT¢?¬m¡Çu?8ø3g9[?"`q±A�J,�GÞ�{£Jè�?�¼?x:p"�,kôiû-��M±á@Å#¢Ü"?³L?4�È�?B�Ì?rºà�M1¤°¬Ü?Î�'`éð���W-bÒ�[ZѪ�ÉÆÔ?]�~v0Ê*Á?&©�-Tf*�<+�^%»Ún<W
     £?�º�DÝì´Fйµò6tBÛål2?ð?`ÔÊJc??FÔU
4B£%?EÌf·Âò»;ÜÙJÁ{H!Ú³uo¶¶ñúÃÂ�|sÎ?¨GÛ̹ëaëZ�$?���®Í?�?d¾h1?��¬¡ÐÄô!H?_�!Я]Þö?´K:?�bÔjE)ÉÁ�{�H¶UA?�s|Ý???�iÃM?¼Jð
ô+×OÇ$§×.Jìí¼¸ØÚ7§=&Ó5Q?¼õxî?ä°?ñt¥ÈWòË ¯�=#Rè�[(?Ô?ºá¿NV?¨:u.ClNU(dG&R³6�*Ë8Z¦A��é Ê/¡YØȵ?-U1'��U""?Ó¸ðºßÆ?�?�ñ?@ÒÅ �lM³®I?¿Ë¤Ú?¨?ZÅ¥Á*Xaf�Æ��åÉ?7¢�??U?ǧËg?�Ò:k?û�&??E¦N-Klà;R?ªpZÊ¥0UÕ?¥?Ú�T=&òrSY�Å-:us>õ{IR??9¨~?)?a:?g��R�´? oà¯5¡?¡T?(H?&¼ÃKZ0h�³t,???çí±ÂaéL?c?Èa;î?�h9¢CH�ñ��?@�ÖBf£Q)]Ǻ4².aºÂùØ�¬�"Ù[.$L??¡F"]b�!Ò¹º�vX§bÀÑë$�')?ôy?­E¡¬/«??¬�'��^��¬wç´�ûT?Ú±7¶
l �ÍIT1¡9�?��6ç«?Ñ0W©YjqÔ����Ýï"K�Í�}´ß)Khº]Z?Ö!�®#{tq��¼M�¬*"�Ýw¡CKDÓ£6Ñ`<Ây
Ñ_S?�L�Û.úøÓ?D¾­??,läf¯¡ÇÞ?KØùÝ?�R£mpèÆ:8?§
dÅo�§2øè®K(!wÖ8g±dCIûâ»�¬M?mVs;É�@ÑkçÒÛó�S<)4×?�]PµËX­¨)0-?¦°Je¢È;�U?Ï"ËD�?ªßü]É?áB@�¡�H



                                January 9, 2017                             ()

[-- Attachment #2: ls.1.bz2 --]
[-- Type: application/octet-stream, Size: 3037 bytes --]

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

* Re: supporting bzip
  2017-01-09  6:54 supporting bzip Jan Stary
@ 2017-01-09  7:42 ` Ingo Schwarze
  2017-01-09  7:47   ` Jan Stary
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Schwarze @ 2017-01-09  7:42 UTC (permalink / raw)
  To: Jan Stary; +Cc: discuss

Hi,

Jan Stary wrote on Mon, Jan 09, 2017 at 07:54:03AM +0100:

> 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
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: supporting bzip
  2017-01-09  7:42 ` Ingo Schwarze
@ 2017-01-09  7:47   ` Jan Stary
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Stary @ 2017-01-09  7:47 UTC (permalink / raw)
  To: discuss

On Jan 09 08:42:49, schwarze@usta.de wrote:
> > Is it because mdocml does not support bzip?
> 
> Yes.  Neither does it support piping through external unpackers.
> 
> > 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.
> 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.

Understood. I will try to persuade them to stop doing that.

	Jan

--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2017-01-09  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09  6:54 supporting bzip Jan Stary
2017-01-09  7:42 ` Ingo Schwarze
2017-01-09  7:47   ` Jan Stary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).