NetBSD Problem Report #43072
From enami@sm.sony.co.jp Mon Mar 29 12:03:54 2010
Return-Path: <enami@sm.sony.co.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id E85C663B11D
for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Mar 2010 12:03:53 +0000 (UTC)
Message-Id: <20100329085023.CA30934449@rplaca.sm.sony.co.jp>
Date: Mon, 29 Mar 2010 17:50:23 +0900 (JST)
From: tsugutomo.enami@jp.sony.com
Reply-To: tsugutomo.enami@jp.sony.com
To: gnats-bugs@gnats.NetBSD.org
Subject: buildhash in ispell-base may create file in inappropriate directory
X-Send-Pr-Version: 3.95
>Number: 43072
>Category: pkg
>Synopsis: buildhash may create file in inappropriate directory
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 29 12:05:00 +0000 2010
>Originator: enami tsugutomo
>Release: NetBSD 5.99.23
>Organization:
>Environment:
System: NetBSD rplaca.sm.sony.co.jp 5.99.23 NetBSD 5.99.23 (GENERIC) #5: Wed Jan 6 11:19:56 JST 2010 enami@sigkill.sm.sony.co.jp:/home/enami/src/current/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
buildhash of textproc/ispell-base trys to create name of
stats file by replacing file extension with .stat,
but it doesn't care if the portion replaced is really a
file extension.
for example, if ispell-base is built with OBJMACHINE is set,
buildhash called via munchlist script during build process
creates stats file as textproc/ispell-base/work.stat which is
obviously inappropriate location.
since bulidhash and munchlist are installed program, this is not
just a build time problem.
>How-To-Repeat:
put OBJMACHINE=yes in your mk.conf and cd textproc/ispell-base
and type make.
>Fix:
below is possible fix (changes to distinfo omitted).
alternatively, munchlist can be fixed to call buildhash
with passing filename with actual file extenstion (currently,
$FAKEDICT doesn't have extension).
i'm not sure which is better.
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/ispell-base/patches/patch-ad,v
retrieving revision 1.3
diff -u -r1.3 patch-ad
--- patches/patch-ad 7 Jul 2005 12:42:20 -0000 1.3
+++ patches/patch-ad 29 Mar 2010 07:20:54 -0000
@@ -2,6 +2,15 @@
--- buildhash.c.orig 2005-04-28 12:26:06.000000000 +1200
+++ buildhash.c
+@@ -176,7 +176,7 @@ int main (argc, argv)
+
+ strcpy (Sfile, Dfile);
+ lastdot = rindex (Sfile, '.');
+- if (lastdot != NULL)
++ if (lastdot != NULL && rindex (Sfile, '/') < lastdot)
+ *lastdot = '\0';
+ strcat (Sfile, STATSUFFIX);
+ #ifdef MSDOS
@@ -248,7 +248,7 @@ static void output ()
{
register FILE * houtfile;
(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.