Skip to content

Conversation

@chewi
Copy link
Contributor

@chewi chewi commented Jan 9, 2026

Fix kernel-apply-patch.sh again for other branches

#3592 worked on main, but not on the other branches where hv-daemons-9999.ebuild still exists. The glob was matching more than one ebuild, causing the rename to fail.

This change ensures that the glob doesn't match 9999. It will fail if there is still more than one match, but that was the case originally. Bash isn't smart enough to determine the latest version accurately.

Finally, it won't run sed if the ebuild is a symlink because doing so would turn it into a regular file. We shouldn't put COREOS_SOURCE_REVISION in symlinked ebuilds.

How to use

You can probably run kernel-apply-patch.sh manually.

Testing done

I tested the changed snippet manually against main and an older branch. I also added other ebuild versions to verify the behaviour.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) -- N/A
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc. -- N/A

The previous fix worked on main, but not on the other branches where
hv-daemons-9999.ebuild still exists. The glob was matching more than one
ebuild, causing the rename to fail.

This change ensures that the glob doesn't match 9999. It will fail if
there is still more than one match, but that was the case originally.
Bash isn't smart enough to determine the latest version accurately.

Finally, it won't run sed if the ebuild is a symlink because doing so
would turn it into a regular file. We shouldn't put
COREOS_SOURCE_REVISION in symlinked ebuilds.

Signed-off-by: James Le Cuirot <[email protected]>
@chewi chewi self-assigned this Jan 9, 2026
@chewi chewi requested a review from a team as a code owner January 9, 2026 11:01
@tormath1
Copy link
Contributor

tormath1 commented Jan 9, 2026

Oh ok, so 9999 is the faulty version: so what about backporting this to maintenance branch: #3565 ?

@chewi
Copy link
Contributor Author

chewi commented Jan 9, 2026

I didn't want to backport the whole thing, but just backporting 3d1a2a4 wouldn't hurt. Happy to do that instead.

@tormath1
Copy link
Contributor

tormath1 commented Jan 9, 2026

I didn't want to backport the whole thing, but just backporting 3d1a2a4 wouldn't hurt. Happy to do that instead.

Your call on this, but if we dropped the live ebuild on main, I think it makes sense to backport the commit 3d1a2a4.
Otherwise, this line: git mv "${pkg}"-!(9999*).ebuild "${new}" won't be relevant in a few months (when main will be stable).

@chewi
Copy link
Contributor Author

chewi commented Jan 9, 2026

Okay, done that. 🤞

@chewi chewi closed this Jan 9, 2026
@tormath1
Copy link
Contributor

tormath1 commented Jan 9, 2026

Okay, done that. 🤞

Alright, it worked. :)

@chewi chewi deleted the chewi/really-fix-kernel-apply-patch branch January 9, 2026 15:03
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.

3 participants