From: Henning Schild <henning.schild@siemens.com>
To: "Schaffner, Tobias (T CED SES-DE)" <tobias.schaffner@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>,
"Moessbauer, Felix (T CED INW-CN)" <felix.moessbauer@siemens.com>,
"Kiszka, Jan (T CED)" <jan.kiszka@siemens.com>,
"Bezdeka, Florian (T CED SES-DE)" <florian.bezdeka@siemens.com>,
Uladzimir Bely <ubely@ilbers.de>
Subject: Re: [PATCH v2 1/1] Set default locale in /etc/locale.conf
Date: Tue, 25 Oct 2022 10:36:32 +0200 [thread overview]
Message-ID: <20221025103632.30aa7305@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <43195c93-c49b-bc5b-16fc-8c21ffb16e08@siemens.com>
Am Mon, 24 Oct 2022 17:07:11 +0200
schrieb "Schaffner, Tobias (T CED SES-DE)"
<tobias.schaffner@siemens.com>:
> Debian bookworm introduced systemd-firstboot [1] which asks the user
> to configure some basic settings like hostname, timezone or locale if
> not already configured.
>
> It asks the user interactively to select a locale on first boot as we
> do not have it set in /etc/locale.conf [2].
>
> /etc/locale.conf has the same format as /etc/default/locale.
>
> Symlink /etc/locale.conf to /etc/default/locale for bookworm images
> to allow booting without user interaction.
>
> [1]
> https://www.freedesktop.org/software/systemd/man/systemd-firstboot.html
> [2] https://man7.org/linux/man-pages/man5/locale.conf.5.html
>
> Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
> ---
> meta/classes/image-locales-extension.bbclass | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/meta/classes/image-locales-extension.bbclass
> b/meta/classes/image-locales-extension.bbclass index 2db6d4a..9def316
> 100644 --- a/meta/classes/image-locales-extension.bbclass
> +++ b/meta/classes/image-locales-extension.bbclass
> @@ -82,6 +82,14 @@ __EOF__
> debconf-set-selections /tmp/locale.debconf
> rm -f '/tmp/locale.debconf'
>
> + SYSTEMD_VERSION=$(dpkg-query \
> + --showformat='${source:Upstream-Version}' \
> + --show systemd || echo "0" )
> +
> + if dpkg --compare-versions "$SYSTEMD_VERSION" "ge"
> "251"; then
> + ln -s /etc/default/locale /etc/locale.conf
> + fi
> +
I would want to bet that we can create that as a file (not a
symlink) instead of some other files we used to create. But for now
that looks like a good quick fix for a problem that might come back in
some form.
Henning
> echo 'reconfigure locales'
> dpkg-reconfigure -f noninteractive locales
>
prev parent reply other threads:[~2022-10-25 8:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 10:51 [PATCH] " Schaffner, Tobias
2022-10-20 11:00 ` Henning Schild
2022-10-20 12:12 ` Uladzimir Bely
2022-10-24 8:08 ` Schaffner, Tobias
2022-10-24 12:04 ` Jan Kiszka
2022-10-24 15:07 ` [PATCH v2 0/1] " Schaffner, Tobias
2022-10-24 15:07 ` [PATCH v2 1/1] " Schaffner, Tobias
2022-10-25 8:36 ` Henning Schild [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221025103632.30aa7305@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=florian.bezdeka@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=tobias.schaffner@siemens.com \
--cc=ubely@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox