Bug 262048 - [exp-run] switch ports tree locale to C.UTF-8
Summary: [exp-run] switch ports tree locale to C.UTF-8
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL: https://bugs.freebsd.org/bugzilla/sho...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-19 06:27 UTC by Kyle Evans
Modified: 2023-07-19 02:22 UTC (History)
6 users (show)

See Also:
kevans: exp-run?


Attachments
diff against the ports tree (344 bytes, patch)
2022-02-19 06:27 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2022-02-19 06:27:00 UTC
Created attachment 231940 [details]
diff against the ports tree

Base has had C.UTF-8 since 2018 and switched to it in base 09ef995baf45. Switching the ports tree to it should largely be a NOP, with exception to one scenario: building in poudriere under qemu-user-static with native-xtools.

native-xtools will use statically linked tar(1) for the host, so it can't use dlopen() -- preventing it from being able to use, e.g., iconv. Switching to C.UTF-8 fixes statically linked tar's ability to extract when paths contain UTF-8 chars.
Comment 1 Charlie Li freebsd_committer freebsd_triage 2022-02-19 15:15:25 UTC
In my own mass rebuild after the latest __FreeBSD_version bump, java/apache-commons-httplib fails during stage due to an ISO8859-1 file. In theory it should have also failed with C.
Comment 4 Michael Osipov 2022-02-27 21:08:36 UTC
Apache HttpComponents maintainer here: Commons HttpClient is VERY VERY dead. I guess only JMeter depends on it. Even 4.5.x is overhauled by 5.x. There are two options:
1) Use JAR from Maven Central instead of compiling yourself with Ant, see here: https://lists.freebsd.org/archives/freebsd-ports/2021-December/001159.html
2) Add an explicit encoding for https://ant.apache.org/manual/Tasks/javac.html
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2022-02-27 21:14:23 UTC
(In reply to Michael Osipov from comment #4)
123 ports depend on java/apache-commons-httpclient
Comment 6 Michael Osipov 2022-02-28 08:16:05 UTC
(In reply to Antoine Brodin from comment #5)

Which?

osipovmi@deblndw011x:/usr/ports
$ grep -r --include='**/Makefile*' java/apache-commons-httpclient .
./editors/libreoffice/Makefile:                 ${JAVAJARDIR}/commons-httpclient.jar:java/apache-commons-httpclient \
./editors/openoffice-4/Makefile:        ${JAVALIBDIR}/commons-httpclient.jar:java/apache-commons-httpclient \
./editors/openoffice-devel/Makefile:    ${JAVALIBDIR}/commons-httpclient.jar:java/apache-commons-httpclient
./editors/libreoffice6/Makefile:                        ${JAVAJARDIR}/commons-httpclient.jar:java/apache-commons-httpclient \
./www/jmeter/Makefile:          ${JAVALIBDIR}/commons-httpclient.jar:java/apache-commons-httpclient
Comment 7 Kyle Evans freebsd_committer freebsd_triage 2022-03-07 23:42:20 UTC
Hey, sorry for stalling on this. I'm trying to decide if it's worth doing, vs. working out if we can build a static libiconv and baking all of it into xtools' tar. I suspect the latter is a better idea...
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2022-03-08 09:49:02 UTC
(In reply to Kyle Evans from comment #7)
A problem with use of iconv by native-xtools is that it is missing a native copy of data files in /usr/share/i18n.  These files depend on the architecture's byte order.
Comment 9 Kyle Evans freebsd_committer freebsd_triage 2022-03-09 04:20:56 UTC
(In reply to Tijl Coosemans from comment #8)

AFAICT both csmapper and esdb are pretty strict about byteswapping. Which aspect isn't agnostic?
Comment 10 Tijl Coosemans freebsd_committer freebsd_triage 2022-03-09 14:28:34 UTC
(In reply to Kyle Evans from comment #9)
You are right.  It's /usr/share/locale, not /usr/share/i18n.  More specifically the collation and ctype data which are generated by localedef(1).  And C.UTF-8 has its own ctype data.
Comment 11 Kyle Evans freebsd_committer freebsd_triage 2022-03-09 21:44:59 UTC
(In reply to Tijl Coosemans from comment #10)

It occurs to me that I'm actually not; htonl() and whatnot are still based on the host architecture. It'll work for the vast majority of cases, but it's not reliable.