From a4ae3d6f585f6bb99c72019fadc43424d9615813 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Mon, 24 Jun 2024 03:28:22 +0300 Subject: [PATCH] add normal fedora kernels --- data/db_kernel.json | 11 +++++++++++ data/kernel_branches/kernel.json | 5 +++++ src/content/mod.rs | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 data/db_kernel.json create mode 100644 data/kernel_branches/kernel.json diff --git a/data/db_kernel.json b/data/db_kernel.json new file mode 100644 index 0000000..8e63a80 --- /dev/null +++ b/data/db_kernel.json @@ -0,0 +1,11 @@ +{ + "latest_kernel_version_deter_pkg": "kernel", + "kernels": [ + { + "name": "Default Kernel", + "main_package": "kernel", + "packages": "kernel kernel-devel-matched", + "min_x86_march": "1" + } + ] +} \ No newline at end of file diff --git a/data/kernel_branches/kernel.json b/data/kernel_branches/kernel.json new file mode 100644 index 0000000..296c898 --- /dev/null +++ b/data/kernel_branches/kernel.json @@ -0,0 +1,5 @@ +{ + "name": "kernel (RPM Default)", + "db_url": "https://raw.githubusercontent.com/CosmicFusion/fedora-kernel-manager/main/data/db_kernel.json", + "init_script": "true" +} \ No newline at end of file diff --git a/src/content/mod.rs b/src/content/mod.rs index 79648b1..837f322 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -511,7 +511,7 @@ fn create_kernel_badges( .args(["version", &kernel_version_deter]) .output() { - Ok(t) => String::from_utf8(t.stdout).unwrap().trim(), + Ok(t) => String::from_utf8(t.stdout).unwrap().trim().to_owned(), _ => "0.0.0".to_owned(), }; @@ -535,7 +535,7 @@ fn create_kernel_badges( )); badge_box.append(&create_kernel_badge( &t!("kernel_badge_latest_version_label").to_string(), - kernel_version, + &kernel_version, "background-accent-bg", &kernel_badges_size_group, &kernel_badges_size_group0,