Bug 29871

Summary: systemd-localed fails to set locale
Product: Sisyphus Reporter: Michael Shigorin <mike>
Component: systemdAssignee: Alexey Shabalin <shaba>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: arseny, shaba
Version: unstableKeywords: l10n, regression, systemd
Hardware: all   
OS: Linux   
URL: http://git.altlinux.org/people/mike/packages/?p=livecd-setlocale.git;a=shortlog;h=refs/heads/master
Attachments:
Description Flags
systemd-analyze plot none

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
> ? :)

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