GNU bug report logs - #12830
charset.alias incorrect path

Previous Next

Package: coreutils;

Reported by: "Matias A. fonzo" <selk <at> dragora.org>

Date: Thu, 8 Nov 2012 00:49:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12830 in the body.
You can then email your comments to 12830 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Thu, 08 Nov 2012 00:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Matias A. fonzo" <selk <at> dragora.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 08 Nov 2012 00:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Matias A. fonzo" <selk <at> dragora.org>
To: bug-coreutils <at> gnu.org
Subject: charset.alias incorrect path
Date: Wed, 7 Nov 2012 21:52:53 -0300
Hi there,

The path for the installed file "charset.alias" is already set by
$(libdir), it is composed as $(libdir)/lib wrongly in Makefile.in. This
is at the line 3001 on Makefile.in (coreutils 8.20):

charset_alias = $(DESTDIR)$(libdir)/charset.alias

I provide a difference fixing the path:

--- Makefile.in.orig	2012-10-23 13:26:32.000000000 -0300
+++ Makefile.in	2012-11-07 17:04:26.000000000 -0300
@@ -2998,7 +2998,7 @@
 	lib/waitpid.c lib/wcrtomb.c lib/wcswidth.c lib/wcwidth.c \
 	lib/write.c lib/xstrtod.c
 GPERF = gperf
-charset_alias = $(DESTDIR)$(libdir)/lib/charset.alias
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
 
 # Because this Makefile snippet defines a variable used by other




Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Thu, 08 Nov 2012 01:00:03 GMT) Full text and rfc822 format available.

Message #8 received at 12830 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: "Matias A. fonzo" <selk <at> dragora.org>
Cc: 12830 <at> debbugs.gnu.org
Subject: Re: bug#12830: charset.alias incorrect path
Date: Wed, 07 Nov 2012 17:59:19 -0700
[Message part 1 (text/plain, inline)]
On 11/07/2012 05:52 PM, Matias A. fonzo wrote:
> Hi there,
> 
> The path for the installed file "charset.alias" is already set by
> $(libdir), it is composed as $(libdir)/lib wrongly in Makefile.in. This
> is at the line 3001 on Makefile.in (coreutils 8.20):
> 
> charset_alias = $(DESTDIR)$(libdir)/charset.alias
> 
> I provide a difference fixing the path:
> 
> --- Makefile.in.orig	2012-10-23 13:26:32.000000000 -0300
> +++ Makefile.in	2012-11-07 17:04:26.000000000 -0300
> @@ -2998,7 +2998,7 @@
>  	lib/waitpid.c lib/wcrtomb.c lib/wcswidth.c lib/wcwidth.c \
>  	lib/write.c lib/xstrtod.c
>  GPERF = gperf
> -charset_alias = $(DESTDIR)$(libdir)/lib/charset.alias
> +charset_alias = $(DESTDIR)$(libdir)/charset.alias
>  charset_tmp = $(DESTDIR)$(libdir)/charset.tmp

Thanks for the report.  Hmm, this snippet is originally copied in from
gnulib, but in gnulib, it was already correct:

modules/localcharset:charset_alias = $(DESTDIR)$(libdir)/charset.alias

So I suspect a bug in the bootstrap script that is converting things
incorrectly when it attempts to normalize path names during a gnulib import.

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Thu, 08 Nov 2012 01:57:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Matias A. fonzo" <selk <at> dragora.org>
To: bug-coreutils <at> gnu.org
Subject: Re: charset.alias incorrect path
Date: Wed, 7 Nov 2012 22:03:39 -0300
El Wed, 7 Nov 2012 21:52:53 -0300
"Matias A. fonzo" <selk <at> dragora.org> escribió:
> Hi there,
> 
> The path for the installed file "charset.alias" is already set by
> $(libdir), it is composed as $(libdir)/lib wrongly in Makefile.in.
> This is at the line 3001 on Makefile.in (coreutils 8.20):

Sorry:

> charset_alias = $(DESTDIR)$(libdir)/charset.alias

The original line at the line 3001 is

charset_alias = $(DESTDIR)$(libdir)/lib/charset.alias




Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Thu, 08 Nov 2012 07:12:01 GMT) Full text and rfc822 format available.

Message #14 received at 12830 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Eric Blake <eblake <at> redhat.com>
Cc: "Matias A. fonzo" <selk <at> dragora.org>, 12830 <at> debbugs.gnu.org
Subject: Re: bug#12830: charset.alias incorrect path
Date: Thu, 08 Nov 2012 08:11:37 +0100
Eric Blake wrote:
> On 11/07/2012 05:52 PM, Matias A. fonzo wrote:
>> Hi there,
>>
>> The path for the installed file "charset.alias" is already set by
>> $(libdir), it is composed as $(libdir)/lib wrongly in Makefile.in. This
>> is at the line 3001 on Makefile.in (coreutils 8.20):
>>
>> charset_alias = $(DESTDIR)$(libdir)/charset.alias
>>
>> I provide a difference fixing the path:
>>
>> --- Makefile.in.orig	2012-10-23 13:26:32.000000000 -0300
>> +++ Makefile.in	2012-11-07 17:04:26.000000000 -0300
>> @@ -2998,7 +2998,7 @@
>>  	lib/waitpid.c lib/wcrtomb.c lib/wcswidth.c lib/wcwidth.c \
>>  	lib/write.c lib/xstrtod.c
>>  GPERF = gperf
>> -charset_alias = $(DESTDIR)$(libdir)/lib/charset.alias
>> +charset_alias = $(DESTDIR)$(libdir)/charset.alias
>>  charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
>
> Thanks for the report.  Hmm, this snippet is originally copied in from
> gnulib, but in gnulib, it was already correct:
>
> modules/localcharset:charset_alias = $(DESTDIR)$(libdir)/charset.alias
>
> So I suspect a bug in the bootstrap script that is converting things
> incorrectly when it attempts to normalize path names during a gnulib import.

Thanks.  You're right.
This error was fall-out from the um, ... pragmatic, hack
required to support non-recursive make.

Here's a possible fix.
I'll test it in the next day or so.

From 8bc198bac4068761f662fcd3f84a5c66e401747a Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim <at> meyering.net>
Date: Wed, 7 Nov 2012 22:37:39 -0800
Subject: [PATCH] prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition

* build-aux/prefix-gnulib-mk (prefix_assignment): Exempt charset_alias
from the "lib/" prefix-adding heuristic.  Reported by Matias A. fonzo
in http://bugs.gnu.org/12206.
---
 ChangeLog                  |  7 +++++++
 build-aux/prefix-gnulib-mk | 11 +++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index adcb8d1..e5b46be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-07  Jim Meyering  <jim <at> meyering.net>
+
+	prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
+	* build-aux/prefix-gnulib-mk (prefix_assignment): Exempt charset_alias
+	from the "lib/" prefix-adding heuristic.  Reported by Matias A. fonzo
+	in http://bugs.gnu.org/12206.
+
 2012-11-05  Paul Eggert  <eggert <at> cs.ucla.edu>

 	errno: port to LynxOS 178 2.2.2
diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 9b23245..11fb31a 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -89,17 +89,20 @@ sub prefix_assignment ($$)
   my ($lhs_and_assign_op, $rhs) = @_;
   my $res;

-  # Some variables are initialized by gnulib.mk, and we don't want
-  # that.  Change '=' to '+='.
-  if ($lhs_and_assign_op =~ /^GPERF =$/)
+  if ($lhs_and_assign_op =~ /^(?:GPERF|charset_alias) =$/)
     {
-      # Do not change the RHS, which specifies the GPERF program.
+      # Do not change the RHS when it specifies the GPERF program
+      # or when the LHS is charset_alias.  The latter's RHS already
+      # includes $(libdir), e.g.,
+      # charset_alias = $(DESTDIR)$(libdir)/charset.alias
     }
   elsif ($lhs_and_assign_op =~
       /^(SUBDIRS|EXTRA_DIST|BUILT_SOURCES|SUFFIXES|MOSTLYCLEANFILES
          |CLEANFILES|DISTCLEANFILES|MAINTAINERCLEANFILES|AM_CFLAGS
          |AM_CPPFLAGS|AM_GNU_GETTEXT)\ =/x)
     {
+      # Some variables are initialized by gnulib.mk, and we don't want
+      # that.  Change '=' to '+='.
       $lhs_and_assign_op =~ s/=/+=/;
     }
   # We don't want to inherit gnulib's AUTOMAKE_OPTIONS, comment them.
--
1.8.0




Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Thu, 08 Nov 2012 22:34:01 GMT) Full text and rfc822 format available.

Message #17 received at 12830 <at> debbugs.gnu.org (full text, mbox):

From: "Matias A. fonzo" <selk <at> dragora.org>
To: Jim Meyering <jim <at> meyering.net>
Cc: 12830 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#12830: charset.alias incorrect path
Date: Thu, 8 Nov 2012 19:50:04 -0300
El Thu, 08 Nov 2012 08:11:37 +0100
Jim Meyering <jim <at> meyering.net> escribió:
> [..]
>
> +	from the "lib/" prefix-adding heuristic.  Reported by Matias
> A. fonzo
> +	in http://bugs.gnu.org/12206.
> +
> [...]

Reported here in http://bugs.gnu.org/12830

Thanks. :-)




Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Fri, 09 Nov 2012 03:37:01 GMT) Full text and rfc822 format available.

Message #20 received at 12830 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: "Matias A. fonzo" <selk <at> dragora.org>
Cc: 12830 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#12830: charset.alias incorrect path
Date: Fri, 09 Nov 2012 04:36:10 +0100
Matias A. fonzo wrote:
> El Thu, 08 Nov 2012 08:11:37 +0100
> Jim Meyering <jim <at> meyering.net> escribió:
>> [..]
>>
>> +	from the "lib/" prefix-adding heuristic.  Reported by Matias
>> A. fonzo
>> +	in http://bugs.gnu.org/12206.
>> +
>> [...]
>
> Reported here in http://bugs.gnu.org/12830

Good catch.  I've corrected both the log and ChangeLog locally.
Testing momentarily...




Information forwarded to bug-coreutils <at> gnu.org:
bug#12830; Package coreutils. (Fri, 09 Nov 2012 06:54:01 GMT) Full text and rfc822 format available.

Message #23 received at 12830 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: "Matias A. fonzo" <selk <at> dragora.org>
Cc: 12830 <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#12830: charset.alias incorrect path
Date: Fri, 09 Nov 2012 07:53:02 +0100
Jim Meyering wrote:
> Matias A. fonzo wrote:
>> El Thu, 08 Nov 2012 08:11:37 +0100
>> Jim Meyering <jim <at> meyering.net> escribió:
>>> [..]
>>>
>>> +	from the "lib/" prefix-adding heuristic.  Reported by Matias
>>> A. fonzo
>>> +	in http://bugs.gnu.org/12206.
>>> +
>>> [...]
>>
>> Reported here in http://bugs.gnu.org/12830
>
> Good catch.  I've corrected both the log and ChangeLog locally.
> Testing momentarily...

Glad I tested.  That patch had no effect.
The one below does what I want.
It induces this sole difference in coreutils' Makefile.in:

  -charset_alias = $(DESTDIR)$(libdir)/lib/charset.alias
  +charset_alias = $(DESTDIR)$(libdir)/charset.alias


From 86b0eb58273181fc4ef484f19b8ab835f7f392ea Mon Sep 17 00:00:00 2001
From: Jim Meyering <jim <at> meyering.net>
Date: Wed, 7 Nov 2012 22:37:39 -0800
Subject: [PATCH] prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition

* build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
white space before each of the special-cased file names, to avoid
adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
in http://bugs.gnu.org/12830.
---
 ChangeLog                  | 8 ++++++++
 build-aux/prefix-gnulib-mk | 6 +++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9817769..a742d0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-11-08  Jim Meyering  <jim <at> meyering.net>
+
+	prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
+	* build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
+	white space before each of the special-cased file names, to avoid
+	adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
+	in http://bugs.gnu.org/12830.
+
 2012-11-08  Paul Eggert  <eggert <at> cs.ucla.edu>

 	fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk
index 9b23245..7553f65 100755
--- a/build-aux/prefix-gnulib-mk
+++ b/build-aux/prefix-gnulib-mk
@@ -147,7 +147,11 @@ sub prefix ($)
    {prefix_assignment($1, $2)}gem;

   # These three guys escape all the other regular rules.
-  s{(charset\.alias|ref-add\.sed|ref-del\.sed)}{$prefix$1}g;
+  # Require the leading white space to avoid inserting the prefix
+  # on a line like this:
+  # charset_alias = $(DESTDIR)$(libdir)/charset.alias
+  # With $(libdir), it would be erroneous.
+  s{(\s)(charset\.alias|ref-add\.sed|ref-del\.sed)}{$1$prefix$2}g;
   # Unfortunately, as a result we sometimes have lib/lib.
   s{($prefix){2}}{$1}g;

--
1.8.0




Added tag(s) fixed. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 15 Oct 2018 18:02:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 12830 <at> debbugs.gnu.org and "Matias A. fonzo" <selk <at> dragora.org> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 15 Oct 2018 18:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Nov 2018 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.