feat(kmod-nvidia): Use Alma functions (#8143)

This commit is contained in:
Gilver
2025-12-07 04:11:45 -06:00
committed by GitHub
parent e76893b41a
commit 8f44c92e53
3 changed files with 6 additions and 12 deletions
@@ -0,0 +1 @@
124.13.1
@@ -1 +1 @@
6.12.0-124.8.1el10_0
6.12.0
+4 -11
View File
@@ -8,17 +8,10 @@ if m == v {
}
// Rebuild the package whenever the Alma kernel updates
let releasever = labels.branch;
releasever.crop(2);
let majorminor = [];
for matches in find_all(`(${releasever}\.[\d]+)/`, get("https://repo.almalinux.org/almalinux/")) {
majorminor += matches[1].parse_float();
}
majorminor.dedup();
majorminor.sort();
let kver = find_all(`kernel-([\d.]+.*?)\.el.*?\.x86_64\.rpm`, get(`https://repo.almalinux.org/almalinux/${majorminor[majorminor.len()-1]}/BaseOS/x86_64/os/Packages/`));
kver.dedup();
open_file("anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt", "w").write(`${kver[kver.len - 1][1]}`);
let kver = bump::alma_vr("kernel", "BaseOS", labels.branch)[1];
let krel = bump::alma_vr("kernel", "BaseOS", labels.branch)[2];
open_file("anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt", "w").write(kver);
open_file("anda/system/nvidia/kmod-nvidia/RELEASE_kernel.txt", "w").write(krel);
let dir = sub(`/[^/]+$`, "", __script_path);
if sh("[[ `git status " + dir + " --porcelain` ]] && exit 1 || exit 0", #{}).ctx.rc == 1 {