__locale_system writes to wrong file in Debian Sid #33

Closed
opened 2021-11-20 11:24:59 +00:00 by ungleich-gitea · 12 comments
$ echo '__locale_system LANG --value C.UTF-8' | cdist config -i - localhost -n
INFO: [297839]: localhost: Starting dry run
INFO: [297839]: localhost: Processing __key_value/etc/environment:LANG
INFO: [297839]: localhost: Finished dry run in 0.93 seconds

$ cdist-dump -E localhost
target host: localhost, host directory: ./421aa90e079fa326b6494f812ad13e79
==============================================================================
./explorer/runlevel:5
./explorer/lsb_id:Debian
./explorer/hostname:limukas
./explorer/lsb_description:Debian GNU/Linux bullseye/sid
./explorer/kernel_name:Linux
./explorer/os:debian
./explorer/init:systemd
./explorer/os_release:PRETTY_NAME="Debian GNU/Linux bullseye/sid"
./explorer/os_release:NAME="Debian GNU/Linux"
./explorer/os_release:ID=debian
./explorer/os_release:HOME_URL="https://www.debian.org/"
./explorer/os_release:SUPPORT_URL="https://www.debian.org/support"
./explorer/os_release:BUG_REPORT_URL="https://bugs.debian.org/"
./explorer/machine_type:physical
./explorer/os_version:bullseye/sid
./explorer/disks:sda sdb sdc
./explorer/lsb_codename:sid
./explorer/interfaces:br0
./explorer/interfaces:eth0
./explorer/interfaces:lo
./explorer/cpu_cores:2
./explorer/lsb_release:unstable
./explorer/memory:31860556
./explorer/cpu_sockets:1
./explorer/machine:x86_64

$ cat /etc/debian_version 
bullseye/sid

Type should write to /etc/default/locale as it did before 47e28fc441.

``` $ echo '__locale_system LANG --value C.UTF-8' | cdist config -i - localhost -n INFO: [297839]: localhost: Starting dry run INFO: [297839]: localhost: Processing __key_value/etc/environment:LANG INFO: [297839]: localhost: Finished dry run in 0.93 seconds $ cdist-dump -E localhost target host: localhost, host directory: ./421aa90e079fa326b6494f812ad13e79 ============================================================================== ./explorer/runlevel:5 ./explorer/lsb_id:Debian ./explorer/hostname:limukas ./explorer/lsb_description:Debian GNU/Linux bullseye/sid ./explorer/kernel_name:Linux ./explorer/os:debian ./explorer/init:systemd ./explorer/os_release:PRETTY_NAME="Debian GNU/Linux bullseye/sid" ./explorer/os_release:NAME="Debian GNU/Linux" ./explorer/os_release:ID=debian ./explorer/os_release:HOME_URL="https://www.debian.org/" ./explorer/os_release:SUPPORT_URL="https://www.debian.org/support" ./explorer/os_release:BUG_REPORT_URL="https://bugs.debian.org/" ./explorer/machine_type:physical ./explorer/os_version:bullseye/sid ./explorer/disks:sda sdb sdc ./explorer/lsb_codename:sid ./explorer/interfaces:br0 ./explorer/interfaces:eth0 ./explorer/interfaces:lo ./explorer/cpu_cores:2 ./explorer/lsb_release:unstable ./explorer/memory:31860556 ./explorer/cpu_sockets:1 ./explorer/machine:x86_64 $ cat /etc/debian_version bullseye/sid ``` Type should write to `/etc/default/locale` as it did before 47e28fc441187b5deb869f53396eac1ee0f8cbe7.
Author
Owner

mentioned in commit a8ea56253c

mentioned in commit a8ea56253cdb5ebb832cb013b2a76dbcedad16fb
Author
Owner

closed via merge request !927

closed via merge request !927
Author
Owner

Debian Sid is always just Sid or unstable, it has no version number, because it never gets released.

"sid" does not necessarily mean "new"
I don't run any Debian sid systems

it means that users mostly know what they are doing and always assume latest version of everything. checking for */sid is enough.

Debian Sid is always just Sid or unstable, it has no version number, because it never gets released. > "sid" does not necessarily mean "new" > I don't run any Debian sid systems it means that users mostly know what they are doing and always assume latest version of everything. checking for `*/sid` is enough.
Author
Owner

I set up a Debian unstable system and could not find any hints to a version number.
I created a MR !927 that tries to decode the */sid strings to a number.

Please test!

I set up a Debian unstable system and could not find any hints to a version number. I created a MR !927 that tries to decode the `*/sid` strings to a number. Please test!
Author
Owner

mentioned in merge request !927

mentioned in merge request !927
Author
Owner

@ander I am always trying to be inclusive, but I don't run any Debian sid systems, and as already explained above the issue here is that sid does not report any useable version information and "sid" does not necessarily mean "new".

Having version switches is a common problem in cdist. We could solve it properly here and then reuse it in other places or solve it later…

If you want this issue fixed, then please be a bit more helpful.
I do not back any "delete code that I don't need" hacks.

@ander I am always trying to be inclusive, but I don't run any Debian sid systems, and as already explained above the issue here is that sid does not report any useable version information and "sid" does not necessarily mean "new". Having version switches is a common problem in cdist. We could solve it properly here and then reuse it in other places or solve it later… If you want this issue fixed, then please be a bit more helpful. I do not back any "delete code that I don't need" hacks.
Author
Owner

since debian etch, default is /etc/default/locale. same for ubuntu since 2010. and for lots of other distros.

I think we can save everybody's time and just drop support for distros released over 10 years ago and restore previous correct behavior.

if @ssrq wants to be ultra inclusive then please include sid users to the mix and fix this breakage.

since debian etch, default is `/etc/default/locale`. same for ubuntu since 2010. and for lots of other distros. I think we can save everybody's time and just drop support for distros released over 10 years ago and restore previous correct behavior. if @ssrq wants to be ultra inclusive then **please** include sid users to the mix and fix this breakage.
Author
Owner

@ssrq I don't know these details. @ander ?

@ssrq I don't know these details. @ander ?
Author
Owner

The issue here is that Debian doesn't provide any useable version information (os_version explorer) for sid (pre-releases) and sid could be every Debian release…
(Two years ago I've seen Debian sarge/sid ;-))

Does /etc/os-release provide anything useable?
If not, I fear that manually maintaining a codename to version mapping is necessary if sid should be supported.

The issue here is that Debian doesn't provide any useable version information (`os_version` explorer) for sid (pre-releases) and sid could be every Debian release… (Two years ago I've seen Debian sarge/sid ;-)) Does `/etc/os-release` provide anything useable? If not, I fear that manually maintaining a codename to version mapping is necessary if sid should be supported.
Author
Owner

@ssrq Can you take a look (due to 47e28fc441)?

@ssrq Can you take a look (due to https://code.ungleich.ch/ungleich-public/cdist/-/commit/47e28fc441187b5deb869f53396eac1ee0f8cbe7)?
Author
Owner

unassigned @poljakowski

unassigned @poljakowski
Author
Owner

assigned to @poljakowski

assigned to @poljakowski
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#33
No description provided.