Skip to content

fix(rust): use "dashed" form for systemd-firstboot keymap#1952

Merged
imobachgs merged 2 commits intofix-scripts-readerfrom
fix-firstboot-keymap
Feb 6, 2025
Merged

fix(rust): use "dashed" form for systemd-firstboot keymap#1952
imobachgs merged 2 commits intofix-scripts-readerfrom
fix-firstboot-keymap

Conversation

@imobachgs
Copy link
Contributor

Problem

When writing the keymap to be used by the target system, Agama does not uses the "dashed" form:
"es(ast)" instead of es-ast.

Solution

Use the "dashed" form in that case so systemd-firstboot is able to handle the keyboard.

Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss a unit test, but not sure how you're doing that in Rust.

Code LGTM anyway.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13005419087

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-18.2%) to 70.932%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rust/agama-server/src/l10n/model.rs 0 1 0.0%
Totals Coverage Status
Change from base Build 12995156707: -18.2%
Covered Lines: 17299
Relevant Lines: 24388

💛 - Coveralls

@imobachgs
Copy link
Contributor Author

In this case what I really miss is an integration test to be sure that everything is set up as expected after the first boot.

@imobachgs imobachgs merged commit 79ded7d into fix-scripts-reader Feb 6, 2025
2 checks passed
@imobachgs imobachgs deleted the fix-firstboot-keymap branch February 6, 2025 14:27
imobachgs added a commit that referenced this pull request Feb 14, 2025
Bug [bsc#1236174](https://bugzilla.suse.com/show_bug.cgi?id=1236174)

* When changing the installer font, only the X11 keymap is adjusted.
* When writing the keymap to be used by the target system, Agama does
not uses the "dashed" form: "es(ast)" instead of es-ast (original fix
was in #1952, merged into the wrong branch).

## Solution

* Use `set-keymap` instead of `set-x11-keymap`.
* Use the dashed form to set the language with `systemd-firstboot`.

## Screenshot

<details>
<summary>output of `localectl` after changing the keymap</summary>


![finish-classic](https://github.com/user-attachments/assets/1503e422-8cce-4e00-a5cb-36059cb8e1ab)
</details>
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants