Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: base-files: don't overwrite existing locale and define default LANG
Date: Fri, 22 Dec 2023 12:33:40 +0100	[thread overview]
Message-ID: <20231222113340.H0_ITKt4eZubJot229eTLb7mQbn8wS169M6m3yZAL6g@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39264@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39264#issuecomment-1867580017

Comment:
Thanks; I wasn't reasoning through the assignment properly.

There are still problems sanitizing input. For example, if somebody has a file like

```sh
LANG=en_US.UTF-8 # English
```

it will contain a trailing space after the change but is currently properly parsed. I don't know whether any of the consumers of locale variables would be harmed by the addition of spurious whitespace, but I'd be surprised if this *didn't* introduce problems.

I have not found any documentation on `locale.conf` besides systemd manual pages. As I said before (apparently elsewhere; I thought I commented here earlier), we should not feel compelled to abide by the restrictions imposed by systemd against using other shell features in the configuration. Because we offer no manual page on the file, the code is the documentation; the code documents that the file is simply sourced. (The limitation in systemd, I assume, is that it parses the file directly. We don't parse the file anywhere but in shell profiles.) Users may currently be exploiting that to add extra logic to the locale configuration.

What Red Hat does to interpret the file is an ugly kludge that we should avoid. If anything, I think the Arch way is preferable; just let a pre-set LANG gate the sourcing of the file and, if some users really care about more complex preservation of the whole gamut of variables, they can implement a custom `post-locale.sh` to do so. However, I again question the need for this. Given we have established precedent that `locale.conf` is just sourced by a shell, users should feel free to do things like

```sh
: ${LANG=my-lang}
```

if they need to preserve a pre-set value.

Whatever the final form looks like, we should include a manual page or at least fully define on the docs web site what we accept as a valid configuration.



  parent reply	other threads:[~2023-12-22 11:33 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13 18:23 [PR PATCH] " oreo639
2022-09-13 18:25 ` [PR PATCH] [Updated] " oreo639
2022-09-26  6:36 ` oreo639
2022-09-26  6:36 ` oreo639
2022-09-26  6:37 ` oreo639
2022-12-26  1:57 ` github-actions
2022-12-26  2:02 ` oreo639
2022-12-26  2:22 ` [PR PATCH] [Updated] " oreo639
2023-01-02 15:29 ` leahneukirchen
2023-01-02 19:53 ` oreo639
2023-01-02 19:54 ` oreo639
2023-01-02 20:23 ` oreo639
2023-01-03  5:45 ` oreo639
2023-01-03  5:45 ` oreo639
2023-01-03  5:45 ` oreo639
2023-04-03  2:41 ` [PR PATCH] [Updated] " oreo639
2023-06-20  3:00 ` oreo639
2023-06-20  3:14 ` [PR REVIEW] " classabbyamp
2023-06-20  3:18 ` [PR PATCH] [Updated] " oreo639
2023-06-20  3:43 ` oreo639
2023-06-20  4:29 ` oreo639
2023-06-20 21:08 ` oreo639
2023-06-20 21:21 ` oreo639
2023-06-21 10:37 ` oreo639
2023-06-21 11:08 ` oreo639
2023-06-21 11:10 ` oreo639
2023-06-21 11:14 ` oreo639
2023-06-21 11:47 ` oreo639
2023-09-20  1:45 ` github-actions
2023-09-20  5:06 ` oreo639
2023-09-21 16:05 ` leahneukirchen
2023-09-21 19:09 ` oreo639
2023-09-21 20:37 ` oreo639
2023-09-21 21:03 ` [PR PATCH] [Updated] " oreo639
2023-09-21 21:06 ` oreo639
2023-09-21 21:10 ` oreo639
2023-09-21 21:11 ` [PR PATCH] [Updated] " oreo639
2023-09-21 21:14 ` oreo639
2023-09-22 20:35 ` ahesford
2023-12-22  1:46 ` github-actions
2023-12-22  2:14 ` oreo639
2023-12-22  2:52 ` ahesford
2023-12-22  3:02 ` oreo639
2023-12-22  3:04 ` oreo639
2023-12-22 11:33 ` ahesford
2023-12-22 11:33 ` ahesford [this message]
2023-12-23  8:14 ` oreo639
2023-12-23  8:21 ` oreo639
2023-12-23  8:21 ` oreo639
2024-03-01  2:36 ` [PR PATCH] [Updated] " oreo639
2024-03-01  2:41 ` oreo639
2024-03-01  2:41 ` oreo639
2024-03-01  2:42 ` oreo639
2024-03-01  2:50 ` oreo639
2024-03-01  2:54 ` oreo639
2024-03-01  3:09 ` [PR PATCH] [Updated] " oreo639
2024-03-01  4:01 ` oreo639
2024-03-01  5:26 ` oreo639
2024-03-01  8:14 ` oreo639
2024-03-01 11:26 ` ahesford
2024-03-01 22:31 ` [PR PATCH] [Updated] " oreo639
2024-03-01 22:31 ` oreo639
2024-03-01 22:33 ` oreo639
2024-03-01 22:54 ` [PR PATCH] [Updated] " oreo639
2024-03-01 22:55 ` oreo639
2024-03-01 22:57 ` oreo639
2024-03-01 23:11 ` [PR PATCH] [Updated] " oreo639
2024-03-01 23:13 ` oreo639
2024-03-02  0:06 ` oreo639
2024-03-02  0:12 ` oreo639
2024-03-02  0:15 ` oreo639
2024-03-04 15:31 ` leahneukirchen
2024-03-04 19:52 ` [PR PATCH] [Updated] " oreo639

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=20231222113340.H0_ITKt4eZubJot229eTLb7mQbn8wS169M6m3yZAL6g@z \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).