Commit 5446018
kpatch-build: fix Fedora 42+ kernel source directory nesting
Starting with Fedora 42, the kernel SRPM unpacks with an extra level
of nesting:
BUILD/kernel-6.14.0-build/kernel-6.14/linux-6.14.0-63.fc42.x86_64/
The existing glob BUILD/kernel-*/linux-* only matches one level deep
and fails with "cannot stat" on this layout.
Try the traditional flat glob first for backward compatibility. If it
fails, fall back to a recursive find (up to 4 levels) to locate the
linux-* source directory regardless of nesting depth.
Tested on Fedora 42 with kernel 6.14.0-63.fc42.x86_64.
Signed-off-by: Or Shoval <oshoval@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 7552b46 commit 5446018
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | | - | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1086 | 1094 | | |
1087 | 1095 | | |
1088 | 1096 | | |
| |||
0 commit comments