-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework system locale #1423
base: master
Are you sure you want to change the base?
Rework system locale #1423
Conversation
6088114
to
7f668da
Compare
7f668da
to
aadb323
Compare
This looks great! It's a breaking change as it will break all existing configurations (which is fine), so I'd like to propose that we postpone merging this (when you feel ready with the PR) until next release, that way we can add a warning to the current functionalities that they're being deprecated. |
In previous changes like this we did support backwards compatibility, for example superuser configuration. Something like in archinstall/lib/models/users.py However, i am very much in favor of providing a deprecated warning (also introduced in users) to inform that this will go away. This way we'll clean up this code and don't have to maintain it. |
Yea this would be optimal, since we have about 1-2 months between releases any way I think having a deprecation warning is more than enough. We could do the same for the superuser configuration tbh. |
aadb323
to
81ee321
Compare
I've changed the scope of the pull request to focus on non-breaking changes. I will follow it up with a pull request for the unification of locale language and locale encoding into locale if that is a desired change. |
81ee321
to
76b1ba6
Compare
42f1510
to
86f76dc
Compare
|
e488c34
to
f0b2921
Compare
@Torxed, considering what you mentioned here: #1200 (comment), is there a reason locale and hostname are not parameters to -def minimal_installation(self, testing=False, multilib=False) -> bool:
+def minimal_installation(self, testing :bool = False, multilib :bool = False, hostname :str = 'archinstall', locale :Tuple[str, str] = ('en_US', 'UTF-8')) -> bool: |
a832eca
to
d8a6eb9
Compare
Not the right place for this but these Arch Linux glibc package changes might be improvements:
|
Here is what this pull request looks like working with multiple locales:
This is ready to be reviewed and tested. More to come in future pull requests as mentioned here #1435 (comment). |
Great work on this, I'll pass along the message about glibc and the examples file. |
I appreciate you passing along the message about the Arch Linux glibc package. Would you please link to the comment when passing the information along? I have just edited that comment for additional clarity. |
Add SUPPORTED file to package as done by other distributions in order to provide the set of available locales in a unmodified file. Also remove examples in locale.gen to avoid matches of tools as sed and grep. Credit @ archlinux/archinstall#1423 (comment) git-svn-id: file:///srv/repos/svn-packages/svn@455119 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Add SUPPORTED file to package as done by other distributions in order to provide the set of available locales in a unmodified file. Also remove examples in locale.gen to avoid matches of tools as sed and grep. Credit @ archlinux/archinstall#1423 (comment) git-svn-id: file:///srv/repos/svn-packages/svn@455119 eb2447ed-0c53-47e4-bac8-5bc4a241df78
@codefiles As per suggested, your change is now merged upstream (archlinux/svntogit-packages@3c537be). Great work! |
Another message regarding the Arch Linux glibc package:
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g'
- sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
+ sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' -e 's|^|#|g' \ or use the following sed command on the generated sed 's|^|#|g'
-# A list of supported locales is included in this file.
-# Uncomment the ones you need.
+# A list of supported locales is given in /usr/share/i18n/SUPPORTED
+# and is included in this file. Uncomment the needed locales below. [0] https://salsa.debian.org/glibc-team/glibc/-/blob/1ad03bfd35cb0258dc1e73c1aab4b9bc128a3ea2/debian/rules.d/build.mk#L240-244 |
Isn't this a bit of a workaround for an upstream glibc issue tho? Or did I misunderstood why we remove trailing whitespaces? |
You are misunderstanding why I'm requesting trailing whitespace to be removed. In the glibc PKGBUILD a sed command is being run on
-aa_DJ.UTF-8/UTF-8 \
+aa_DJ.UTF-8/UTF-8
-aa_DJ.UTF-8/UTF-8 \
+aa_DJ.UTF-8/UTF-8 The following demonstrates that it makes a difference:
The |
This may also clear things up:
|
I see, I'll pass it along! :) Apologies for not getting it straight away, I should maybe have spent a few more minutes reading through your initial example. I was in a bit of a rush :) |
It is ok, should be a lot clearer now. It is hard to find a middle ground between being terse and verbose when describing issues. Terse descriptions might lack clarity and verbose descriptions risk being ignored. |
d8a6eb9
to
ea71566
Compare
In regards to the Arch Linux glibc package, two of the bullets in my earlier comment, #1423 (comment), have now been resolved by: @freswa, the revised patch file supported.diff targets the second bullet from my earlier comment, #1423 (comment), that is not yet addressed. If implemented it would:
|
The latest commit requires the next release of the glibc package for archlinux/svntogit-packages@b09829c. |
Perfect, I'll merge this as soon as https://archlinux.org/packages/core/x86_64/glibc/ is updated (the upstream commit is newer than latest package release) |
96ab2ce
to
9795a7f
Compare
The glibc package has been updated. Be aware that if this is merged the current ISO (2022.10.01) will not meet the required version of glibc when using |
9795a7f
to
2fabbe5
Compare
Good heads up! Our ISO build and tests should still work as it always build the latest, but people tend to run the git version on the officiall ISO so, gut feeling says this will be the last PR into the next release, as close to the 1-11-2022 as possible, is that ok? |
2fabbe5
to
a305023
Compare
a305023
to
a766653
Compare
a766653
to
69c3e10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks promising, I understand I'm a bit late approving this. Will this interfere with the recent changes to the locale perhaps?
Let's not merge this yet. I feel that it is stale now so I am changing this to a draft till I review it again. |
PR Description:
list_locales()
to use/usr/share/i18n/SUPPORTED
./usr/share/i18n/SUPPORTED
./etc/locale.gen
or append if an entry is not found to uncomment.localedef
for generating locales instead oflocale-gen
./etc/locale.gen
when it does not need to be modified.Locale language
menu leaving only languages since encodings are selected in theLocale encoding
menu.Tests and Checks