NetBSD Problem Report #47939

From Wolfgang.Stukenbrock@nagler-company.com  Mon Jun 17 08:39:20 2013
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2D70E70B86
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Jun 2013 08:39:20 +0000 (UTC)
Message-Id: <20130617083909.B3809123B93@test-s0.nagler-company.com>
Date: Mon, 17 Jun 2013 10:39:09 +0200 (CEST)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: catman does not honor makemandb and will error-out when called with '-w', /etc/weekly.conf is wrong too
X-Send-Pr-Version: 3.95

>Number:         47939
>Category:       bin
>Synopsis:       catman does not honor makemandb and will error-out when called with '-w', /etc/weekly.conf is wrong too
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 17 08:40:00 +0000 2013
>Last-Modified:  Mon Jun 17 08:55:00 +0000 2013
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 6.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:


System: NetBSD test-s0 5.1.2 NetBSD 5.1.2 (NSW-WS) #3: Fri Dec 21 15:15:43 CET 2012 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
>Description:
	Since NetBSD 6.x the way manual full text search is done changed from "old-style" whatis to makemandd (/var/run/man.db).
	The binary installatin files honor this - no /usr/libexec/makewhatis is installed anymore, but the command
	catman still tries to call it if called with option '-w'.

	The default setup in /etc/weekly.conf is also wrong for systems useing makemandb.
	There 'rebuild_whatisdb=YES' is still included and not 'rebuild_mandb=YES' that would rebuld the database.

>How-To-Repeat:
	Install e.g. 6.1 and call "catman -w".
	You will see the followin error message:

usr/libexec/makewhatis /usr/share/man
sh: /usr/libexec/makewhatis: not found
catman: *** Exited 32512

	The exit value of catman is 1, so any script (or cron-job) that uses this and check the return value will
	fail too.

>Fix:
	The correct way would be to change the implemantation of the catman command, so that it does no longer
	call /usr/libexec/makewhatis if makemandb is the way the current system is setup.
	I'm not shure about the way how to figure this out - either at compile time or at runtime.
	(The "makemandb" selection is used when building binary sets from list-files.)

	A possible sollution at runtime would be to check for the /usr/libexec/makewhatis binary prior calling it
	and - depending on the correct way to handle makemandb-recreation - either do nothing, print a warning or error
	message or call an other program ("/usr/sbin/makemandb" with some options as far as I've seen till now) to do
	the requested job.

	On systems that uses makemandb, in /etc/weekly.conf there should be
	''rebuild_whatisdb=NO' and 'rebuild_mandb=YES' instead of 'rebuild_whatisdb=YES'.
	I'm not shure how to detect this during compilation. In the list-files the "makemandb" selection does this when
	building the binary sets.

>Audit-Trail:
From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47939: catman does not honor makemandb and will error-out when called with '-w', /etc/weekly.conf is wrong too
Date: Mon, 17 Jun 2013 10:52:06 +0200

 Hi again,

 the file /etc/weekly.conf in the distribution is OK.
 The "wrong" entry that enables makewhatis somes from our install-script.
 please ignore this part of the report.
 Recognised while gooing to create a private patch in our install-setup 
 routines for weekly.conf.
 Sorry - I've should have had a look at this prior reporting it.

 Neverless "catman -w" is broken and there is no change in HEAD till now.

 W. Stukenbrock

 gnats-admin@NetBSD.org wrote:

 > Thank you very much for your problem report.
 > It has the internal identification `bin/47939'.
 > The individual assigned to look at your
 > report is: bin-bug-people. 
 > 
 > 
 >>Category:       bin
 >>Responsible:    bin-bug-people
 >>Synopsis:       catman does not honor makemandb and will error-out when called with '-w', /etc/weekly.conf is wrong too
 >>Arrival-Date:   Mon Jun 17 08:40:00 +0000 2013
 >>
 > 
 > 


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.