Skip to content
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

kmod: do not append glob to search for firmware if it is already there #3210

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Nov 20, 2024

Some kernel modules use globs in their firmware dependencies:

$ modinfo ath11k_pci
filename:       /lib/modules/6.11.7-amd64/kernel/drivers/net/wireless/ath/ath11k/ath11k_pci.ko.xz
firmware:       ath11k/WCN6855/hw2.1/*
firmware:       ath11k/WCN6855/hw2.0/*
firmware:       ath11k/QCN9074/hw1.0/*
firmware:       ath11k/QCA6390/hw2.0/*

Which means the glob uses a double "**" which breaks it, and the firmwares are skipped. Do not add a "*" if it is already present in the search value.

@bluca bluca force-pushed the firmware branch 2 times, most recently from 3274b20 to 462614a Compare November 20, 2024 01:53
@bluca
Copy link
Member Author

bluca commented Nov 20, 2024

Run ruff --version
ruff 0.7.4
Would reformat: mkosi/kmod.py
1 file would be reformatted, [6](https://github.com/systemd/mkosi/actions/runs/11925229561/job/33236955372?pr=3210#step:5:7)0 files already formatted
Error: Process completed with exit code 1.

what on earth does this mean?

@DaanDeMeyer
Copy link
Contributor

Run ruff --version
ruff 0.7.4
Would reformat: mkosi/kmod.py
1 file would be reformatted, [6](https://github.com/systemd/mkosi/actions/runs/11925229561/job/33236955372?pr=3210#step:5:7)0 files already formatted
Error: Process completed with exit code 1.

what on earth does this mean?

That your changes are not formatted properly. Run ruff format mkosi to format them properly

Some kernel modules use globs in their firmware dependencies:

modinfo ath11k_pci
filename:       /lib/modules/6.11.7-amd64/kernel/drivers/net/wireless/ath/ath11k/ath11k_pci.ko.xz
firmware:       ath11k/WCN6855/hw2.1/*
firmware:       ath11k/WCN6855/hw2.0/*
firmware:       ath11k/QCN9074/hw1.0/*
firmware:       ath11k/QCA6390/hw2.0/*

Which means the glob uses a double "**" which breaks it, and the
firmwares are skipped. Do not add a "*" if it is already present in
the search value.
@DaanDeMeyer
Copy link
Contributor

Fixed up myself, setting green label

@DaanDeMeyer DaanDeMeyer merged commit 34c171a into systemd:main Nov 20, 2024
32 of 36 checks passed
@bluca bluca deleted the firmware branch November 20, 2024 09:26
@bluca
Copy link
Member Author

bluca commented Nov 20, 2024

what on earth does this mean?

That your changes are not formatted properly. Run ruff format mkosi to format them properly

I did try that, but it doesn't seem to work, likely some version difference from the CI:

$ ruff format mkosi
warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation.
ruff failed
  Cause: TOML parse error at line 79, column 1
   |
79 | lint.select = ["E", "F", "I", "UP"]
   | ^^^^
unknown field `lint`, expected one of `allowed-confusables`, `builtins`, `cache-dir`, `dummy-variable-rgx`, `exclude`, `extend`, `extend-exclude`, `extend-include`, `extend-ignore`, `extend-select`, `extend-fixable`, `extend-unfixable`, `external`, `fix`, `fix-only`, `fixable`, `output-format`, `force-exclude`, `ignore`, `ignore-init-module-imports`, `include`, `line-length`, `tab-size`, `logger-objects`, `required-version`, `respect-gitignore`, `select`, `show-source`, `show-fixes`, `src`, `namespace-packages`, `target-version`, `preview`, `task-tags`, `typing-modules`, `unfixable`, `flake8-annotations`, `flake8-bandit`, `flake8-bugbear`, `flake8-builtins`, `flake8-comprehensions`, `flake8-copyright`, `flake8-errmsg`, `flake8-quotes`, `flake8-self`, `flake8-tidy-imports`, `flake8-type-checking`, `flake8-gettext`, `flake8-implicit-str-concat`, `flake8-import-conventions`, `flake8-pytest-style`, `flake8-unused-arguments`, `isort`, `mccabe`, `pep8-naming`, `pycodestyle`, `pydocstyle`, `pyflakes`, `pylint`, `pyupgrade`, `format`, `per-file-ignores`, `extend-per-file-ignores`

Can the CI be made to output the diff, so that it can be applied directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants