Bug 29871 - systemd-localed fails to set locale
Summary: systemd-localed fails to set locale
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: systemd (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Alexey Shabalin
QA Contact: qa-sisyphus
URL: http://git.altlinux.org/people/mike/p...
Keywords: l10n, regression, systemd
Depends on:
Blocks:
 
Reported: 2014-03-06 21:47 MSK by Michael Shigorin
Modified: 2014-03-07 19:03 MSK (History)
2 users (show)

See Also:


Attachments
systemd-analyze plot (232.22 KB, image/svg+xml)
2014-03-06 21:47 MSK, Michael Shigorin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2014-03-06 21:47:10 MSK
Created attachment 6054 [details]
systemd-analyze plot

There's an initscript that has this code:

# lang might be e.g. ru_RU here
        locale="$lang.UTF-8"

        LOCALECTL=/usr/bin/localectl
        [ ! -x "$LOCALECTL" ] ||
                "$LOCALECTL" set-locale LANG="$locale"

There's a unit file that has these dependencies:

Requires=dbus.service systemd-localed.service
After=systemd-remount-fs.service dbus.service systemd-localed.service
Before=dm.service prefdm.service gdm.service

The complete source code is available at http://git.altlinux.org/people/mike/packages/?p=livecd-setlocale.git;a=tree;f=livecd-setlocale;hb=HEAD

Problem: a LiveCD with systemd as init and livecd-setlocale.service activated at image build time fails to set up locale as requested at boot.

How to reproduce:
- download http://ftp.linux.kiev.ua/pub/Linux/ALT/people/mike/iso/mkimage-profiles/systemd-tests/regular-mate-20140306-i586.iso
- start a VM or host with it (it's a hybrid ISO)
- press F2, choose Russian during gfxboot

Expected result (was observed with systemd <= 208):
- ru_RU.UTF-8 locale within both graphical and console user sessions

Observed result (with systemd-210-alt1):
- locale is en_US.utf8 within graphical session
- locale is ru_RU.UTF-8 within manually started console session ("altlinux")
- /etc/init.d/livecd-setlocale has been run since the keyboard setup is done
- systemctl status livecd-setlocale reports no errors

This bug blocks marking systemd-based altlinux.org/regular releases as "tested" since these can't pass basic QA.
Comment 1 Alexey Shabalin 2014-03-07 16:52:34 MSK
please, try systemd-210-alt2 from test task #116002.
Comment 3 Alexey Shabalin 2014-03-07 19:03:36 MSK
(В ответ на комментарий №2)
> Thanks, it works now:
> http://ftp.linux.kiev.ua/pub/Linux/ALT/people/mike/iso/mkimage-profiles/systemd-tests/regular-mate-20140307-i586.iso
> 
> Is it
> http://git.altlinux.org/people/shaba/packages/?p=systemd.git;a=commitdiff;h=bdbea10fed4d30eea3f53e5346f4b41165b777a4
> ? :)

Да, я вернул поддержку старых конфигов, но новые должны иметь больший приоритет.