Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Kernel Manager skips essential pre-build steps — no _localmodcfg_path resolution, no GPG key handling

Đang mở
#90 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

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:

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):

  1. Fresh system / fresh GPG keyring, no CachyOS kernel keys imported yet.
  2. Open Kernel Manager, select a CachyOS kernel variant, build.
  3. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CachyOS/kernel-manager

Tất cả issue của CachyOS/kernel-manager

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.