yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #25528
[Bug 1402406] [NEW] Archlinux locale configuration broken
Public bug reported:
The method for configuring the locale information for Arch is incorrect;
it's writing "LANG=lang.CP CP" to /etc/locale.gen which should just be
"lang.CP CP" (no foo=bar) as a naked line. The LANG= is to be written to
/etc/locale.conf instead.
http://bazaar.launchpad.net/~cloud-init-dev/cloud-
init/trunk/view/head:/cloudinit/distros/arch.py#L47
Provider (Rackspace) generated config value:
# grep ^locale /etc/cloud/cloud.cfg.d/10_rackspace.cfg
locale: en_US.UTF-8 UTF-8
== Existing code ==
# cat /etc/locale.gen
# Created by cloud-init v. 0.7.6 on Sun, 14 Dec 2014 15:23:26 +0000
LANG="en_US.UTF-8 UTF-8"
# locale-gen
Generating locales...
LANG="en_US.UTF-8"...character map file `UTF-8"' not found: No such file or directory
cannot open locale definition file `LANG="en_US': No such file or directory
== Manually fixed ==
# cat /etc/locale.gen
# Created by cloud-init v. 0.7.6 on Sun, 14 Dec 2014 15:23:26 +0000
en_US.UTF-8 UTF-8
# locale-gen
Generating locales...
en_US.UTF-8... done
Generation complete.
====
The attached patch takes a stab at correcting arch.py, however I'm not a
Python coder so YMMV. Based on the existing code, it seems to be
expected the Provider always specify "lang.CP CP" for 'locale' in the
cloud.cfg file(s) so this patch is based on that expectation, using
split() looking for the space and peeling off the first element for
/etc/locale.conf setup.
** Affects: cloud-init
Importance: Undecided
Status: New
** Patch added: "correct locale creation on Arch"
https://bugs.launchpad.net/bugs/1402406/+attachment/4281065/+files/cloud-init-arch.patch
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1402406
Title:
Archlinux locale configuration broken
Status in Init scripts for use on cloud images:
New
Bug description:
The method for configuring the locale information for Arch is
incorrect; it's writing "LANG=lang.CP CP" to /etc/locale.gen which
should just be "lang.CP CP" (no foo=bar) as a naked line. The LANG= is
to be written to /etc/locale.conf instead.
http://bazaar.launchpad.net/~cloud-init-dev/cloud-
init/trunk/view/head:/cloudinit/distros/arch.py#L47
Provider (Rackspace) generated config value:
# grep ^locale /etc/cloud/cloud.cfg.d/10_rackspace.cfg
locale: en_US.UTF-8 UTF-8
== Existing code ==
# cat /etc/locale.gen
# Created by cloud-init v. 0.7.6 on Sun, 14 Dec 2014 15:23:26 +0000
LANG="en_US.UTF-8 UTF-8"
# locale-gen
Generating locales...
LANG="en_US.UTF-8"...character map file `UTF-8"' not found: No such file or directory
cannot open locale definition file `LANG="en_US': No such file or directory
== Manually fixed ==
# cat /etc/locale.gen
# Created by cloud-init v. 0.7.6 on Sun, 14 Dec 2014 15:23:26 +0000
en_US.UTF-8 UTF-8
# locale-gen
Generating locales...
en_US.UTF-8... done
Generation complete.
====
The attached patch takes a stab at correcting arch.py, however I'm not
a Python coder so YMMV. Based on the existing code, it seems to be
expected the Provider always specify "lang.CP CP" for 'locale' in the
cloud.cfg file(s) so this patch is based on that expectation, using
split() looking for the space and peeling off the first element for
/etc/locale.conf setup.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1402406/+subscriptions
Follow ups
References