From owner-freebsd-current@FreeBSD.ORG Sun Nov 4 17:52:05 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D376916A41B for ; Sun, 4 Nov 2007 17:52:05 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from istc.kiev.ua (wolf.istc.kiev.ua [193.108.236.1]) by mx1.freebsd.org (Postfix) with ESMTP id 52B6A13C49D for ; Sun, 4 Nov 2007 17:52:05 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from localhost ([127.0.0.1] helo=ravenloft.kiev.ua) by istc.kiev.ua with esmtp (Exim 4.52) id 1Iohy4-000420-03 for current@freebsd.org; Sun, 04 Nov 2007 18:05:01 +0200 Received: from kozlov by ravenloft.kiev.ua with local (Exim 4.68 (FreeBSD)) (envelope-from ) id 1Iohy0-0004pL-CR; Sun, 04 Nov 2007 18:04:52 +0200 Date: Sun, 4 Nov 2007 18:04:52 +0200 From: Alex Kozlov To: current@freebsd.org, spam@rm-rf.kiev.ua Message-ID: <20071104160452.GA18520@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-Spam-Score: 0.0 (/) X-Spam-Report: Content analysis detailz: (0.0 points, 10.0 required) Cc: Subject: Re: /usr/share/man/man8/MAKEDEV.8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2007 17:52:06 -0000 On Sun, Nov 04, 2007 at 04:07:38PM +0200, Alex Kozlov wrote: > On Sun, Nov 04, 2007 at 05:03:04AM -0800, Jeremy Chadwick wrote: > > On Sun, Nov 04, 2007 at 02:10:40PM +0200, Alex Kozlov wrote: > > > On Sat, Nov 03, 2007 at 01:48:54PM -0400, Andrew Lankford wrote: > > > > 2) getting rid of catman and forcing man to generate a new one from > > > > scratch each time instead of filling up /usr/share/man/cat* with stale > > > > files. Is this going to be a big drain on a p4-era pc compared to > > > > something like another periodic.conf script? > > > > > > > > or > > > > > > > > 3) A compile or run-time option that disables catman as described above. > > > > If I knew of one, I'd enable it without a second thought on my cutting > > > > edge p3 desktop :) > > > Put weekly_catman_enable="NO" in your /etc/periodic.conf > > It defaults to "no". > > > > Regardless, I think you miss Andrew's point. AFAIK, there isn't any way > > to disable automatic creation of catman pages when "man" is run as root. > In all honesty, I forgot about that. I don't work under root. > > > Being able to disable that feature would ultimately solve this issue > > for those of us who don't want it (this thread has already mentioned > > the problems with it). > Relatively easy to add a new man option to disable creation of cat files. > But I starting to think, that may be better disable this feature by default. > Anyway, it work only in rare case, when man run under root. > > Or it will be serious POLA violation? > Ok, here is two patches. First adds a new option, which prohibits the creation of cat files. Second allows the creation of cat files only if the new option given. Index: man.c @@ -85,6 +85,9 @@ static char *roff_directive; static int apropos; static int whatis; +#ifdef __FreeBSD__ +static int nocatcreate; +#endif static int findall; static int print_where; @@ -112,13 +115,13 @@ #ifdef HAS_TROFF #ifdef __FreeBSD__ -static char args[] = "M:P:S:adfhkm:op:tw?"; +static char args[] = "M:P:S:acdfhkm:op:tw?"; #else static char args[] = "M:P:S:adfhkm:p:tw?"; #endif #else #ifdef __FreeBSD__ -static char args[] = "M:P:S:adfhkm:op:w?"; +static char args[] = "M:P:S:acdfhkm:op:w?"; #else static char args[] = "M:P:S:adfhkm:p:w?"; #endif @@ -247,7 +250,8 @@ k : same as apropos(1)\n"; #ifdef __FreeBSD__ - static char s3[] = " o : use original, non-localized manpages\n"; + static char s3[] = " o : use original, non-localized manpages\n\ + c : do not create pre-formated man pages\n"; #endif #ifdef HAS_TROFF @@ -342,6 +346,11 @@ case 'a': findall++; break; +#ifdef __FreeBSD__ + case 'c': + nocatcreate++; + break; +#endif case 'd': debug++; break; @@ -1606,7 +1615,11 @@ man_file = ultimate_source (*np, path); +#ifdef __FreeBSD__ + if (!troff && !nocatcreate) +#else if (!troff) +#endif { to_cat = 1; Index: man.c @@ -85,6 +85,9 @@ static char *roff_directive; static int apropos; static int whatis; +#ifdef __FreeBSD__ +static int catcreate; +#endif static int findall; static int print_where; @@ -112,13 +115,13 @@ #ifdef HAS_TROFF #ifdef __FreeBSD__ -static char args[] = "M:P:S:adfhkm:op:tw?"; +static char args[] = "M:P:S:acdfhkm:op:tw?"; #else static char args[] = "M:P:S:adfhkm:p:tw?"; #endif #else #ifdef __FreeBSD__ -static char args[] = "M:P:S:adfhkm:op:w?"; +static char args[] = "M:P:S:acdfhkm:op:w?"; #else static char args[] = "M:P:S:adfhkm:p:w?"; #endif @@ -247,7 +250,8 @@ k : same as apropos(1)\n"; #ifdef __FreeBSD__ - static char s3[] = " o : use original, non-localized manpages\n"; + static char s3[] = " o : use original, non-localized manpages\n\ + c : create pre-formated man pages\n"; #endif #ifdef HAS_TROFF @@ -342,6 +346,11 @@ case 'a': findall++; break; +#ifdef __FreeBSD__ + case 'c': + catcreate++; + break; +#endif case 'd': debug++; break; @@ -1606,7 +1615,11 @@ man_file = ultimate_source (*np, path); +#ifdef __FreeBSD__ + if (!troff && catcreate) +#else if (!troff) +#endif { to_cat = 1; -- Adios