Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Michael Schroeder
That makes things a bit easier, so we just need to teach libarchive that it should accept utf8. I'll adapt the title of this issue ;-) -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-2003579832 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Panu Matilainen
It does, by default. For many years now. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-2003543922 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Michael Schroeder
Why "legacy"? Does the current code reject non-utf8 file names? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-2003513183 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Panu Matilainen
Right. So the warning would only be seen by folks who run rpm2archive to convert legacy rpms to tar - ie a rare corner case really. A harmless warning from gnu tar in that case is quite acceptable to me at least. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Michael Schroeder
And this is about file names, I think "upstream rpm" treats those pretty much as binary as they are created by the build process and not part of the spec file. -- Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Michael Schroeder
It just warns about the unknown attribute. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-2003338390 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-18 Thread Panu Matilainen
rpm2archive could use some love for sure, but I'd rather not teach it about format internals, that's just the kind of thing I'd rather outsource to somebody else - like libarchive. If it doesn't do what we want it to do, then lets at least look at fixing it instead of doing it in rpm, it'd

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-15 Thread Michael Schroeder
It's not much work to not use libarchive for writing. The only two formats that can be used for archive writing are cpio and pax (all the others have too many limitations). Writing cpio is easy and writing a pax tar file is also not hard (reading a tar file is where it gets really messy because

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-15 Thread Michael Schroeder
I find it very surprising that bsdtar's output depends on the current locale, but that seems to be the case: ``` $ echo hello > micro_µ $ bsdtar -cf - . | bsdtar -tf - ./ ./micro_µ $ LC_CTYPE=de_DE@euro bsdtar -cf - . | bsdtar -tf - ./ ./micro_µ $ LC_CTYPE=de_DE@euro bsdtar --options

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-15 Thread Michael Schroeder
Btw, it cannot handle UTF8 filenames as well, as it checks the current locale which is not initialized and thus 7 bit ascii... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-1999274523 You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-15 Thread Michael Schroeder
Oh, and the error handling in rpm2archive is completely broken... -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/2972#issuecomment-1999270285 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-14 Thread Michael Schroeder
In this case archive_write_header() returns ARCHIVE_WARN, which is treated as error in rpm2archive. OTOH I don't think libarchive should mess with the file names, maybe it makes sense to set the hdrcharset to `BINARY` for pax. But that adds a "hdrcharset=BINARY" attribute that GNU tar complains

[Rpm-maint] [rpm-software-management/rpm] rpm2archive -f pax cannot handle non-utf8 filenames (Issue #2972)

2024-03-14 Thread Michael Schroeder
It fails because it want to convert the filenames to utf8: $ echo $LC_CTYPE de_DE@euro $ rpm2archive /usr/src/packages/RPMS/x86_64/empty-3.0.0-1.x86_64.rpm > /dev/null Error writing archive: Can't translate pathname './fooöo' to UTF-8 (84) -- Reply to this email directly or view it on GitHub: