[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#214028: marked as done (localedef, LSB 1.3 conformance, and Debian standard utilities)



Your message dated Tue, 10 Jan 2006 22:26:59 +0100
with message-id <20060110212659.GC4794@linuxfr.org>
and subject line localedef, LSB 1.3 conformance, and Debian standard utilities
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 4 Oct 2003 00:33:24 +0000
>From eggert@cs.ucla.edu Fri Oct 03 19:33:23 2003
Return-path: <eggert@cs.ucla.edu>
Received: from panther.cs.ucla.edu [131.179.128.25] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A5aMN-0006WT-00; Fri, 03 Oct 2003 19:33:23 -0500
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by panther.cs.ucla.edu (8.11.7p1+Sun/8.11.6/UCLACS-5.2) with ESMTP id h940XL927991;
	Fri, 3 Oct 2003 17:33:22 -0700 (PDT)
Received: from eggert by penguin.cs.ucla.edu with local (Exim 3.35 #1 (Debian))
	id 1A5aML-0004KO-00; Fri, 03 Oct 2003 17:33:21 -0700
To: submit@bugs.debian.org
Cc: 184886@bugs.debian.org, 184887@bugs.debian.org, 186140@bugs.debian.org,
   206210@bugs.debian.org, Jim Meyering <jim@meyering.net>
Subject: localedef, LSB 1.3 conformance, and Debian standard utilities
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 03 Oct 2003 17:33:21 -0700
Message-ID: <87oewxalke.fsf@penguin.cs.ucla.edu>
Lines: 63
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Paul Eggert <eggert@penguin.cs.ucla.edu>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0
	tests=BAYES_20,HAS_PACKAGE
	version=2.53-bugs.debian.org_2003_10_03
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_03 (1.174.2.15-2003-03-30-exp)

Package: libc6
Version: 2.3.2-8

This message is motivated by Debian's desire to pass the LSB 1.3
conformance tests.  The patch proposed below is intended to close
Debian bugs 184886, 184887, 186140, and 206210.  184887 has "serious"
severity; the rest are "wishlist".

Many Debian utilities (diff, cpio, sort, join, pr, uniq, etc.) lack
complete support for multibyte encodings.  The LSB conformance tests
apparently create locales with multibyte encodings using "localedef",
and then use these locales as part of the later tests.  POSIX and LSB
do not require that localedef must succeed when users attempt to
create multibyte locales; but if localedef succeeds, Andrew Josey has
indicated that the relevant Debian utilities must fully support the
multibyte locales that are created.

We plan to fix these utilities at some point in the hopefully
not-to-distant future.  Patches have been submitted for some of them,
but the patches are incomplete, are complicated and possibly buggy,
and in some cases are harmful to unibyte performance.

In the meantime, to conform to LSB 1.3, I propose that we modify the
"localedef" command to refuse to create user-defined locales with
multibyte encodings when invoked in a strict POSIX environment.  This
is a very simple fix that avoids the patch problems mentioned earlier.
It should not affect ordinary users (who hardly ever use localedef,
and when they do, don't use it in strict POSIX mode).  And it should
satisfy the LSB 1.3 conformance testers.

Here is a proposed patch.  I haven't tested it, unfortunately, since I
lack the correct development and test environment (I've never seen the
LSB 1.3 conformance tests).  But the basic idea is pretty
straightforward.  This patch isn't entirely satisfactory of course,
but it should get the job done for now.

2003-10-03  Paul Eggert  <eggert@twinsun.com>

	* locale/programs/localedef.c (main): Reject attempts to create
	multibyte locales when operating in strict POSIX mode.

--- glibc-2.3.2-8/glibc-2.3.2/locale/programs/localedef.c	Thu Jan  2 12:02:31 2003
+++ glibc-2.3.2-8-fix/glibc-2.3.2/locale/programs/localedef.c	Fri Oct  3 16:57:39 2003
@@ -247,6 +247,18 @@ FATAL: system does not define `_POSIX2_L
   /* Process charmap file.  */
   charmap = charmap_read (charmap_file, verbose, be_quiet, 1);
 
+  /* Some Debian utilities don't fully support multibyte encodings.
+     Pass the LSB 1.3 conformance tests by not allowing users to
+     create locales with such encodings.  This hack can be removed
+     after all Debian standard utilities have full support for
+     multibyte locales.  (However, if localedef ever adds support for
+     state-dependent character encodings, a similar hack will be
+     needed until all Debian standard utilities have full support for
+     such encodings.)  */
+  if (posix_conformance && 1 < charmap->mb_cur_max)
+    WITH_CUR_LOCALE (error (2, 0, _("\
+FATAL: multibyte character sets are not supported in strict POSIX mode")));
+
   /* Add the first entry in the locale list.  */
   memset (&global, '\0', sizeof (struct localedef_t));
   global.name = input_file ?: "/dev/stdin";
Only in glibc-2.3.2-8-fix/glibc-2.3.2/locale/programs: localedef.c~

---------------------------------------
Received: (at 214028-done) by bugs.debian.org; 10 Jan 2006 21:26:51 +0000
>From barbier@mp4h.org Tue Jan 10 13:26:51 2006
Return-path: <barbier@mp4h.org>
Received: from main.uucpssh.org ([212.27.33.224])
	by spohr.debian.org with esmtp (Exim 4.50)
	id 1EwR10-0000or-W5
	for 214028-done@bugs.debian.org; Tue, 10 Jan 2006 13:26:51 -0800
Received: from localhost (localhost [127.0.0.1])
	by main.uucpssh.org (Postfix) with ESMTP id CF64094F68
	for <214028-done@bugs.debian.org>; Tue, 10 Jan 2006 22:26:49 +0100 (CET)
Received: by main.uucpssh.org (Postfix, from userid 10)
	id 8B7AD9515C; Tue, 10 Jan 2006 22:26:49 +0100 (CET)
Received: by localhost.localdomain (Postfix, from userid 1000)
	id 8DED8FAC7E; Tue, 10 Jan 2006 22:26:59 +0100 (CET)
Date: Tue, 10 Jan 2006 22:26:59 +0100
From: Denis Barbier <barbier@linuxfr.org>
To: 214028-done@bugs.debian.org
Subject: Re: localedef, LSB 1.3 conformance, and Debian standard utilities
Message-ID: <20060110212659.GC4794@linuxfr.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.11
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02

> From Paul Eggert
>> From: GOTO Masanori
>>
>> Could I close this bug?
>
> Yes, please do.

Thanks for your report, closing it now.

Denis



Reply to: