By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1493 - kio_man does not support XZ compressed manpages
Summary: kio_man does not support XZ compressed manpages
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: 3.5.13.2 [Trinity]
Hardware: All Linux
: P5 normal
Assignee: Slávek Banko
URL:
Depends on:
Blocks:
 
Reported: 2013-05-05 03:03 CDT by Francois Andriot
Modified: 2013-05-09 12:17 CDT (History)
5 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Add support for xz compression in kio-man (1.60 KB, patch)
2013-05-05 14:32 CDT, Slávek Banko
Details | Diff
Add support for xz and lzma compression in kio-man (3.45 KB, patch)
2013-05-07 15:04 CDT, Slávek Banko
Details | Diff
tdelibs 3.5.13.2 : add XZ kioslave (15.33 KB, patch)
2013-05-07 16:34 CDT, Francois Andriot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Andriot 2013-05-05 03:03:16 CDT
This problem occurs at least with "makewhatis" man-based distributions, but I think it happens on all.

On Mageia 2, man-pages are compressed with the "xz" utilities.
E.g:  /usr/share/man/man1/bash.1.xz

When displaying man pages in konqueror with syntax "man:bash", there is only a blank page displayed.

If I recompress the man page to GZIP or BZIP2, it works as expected.

Looking into the "kio_man" source code, there are several references to "gzip" and "bzip2" but nothing about "lzma" or "xz".
Comment 1 Slávek Banko 2013-05-05 14:32:20 CDT
Created attachment 1209 [details]
Add support for xz compression in kio-man

Please, try proposed patch.
Comment 2 Francois Andriot 2013-05-07 12:34:40 CDT
OK I've analyzed a bit further.
In fact there are 2 problems that must be solved for this bug:

1) kio_man cannot not locate ".xz" nor ".lzma" compressed man pages. E.g, if you type "man:bash", you get a message:
================
KDE Man Viewer Error
No man page matching to bash found.

Check that you have not mistyped the name of the page that you want. Be careful that you must take care about upper case and lower case characters!
If everything looks correct, then perhaps you need to set a better search path for man pages, be it by the environment variable MANPATH or a matching file in the directory /etc .
================
BUT you can still (try to) display man pages by their full path:, e.g: "man:/usr/share/man/man1/bash.1.xz"

The patch you have posted fix this first issue (you should add the ".lzma" extension too, I think this is a valid compression for man pages)


2) The "makewhatis" variant of kio_man does not display the XZ file content at all, I just get a blank page. I think this is because it is using some generic kioslave filter to load the file and uncompress it on the fly, but currently there is no XZ kio_filter available, only gzip and bzip2.
This issue still need to be solved (I'm currently looking for it)

Note: I think (not sure) the "mandb" variant of kio_man is not affected, since it's using the "man" command directly and parses output. The KIO related stuff is not involved.
Comment 3 Slávek Banko 2013-05-07 15:04:16 CDT
Created attachment 1223 [details]
Add support for xz and lzma compression in kio-man

Lzma suffix added.

I also tried to add "protocol" files for other compressions in kio-filters.
I have no idea if this will help, please try it.
Comment 4 Francois Andriot 2013-05-07 15:06:46 CDT
Hello, I see you had the same idea as me :) Alas it is not enough.

There are more stuff to add in tdelibs. I'm currently working on it.
I will tell you when I find the final solution.
You can focus on other bugs for now :)
Comment 5 Francois Andriot 2013-05-07 16:34:05 CDT
Created attachment 1224 [details]
tdelibs 3.5.13.2 : add XZ kioslave

Here is the patch for tdelibs. Your patch is required too.

XZ format information:
  http://tukaani.org/xz/xz-file-format.txt

Original XZ kioslave code from KDE4 :
  https://projects.kde.org/projects/kde/kdelibs/repository/revisions/bbe9e8f51f5f9af4236f1b160fc785c64021cafc

... backported to TDE library code, adapted to TQT layer, inspired from kbzip2filter ...

finally it works !!! I can see my XZ man pages in konqueror !!! I did not try LZMA since I do not know if/which distribution use it today.

I'm exhausted and going to sleep now . Good night :)
Comment 6 Timothy Pearson 2013-05-09 09:43:30 CDT
Comment on attachment 1224 [details]
tdelibs 3.5.13.2 : add XZ kioslave

Looks like this was committed to GIT in hash 7f328ba6
Comment 7 Timothy Pearson 2013-05-09 09:51:59 CDT
I forward-ported Slavek's patch to R14 GIT in hash f08ddb4.
Comment 8 Slávek Banko 2013-05-09 11:17:32 CDT
(Odpověď na komentář #7)
> I forward-ported Slavek's patch to R14 GIT in hash f08ddb4.

I was going to commit the remaining part today.
You were faster :) Thank you.
Comment 9 Darrell 2013-05-09 11:30:00 CDT
I updated both tdelibs and tdebase sources. There is no xz.protocol file in either and building tdebase fails because of that.
Comment 10 Darrell 2013-05-09 11:32:08 CDT
Oops:

The failure message:

file INSTALL cannot find "/dev/shm/tdebase/tdeioslave/filter/xz.protocol".
Comment 11 Slávek Banko 2013-05-09 11:34:35 CDT
(Odpověď na komentář #10)
> Oops:
> 
> The failure message:
> 
> file INSTALL cannot find "/dev/shm/tdebase/tdeioslave/filter/xz.protocol".

Good point - I need to commit new files that Tim forgot.
Note: That is why I always recommend to use git add --all ;)
Comment 12 Slávek Banko 2013-05-09 11:42:36 CDT
Remaining files pushed to GIT in hash c58d6f50.
Comment 13 Darrell 2013-05-09 12:17:32 CDT
All is well --- no build errors. :-)