NetBSD Problem Report #43325
From makoto@mx.ki.nu Wed May 19 02:45:30 2010
Return-Path: <makoto@mx.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id C741263B873
for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 May 2010 02:45:29 +0000 (UTC)
Message-Id: <201005190245.o4J2jQs2027436@mx.ki.nu>
Date: Wed, 19 May 2010 11:45:26 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: [PATCH] textproc/namazu is not really WAKATI friendly, internal make check fails
X-Send-Pr-Version: 3.95
>Number: 43325
>Category: pkg
>Synopsis: textproc/namazu is not really WAKATI friendly, internal make check fails
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 19 02:50:01 +0000 2010
>Last-Modified: Mon May 31 19:40:01 +0000 2010
>Originator: Makoto Fujiwara
>Release: NetBSD 5.0_STABLE
>Organization:
KINU Corporation
>Environment:
System: NetBSD modena 5.0_STABLE NetBSD 5.0_STABLE (XEN3_DOM0) #0: Wed Apr 7 02:17:52 UTC 2010 builds@b8.netbsd.org:/home/builds/ab/netbsd-5/amd64/201004070000Z-obj/home/builds/ab/netbsd-5/src/sys/arch/amd64/compile/XEN3_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:
textproc/namazu has various situation to package, LANGUAGE and WAKATI
(word segmentation for Japanese = morphological analyzer)
and textproc/namazu fails internal 'make check' after build, with
LANG=ja_JP.eucJP (or any LANG=ja...)
These situation should be selected by options.mk
>How-To-Repeat:
(1) before the patch
--------------------
foreach lang (C ja_JP.eucJP) \
(make clean && make package && \
(cd work/namazu-2.0.20/; env PERL_BADLANG=0 LANG=$lang make -i check) \
) |& tee -a ~/prep/namazu-log-before
end
stable@makoto 11:23:16/100519(..textproc/namazu)% grep ' tests ' ~/prep/namazu-log-before
All 47 tests passed
19 of 50 tests failed
(2) after the patch
--------------------
( in /etc/mk.conf, following three lines are added)
----
PKG_OPTIONS.namazu= kakasi
PKG_OPTIONS.namazu+= chasen
PKG_OPTIONS.namazu+= mecab
----
stable@makoto 11:33:57/100519(..textproc/namazu)% foreach lang (C ja_JP.eucJP)\
(make clean && make package && \
(cd work/namazu-2.0.20/; env PERL_BADLANG=0 LANG=$lang make -i check) ) \
|& tee -a ~/prep/namazu-after
end
stable@makoto 11:34:01/100519(..textproc/namazu)% grep ' tests ' ~/prep/namazu-after
All 47 tests passed
All 50 tests passed
>Fix:
Index: Makefile
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/textproc/namazu/Makefile,v
retrieving revision 1.5
diff -u -a -u -r1.5 Makefile
--- Makefile 17 Apr 2010 16:25:11 -0000 1.5
+++ Makefile 19 May 2010 02:25:37 -0000
@@ -27,22 +27,11 @@
CONFIGURE_ARGS+= --localstatedir=${PREFIX}/${DATADIR} \
--libexecdir=${PREFIX}/libexec/cgi-bin \
--sysconfdir=${PKG_SYSCONFBASE}
-CONFIGURE_ENV+= KAKASI="module_kakasi"
-CONFIGURE_ENV+= ac_cv_path_KAKASI="module_kakasi"
-CONFIGURE_ENV+= CHASEN="module_chasen"
-CONFIGURE_ENV+= ac_cv_path_CHASEN="module_chasen"
-CONFIGURE_ENV+= MECAB="module_mecab"
-CONFIGURE_ENV+= ac_cv_path_MECAB="module_mecab"
DATADIR= libdata
EXAMPLESDIR= share/examples/namazu
EXAMPLES= mknmzrc namazurc
INSTALLATION_DIRS+= ${DATADIR}/namazu ${EXAMPLESDIR}
-SUBST_CLASSES+= wakati
-SUBST_STAGE.wakati= pre-configure
-SUBST_FILES.wakati= pl/conf.pl.in
-SUBST_SED.wakati= -e 's|@OPT_WAKATI_DEFAULT@|none|'
-
.include "../../mk/bsd.prefs.mk"
PKG_SYSCONFSUBDIR= namazu
@@ -58,6 +47,8 @@
${DESTDIR}${PREFIX}/${EXAMPLESDIR}/${f}
.endfor
+.include "options.mk"
+
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ options.mk 19 May 2010 02:27:27 -0000
@@ -0,0 +1,33 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.namazu
+PKG_SUPPORTED_OPTIONS= ja_lang kakasi chasen mecab
+# ja_lang is not currently supported yet
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.options.mk"
+
+. if !empty(PKG_OPTIONS:Mkakasi)
+CONFIGURE_ENV+= KAKASI="module_kakasi"
+CONFIGURE_ENV+= ac_cv_path_KAKASI="module_kakasi"
+DEPENDS+= p5-Text-Kakasi>=1.04:../../textproc/p5-Text-Kakasi
+. endif
+
+. if !empty(PKG_OPTIONS:Mchasen)
+CONFIGURE_ENV+= CHASEN="module_chasen"
+CONFIGURE_ENV+= ac_cv_path_CHASEN="module_chasen"
+DEPENDS+= p5-Text-ChaSen>=1.0:../../textproc/p5-Text-ChaSen
+. endif
+
+. if !empty(PKG_OPTIONS:Mmecab)
+CONFIGURE_ENV+= MECAB="module_mecab"
+CONFIGURE_ENV+= ac_cv_path_MECAB="module_mecab"
+DEPENDS+= mecab:../../textproc/mecab
+. endif
+
+. if empty(PKG_OPTIONS:Mkakasi) && empty(PKG_OPTIONS:Mchasen) && empty(PKG_OPTIONS:Mmecab)
+SUBST_CLASSES+= wakati
+SUBST_STAGE.wakati= pre-configure
+SUBST_FILES.wakati= pl/conf.pl.in
+SUBST_SED.wakati= -e 's|@OPT_WAKATI_DEFAULT@|none|'
+. endif
>Audit-Trail:
From: Makoto Fujiwara <makoto@ki.nu>
To:
Cc: gnats-bugs@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI friendly, internal make check fails
Date: Wed, 19 May 2010 13:26:07 +0900
Sorry, probably this should be correct:
--- options.mk 19 May 2010 03:47:04 -0000 1.1
+++ options.mk 19 May 2010 04:21:45 -0000 1.2
@@ -22,7 +22,7 @@
. if !empty(PKG_OPTIONS:Mmecab)
CONFIGURE_ENV+= MECAB="module_mecab"
CONFIGURE_ENV+= ac_cv_path_MECAB="module_mecab"
-DEPENDS+= mecab:../../textproc/mecab
+DEPENDS+= p5-mecab:../../textproc/p5-mecab
. endif
. if empty(PKG_OPTIONS:Mkakasi) && empty(PKG_OPTIONS:Mchasen) && empty(PKG_OPTIONS:Mmecab)
---
Makoto Fujiwara,
Chiba, Japan, Narita Airport and Disneyland prefecture.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI friendly,
internal make check fails
Date: Wed, 19 May 2010 14:29:16 +0900
I already noted in MESSAGE how to use WAKATI modules.
See also following discussion why doing so:
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200705/msg00010.html
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200705/msg00011.html
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200705/msg00012.html
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200705/msg00013.html
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200705/msg00014.html
http://www.jp.netbsd.org/ja/JP/ml/tech-pkg-ja/200706/msg00001.html
From: Makoto Fujiwara <makoto@ki.nu>
To: "OBATA Akio" <obache@NetBSD.org>
Cc: pkg-manager@NetBSD.org, gnats-bugs@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI friendly, internal make check fails
Date: Thu, 20 May 2010 08:54:26 +0900
Obache San, thank you for the reply. The reasons I submit the patch are:
(1) I would like to 'make check' before install. With some environment,
I said 'some' but it may be with some large audience, make check fails
with existing setup. ( LANG=ja.. environment)
(2) I saw some discussions (just question and answers) on also 'make check'
was failing with the same reason at namazu-dev-ja mailing list,
(in Japanese, sorry) staring at:
http://www.namazu.org/pipermail/namazu-devel-ja/2009-February/001771.html
(3) My patch does not break existing setup as default is non-wakati. It only
affects when the options are setup ( say in /etc/mk.conf)
This means we provide user's choise WITH or WITHOUT wakati
I would like to take my patch.
(Or is there any discussions that options.mk is not good practice ?)
Thank you,
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI friendly,
internal make check fails
Date: Thu, 20 May 2010 11:23:16 +0900
On Thu, 20 May 2010 08:55:03 +0900, Makoto Fujiwara <makoto@ki.nu> wrote:
> (1) I would like to 'make check' before install. With some environment,
> I said 'some' but it may be with some large audience, make check fails
> with existing setup. ( LANG=ja.. environment)
You can edit 'pl/config.pl' and change $WAKATI for your wanted module before test,
and you can test with all patterns of WAKATI module.
> (2) I saw some discussions (just question and answers) on also 'make check'
> was failing with the same reason at namazu-dev-ja mailing list,
> (in Japanese, sorry) staring at:
> http://www.namazu.org/pipermail/namazu-devel-ja/2009-February/001771.html
I feel it is upstream issue.
If any of wakati module is not found WAKATI=$none is set in config.pl.
but $none is not defined anywhere.
> (3) My patch does not break existing setup as default is non-wakati. It only
> affects when the options are setup ( say in /etc/mk.conf)
> This means we provide user's choise WITH or WITHOUT wakati
No.
Namazu's configure script pick up WAKATI modules and commands as it can possible.
As your patch, even if any of WAKATI modules are not selected by pkg-option,
if any of kakasi, chasen, mecab perl modules or those commands are found,
they are set in default config.pl.
It means that default configuration file is depend on the situation of build machine.
Incidentally, if you set only mecab option, but you have kakasi command,
kakasi command will be selected as default WAKATI because its selection order for default
WAKATI is hard coded as kakasi > chasen > mecab.
From: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI friendly, internal make check fails
Date: Fri, 21 May 2010 11:01:41 +0900
Thanks obache san, I understand. please close the PR.
It would be nice to have some note on 'make check' in MESSAGES.
(But MESSAGES is both for make install and for pkg_add, and the
latter may not apply for this note, sorry).
Index: textproc/namazu/MESSAGE
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/textproc/namazu/MESSAGE,v
retrieving revision 1.1
diff -u -r1.1 MESSAGE
--- textproc/namazu/MESSAGE 20 Sep 2007 20:53:30 -0000 1.1
+++ textproc/namazu/MESSAGE 21 May 2010 01:58:46 -0000
@@ -52,4 +52,7 @@
See http://www.dehenken.co.jp/products/products-01/products-dc01.html
in detail.
+8. If you do 'make check' with LANG=ja after source install (in its working
+ directory), modify 'pl/conf.pl' at $WAKATI= line for your wanted
+ module before that.
===========================================================================
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/43325: [PATCH] textproc/namazu is not really WAKATI
friendly, internal make check fails
Date: Mon, 31 May 2010 19:36:47 +0000
On Fri, May 21, 2010 at 02:05:04AM +0000, Makoto Fujiwara wrote:
> It would be nice to have some note on 'make check' in MESSAGES.
> (But MESSAGES is both for make install and for pkg_add, and the
> latter may not apply for this note, sorry).
>
> Index: textproc/namazu/MESSAGE
> [...]
> +8. If you do 'make check' with LANG=ja after source install (in its working
> + directory), modify 'pl/conf.pl' at $WAKATI= line for your wanted
> + module before that.
Indeed, MESSAGE is not really the right place for that note; also,
pkgsrc isn't really meant to support going and running things by hand
inside the work directory. (Sometimes correct behavior depends on
settings passed through from the package makefile.)
Maybe the right way to approach this is to add rules to the pkgsrc
makefile for running the tests from there? The substitution could be
automated then.
--
David A. Holland
dholland@netbsd.org
>Unformatted:
(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.