[Bug]: Kernel Manager skips essential pre-build steps — no _localmodcfg_path resolution, no GPG key handling
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, linux
- Lĩnh vực
- build-system, operating-systems, security
Hướng nghiên cứu
Start with the makepkg entry points in src/aur_kernel.cpp and src/conf-window.cpp, then inspect src/compile_options.json and the config-option handling for the localmodcfg flow. Reproduce the missing-path and missing-key failures before changing behavior. Done means both preconditions are checked before makepkg runs and the GUI gives actionable failure guidance.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Package name
cachyos-kernel-manager
Package version
1.19.0
Issue type
Build failure / incorrect behavior
Description
Two related gaps, both confirmed by grepping the source (develop branch),
where Kernel Manager skips preparation steps that a build genuinely needs
and instead lets makepkg fail with a raw, unhelpful error 30+ minutes
into a build (or immediately, in the GPG case) — rather than validating
upfront.
1. "Modprobed-db" option never sets/reads _localmodcfg_path
The checkbox only toggles _localmodcfg=yes in the PKGBUILD. It never
sets, reads, or validates _localmodcfg_path:
$ grep -rn "localmodcfg" src/
src/config-options.hpp:34: bool localmodcfg_check{};
src/config-options.cpp:61: .localmodcfg_check = rust_config_options.localmodcfg_check,
src/config-options.cpp:88: .localmodcfg_check = config_options.localmodcfg_check,
src/conf-window.cpp:171: {&Ui::ConfOptionsPage::localmodcfg_check, &ConfigOptions::localmodcfg_check, "localmodcfg"},
src/compile_options.json:6: "localmodcfg": "_localmodcfg",
No code anywhere references _localmodcfg_path, modprobed-db.conf, or
DBPATH. Kernel Manager relies entirely on the PKGBUILD's own default:
: "${_localmodcfg_path:="$HOME/.config/modprobed.db"}"
modprobed-db itself is configured via ~/.config/modprobed-db.conf
(see its manpage), where DBPATH can point anywhere the user has set it.
When DBPATH doesn't match the PKGBUILD's hardcoded default, Kernel
Manager builds with a stale, empty, or wrong module list — with no
warning. Depending on whether a stale file happens to exist at the old
default path, this results in either:
==> ERROR: No modprobed.db data found(build aborts), or- a build that silently drops boot-critical/hardware-critical modules
(WiFi, audio, storage drivers) because it read an empty/stale db.
Independently reported by two users, same symptom, different root causes:
- https://github.com/CachyOS/CachyOS-PKGBUILDS/issues/1853
- https://discuss.cachyos.org/t/the-kernel-manager-does-not-see-the-modeprobed-db-database/35671
Suggested fix: parse ~/.config/modprobed-db.conf for DBPATH and pass
_localmodcfg_path=$DBPATH/modprobed.db explicitly as an absolute path
(makepkg's build environment does not reliably expand ~/$HOME). At
minimum, warn in the UI if the resolved path doesn't exist before
starting the build.
2. No GPG/PGP key handling before invoking makepkg
$ grep -rn -i "gpg\|pgp\|recv-keys\|validpgpkeys\|keyserver" src/
(no results)
$ grep -rn "makepkg" src/
src/aur_kernel.cpp:53: utils::runCmdTerminal("makepkg -sicf --cleanbuild --skipchecksums", false);
src/conf-window.cpp:734: run_cmd_async("makepkg -scf --cleanbuild --skipchecksums && touch .done-status", ...);
No --skippgpcheck, no pre-check of validpgpkeys= from the PKGBUILD,
no automatic import of missing keys, and no try/catch or error surfacing
around the makepkg call in aur_kernel.cpp. If a required signing key
isn't already in the user's local GPG keyring, the build simply fails on
makepkg's own PGP verification with a raw error the user has to
interpret and fix manually (gpg --recv-keys ...) outside the tool.
Reproduced on a fresh CachyOS install (X99 board, i7-58xx, GTX 1070) —
first build attempt failed on an unimported PGP key with no guidance
from the UI on what to do next.
Suggested fix: before invoking makepkg, extract validpgpkeys= from the
PKGBUILD, check each against the local keyring (gpg --list-keys), and
auto-import any missing ones from a keyserver (with a fallback server)
— same approach already working reliably in third-party build scripts,
e.g.:
for key_id in $key_ids
if gpg --list-keys $key_id &>/dev/null
# already present
else
gpg --keyserver hkps://keys.openpgp.org --recv-keys $key_id \
|| gpg --keyserver hkps://pgp.surf.nl --recv-keys $key_id
end
end
This is not a one-off: the same class of failure (unimported PGP key,
no guidance from the tool) has been reported and reproduced by multiple
independent users since June 2026, still without a fix in Kernel Manager
itself — the only working workaround remains running gpg --recv-keys
manually, outside the tool, before building:
https://discuss.cachyos.org/t/cachyos-kernel-manager-fails-on-custom-config/31802
(Note: run without sudo — the key must land in the invoking user's own
keyring, not root's, since makepkg refuses to run as root anyway.)
Both point to the same underlying gap: Kernel Manager hands off to
makepkg without validating the preconditions it needs to succeed,
so failures surface late (sometimes 30+ minutes in) and unhelpfully,
instead of being caught and explained upfront in the GUI.
Steps to reproduce
For (1): See steps in linked issue #1853 / forum thread above.
For (2):
- Fresh system / fresh GPG keyring, no CachyOS kernel keys imported yet.
- Open Kernel Manager, select a CachyOS kernel variant, build.
- Build fails on PGP signature verification with no in-app guidance.
Relevant logs or error output
(attach your own PGP error log excerpt here if you still have it)
CachyOS bug report
No response
Additional context
No response
- Ngôn ngữ chính
- C++
- Star
- 44
- Fork
- 30
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CachyOS/kernel-manager
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
CachyOS/kernel-manager#87 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
CachyOS/kernel-manager#78 ·
-
Unpatched Base KernelsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
CachyOS/kernel-manager#70 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
CachyOS/kernel-manager#63 · 1 bình luận ·
-
rm: cannot remove '/home/user/.cache/cachyos-km/pkgbuilds/linux-cachyos/src/': Is a directoryĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
CachyOS/kernel-manager#43 · 1 bình luận ·
Tất cả issue của CachyOS/kernel-manager
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
sandialabs/seacas#945 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ROCm/FastFlowLM#757 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
WaterHeaterManagement: tank_percent feature reports wrong feature id (FeatureMap corruption)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
espressif/esp-matter#1867 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mltframework/shotcut#1920 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày