Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archlinux locale configuration broken #2510

Closed
ubuntu-server-builder opened this issue May 10, 2023 · 4 comments
Closed

Archlinux locale configuration broken #2510

ubuntu-server-builder opened this issue May 10, 2023 · 4 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1402406

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = 2021-05-05T20:34:30.588570+00:00
date_created = 2014-12-14T16:49:16.446856+00:00
date_fix_committed = 2021-03-15T19:31:02.574583+00:00
date_fix_released = 2021-05-05T20:34:30.588570+00:00
id = 1402406
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1402406
milestone = None
owner = troyengel
owner_name = troy engel
private = False
status = fix_released
submitter = troyengel
submitter_name = troy engel
tags = ['arch']
duplicates = []

Launchpad user troy engel(troyengel) wrote on 2014-12-14T16:49:16.446856+00:00

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.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user troy engel(troyengel) wrote on 2014-12-14T16:49:16.446856+00:00

Launchpad attachments: correct locale creation on Arch

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Alexander E. Patrakov(patrakov-gmail) wrote on 2020-11-08T00:07:13.927462+00:00

Downstream (Arch) asked me to ping this bug, it is still valid.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2021-03-15T19:30:41.189882+00:00

#841

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2021-05-05T20:34:31.984626+00:00

This bug is believed to be fixed in cloud-init in version 21.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant