On Sun, Oct 10, 2021 at 2:40 PM Pierluigi Passaro
I think various revisions of that patch have been around for years
actually as downstream
distros have been shipping it for a long time.
Actually I just noticed a newer version of it just got merged upstream
about a month ago:
https://sourceware.org/git/?p=glibc.git;a=commit;h=466f2be6c08070e9113ae2fdc7acd5d8828cba50
>
>> > If I change the call to
>> > archive_locale = newlocale(LC_CTYPE_MASK, "en_US.utf8", (locale_t)0);
>> > everything start working again.
>>
>> Does setting LC_CTYPE=en_US.utf8 in the env with the default
>> implementation not work?
>> I thought that was equivalent to doing this.
>
>
> If I manually set LC_CTYPE=en_US.utf8 from the command line and then run swupdated (with no archive patch), it works fine.
> I'm wondering, from an architectural perspective, which is the right way to proceed.
Maybe have a launch script search for available UTF-8 locales and set
it appropriately?
I just set it in my systemd service env myself.
> I'm not expecting that all computer worldwide should have the en_US.utf8 installed: I don't think make sense changing the current archive_handler.c code.
> Also, I'm not expecting that an embedded system with "C" as default locale should fail to extract a tar.gz file: if I extract the tar.gz from the swu file, and I manually run
> tar xvf myupdate.tar.gz
> it works with no problems.
> I'm aware that tar does not dependent on libarchive, but this leads me to think that maybe the problem is only in libarchive.
It does seem to be an issue somewhat linked to libarchive, at least
for tar handling, but I don't think there's a decent alternative to
libarchive for swupdate.
> For the time being, I can force the default locale to something supporting UTF8, but still this sounds a workaround, not a solution.
I guess wait for the glibc C.UTF-8 patch to make it into a release and use that?
Or try to overhaul upstream libarchive's locale handling spaghetti
code...but that doesn't exactly sound easy.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/swupdate/82efa8ac-7cdb-4657-8004-113da65bfd25n%40googlegroups.com.