Bug 255300 - sysutils/puppetserver6 invalid C.UTF-8 default locale on 11.x
Summary: sysutils/puppetserver6 invalid C.UTF-8 default locale on 11.x
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Puppet Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-21 11:15 UTC by Ray Bellis
Modified: 2023-06-01 18:53 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (puppet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Bellis 2021-04-21 11:15:03 UTC
The rc script for puppetserver6 sets the default locale to C.UTF-8 in the absence of any inherited environment variable.

There is no such locale in FreeBSD 11.x.

While the puppetserver doesn't complain, any Perl scripts invoked via a "generate()" call will do, generating warnings that pollute the output:

pm% setenv LC_ALL C.UTF-8
pm% perl -e exit
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LC_ALL = "C.UTF-8",
	LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

For now my only work around has been to symlink /usr/share/locale/en-us.UTF-8 directory to C.UTF-8.     If there's a better way to set the global locale as used by system daemons I've been unable to find it.  All searches point at login.conf but AFAIK that's only used for interactive processes.
Comment 1 Romain Tartière freebsd_committer freebsd_triage 2023-03-23 17:58:48 UTC
Oops, looks like I missed that one!

C.UTF-8 was introduced and is the default in 13.0+
https://reviews.freebsd.org/D17835
https://reviews.freebsd.org/D26973

Maybe the default should be en_US.UTF-8 when __FreeBSD_version < 1300130 (the last commit that change the default was between 1300129 and 1300130).

I'll need to setup a 12.4 jail to test this thoroughly.
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2023-06-01 18:53:23 UTC
Both Puppet 6 and FreeBSD 11 are end-of-life, and the puppet6 ports expired today, so closing this PR.