Skip to content

Unify kernel flavors in one PKGBUILD - #944

Open
ventureoo wants to merge 19 commits into
masterfrom
ventureoo-unify-pkgbuild
Open

Unify kernel flavors in one PKGBUILD#944
ventureoo wants to merge 19 commits into
masterfrom
ventureoo-unify-pkgbuild

Conversation

@ventureoo

@ventureoo ventureoo commented Jul 23, 2026

Copy link
Copy Markdown
Member

Based on #941 changes, but with less drastic changes in PKGBUILD structure.

Closes #750
Closes #894

@ventureoo
ventureoo requested review from 1Naim, ptr1337 and sirlucjan July 23, 2026 17:54
@ventureoo
ventureoo force-pushed the ventureoo-unify-pkgbuild branch from 1ca0588 to 915689b Compare July 23, 2026 18:15

@1Naim 1Naim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread linux-cachyos/PKGBUILD Outdated
Comment thread linux-cachyos/PKGBUILD Outdated
Comment thread linux-cachyos/PKGBUILD Outdated
@ventureoo ventureoo changed the title [RFC} Unify kernel flavors in one PKGBUILD [RFC] Unify kernel flavors in one PKGBUILD Jul 24, 2026
@ventureoo
ventureoo force-pushed the ventureoo-unify-pkgbuild branch from d0cfe52 to 51b3f91 Compare July 24, 2026 09:30
@ventureoo
ventureoo requested a review from 1Naim July 24, 2026 09:31
@ventureoo
ventureoo force-pushed the ventureoo-unify-pkgbuild branch from 51b3f91 to 1ae7d7f Compare July 24, 2026 09:35
@ventureoo ventureoo changed the title [RFC] Unify kernel flavors in one PKGBUILD Unify kernel flavors in one PKGBUILD Jul 24, 2026
@ventureoo
ventureoo marked this pull request as ready for review July 24, 2026 09:43

@sirlucjan sirlucjan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, thanks.

@ptr1337

ptr1337 commented Jul 24, 2026

Copy link
Copy Markdown
Member

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.

@ventureoo

Copy link
Copy Markdown
Member Author

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.

In this case you just need to select cachyos flavor, which is used by default. It doesn't override any build options, so you can customize your build with environment variables as before.

@1Naim

1Naim commented Jul 24, 2026

Copy link
Copy Markdown
Member

In this case you just need to select cachyos flavor, which is used by default.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/PKGBUILD using a new _flavor preset mechanism and _package_suffix.
  • Updates packaging logic to use the appropriate strip tool (llvm-strip vs strip) 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.

Comment thread script.sh Outdated
Comment thread script-znver4.sh Outdated
Comment thread script-v3-v4.sh
Comment thread linux-cachyos/PKGBUILD Outdated
Comment thread .github/workflows/build.yml
ventureoo and others added 11 commits July 24, 2026 19:32
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>
@ventureoo
ventureoo force-pushed the ventureoo-unify-pkgbuild branch from 1ae7d7f to 87701dd Compare July 24, 2026 16:33
1Naim and others added 7 commits July 24, 2026 19:49
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>
@ventureoo
ventureoo force-pushed the ventureoo-unify-pkgbuild branch from fc20ff8 to c53f62e Compare July 24, 2026 16:50
@ventureoo

Copy link
Copy Markdown
Member Author

In this case you just need to select cachyos flavor, which is used by default.

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.

That's now possible with c53f62e

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Hardcoded GNU strip in _package-headers() fails on Clang builds due to fakeroot interference [BUG] Conflicting scheduler config for all kernels

5 participants