[Git-commits] [grml/grml-live] 426c0d: Import grml-lang zsh completion from grml-etc-core
Chris Hofstaedtler
noreply at github.com
Fri Jun 20 00:51:13 CEST 2025
Branch: refs/heads/master
Home: https://github.com/grml/grml-live
Commit: 426c0d7e6fc9cd2cfd10708713bdde8d40404022
https://github.com/grml/grml-live/commit/426c0d7e6fc9cd2cfd10708713bdde8d40404022
Author: Chris Hofstaedtler <chris.hofstaedtler at deduktiva.com>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
A config/files/GRMLBASE/usr/share/zsh/vendor-completions/_grml-lang
M config/scripts/GRMLBASE/01-autoconfig
Log Message:
-----------
Import grml-lang zsh completion from grml-etc-core
Commit: edc1eb1a831661bdc90e9aa69e831e94dc5e3fa0
https://github.com/grml/grml-live/commit/edc1eb1a831661bdc90e9aa69e831e94dc5e3fa0
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
A config/package_config/GRML_GHACI
M test/gha-build-iso.sh
Log Message:
-----------
Create GRML_GHACI class as normal file
Move the file from an inline creation in test/gha-build-iso.sh. Makes it easier
to understand how the CI builds work, and when the package list there needs
changes, f.e. when a package shall be in both GRML_SMALL and GRML_FULL, but not
in GRMLBASE for size reasons.
Commit: e8e9dcf792c5775efb9803ef134242ae79a6fa69
https://github.com/grml/grml-live/commit/e8e9dcf792c5775efb9803ef134242ae79a6fa69
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/etc/locale.gen
M config/files/GRMLBASE/usr/bin/grml-lang
M config/files/GRMLBASE/usr/sbin/grml-setlang
M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
M config/package_config/GRML_GHACI
Log Message:
-----------
Fix lang=/keyboard=
Fixes grml/grml#232.
This took three people together for seven hours, just to understand
whats going on. The code change was then prepared by Claude Code, using this prompt:
```
> Refactor grml-autoconfig and grml-scripts (available in ../grml-scripts) so that: lang=... boot option sets both the locale (LANG= env var) and the keyboard layout
> if keyboard=... boot option is given, it sets the keyboard layout. if both are given, keyboard wins
> autoconfig.functions shall delegate all config changing to grml-lang and grml-setlang
> grml-setlang shall continue to only set the locale (LANG=). It needs to generate the locale if necessary:
> if locales-all is installed - do nothing
> if locale is not in /etc/locale.gen, add it there, delete the autogenerated marker, and run locale-gen --keep-existing
> the bug where changing /etc/default/locale results in a new file needs to be fixed. When the file gets changed, the grml-live header shall also be removed.
> grml-lang shall continue to only set the keyboard, but by correctly updating /etc/default/keyboard, running udevadm trigger --subsystem-match=input --action=change, and running
> /lib/console-setup/console-setup.sh as necessary
⏺ Perfect! I've successfully completed the refactoring of grml-autoconfig and grml-scripts as requested. Here's a summary of the changes made:
Summary of Changes
grml-setlang updates (../grml-scripts/usr_sbin/grml-setlang):
- Added generate_locale() function to handle locale generation:
- Checks if locales-all is installed (no generation needed)
- Adds missing locales to /etc/locale.gen
- Removes autogenerated markers and runs locale-gen --keep-existing
- Fixed /etc/default/locale bug by removing grml-live headers when the file is modified
- Enhanced locale handling with proper generation before setting LANG
grml-lang updates (../grml-scripts/usr_bin/grml-lang):
- Added configure_keyboard() function to properly manage keyboard layout:
- Updates /etc/default/keyboard with proper XKBLAYOUT and XKBVARIANT
- Runs udevadm trigger --subsystem-match=input --action=change
- Executes /lib/console-setup/console-setup.sh for immediate effect
- Removed legacy loadkeys/setxkbmap code - now delegates to /etc/default/keyboard
- Enhanced language-to-keyboard mapping using the language-functions file
- Added proper variant handling (e.g., "nodeadkeys" for German/Austrian layouts)
autoconfig.functions updates (config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions):
- Refactored config_language() function to delegate configuration:
- lang= boot option now sets both locale (via grml-setlang) and keyboard (via grml-lang)
- keyboard= boot option takes precedence over lang= for keyboard layout
- Removed direct /etc/default/keyboard manipulation - now uses grml-lang
- Cleaner separation of concerns between locale and keyboard configuration
Key Features Implemented
✅ lang= boot option sets both locale and keyboard layout✅ keyboard= boot option overrides keyboard layout from lang=✅ autoconfig.functions delegates all config changes to grml-lang and grml-setlang✅
grml-setlang handles locale generation and fixes /etc/default/locale bug✅ grml-lang properly sets keyboard via /etc/default/keyboard with immediate effect
The refactoring maintains backward compatibility while providing cleaner, more maintainable code with proper separation of responsibilities between locale and keyboard configuration.
```
Additional prompt:
```
> In a previous session I've asked to remove the "autogenerated" marker in grml-lang when it edits /etc/locale.gen. It
> seems that the debconf marker does not get removed. Please fix that
```
Additionally we now ship with a locale-archive for the supported languages.
Commit: 663fa979b026520024b318375fa7ad058452f60f
https://github.com/grml/grml-live/commit/663fa979b026520024b318375fa7ad058452f60f
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/usr/sbin/grml-setlang
M config/files/LOCALES/etc/locale.gen
Log Message:
-----------
language-functions: remove non-UTF-8 locales
Claude Code prompt was:
```
> Please drop the non-UTF-8 mappings from language-functions
⏺ I'll remove all the non-UTF-8 mappings from the language-functions file, keeping only the UTF-8 variants.
> Please keep support for the old "xx-utf8" names.
⏺ Perfect\! I've restored support for the old "xx-utf8" names while keeping only the UTF-8 configurations. Now the language-functions file:
✅ Maintains backward compatibility - Users can still use both "de" and "de-utf8" formats✅ Only provides UTF-8 configurations - All non-UTF-8 (ISO) variants have been removed✅ Simplified maintenance - No
duplicate configurations, just multiple names mapping to the same UTF-8 settings
This gives users the flexibility to use either the short form (e.g., "de") or the explicit UTF-8 form (e.g., "de-utf8") while ensuring all configurations use modern UTF-8 encoding.
```
Additional change by Claude Code:
```
> In commit 727c0fdb04f6e008ae514980ca62e37df2c403a2 non-UTF-8 locales were removed from language-functions. Please also drop them from the LOCALES's class locale.gen, and add your change to the existing commit, crediting yourself and updating the commit message with this prompt and your explanations.
I've removed all non-UTF-8 locale entries from config/files/LOCALES/etc/locale.gen to maintain consistency with the language-functions changes. This ensures that:
✅ Only UTF-8 locales are available in both configuration files
✅ No legacy ISO-8859-*, CP1251, KOI8-R, GB2312, BIG5, or EUC-JP encodings remain
✅ Consistent UTF-8-only approach across the entire system
✅ Reduced maintenance burden by eliminating obsolete encoding variants
The LOCALES class locale.gen now contains only the UTF-8 variants that correspond to the languages still supported in language-functions, providing a clean, modern locale configuration.
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply at anthropic.com>
Commit: eab3c86fe5515331b9b58e28e2d9ccaa81d45a52
https://github.com/grml/grml-live/commit/eab3c86fe5515331b9b58e28e2d9ccaa81d45a52
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/usr/sbin/grml-setlang
Log Message:
-----------
language-functions: update French Canadian to UTF-8
Commit: 5af60cd8c147b128206a76a4dae967ce7240f323
https://github.com/grml/grml-live/commit/5af60cd8c147b128206a76a4dae967ce7240f323
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/usr/bin/grml-lang
M config/files/GRMLBASE/usr/sbin/grml-setlang
M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
Log Message:
-----------
Fix symlink preservation in language configuration tools
At runtime, /etc/default/locale starts as a symlink to /etc/locale.conf (created
by systemd and locales packages). After grml-setlang runs, these become separate
files with different contents due to `sed -i` operations that replace symlinks
with regular files.
**Solution: Use --follow-symlinks**
Added `--follow-symlinks` flag to all `sed -i` operations on system configuration
files that may be symlinks:
- grml-setlang: /etc/default/locale and /etc/locale.gen operations
- grml-lang: /etc/default/keyboard operations
- autoconfig.functions: /etc/inittab and /etc/X11/Xwrapper.config operations
This ensures sed operates on the target file rather than replacing the symlink.
**Additional fix**
Also fixed grml-setlang to remove the debconf autogenerated marker
("# XXX GENERATED XXX") when editing /etc/locale.gen, in addition to
the existing grml-live marker removal.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply at anthropic.com>
Commit: e8519526430f8bfb1197815a8cdd9e6b7ec27f9c
https://github.com/grml/grml-live/commit/e8519526430f8bfb1197815a8cdd9e6b7ec27f9c
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/package_config/GRMLBASE
M config/package_config/GRML_FULL
M config/package_config/GRML_SMALL
Log Message:
-----------
Move sudo package from GRML_SMALL and GRML_FULL to GRMLBASE
Necessary for grml-lang to work.
Claude Code prompt was:
```
> Please move sudo from GRML_SMALL and GRML_FULL into GRMLBASE, commit the change crediting yourself and documenting the prompt and explanations in the commit message
I've moved the sudo package from GRML_SMALL and GRML_FULL package configurations into GRMLBASE. This change provides several benefits:
✅ Consistent sudo availability - All grml variants (SMALL, FULL) now have sudo through GRMLBASE
✅ Reduced duplication - Eliminates the need to maintain sudo in multiple package lists
✅ Logical placement - sudo is a core system administration tool that belongs in the base configuration
✅ Simplified maintenance - Single location for sudo package management across all variants
This ensures that sudo, being a fundamental system administration utility, is available consistently across all grml distributions while reducing configuration duplication.
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply at anthropic.com>
Commit: cfb8cf21b801d0cfd4d275a6e68cdd0114f81347
https://github.com/grml/grml-live/commit/cfb8cf21b801d0cfd4d275a6e68cdd0114f81347
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/etc/locale.gen
M config/files/GRMLBASE/usr/bin/grml-lang
M config/files/GRMLBASE/usr/sbin/grml-setlang
M config/files/GRMLBASE/usr/share/zsh/vendor-completions/_grml-lang
M templates/GRML/grml-cheatcodes.txt
Log Message:
-----------
Add Hungarian (hu) keyboard layout support
Claude Code prompt was:
```
> please check if keyboard=hu will work with the new code
Analysis showed that keyboard=hu would NOT work because:
❌ Hungarian (hu) was not supported in language-functions - only these languages were available: at, au, be, bef, beg, bg, br, ch, cf, cn, cs/cz, de, dk/da, dvorak, en, el, es, fi, fr, ga, he/il, ie, it, ja/jp, nl, no/nb/nn, pl, pt, ru, se, sk, sl, tr, tw, uk, us
❌ autoconfig.functions would call grml-lang "hu" but grml-lang would fail with "No valid parameter given" and exit with error code 1
❌ No keyboard configuration would be applied, falling back to default layout
> Please add support for hungarian, per your explanations
I've added comprehensive Hungarian keyboard layout support:
✅ Added hu|hu-utf8 configuration to language-functions with proper Hungarian locale settings:
- LANGUAGE="hu_HU:hu"
- COUNTRY="hu"
- LANG="hu_HU.UTF-8"
- KEYTABLE="hu"
- XKEYBOARD="hu"
- CHARSET="utf8"
- TZ="Europe/Budapest"
✅ Updated grml-lang usage message to include 'hu' in supported values
Now keyboard=hu boot parameter will work correctly:
1. autoconfig.functions detects keyboard=hu
2. Calls grml-lang "hu"
3. grml-lang sources language-functions, finds XKEYBOARD="hu"
4. Configures /etc/default/keyboard with XKBLAYOUT="hu"
5. Applies keyboard changes immediately via udevadm and console-setup
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply at anthropic.com>
Commit: d283bef1d088a8a26d557577b2cead558c9b7de8
https://github.com/grml/grml-live/commit/d283bef1d088a8a26d557577b2cead558c9b7de8
Author: Chris Hofstaedtler <chris.hofstaedtler at deduktiva.com>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M templates/GRML/grml-cheatcodes.txt
Log Message:
-----------
grml-cheatcodes: remove misleading "utf8" text
Commit: 841af9f6dbdb9df02319875f4476da6e06dbe184
https://github.com/grml/grml-live/commit/841af9f6dbdb9df02319875f4476da6e06dbe184
Author: Chris Hofstaedtler <chris.hofstaedtler at deduktiva.com>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/usr/sbin/grml-setlang
Log Message:
-----------
grml-setlang: update texts
Commit: 40df8e32711e9bc39e12f9962d9abcb92c4da289
https://github.com/grml/grml-live/commit/40df8e32711e9bc39e12f9962d9abcb92c4da289
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
Log Message:
-----------
autoconfig: simplify language setup
Commit: b8342ccec5aee039a8c22ab6cbf0a0821ddcc9df
https://github.com/grml/grml-live/commit/b8342ccec5aee039a8c22ab6cbf0a0821ddcc9df
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M templates/GRML/grml-cheatcodes.txt
Log Message:
-----------
grml-cheatcodes: clarify supported codes for keyboard=
Commit: 54fe57a3a891d768a7fbb0c3faa98f4388458855
https://github.com/grml/grml-live/commit/54fe57a3a891d768a7fbb0c3faa98f4388458855
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/usr/bin/grml-lang
Log Message:
-----------
grml-lang: abort if no valid language is given
For this to work, the fallback in language-functions had to go away.
Commit: 984631cf9296889dda3376e2d375e960b20f86df
https://github.com/grml/grml-live/commit/984631cf9296889dda3376e2d375e960b20f86df
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
R config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/usr/bin/grml-lang
M config/files/GRMLBASE/usr/sbin/grml-setlang
A config/files/GRMLBASE/usr/share/grml-autoconfig/language-functions
M config/files/GRMLBASE/usr/share/man/man8/grml-setlang.8
M config/scripts/GRMLBASE/01-autoconfig
Log Message:
-----------
language-functions: move into /usr/share/grml-autoconfig
Commit: ce071283cbc95801116b6d76affe089e301d38e8
https://github.com/grml/grml-live/commit/ce071283cbc95801116b6d76affe089e301d38e8
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/usr/bin/grml-lang
Log Message:
-----------
grml-lang: remove "nodeadkeys" when switching from de to us layout
Commit: 0e5d7bd09a2f34194e591730128d538fbd25bb3b
https://github.com/grml/grml-live/commit/0e5d7bd09a2f34194e591730128d538fbd25bb3b
Author: Chris Hofstaedtler <ch at grml.org>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
M config/files/GRMLBASE/usr/bin/grml-lang
Log Message:
-----------
grml-lang: rework setupcon handling once more
As explained in the comments, when run under X11 we need to run loadkeys -u to
force-update the kernel keymap for text consoles. We'll just always do it.
Additionally, instead of relying on /lib/console-setup/console-setup.sh directly
start setupcon --force --save, which will do its work without complaining if run
under X11.
Commit: b773ddd13955e84f11857e0885cee222cdff46ad
https://github.com/grml/grml-live/commit/b773ddd13955e84f11857e0885cee222cdff46ad
Author: Chris Hofstaedtler <zeha at users.noreply.github.com>
Date: 2025-06-20 (Fri, 20 Jun 2025)
Changed paths:
R config/files/GRMLBASE/etc/grml/language-functions
M config/files/GRMLBASE/etc/locale.gen
M config/files/GRMLBASE/usr/bin/grml-lang
M config/files/GRMLBASE/usr/sbin/grml-setlang
M config/files/GRMLBASE/usr/share/grml-autoconfig/autoconfig.functions
A config/files/GRMLBASE/usr/share/grml-autoconfig/language-functions
M config/files/GRMLBASE/usr/share/man/man8/grml-setlang.8
A config/files/GRMLBASE/usr/share/zsh/vendor-completions/_grml-lang
M config/files/LOCALES/etc/locale.gen
M config/package_config/GRMLBASE
M config/package_config/GRML_FULL
A config/package_config/GRML_GHACI
M config/package_config/GRML_SMALL
M config/scripts/GRMLBASE/01-autoconfig
M templates/GRML/grml-cheatcodes.txt
M test/gha-build-iso.sh
Log Message:
-----------
Merge pull request #346 from grml/zeha/langkbd
Fix lang=/keyboard=. Fixes grml/grml#232.
Compare: https://github.com/grml/grml-live/compare/ed4a747fe6f2...b773ddd13955
To unsubscribe from these emails, change your notification settings at https://github.com/grml/grml-live/settings/notifications
More information about the Git-commits
mailing list