public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34
@ 2021-08-06  4:52 patrick.mccarty at intel dot com
  2021-08-08 11:51 ` [Bug locale/28199] " michael.hudson at canonical dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: patrick.mccarty at intel dot com @ 2021-08-06  4:52 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

            Bug ID: 28199
           Summary: iconvconfig prefix flag behaves differently in glibc
                    2.34
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: locale
          Assignee: unassigned at sourceware dot org
          Reporter: patrick.mccarty at intel dot com
  Target Milestone: ---

Overview:
---------

In glibc 2.34, I observed that the gconv-modules cache created by `iconvconfig
--prefix=PATHPREFIX` contains a module lookup path with a prepended value of
PATHPREFIX. That is, the lookup path is "PATHPREFIX/LIBDIR/gconv-modules/".

However, in glibc 2.33 and earlier, the module lookup path from the cache
created by the same command does *not* contain that prepended value. Instead
the path is "LIBDIR/gconv-modules/".

I don't know if this is an expected change or a bug, but the distro I
contribute to (Clear Linux OS) relies on the behavior from glibc <= 2.33, since
the distro package re-creates the gconv module cache (with `iconvconfig
--prefix=%{buildroot}`) after the `make install`, running as a non-root user.
Thus, the expectation has been for the cache file to be pre-populated and not
created via %post scripts or equivalent mechanisms.


Steps to Reproduce:
-------------------

I tested on Clear Linux OS, comparing the results on release 34900 (with glibc
2.33) to 34930 (with glibc 2.34). But any equivalent setup to compare
`iconvconfig` behavior from glibc 2.33 to 2.34 will work.

1. Run the following series of commands (or equivalent). They assume the glibc
under test is installed system-wide and that the installation libdir is
/usr/lib64.

  $ mkdir -p /tmp/usr/lib64
  $ cp -a /usr/lib64/gconv /tmp/usr/lib64/
  $ rm -f /tmp/usr/lib64/gconv/gconv-modules.cache
  $ iconvconfig --prefix=/tmp -o foo
  $ strings foo | grep /usr/lib64/gconv


Actual Results:
---------------

The grep command prints `/tmp/usr/lib64/gconv/`, demonstrating that the path
prefix, `/tmp`, is prepended to the cache lookup path. 


Expected Results:
-----------------

The grep command prints `/usr/lib64/gconv/`, demonstrating that the path prefix
is omitted from the lookup path. This is the behavior in glibc <= 2.33.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
@ 2021-08-08 11:51 ` michael.hudson at canonical dot com
  2021-08-08 11:58 ` michael.hudson at canonical dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: michael.hudson at canonical dot com @ 2021-08-08 11:51 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

Michael Hudson-Doyle <michael.hudson at canonical dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.hudson at canonical dot co
                   |                            |m

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
  2021-08-08 11:51 ` [Bug locale/28199] " michael.hudson at canonical dot com
@ 2021-08-08 11:58 ` michael.hudson at canonical dot com
  2021-08-08 12:02 ` michael.hudson at canonical dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: michael.hudson at canonical dot com @ 2021-08-08 11:58 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

--- Comment #1 from Michael Hudson-Doyle <michael.hudson at canonical dot com> ---
Created attachment 13603
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13603&action=edit
terrible hack fix

Oh, we've just run into this in Ubuntu. I'm pretty sure
eeac390eecf7de24a110dc84e77e1190f42c5305 is the commit to blame.
gconv_parseconfdir is passed the prefixed path and passes the prefixed path to
add_module which ends up in the string table of the cache. I'm testing the
attached horrible hack patch now, don't know if it helps yet.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
  2021-08-08 11:51 ` [Bug locale/28199] " michael.hudson at canonical dot com
  2021-08-08 11:58 ` michael.hudson at canonical dot com
@ 2021-08-08 12:02 ` michael.hudson at canonical dot com
  2021-08-08 18:44 ` siddhesh at sourceware dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: michael.hudson at canonical dot com @ 2021-08-08 12:02 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

--- Comment #2 from Michael Hudson-Doyle <michael.hudson at canonical dot com> ---
My horrible hack does seem to help, in fact.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
                   ` (2 preceding siblings ...)
  2021-08-08 12:02 ` michael.hudson at canonical dot com
@ 2021-08-08 18:44 ` siddhesh at sourceware dot org
  2021-08-08 21:21 ` michael.hudson at canonical dot com
  2021-09-13 15:23 ` siddhesh at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: siddhesh at sourceware dot org @ 2021-08-08 18:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |siddhesh at sourceware dot org
   Last reconfirmed|                            |2021-08-08
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at sourceware dot org   |siddhesh at sourceware dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
                   ` (3 preceding siblings ...)
  2021-08-08 18:44 ` siddhesh at sourceware dot org
@ 2021-08-08 21:21 ` michael.hudson at canonical dot com
  2021-09-13 15:23 ` siddhesh at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: michael.hudson at canonical dot com @ 2021-08-08 21:21 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

Michael Hudson-Doyle <michael.hudson at canonical dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13603|0                           |1
        is obsolete|                            |

--- Comment #3 from Michael Hudson-Doyle <michael.hudson at canonical dot com> ---
Created attachment 13604
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13604&action=edit
patch v2

More tested patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug locale/28199] iconvconfig prefix flag behaves differently in glibc 2.34
  2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
                   ` (4 preceding siblings ...)
  2021-08-08 21:21 ` michael.hudson at canonical dot com
@ 2021-09-13 15:23 ` siddhesh at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: siddhesh at sourceware dot org @ 2021-09-13 15:23 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=28199

Siddhesh Poyarekar <siddhesh at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.35
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Siddhesh Poyarekar <siddhesh at sourceware dot org> ---
commit 43cea6d5652b6b9e61ac6ecc69419c909b504f47
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Mon Sep 13 20:48:35 2021 +0530

    iconvconfig: Fix behaviour with --prefix [BZ #28199]

    The consolidation of configuration parsing broke behaviour with
    --prefix, where the prefix bled into the modules cache.  Accept a
    prefix which, when non-NULL, is prepended to the path when looking for
    configuration files but only the original directory is added to the
    modules cache.

    This has no effect on the codegen of gconv_conf since it passes NULL.

    Reported-by: Patrick McCarty <patrick.mccarty@intel.com>
    Reported-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
    Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>

 iconv/gconv_conf.c         |  2 +-
 iconv/gconv_parseconfdir.h | 22 +++++++++++++++-------
 iconv/iconvconfig.c        | 16 ++++++++++++----
 3 files changed, 28 insertions(+), 12 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-13 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  4:52 [Bug locale/28199] New: iconvconfig prefix flag behaves differently in glibc 2.34 patrick.mccarty at intel dot com
2021-08-08 11:51 ` [Bug locale/28199] " michael.hudson at canonical dot com
2021-08-08 11:58 ` michael.hudson at canonical dot com
2021-08-08 12:02 ` michael.hudson at canonical dot com
2021-08-08 18:44 ` siddhesh at sourceware dot org
2021-08-08 21:21 ` michael.hudson at canonical dot com
2021-09-13 15:23 ` siddhesh at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).