Bug 1651446

Summary: RFE: Add support for changing system locale with virt-customize(1)
Product: [Community] Virtualization Tools Reporter: Marko Myllynen <myllynen>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marko Myllynen 2018-11-20 06:25:29 UTC
Description of problem:
Consider adding support for changing system locale with virt-customize(1).

On systemd based systems this would be otherwise pretty straightforward (just adjust /etc/locale.conf) but if the system has only e.g. glibc-langpack-fi/langpacks-fi installed instead of glibc-langpack-en/langpacks-end or glibc-all-langpacks, then switching from fi_FI.UTF-8 to en_US.UTF-8 properly might not be that trivial.

More exotic cases like using "%packages --instLangs=en_US" in kickstart or configurations like below may also make this a bit more involved. One option might of course just to document these limitations.

echo "%_install_langs en_US" > /etc/rpm/macros.image-language-conf
echo "override_install_langs=en_US" >> /etc/yum.conf


Comment 1 Richard W.M. Jones 2018-11-20 08:48:53 UTC
We can install new packages, or as you say document in the manual
that changing the locale might need to be accompanied by using
‘--install’ + a suitable langpack.  It would be nicer to do the
right thing automatically.