Unify kernel flavors in one PKGBUILD - #944
Conversation
1ca0588 to
915689b
Compare
1Naim
left a comment
There was a problem hiding this comment.
I considered doing profiles/flavors as well, but thought that would be restrictive if someone wants to build a custom kernel. I see that you added $_flavor but still kept the rest of the build options.
While this does solve the problem of having too many PKGBUILDs, I worry about the number of variables in the PKGBUILD. (although if u think about it, $_features just moves that into a string instead of a variable).
Aside from that, I don't have much problems with this. I'm fine with it if this gets merged instead of #941.
P.S. on moving rt to $_preempt, somehow that didn't come to mind. it seems fitting though. should probably go there regardless of any of these unification series(es?) gets merged.
d0cfe52 to
51b3f91
Compare
51b3f91 to
1ae7d7f
Compare
|
Didnt review yet fully, but the only problem I do see would be if I want not build a specific variant, e.g deckify/hardened whatsoever. But likely I would just edit the script then. |
In this case you just need to select |
it'll be a little bit of a problem if you want to build some customized handheld kernel with a different cpusched, since it currently overrides it to BORE. |
There was a problem hiding this comment.
Pull request overview
This PR consolidates multiple kernel “flavor” packages into a single linux-cachyos/PKGBUILD that is parameterized via a _flavor preset, and removes the now-redundant per-flavor PKGBUILD directories. It also updates local build helper scripts and the GitHub Actions workflow to build the new unified variants.
Changes:
- Unifies previously separate kernel flavor PKGBUILDs (bore/bmq/eevdf/server/deckify/rt-bore) into
linux-cachyos/PKGBUILDusing a new_flavorpreset mechanism and_package_suffix. - Updates packaging logic to use the appropriate strip tool (
llvm-stripvsstrip) during module signing and header packaging. - Refactors docker-based build scripts and tweaks CI build invocation.
Reviewed changes
Copilot reviewed 18 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| script.sh | Refactors docker build helper; now builds removed flavors via env-driven presets. |
| script-znver4.sh | Same as script.sh, but for the znver4 build image. |
| script-v3-v4.sh | Refactors v3/v4 build orchestration into helper functions for GCC vs LLVM LTO runs. |
| linux-cachyos/PKGBUILD | Introduces _flavor presets, unified pkgdesc generation, and uses llvm-strip for LLVM builds during packaging. |
| linux-cachyos-server/PKGBUILD | Removes standalone server flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-server/.SRCINFO | Removes standalone server flavor metadata. |
| linux-cachyos-rt-bore/PKGBUILD | Removes standalone rt-bore flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-rt-bore/.SRCINFO | Removes standalone rt-bore flavor metadata. |
| linux-cachyos-rc/PKGBUILD | Adds maintainer entry. |
| linux-cachyos-eevdf/PKGBUILD | Removes standalone eevdf flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-eevdf/.SRCINFO | Removes standalone eevdf flavor metadata. |
| linux-cachyos-deckify/PKGBUILD | Removes standalone deckify flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-deckify/.SRCINFO | Removes standalone deckify flavor metadata. |
| linux-cachyos-bore/PKGBUILD | Removes standalone bore flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-bore/.SRCINFO | Removes standalone bore flavor metadata. |
| linux-cachyos-bmq/PKGBUILD | Removes standalone bmq flavor PKGBUILD (now handled by _flavor). |
| linux-cachyos-bmq/.SRCINFO | Removes standalone bmq flavor metadata. |
| .github/workflows/build.yml | Changes CI makepkg flags from --skipchecksums to --skipinteg. |
Comments suppressed due to low confidence (3)
script.sh:30
- These _flavor values (server/deckify) do not match the presets accepted by linux-cachyos/PKGBUILD (cachyos-server / cachyos-deckify), so the PKGBUILD will fail with "Invalid preset" for these builds.
build_pkg linux-cachyos -e "_flavor=server" -e _package_suffix=lto
build_pkg linux-cachyos -e "_flavor=deckify" -e _package_suffix=lto
script-znver4.sh:30
- These _flavor values (server/deckify) do not match the presets accepted by linux-cachyos/PKGBUILD (cachyos-server / cachyos-deckify), so the PKGBUILD will fail with "Invalid preset" for these builds.
build_pkg linux-cachyos -e "_flavor=server" -e _package_suffix=lto
build_pkg linux-cachyos -e "_flavor=deckify" -e _package_suffix=lto
linux-cachyos/PKGBUILD:516
- This condition checks for _flavor="deckify", but the preset names accepted earlier in the file use "cachyos-deckify". As written, the deckify-specific kernel config toggles will not be enabled when using the preset.
if [ "$_flavor" = "deckify" ]; then
echo "Enabling handheld configs"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-bmq in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-server in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-eevdf in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-deckify in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-rt-bore in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It replaced by _flavor=cachyos-bore in linux-cachyos PKGBUILD. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
Fixes: #894 Signed-off-by: Eric Naim <dnaim@cachyos.org>
linux-cachyos-lto is no longer in repos, so noone should have this obsolete package anymore. Signed-off-by: Eric Naim <dnaim@cachyos.org>
Both of these options are mutually exclusive, so it makes sense to merge them together to a single variable. Signed-off-by: Eric Naim <dnaim@cachyos.org>
Having hardened in $_cpusched is fundamentally incorrect because, well, it's not a CPU scheduler! Regardless, having that as an option is also not possible to do correctly since: 1. version can lag behind current stable 2. it needs a different config that isn't easily toggleable so a different file must be provided With that in mind, remove it from $_cpusched. Signed-off-by: Eric Naim <dnaim@cachyos.org> Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
1ae7d7f to
87701dd
Compare
Refactor the build scripts to make use of the newly written PKGBUILD. This removes 6 PKGBUILDs that are just there for different build configurations. LTS, RC and hardened PKGBUILDs are still kept because they differ by version and not configuration. Co-authored-by: Vasiliy Stelmachenok <ventureo@cachyos.org> Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org> Signed-off-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
It is the same as EEVDF value, but can cause some confuse due to generated package description. Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
fc20ff8 to
c53f62e
Compare
That's now possible with c53f62e |
Based on #941 changes, but with less drastic changes in PKGBUILD structure.
Closes #750
Closes #894