All of lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Rannou <lrannou@baylibre.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	openembedded-core@lists.openembedded.org
Cc: "khilman@baylibre.com" <khilman@baylibre.com>
Subject: Re: [OE-core] [PATCH v2] oeqa/selftest/locales: Create selftest for locales generation
Date: Fri, 3 Feb 2023 17:33:16 +0100	[thread overview]
Message-ID: <778f895b-6fea-4290-cea3-1727478de64f@baylibre.com> (raw)
In-Reply-To: <52b723c5-e5b4-54b8-7cbf-f50649a0b746@baylibre.com>


On 02/02/2023 14:58, Louis Rannou wrote:
> 
> On 02/02/2023 11:53, Richard Purdie wrote:
>> On Thu, 2023-02-02 at 11:41 +0100, Louis Rannou wrote:
>>> On 01/02/2023 18:57, Richard Purdie wrote:
>>>> On Wed, 2023-02-01 at 16:02 +0100, Louis Rannou wrote:
>>>>
>>>>
>>>> I was able to take a quick look at this. The locale generation on
>>>> target is broken, it throws errors upon boot. I was able to make it
>>>> work with this patch:
>>>>
>>>> diff --git a/meta/recipes-core/glibc/glibc-locale.inc 
>>>> b/meta/recipes-core/glibc/glibc-locale.inc
>>>> index 7f70b3ca4f..c39007b573 100644
>>>> --- a/meta/recipes-core/glibc/glibc-locale.inc
>>>> +++ b/meta/recipes-core/glibc/glibc-locale.inc
>>>> @@ -60,7 +60,7 @@ DESCRIPTION:localedef = "glibc: compile locale 
>>>> definition files"
>>>>    # FILES:glibc-gconv will not be automatically extended in multilib.
>>>>    # Explicitly add ${MLPREFIX} for FILES:glibc-gconv.
>>>>    FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
>>>> -FILES:localedef = "${bindir}/localedef"
>>>> +FILES:localedef = "${bindir}/localedef ${libdir}/locale"
>>>>    LOCALETREESRC = 
>>>> "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale"
>>>> @@ -87,6 +87,7 @@ do_install() {
>>>>           find ${D}${libdir} -type d -empty -delete
>>>>           copy_locale_files ${datadir}/locale 0644
>>>>           install -m 0644 ${LOCALETREESRC}/SUPPORTED 
>>>> ${WORKDIR}/SUPPORTED
>>>> +       install -d ${D}${libdir}/locale
>>>>    }
>>>>    inherit libc-package
>>>>
>>>> could you see if the same test will now work with that patch applied?
>>>> I'm happy to have the basic test but if we can fix this and stop it
>>>> regressing that would be even better.
>>>
>>> The patch does not change the result. I have actually nothing in the
>>> image/usr/lib/locale directory.
>>
>> Testing locally, if I don't have the patch and "runqemu core-image-
>> minimal snapshot kvm", I see errors about locale generation failing
>> during first boot as the directory isn't present.
>>
>> If I add the patch and then boot the image, I see the locale generation
>> happening at first boot. If I then run the locale commands, I can see
>> the locales present.
> 
> I wonder which package do that, because this is not something I see on 
> my qemu. I run a kirkstone qemuarm on poky. Perhaps I need something 
> more recent.
> 

Here is what I have at boot:

```
Configuring packages on first boot....
  (This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
  Removing any system startup links for run-postinsts ...
   /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... ip: RTNETLINK answers: File exists
Starting syslogd/klogd: done

Poky (Yocto Project Reference Distro) 4.0.6 qemuarm /dev/ttyAMA0

qemuarm login:
```

Would you recommend to try on langdale ?

Regards,
Louis

>>
>>> I am not sure to understand... If I add to my image the packages
>>> glibc-localedata-fr-fr and glibc-charmap-utf-8, then I have something in
>>> /usr/share/i18n/locales and /usr/share/i18n/charmaps, and then I can
>>> generate the locales with `localedef -c -i fr_FR -f UTF-8 fr_FR`
>>>
>>> In the end, I believe this is correct that I have nothing in
>>> {libdir}/locale, but perhaps the settings IMAGE_LINGUAS (or
>>> GLIBC_GENERATE_LOCALES ?) should specify a rdepend to the locale/charmap
>>> packages, so the locales would exist in the image, but would not be
>>> generated at build.
>>
>> The locale generation can happen at build time or it can happen at
>> first boot on the final target. For the second test case, the locales
>> will only appear during the boot process.
>>
>> I've merged your patch with the first test case, thanks! I did tweak
>> the comment message to match that it is just one test so far. Thanks
>> for getting us that far, it is great to be adding tests around this.


      reply	other threads:[~2023-02-03 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 15:33 [PATCH v2] oeqa/selftest/locales: Create selftest for locales generation lrannou
2023-02-01 13:49 ` [OE-core] " Richard Purdie
2023-02-01 15:02   ` Louis Rannou
2023-02-01 17:57     ` Richard Purdie
2023-02-02 10:41       ` Louis Rannou
2023-02-02 10:53         ` Richard Purdie
2023-02-02 13:58           ` Louis Rannou
2023-02-03 16:33             ` Louis Rannou [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=778f895b-6fea-4290-cea3-1727478de64f@baylibre.com \
    --to=lrannou@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.