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.
fc20ff8 to
c53f62e
Compare
That's now possible with c53f62e |
c53f62e to
bb26a3b
Compare
|
Rebased |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 24 changed files in this pull request and generated 3 comments.
Suppressed comments (7)
script-v3-v4.sh:34
- This call runs in both the
noneandthinpasses, but the later_use_llvm_lto=nonealways overridesbuild_env. The second pass therefore rebuildslinux-cachyos-gccinstead of producing the default ThinLTOlinux-cachyospackage. Let the per-pass LTO value take effect here.
build_pkg "$image" linux-cachyos "${build_env[@]}" -e "_flavor=cachyos" -e "_use_llvm_lto=none" -e _package_suffix=gcc
script.sh:24
- This replaces the script's previous default ThinLTO
linux-cachyosbuild withlinux-cachyos-gcc, and no subsequent call publishes the default package name. Keep the GCC build, but also build the default LTO flavor so repository updates do not droplinux-cachyos.
build_pkg linux-cachyos -e "_flavor=cachyos" -e "_use_llvm_lto=none" -e _package_suffix=gcc
script-znver4.sh:24
- This replaces the script's previous default ThinLTO
linux-cachyosbuild withlinux-cachyos-gcc, and no subsequent call publishes the default package name. Keep the GCC build, but also build the default LTO flavor so repository updates do not droplinux-cachyos.
build_pkg linux-cachyos -e "_flavor=cachyos" -e "_use_llvm_lto=none" -e _package_suffix=gcc
linux-cachyos/PKGBUILD:290
- The PKGBUILD now selects LLVM tools for LTO builds, but
_package-headersno longer addsclang,llvm, andlldto runtime dependencies. Installed LTO headers therefore lack the toolchain needed to build external modules;linux-cachyos-rc/PKGBUILD:638-640retains this dependency for the same case. Restore that conditional dependency in_package-headers.
if _is_lto_kernel; then
makedepends+=(clang llvm lld)
source+=("${_patchsource}/misc/dkms-clang.patch")
_strip_bin=llvm-strip
linux-cachyos/PKGBUILD:243
- The package metadata changed here, but
linux-cachyos/.SRCINFOwas not regenerated: it still contains the old description and the removedlinux-cachyos-ltoprovides/replaces entries. AUR and repository tooling consuming.SRCINFOwill therefore expose metadata that disagrees with the PKGBUILD. Regenerate and commit.SRCINFO.
pkgdesc="Linux kernel by CachyOS with patches and improvements ($(_generate_build_desc))"
linux-cachyos/PKGBUILD:13
- These presets inherit the shared ThinLTO/toolchain-suffix defaults, although every removed flavor PKGBUILD (
bore,bmq,eevdf,rt-bore,server, anddeckify) defaulted to unsuffixed GCC packages. Using a ready-to-use preset directly therefore produces an LLVM kernel under the legacy unsuffixed package name. Default non-cachyospresets to GCC with no suffix while still honoring explicit environment overrides.
### Ready-to-use named options preset
: "${_flavor:="cachyos"}"
linux-cachyos/PKGBUILD:98
dynamicis listed as a valid preemption mode, but the selection case only acceptsfull,lazy, andrt; choosingdynamicreaches_die. Remove it from the documented options unless support is implemented.
## Choose between full, lazy, rt or dynamic
| if [ "$_preempt" = "rt" ]; then | ||
| source+=("${_patchsource}/misc/0001-rt-i915.patch") |
| source+=( | ||
| "${_patchsource}/misc/0001-acpi-call.patch" | ||
| "${_patchsource}/misc/0001-handheld.patch" | ||
| ) |
| bore) ## Burst-Oriented Response Enhancer (BORE) scheduler | ||
| source+=("${_patchsource}/sched/0001-bore-cachy.patch");;& | ||
| bmq) ## Project C Scheduler | ||
| source+=("${_patchsource}/sched/0001-prjc-cachy.patch");; |
There was a problem hiding this comment.
The problem is that b2sums is below source array, and it can't be extended. So we either need to move b2sums to the same place as source array, but this will lead to more complicated checksum updating process.
There was a problem hiding this comment.
This has always been a problem and theres really not a good solution for this since u can't automate the checksums for the conditional source files. I say we just ignore this like we always have.
99e9b52 to
d0cd79a
Compare
d0cd79a to
7839ced
Compare
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>
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>
7839ced to
a52d2c6
Compare
|
Rebased |
Based on #941 changes, but with less drastic changes in PKGBUILD structure.
Closes #750
Closes #894