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 714 - Build issue: kio_man does not work with some distros
Summary: Build issue: kio_man does not work with some distros
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: 3.5.13 [Trinity]
Hardware: All All
: P5 minor
Assignee: Alexander Golubev (Fat-Zer)
URL:
Depends on:
Blocks:
 
Reported: 2011-12-02 17:43 CST by Francois Andriot
Modified: 2013-07-29 12:43 CDT (History)
7 users (show)

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


Attachments
Fix kio_man for distributions without man-db (1.47 KB, patch)
2011-12-02 17:44 CST, Francois Andriot
Details | Diff
Updated patch to support TQt layer (1.47 KB, patch)
2011-12-09 22:32 CST, Darrell
Details | Diff
Patch idea for supporting both manpage systems (2.10 KB, patch)
2013-04-24 15:15 CDT, Darrell
Details | Diff
kdebase 3.5.13.2 : support both makewhatis and mandb at build time (2.17 KB, patch)
2013-04-28 13:56 CDT, Francois Andriot
Details | Diff
kdebase 3.5.13.2 : support both makewhatis and mandb at build time (2) (2.35 KB, patch)
2013-04-30 15:50 CDT, Francois Andriot
Details | Diff
tdebase R14: support both makewhatis and mandb at build time (2.37 KB, patch)
2013-04-30 17:32 CDT, Darrell
Details | Diff
online-mandb-support-r14.patch (5.09 KB, patch)
2013-06-30 14:28 CDT, Alexander Golubev (Fat-Zer)
Details | Diff
online-mandb-support-3.5.13.patch (5.10 KB, patch)
2013-06-30 14:29 CDT, Alexander Golubev (Fat-Zer)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Andriot 2011-12-02 17:43:03 CST
Under RHEL 5 and RHEL 6, konqueror does not manage to display man pages.
We only get a blank page.

It looks like an Ubuntu-specific patch related to UTF8 encoding is causing the problem. The patch requires that the distrob uses "man-db" package instead of older "man".

http://old.nabble.com/Bug-449554%3A-konqueror%3A-Recode-manual-pages-to-UTF-8-td15409333.html

The attached patch rolls back the modification and allows kio_man to work on older distributions.
Comment 1 Francois Andriot 2011-12-02 17:44:14 CST
Created attachment 205 [details]
Fix kio_man for distributions without man-db
Comment 2 Calvin Morrison 2011-12-02 19:31:40 CST
afaik all distros use mandb to generate new manual pages and reload the cache... Am I missing something here?
Comment 3 Francois Andriot 2011-12-03 02:40:11 CST
Well, I'm not a "man" specialist, but it looks like RHEL is NOT using "man-db".
Instead, it is using "makewhatis".

I guess that man-db is a modern replacement for makewhatis.

Look at this page:
http://pkgs.org/download/man

It looks like there are several distros that are using "man 1.6" (like RHEL), and others using "man-db 2.x" . Slackware 13.x, Mandriva and Mageia will have the same kio_man problem as RHEL.
Comment 4 Darrell 2011-12-09 22:32:52 CST
Created attachment 220 [details]
Updated patch to support TQt layer

Problem exists in Slackware 13.1.

Patch is  updated to support the TQt layer. :)
Comment 5 Timothy Pearson 2012-01-11 13:28:55 CST
I am hesitant to remove functionality (this is what the patch currently does).  Ideally the affected code should detect the presence of man-db and if it is not present then fall back to the old method, which has problems with internationalized files.
Comment 6 Darrell 2012-03-06 12:27:12 CST
I have been using this patch for 3 months. If this patch removes functionality, then should we investigate why man pages are broken on some distros and not others? What happened?
Comment 7 Timothy Pearson 2012-03-06 12:32:19 CST
(In reply to comment #6)
> I have been using this patch for 3 months. If this patch removes functionality,
> then should we investigate why man pages are broken on some distros and not
> others? What happened?

You are not using internationalized man files, so you wouldn't see any difference.  From what I understand there are two variants of a man-db -type utility, one that is newer/better but not available on all distros, and the old makewhatis utility that seems to be present on at least RHEL and Slackware.  TDE should support makewhatis as a fallback, not dump support for man-db entirely.
Comment 8 Darrell 2012-07-09 12:45:02 CDT
I changed the summary description because this problem affects Slackware too, and probably other distros as well (Arch?).
Comment 9 Darrell 2013-04-09 13:50:20 CDT
Could we add an ifdef or ifndef to support both types of systems? That is, the patched code would compile only for those distros that need the patch?

Something along the line of

if [ `which makewhatis` ] && [ ! which man-db ]
Comment 10 Darrell 2013-04-09 14:05:10 CDT
Ignore the previous inadvertent post. :)

How about adding a cmake test and an ifdef to support both types of systems?

Something like:

tdebase/tdeioslave/man/CMakeLists.txt:

(need to look in all bin directories)
if [ -x /usr/sbin/makewhatis ]; then
  set MAKEWHATIS=true
fi

tdebase/tdeioslave/man/kio_man.cpp:

ifdef MAKEWHATIS
  use patched code
else
  use old code
endif

Hopefully you get the idea. I don't know how to do this. :)
Comment 11 Darrell 2013-04-24 15:15:25 CDT
Created attachment 1183 [details]
Patch idea for supporting both manpage systems

I tried to create a patch to support both manpage systems. Conceptually I understand what needs to be done, but I am not understanding cmake well enough to finish the patch.

I'm attaching what I have. Somebody please update and fix the patch. :-)
Comment 12 Darrell 2013-04-28 12:58:30 CDT
Francois, I just realized this report is assigned to you. Would you please look at attachment 1183 [details] and help me fix the patch? I'm sure I have the right idea, but the patch does not work.
Comment 13 Francois Andriot 2013-04-28 13:56:26 CDT
Created attachment 1193 [details]
kdebase 3.5.13.2 : support both makewhatis and mandb at build time

OK here is a patch that works.

BTW I have another man-related problem: under Mageia 2, konqueror always says I have no man page for any of existing page (e.g: type "man:man", it should work).
It works in Centos6.

I have the feeling that XZ-compressed pages (as in MGA2) are not supported with this patch. Centos6 use GZIP pages.
Comment 14 Darrell 2013-04-28 19:38:58 CDT
I updated the patch for R14 but the patch does not work for me. When I open a man page in konqueror I get only a blank page.

I notice the variable WITH_MAKEWHATIS is not defined in CMakeCache.txt although I do see the variable defined in tdebase.build/config.h.
Comment 15 Francois Andriot 2013-04-30 15:50:20 CDT
Created attachment 1198 [details]
kdebase 3.5.13.2 : support both makewhatis and mandb at build time (2)

OK I had forgotten to add the "include config.h".
Try this new patch.
Comment 16 Darrell 2013-04-30 17:32:20 CDT
Created attachment 1199 [details]
tdebase R14: support both makewhatis and mandb at build time

I'm attaching a patch updated for R14. I'll push to GIT as soon as somebody tests the patch on a system that does not use makewhatis and man pages still work in konqueror.
Comment 17 Slávek Banko 2013-05-04 22:01:29 CDT
Thank you both for your good work.
Pushed to GIT in hash 2b6bc472.
Comment 18 Alexander Golubev (Fat-Zer) 2013-06-30 14:28:41 CDT
Created attachment 1325 [details]
online-mandb-support-r14.patch

Here is a patch for online check which man implementation is used: traditional or mandb.

If this patch won't be accepted to release than please fix cmake QA issue: use an option() statement rather that set() to declare WITH_MAKEWHATIS.
Comment 19 Alexander Golubev (Fat-Zer) 2013-06-30 14:29:41 CDT
Created attachment 1326 [details]
online-mandb-support-3.5.13.patch

here is 3.5.13 branch patch.
Comment 20 Darrell 2013-07-28 11:57:33 CDT
Proposed patch in comment 18 for R14 works for me on Slackware 14.0.

Somebody test on a different distro (Francois?) and I'll push to GIT.
Comment 21 Francois Andriot 2013-07-28 17:22:05 CDT
Patch is working correctly in R14 using makewhatis on Mageia 3.
Comment 22 Darrell 2013-07-28 19:23:33 CDT
I was going to push to GIT and then decided that somebody should ensure systems _not_ using makewhatis still display man pages properly. Francois, do you have such a system to easily test?
Comment 23 Alexander Golubev (Fat-Zer) 2013-07-28 19:30:01 CDT
(In reply to comment #22)
> I was going to push to GIT and then decided that somebody should ensure systems
> _not_ using makewhatis still display man pages properly. Francois, do you have
> such a system to easily test?

I've tested it on gentoo with both mandb and traditional man (aka makewhatis here) implementations.

But it would be better if someone else will confirm it...
Comment 24 Slávek Banko 2013-07-29 11:30:55 CDT
Tested on Debian => works fine.
Comment 25 Darrell 2013-07-29 12:43:28 CDT
Pushed to GIT in commit 14ffd77b.

Tagging as resolved.