debian-minimal builds still busted, now on locale issues

Bug #1452400 reported by Adam Gandelman
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
Medium
Igor Belikov

Bug Description

Not sure if this is wheezy specific or affects other DIB_RELEASES:

$ DIB_RELEASE=wheezy disk-image-create -o /tmp/wheezy debian-minimal vm

installing ccache_package from base
installing cloud-initramfs-growroot from debootstrap
Map file for debootstrap element does not exist.
installing ca-certificates from debootstrap
Map file for debootstrap element does not exist.
installing locales from debootstrap
Map file for debootstrap element does not exist.
installing adduser from debootstrap
Map file for debootstrap element does not exist.
dib-run-parts Wed May 6 05:41:16 UTC 2015 01-package-installs completed
dib-run-parts Wed May 6 05:41:16 UTC 2015 Running /tmp/in_target.d/install.d/10-cloud-init
0+1 records in
0+1 records out
28 bytes (28 B) copied, 4.4279e-05 s, 632 kB/s
dib-run-parts Wed May 6 05:41:16 UTC 2015 10-cloud-init completed
dib-run-parts Wed May 6 05:41:16 UTC 2015 Running /tmp/in_target.d/install.d/10-debian-networking
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
dib-run-parts Wed May 6 05:41:16 UTC 2015 10-debian-networking completed
dib-run-parts Wed May 6 05:41:16 UTC 2015 Running /tmp/in_target.d/install.d/12-debian-locale-gen
Generating locales (this might take a while)...
Generation complete.
*** update-locale: Error: invalid locale settings: LANG=en_US.UTF-8

Revision history for this message
Steve Kowalik (stevenk) wrote :

Doing some debugging, seems like the culprit is:

+ locale charmap
ANSI_X3.4-1968

Whereas, on my local machine that returns "UTF-8". More digging required.

Changed in diskimage-builder:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Lee Mayes (leem-mayeses) wrote :

I did a little debugging and digging on this. The issue seems to lie in elements/debootstrap/install.d/12-debian-locale-gen

While a call is made to debconf-set-selections to preseed the locale value /etc/locale.gen does not get modified and is effectively empty causing dpkg-reconfigure locales to throw an error. I worked around it by simply appending the desired locale string in there before calling dpkg-reconfigure, ala:

<snip>
locales locales/default_environment_locale select en_US.UTF-8
EOF
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen # I ADDED THIS
dpkg-reconfigure -f noninteractive locales
|<snip>

After that change to the debootstrap element my Debian images are building.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/273544

Changed in diskimage-builder:
assignee: nobody → Igor Belikov (ibelikov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/273544
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=78278405ceb0e0d05eafc1eab2ef27a18463c1fd
Submitter: Jenkins
Branch: master

commit 78278405ceb0e0d05eafc1eab2ef27a18463c1fd
Author: Igor Belikov <email address hidden>
Date: Thu Jan 28 16:28:58 2016 +0300

    Fix debian-minimal image building

    'locales' package gets installed before '12-debian-locale-gen' is executed
    and generates effectively empty /etc/locales.gen in debian, which makes
    dpkg-reconfigure call to locales ignore the values set by
    debconf-set-selections.
    * Remove /etc/locale.gen generated by 'locales' installation to ensure
      proper locales generation on debian images
    * Remove 'locales-all' package installation from debian element since
      it's not needed anymore to build the image and cosnumes additional
      ~120MB of space
    * Remove unused 'package-installs' dependency from debian-minimal
      element

    Change-Id: Ic39ba2b5ceb5018efb75742547b2babf80827e56
    Closes-Bug: #1452400

Changed in diskimage-builder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.