public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users <isar-users@googlegroups.com>,
	"Schaffner, Tobias" <tobias.schaffner@siemens.com>
Subject: Re: [PATCH] Set default locale in /etc/locale.conf
Date: Thu, 20 Oct 2022 15:12:44 +0300	[thread overview]
Message-ID: <6808467.jJDZkT8p0M@hp> (raw)
In-Reply-To: <78c228a7-1a11-119d-8fe9-03f62d47c752@siemens.com>

In mail from четверг, 20 октября 2022 г. 13:51:57 +03 user Schaffner, Tobias 
wrote:

Hello. 
I've just tried your changes with both 'bullseye' and 'bookworm' under qemu 
and it they both booted properly (before, bookworm boot too, much more time 
and resulted in some kind of error).

Just a question: How did you send this patch? Because both 'mbox'-es, one 
generated by our patchwork ( https://patchwork.isar-build.org/project/isar/
patch/78c228a7-1a11-119d-8fe9-03f62d47c752@siemens.com/ ) and another I saved 
in the mail client, couldn't be applied. So, I had to apply this changes 
manually, line by line.

Probably, the patch was sent from some client that broke lines?

> 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].
> 
> Create the /etc/locale.conf with the default locale setting to allow booting
> bookworm images 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 | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/image-locales-extension.bbclass
> b/meta/classes/image-locales-extension.bbclass
> index 25af540..964793a 100644
> --- a/meta/classes/image-locales-extension.bbclass
> +++ b/meta/classes/image-locales-extension.bbclass
> @@ -44,7 +44,7 @@ __EOF__
>   locales     locales/locales_to_be_generated    multiselect
> ${@get_locale_gen(d, ', ')}
>   locales     locales/default_environment_locale select ${LOCALE_DEFAULT}
>   __EOF__
> -    cat<<__EOF__ > ${WORKDIR}/locale.default
> +    cat<<__EOF__ > ${WORKDIR}/locale.conf
>   LANG=${LOCALE_DEFAULT}
>   __EOF__
>       cat<<__EOF__ > ${WORKDIR}/locale.nopurge
> @@ -63,7 +63,7 @@ __EOF__
>           cat '${WORKDIR}/locale.gen' >> '${ROOTFSDIR}/etc/locale.gen'
>           cat '${WORKDIR}/locale.default' >
> '${ROOTFSDIR}/etc/default/locale' cat '${WORKDIR}/locale.nopurge' >
> '${ROOTFSDIR}/etc/locale.nopurge' -        cat '${WORKDIR}/locale.debconf'
> > '${ROOTFSDIR}/tmp/locale.debconf' +        cat '${WORKDIR}/locale.conf' >
> '${ROOTFSDIR}/etc/locale.conf'
> 
>           # Enter image and trigger locales config and localepurge:
>           chroot '${ROOTFSDIR}' /bin/sh <<'EOSH'
> @@ -78,8 +78,7 @@ __EOF__
>               fi
> 
>               echo 'running locale debconf-set-selections'
> -            debconf-set-selections /tmp/locale.debconf
> -            rm -f '/tmp/locale.debconf'
> +            debconf-set-selections /etc/locale.conf
> 
>               echo 'reconfigure locales'
>               dpkg-reconfigure -f noninteractive locales





  parent reply	other threads:[~2022-10-20 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 10:51 Schaffner, Tobias
2022-10-20 11:00 ` Henning Schild
2022-10-20 12:12 ` Uladzimir Bely [this message]
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

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=6808467.jJDZkT8p0M@hp \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=tobias.schaffner@siemens.com \
    /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