[libvirt] [jenkins-ci PATCH] lcitool: Generate the en_US.UTF-8 locale for deb containers

Fabiano Fidêncio posted 1 patch 1 week ago
Failed in applying to current master (apply log)
guests/lcitool | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

[libvirt] [jenkins-ci PATCH] lcitool: Generate the en_US.UTF-8 locale for deb containers

Posted by Fabiano Fidêncio 1 week ago
osinfo-db tests require "en_US.UTF-8" locate to be set. Since commit
3b682c416b0d the locales are installed but we have to actually generate
it for the containers.

The reason we don't have to do that for the virtual machines is because
the preseed file used for installed them already forces it:
```
 # Environment configuration
 #
 # Locale, keyboard and timezone. All these will be configured again
 # later with Ansible, but they're required information so we must
 # provide them
 d-i debian-installer/locale string en_US.UTF-8
```

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
---
 guests/lcitool | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guests/lcitool b/guests/lcitool
index 5cf8efe..5b5b622 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -675,7 +675,9 @@ class Application:
                     {package_manager} dist-upgrade -y && \\
                     {package_manager} install --no-install-recommends -y {pkgs} && \\
                     {package_manager} autoremove -y && \\
-                    {package_manager} autoclean -y
+                    {package_manager} autoclean -y && \\
+                    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\\1,' /etc/locale.gen && \\
+                    dpkg-reconfigure locales
             """).format(**varmap))
             if args.cross_arch:
                 # Intentionally a separate RUN command from the above
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [jenkins-ci PATCH] lcitool: Generate the en_US.UTF-8 locale for deb containers

Posted by Andrea Bolognani 1 week ago
On Mon, 2019-09-09 at 13:47 +0200, Fabiano Fidêncio wrote:
> osinfo-db tests require "en_US.UTF-8" locate to be set. Since commit

s/locate/locale/

> 3b682c416b0d the locales are installed but we have to actually generate
> it for the containers.
> 
> The reason we don't have to do that for the virtual machines is because
> the preseed file used for installed them already forces it:

s/for installed/to install/

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

and pushed.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list