Your message dated Fri, 10 May 2024 14:55:49 +0000
with message-id <e1s5rf3-00ec51...@fasolo.debian.org>
and subject line Bug#1066887: fixed in glibc 2.38-9
has caused the Debian Bug report #1066887,
regarding locales/locale-gen: Locales Cannot Copy from Locales in  
/usr/local/share/i18n/locales
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1066887: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066887
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: locales
Version: 2.36-9+deb12u4
Severity: important
Tags: l10n
X-Debbugs-Cc: maddes+deb...@maddes.net

Dear Maintainer,

referencing a custom locale that resides in /usr/local/share/i18n/loaces/ via 
"copy" doesn't work.

`dpkg-reconfigure locales` gives the following error message:
en_GB.UTF-8@INTL...[error] cannot open locale definition file `en_US@INTL': No 
such file or directory

Both locales will get attached to the bug, so you can be reproduce.

   * What led up to the situation?

Created custom locales in /usr/local/share/i18n/locales/ and wanted
to copy from one those custome locales: en_GB@INTL shall copy LC_TIME from 
en_US@INTL.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Looked around and recognized that locale-gen doesn't pass any I18NPATH to 
localedef. So only the compiled-in single path /usr/share/i18n/locales/ is 
referenced.

   * What was the outcome of this action?

Referencing custom locales without I18NPATH does not work (see error message 
above).

   * What outcome did you expect instead?

Referencing a custom locale should work out of the box.

   * Workarounds?

This worked: `I18NPATH=/usr/local/share/i18n dpkg-reconfigure locales`

   * Possible solutions?

Option #1: Enhance `locale-gen` to set I18NPATH when calling localedef

TESTED and working, allows to set I18NPATH also from the outside.

/usr/sbin/locale-gen:
...
if [ -z "${I18NPATH:-}" ]; then
  if [ -d "${USER_LOCALES}" ]; then
    I18NPATH="${USER_LOCALES%/locales}"
  fi
fi

echo "Generating locales (this might take a while)..."
while read -r locale charset; do
  ...
  I18NPATH="${I18NPATH}" localedef ...
  ...
done


Option #2: Enhance `localedef` upstream to allow collon separated list of paths 
via LOCSRCDIR macro

There are no changes since glibc 2.36 in function locfile_read() of 
locale/programs/locfile.c and no debian patches for this function.

Something like this should work (UNTESTED!):

int
locfile_read (struct localedef_t *result, const struct charmap_t *charmap)
{
...
      /* Test in the default directories.  */
      if (ldfile == NULL)
        {
          char *locpath = LOCSRCDIR;
          const size_t pathlen = strlen (locpath);
          char locpathbuf[pathlen + 1];
          char path[strlen (filename) + 1 + pathlen];
          char *next;
          locpath = memcpy (locpathbuf, locpath, pathlen + 1);

          while (ldfile == NULL
             && (next = strsep (&locpath, ":")) != NULL)
            {
              stpcpy (stpcpy (path, next), filename);
            
              ldfile = lr_open (path, locfile_hash);
            
              if (ldfile == NULL)
                {
                  stpcpy (stpcpy (stpcpy (path, next), "/"), filename);
            
                  ldfile = lr_open (path, locfile_hash);
                }
            }
        }
...


-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-9-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_US.UTF-8@INTL, LC_CTYPE=en_US.UTF-8@INTL (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages locales depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  libc-bin               2.36-9+deb12u4
ii  libc-l10n              2.36-9+deb12u4

locales recommends no packages.

locales suggests no packages.

-- debconf information:
* locales/locales_to_be_generated: en_DE.UTF-8@INTL UTF-8, en_US.UTF-8 UTF-8, 
en_US.UTF-8@INTL UTF-8
* locales/default_environment_locale: en_US.UTF-8@INTL
comment_char %
escape_char /

% INTL English locale for US
% This is a modified copy of "en_US"
% Modifications done for internationally working people: ISO date, 24h clock, 
comma as decimal separator, A4 paper, metric system, etc.
% Most settings are either directly copied from en_US or from i18n
% Special cases are explicitly mentioned

% "en_US" is part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file.  The foregoing does not
% affect the license of the GNU C Library as a whole.  It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.

LC_IDENTIFICATION
title      "INTL English locale for US (based on en_US)"
source     "Maddes (based on the work of Free Software Foundation, Inc.)"
address    "http:////www.github.com//maddes-b//linux-stuff//";
contact    ""
email      ""
tel        ""
fax        ""
language   "American English"
territory  "United States"
revision   "1.0"
date       "2024-03-12"

category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
category "i18n:2012";LC_COLLATE
category "i18n:2012";LC_TIME
category "i18n:2012";LC_NUMERIC
category "i18n:2012";LC_MONETARY
category "i18n:2012";LC_MESSAGES
category "i18n:2012";LC_PAPER
category "i18n:2012";LC_NAME
category "i18n:2012";LC_ADDRESS
category "i18n:2012";LC_TELEPHONE
category "i18n:2012";LC_MEASUREMENT
END LC_IDENTIFICATION


LC_CTYPE
copy "en_US"
END LC_CTYPE


LC_COLLATE
copy "en_US"
END LC_COLLATE


LC_MONETARY
% -- taken from en_US
int_curr_symbol     "USD "
currency_symbol     "$"
mon_decimal_point   ","  % INTL: adapted
mon_thousands_sep   "."  % INTL: adapted
mon_grouping        3;3
positive_sign       ""
negative_sign       "-"
int_frac_digits     2
frac_digits         2
p_cs_precedes       1
int_p_sep_by_space  1
p_sep_by_space      0
n_cs_precedes       1
int_n_sep_by_space  1
n_sep_by_space      0
p_sign_posn         1
n_sign_posn         1
END LC_MONETARY


LC_NUMERIC
% -- taken from en_US
decimal_point   ","  % INTL: adapted
thousands_sep   "."  % INTL: adapted
grouping        3;3
END LC_NUMERIC


LC_TIME
% -- taken from en_US/en_GB
abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"
day /
  "Sunday";/
  "Monday";/
  "Tuesday";/
  "Wednesday";/
  "Thursday";/
  "Friday";/
  "Saturday"
abmon /
  "Jan";"Feb";/
  "Mar";"Apr";/
  "May";"Jun";/
  "Jul";"Aug";/
  "Sep";"Oct";/
  "Nov";"Dec"
mon /
  "January";/
  "February";/
  "March";/
  "April";/
  "May";/
  "June";/
  "July";/
  "August";/
  "September";/
  "October";/
  "November";/
  "December"
% Appropriate 12h clock time representation (%r)
am_pm "AM";"PM"
t_fmt_ampm "%I:%M:%S %p %Z"  % INTL: adapted
% -- taken/adapted from i18n
% This is the ISO/IEC 14652 "i18n" definition for
% the LC_TIME category.
%
% Weekday and week numbering according to ISO 8601  % INTL: adapted
% https://sourceware.org/glibc/wiki/Locales#LC_TIME
% glibc <=2.36: needs to be based on Sunday
week 7;19971130;4
first_weekday 2
first_workday 2
% week 7;19971201;4
% first_weekday 1
% first_workday 1
% Date formats following ISO 8601
% Appropriate date and time representation (%c)
d_t_fmt    "%F %T %Z"  % INTL: adapted
%
% Appropriate date representation (%x)
d_fmt      "%F"
%
% Appropriate time representation (%X)
t_fmt      "%T %Z"  % INTL: adapted
%
% Appropriate date representation (date(1))
date_fmt   "%a %F %T %Z"  % INTL: adapted
END LC_TIME


LC_MESSAGES
copy "en_US"
END LC_MESSAGES


LC_PAPER
copy "i18n"
END LC_PAPER


LC_NAME
copy "en_US"
END LC_NAME


LC_ADDRESS
copy "en_US"
END LC_ADDRESS


LC_TELEPHONE
copy "en_US"
END LC_TELEPHONE


LC_MEASUREMENT
copy "i18n"
END LC_MEASUREMENT
comment_char %
escape_char /

% INTL English locale for GB
% This is a modified copy of "en_GB"
% Modifications done for internationally working people: ISO date, 24h clock, 
comma as decimal separator, A4 paper, metric system, etc.
% Most settings are either directly copied from en_GB or from i18n
% Special cases are explicitly mentioned

% "en_GB" is part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file.  The foregoing does not
% affect the license of the GNU C Library as a whole.  It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.

LC_IDENTIFICATION
title      "INTL English locale for GB (based on en_GB)"
source     "Maddes (based on the work of Free Software Foundation, Inc.)"
address    "http:////www.github.com//maddes-b//linux-stuff//";
contact    ""
email      ""
tel        ""
fax        ""
language   "British English"
territory  "United Kingdom"
revision   "1.0"
date       "2024-03-12"

category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
category "i18n:2012";LC_COLLATE
category "i18n:2012";LC_TIME
category "i18n:2012";LC_NUMERIC
category "i18n:2012";LC_MONETARY
category "i18n:2012";LC_MESSAGES
category "i18n:2012";LC_PAPER
category "i18n:2012";LC_NAME
category "i18n:2012";LC_ADDRESS
category "i18n:2012";LC_TELEPHONE
category "i18n:2012";LC_MEASUREMENT
END LC_IDENTIFICATION


LC_CTYPE
copy "en_GB"
END LC_CTYPE


LC_COLLATE
copy "en_GB"
END LC_COLLATE


LC_MONETARY
% -- taken from en_GB
int_curr_symbol         "GBP "
currency_symbol         "£"
mon_decimal_point       ","  % INTL: adapted
mon_thousands_sep       "."  % INTL: adapted
mon_grouping            3
positive_sign           ""
negative_sign           "-"
int_frac_digits         2
frac_digits             2
p_cs_precedes           1
p_sep_by_space          0
n_cs_precedes           1
n_sep_by_space          0
p_sign_posn             1
n_sign_posn             1
END LC_MONETARY


LC_NUMERIC
% -- taken from en_GB
decimal_point           ","  % INTL: adapted
thousands_sep           "."  % INTL: adapted
grouping                3
END LC_NUMERIC


LC_TIME
copy "en_US@INTL"
END LC_TIME


LC_MESSAGES
copy "en_GB"
END LC_MESSAGES


LC_PAPER
copy "i18n"
END LC_PAPER


LC_NAME
copy "en_GB"
END LC_NAME


LC_ADDRESS
copy "en_GB"
END LC_ADDRESS


LC_TELEPHONE
copy "en_GB"
END LC_TELEPHONE


LC_MEASUREMENT
copy "i18n"
END LC_MEASUREMENT
en_GB.UTF-8@INTL UTF-8
en_US.UTF-8@INTL UTF-8

--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.38-9
Done: Aurelien Jarno <aure...@debian.org>

We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1066...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aure...@debian.org> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 10 May 2024 15:59:00 +0200
Source: glibc
Architecture: source
Version: 2.38-9
Distribution: unstable
Urgency: medium
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aure...@debian.org>
Closes: 1066887
Changes:
 glibc (2.38-9) unstable; urgency=medium
 .
   [ Aurelien Jarno ]
   * debian/rules: build with gcc-13.
   * debian/tests/control: re-enable autopkgtest on arm64, the memory
     consumption should be lower with gcc-13.
   * debian/testsuite-xfail-debian.mk: remove now fixed riscv64 XFAILs.
   * debian/debhelper.in/libc-bin.{install,lintian-overrides}: move ldconfig to
     /usr/sbin.
   * debian/patches/git-updates.diff: update from upstream stable branch.
 .
   [ M. Buecher ]
   * debian/local/usr_sbin/locale-gen: enhance to support referencing locales
     in /usr/local/share/i18n/locales through copy.  Closes: #1066887
Checksums-Sha1:
 70541bc4bd32028b9448dfb2c5c2a80db965dd0a 9079 glibc_2.38-9.dsc
 a5e1b0aee72d2926438be66027e6eb72da22b4fc 427576 glibc_2.38-9.debian.tar.xz
 52bfa216e11f84ee7b44bf56df418d027ae1a4d9 9021 glibc_2.38-9_source.buildinfo
Checksums-Sha256:
 6025837e231c146eeac1a6aee3fbd3450ca5e08f374f144977312161482024f7 9079 
glibc_2.38-9.dsc
 184aca4ef74e68da9a9b8715074a93cb1717017854d943cc73324281341bd57a 427576 
glibc_2.38-9.debian.tar.xz
 484c083375ce24f88428ed8ad9912615c955b6d2e042ecc04fcb85820392301e 9021 
glibc_2.38-9_source.buildinfo
Files:
 cdb165e4105619c90bf070e17a77489a 9079 libs required glibc_2.38-9.dsc
 15f3845b4415127d88436ba916166381 427576 libs required 
glibc_2.38-9.debian.tar.xz
 584fa6fc238450cb2630a1e76022d07c 9021 libs required 
glibc_2.38-9_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAmY+KYYACgkQE4jA+Jno
M2ti+g//fnHoC+1Z14FzUHNaWUKTm2WHmGAeeo61ulmexRoikYpIPoM00+O46e0W
roeeVKJv/HkvuR/G0zAo1vdzqcQEHZleZgu2DKggH6q6JGJZoQYWQP7q3/PnTyzM
IYiAt7wiKZH/JMjy9ZYkqS6AUa5IlHCrQsyWb5/WocoqaWQB4O1PlxYPCMqoz5bF
uEmqEjKSPugtjcGkgQeKO4ksgb7Co4P8t/Zp8BW5cH+ZkGqlWv3u2wLYVn78PEZu
x4136lGh/PQBl22BVT7Kmm9/86t0xF0bvEyUpWX1EOp0ijvy2SoW0O4Fyt8sNaqT
u+vD0LPrfxKi6tBEdp1ALb2BYrx77Jt4RzCYz1poOMd9yaKROdFDL9Ykyv4iyJww
wcW2YeXKtleCWu3M2E/mQTiGS/RYOuFnGUbRrDc7l+2LytbnAuv/6met97vtEK7W
Oc6OPez9l15B+KXmxyib6EQtZ9QQbv9mRdY0mlVjFEAKk0o5TUrsa1Vwyg5n6ej6
HgGfMEDHV0dX6dn/oDQUGhDDkmp/c4NGvyun70XqzPuwiZVZOGUDLb7kGt1zJmLx
9uBd+/W07KtfTKU484JgPDzuNrNiNuqxpkadCcIvubkI1orbUoyeaq6brUhKTXBv
cnZOX7QHdqaW5JtgKp/p2Lxkpzeaj+64cUp9lKVvHYciz5LhKIQ=
=Y/Zh
-----END PGP SIGNATURE-----

Attachment: pgpMZWHakiALd.pgp
Description: PGP signature


--- End Message ---

Reply via email to