From 8456aa4e4b1a6b88a2a5ba7ede784f821a0cdf53 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Fri, 21 Jun 2024 16:57:48 +0300 Subject: [PATCH] use dnf for description + add cachyos-addons + enable multipackage --- data/db_kernel_cachy.json | 26 +++++++++++-- data/scripts/core | Bin 10530816 -> 10530816 bytes data/scripts/generate_package_info.sh | 11 ++++++ data/scripts/get_version.sh | 3 -- src/build_ui/mod.rs | 12 ++++-- src/content/mod.rs | 46 +++++++++------------- src/kernel_pkg/mod.rs | 50 ++++++++++++++---------- src/main.rs | 2 +- src/sched_ext/mod.rs | 53 ++++++++++++++++---------- 9 files changed, 121 insertions(+), 82 deletions(-) create mode 100755 data/scripts/generate_package_info.sh delete mode 100755 data/scripts/get_version.sh diff --git a/data/db_kernel_cachy.json b/data/db_kernel_cachy.json index 4493119..515bb21 100644 --- a/data/db_kernel_cachy.json +++ b/data/db_kernel_cachy.json @@ -3,15 +3,33 @@ "kernels": [ { "name": "CachyOS Default Kernel", - "package": "kernel-cachyos", - "description": "CachyOS Kernel with default scheduler.", + "main_package": "kernel-cachyos", + "packages": "kernel-cachyos kernel-cachyos-devel-matched", "min_x86_march": "3" }, { "name": "CachyOS LTS Kernel", - "package": "kernel-cachyos-lts", - "description": "CachyOS Long Term Support Kernel.", + "main_package": "kernel-cachyos-lts", + "packages": "kernel-cachyos kernel-cachyos-devel-matched", "min_x86_march": "2" + }, + { + "name": "UKSMD Daemon", + "main_package": "uksmd", + "packages": "uksmd", + "min_x86_march": "1" + }, + { + "name": "CachyOS-Settings", + "main_package": "cachyos-settings", + "packages": "cachyos-settings", + "min_x86_march": "1" + }, + { + "name": "Ananicy-CPP", + "main_package": "ananicy-cpp", + "packages": "ananicy-cpp", + "min_x86_march": "1" } ] } \ No newline at end of file diff --git a/data/scripts/core b/data/scripts/core index 8e9e31e48c1bb80dc1b0ad7629f62fadb9a7492d..5b28f813bb89c1508e1932bb1f2bfa3fcad1e499 100644 GIT binary patch del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YqC6Co9D+fzQ=*rg3G`l_$a7$L8;on2UHVD?^x3RPyfT`Dv z*Lfzco?PXvuUuVKQQ5F|UA=cr#X3)YRaHg&jwxoLC99&Uax!~psyWQ=r5s-N%v5uH z)+CQ-68mVXxx!Xabq$+5jZRE_ { -// - // )); - // } - // _ => { - - // } - // - - - let kernel_branch_expander_row_boxedlist = gtk::ListBox::builder() .selection_mode(SelectionMode::None) .hexpand(true) @@ -167,8 +154,9 @@ pub fn content( .build(); config_kernel_button.add_css_class("circular"); - if ! is_scx_kernel() { - config_kernel_button.set_tooltip_text(Some("Currently running kernel doesn't support Sched-EXT")); + if !is_scx_kernel() { + config_kernel_button + .set_tooltip_text(Some("Currently running kernel doesn't support Sched-EXT")); } config_kernel_button.connect_clicked(clone!(@weak content_stack, @weak window => move |_| { @@ -385,28 +373,28 @@ pub fn create_kernel_badge( fn get_kernel_branches() -> Result, reqwest::Error> { let mut kernel_branches_array: Vec = Vec::new(); - let data = fs::read_to_string( - "/usr/lib/fedora-kernel-manager/kernel_branches.json", - ) - .expect("Unable to read file"); + let data = fs::read_to_string("/usr/lib/fedora-kernel-manager/kernel_branches.json") + .expect("Unable to read file"); let res: serde_json::Value = serde_json::from_str(&data).expect("Unable to parse"); if let serde_json::Value::Array(branches) = &res["branches"] { for branch in branches { let branch_name = branch["name"].as_str().to_owned().unwrap().to_string(); let branch_db_url = branch["db_url"].as_str().to_owned().unwrap().to_string(); - let branch_init_script = branch["init_script"].as_str().to_owned().unwrap().to_string(); - println!( - "Downloading & Parsing package DB for {}.", - &branch_name - ); - let branch_db = reqwest::blocking::get( - branch["db_url"].as_str().to_owned().unwrap().to_string(), - )?.text().unwrap(); + let branch_init_script = branch["init_script"] + .as_str() + .to_owned() + .unwrap() + .to_string(); + println!("Downloading & Parsing package DB for {}.", &branch_name); + let branch_db = + reqwest::blocking::get(branch["db_url"].as_str().to_owned().unwrap().to_string())? + .text() + .unwrap(); let branch = KernelBranch { name: branch_name, db_url: branch_db_url, init_script: branch_init_script, - db: branch_db + db: branch_db, }; println!("Download Complete!"); println!("Running {} init script.", &branch.name); diff --git a/src/kernel_pkg/mod.rs b/src/kernel_pkg/mod.rs index f547457..66ac133 100644 --- a/src/kernel_pkg/mod.rs +++ b/src/kernel_pkg/mod.rs @@ -148,26 +148,36 @@ fn add_package_rows( if let serde_json::Value::Array(kernels) = &res["kernels"] { for kernel in kernels { let kernel_name = kernel["name"].as_str().to_owned().unwrap().to_string(); - let kernel_package = kernel["package"].as_str().to_owned().unwrap().to_string(); - let kernel_description = kernel["description"] + let kernel_main_package = kernel["main_package"] .as_str() .to_owned() .unwrap() .to_string(); + let kernel_packages = kernel["packages"].as_str().to_owned().unwrap().to_string(); let kernel_min_x86_march = kernel["min_x86_march"] .as_str() .to_owned() .unwrap() .parse::() .unwrap(); - let kernel_package_version = - match Command::new("/usr/lib/fedora-kernel-manager/scripts/get_version.sh") - .args([&kernel_package]) - .output() - { - Ok(t) => String::from_utf8(t.stdout).unwrap(), - _ => "Error".to_owned(), - }; + let kernel_package_version = match Command::new( + "/usr/lib/fedora-kernel-manager/scripts/generate_package_info.sh", + ) + .args(["description", &kernel_main_package]) + .output() + { + Ok(t) => String::from_utf8(t.stdout).unwrap(), + _ => "Error".to_owned(), + }; + let kernel_description = match Command::new( + "/usr/lib/fedora-kernel-manager/scripts/generate_package_info.sh", + ) + .args(["description", &kernel_main_package]) + .output() + { + Ok(t) => String::from_utf8(t.stdout).unwrap(), + _ => "Error".to_owned(), + }; let (log_loop_sender, log_loop_receiver) = async_channel::unbounded(); let log_loop_sender: async_channel::Sender = log_loop_sender.clone(); @@ -181,11 +191,11 @@ fn add_package_rows( let kernel_status_loop_sender: async_channel::Sender = kernel_status_loop_sender.clone(); - let kernel_package_clone0 = kernel_package.clone(); + let kernel_main_package_clone0 = kernel_main_package.clone(); std::thread::spawn(move || loop { let command_installed_status = Command::new("rpm") - .args(["-q", &kernel_package_clone0]) + .args(["-q", &kernel_main_package_clone0]) .output() .unwrap(); if command_installed_status.status.success() { @@ -200,10 +210,10 @@ fn add_package_rows( std::thread::sleep(Duration::from_secs(6)); }); - let kernel_package_clone0 = kernel_package.clone(); + let kernel_main_package_clone0 = kernel_main_package.clone(); let kernel_expander_row = kernel_package_row::KernelPackageRow::new(); - kernel_expander_row.set_package(kernel_package_clone0); + kernel_expander_row.set_package(kernel_main_package_clone0); let kernel_status_icon = gtk::Image::builder() .icon_name("emblem-default") .pixel_size(24) @@ -329,7 +339,7 @@ fn add_package_rows( } })); // - kernel_install_button.connect_clicked(clone!(@weak kernel_install_log_terminal,@weak kernel_install_log_terminal_buffer, @weak kernel_install_dialog, @strong log_loop_sender, @strong log_status_loop_sender, @strong kernel_package => move |_| { + kernel_install_button.connect_clicked(clone!(@weak kernel_install_log_terminal,@weak kernel_install_log_terminal_buffer, @weak kernel_install_dialog, @strong log_loop_sender, @strong log_status_loop_sender, @strong kernel_packages => move |_| { kernel_install_log_terminal_buffer.delete(&mut kernel_install_log_terminal_buffer.bounds().0, &mut kernel_install_log_terminal_buffer.bounds().1); kernel_install_dialog.set_response_enabled("kernel_install_dialog_ok", false); kernel_install_dialog.set_response_enabled("kernel_install_dialog_reboot", false); @@ -344,9 +354,9 @@ fn add_package_rows( }); let log_status_loop_sender_clone = log_status_loop_sender.clone(); let log_loop_sender_clone= log_loop_sender.clone(); - let kernel_package_clone = kernel_package.clone(); + let kernel_packages_clone = kernel_packages.clone(); std::thread::spawn(move || { - let command = kernel_modify(log_loop_sender_clone, &kernel_package_clone); + let command = kernel_modify(log_loop_sender_clone, &kernel_packages_clone); match command { Ok(_) => { println!("Status: kernel modify Successful"); @@ -359,7 +369,7 @@ fn add_package_rows( } }); })); - kernel_remove_button.connect_clicked(clone!(@weak kernel_install_log_terminal,@weak kernel_install_log_terminal_buffer, @weak kernel_install_dialog, @strong log_loop_sender, @strong log_status_loop_sender, @strong kernel_package => move |_| { + kernel_remove_button.connect_clicked(clone!(@weak kernel_install_log_terminal,@weak kernel_install_log_terminal_buffer, @weak kernel_install_dialog, @strong log_loop_sender, @strong log_status_loop_sender, @strong kernel_packages => move |_| { kernel_install_log_terminal_buffer.delete(&mut kernel_install_log_terminal_buffer.bounds().0, &mut kernel_install_log_terminal_buffer.bounds().1); kernel_install_dialog.set_response_enabled("kernel_install_dialog_ok", false); kernel_install_dialog.set_response_enabled("kernel_install_dialog_reboot", false); @@ -374,9 +384,9 @@ fn add_package_rows( }); let log_status_loop_sender_clone = log_status_loop_sender.clone(); let log_loop_sender_clone= log_loop_sender.clone(); - let kernel_package_clone = kernel_package.clone(); + let kernel_packages_clone = kernel_packages.clone(); std::thread::spawn(move || { - let command = kernel_modify(log_loop_sender_clone, &kernel_package_clone); + let command = kernel_modify(log_loop_sender_clone, &kernel_packages_clone); match command { Ok(_) => { println!("Status: kernel modify Successful"); diff --git a/src/main.rs b/src/main.rs index 891bd97..abcf0fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ struct KernelBranch { name: String, db_url: String, db: String, - init_script: String + init_script: String, } fn main() -> glib::ExitCode { diff --git a/src/sched_ext/mod.rs b/src/sched_ext/mod.rs index f443680..da16391 100644 --- a/src/sched_ext/mod.rs +++ b/src/sched_ext/mod.rs @@ -1,19 +1,19 @@ use crate::content::get_running_kernel_info; use crate::{KernelBranch, RunningKernelInfo}; use adw::prelude::*; +use duct::cmd; use glib::*; use gtk::prelude::*; +use gtk::AccessibleRole::Command; use gtk::*; -use std::{fs, io, thread}; use std::cell::RefCell; use std::fs::*; use std::process::Stdio; use std::rc::Rc; use std::time::Duration; -use duct::cmd; -use gtk::AccessibleRole::Command; +use std::{fs, io, thread}; -pub fn sched_ext_page(content_stack: >k::Stack, window: &adw::ApplicationWindow,) -> gtk::Box { +pub fn sched_ext_page(content_stack: >k::Stack, window: &adw::ApplicationWindow) -> gtk::Box { let main_box = gtk::Box::builder() .hexpand(true) .vexpand(true) @@ -70,16 +70,16 @@ pub fn sched_ext_page(content_stack: >k::Stack, window: &adw::ApplicationWindo .transient_for(window) .hide_on_close(true) .build(); - cmd_status_dialog.add_response( - "cmd_status_dialog_ok", - "Ok", - ); + cmd_status_dialog.add_response("cmd_status_dialog_ok", "Ok"); let scx_sched_expander_row = adw::ExpanderRow::builder() .subtitle("Select Sched-EXT Scheduler") .build(); - scx_sched_expander_row.add_row(&scx_sched_expandable(&scx_sched_expander_row, &selected_scx_sched)); + scx_sched_expander_row.add_row(&scx_sched_expandable( + &scx_sched_expander_row, + &selected_scx_sched, + )); let scx_sched_expander_row_boxedlist = gtk::ListBox::builder() .selection_mode(SelectionMode::None) @@ -205,8 +205,10 @@ fn create_current_sched_badge( )); } -fn scx_sched_expandable(expander_row: &adw::ExpanderRow, - selected_scx_sched: &Rc>) -> gtk::ListBox { +fn scx_sched_expandable( + expander_row: &adw::ExpanderRow, + selected_scx_sched: &Rc>, +) -> gtk::ListBox { let searchbar = gtk::SearchEntry::builder().search_delay(500).build(); searchbar.add_css_class("round-border-only-top"); @@ -225,9 +227,7 @@ fn scx_sched_expandable(expander_row: &adw::ExpanderRow, .label("No branch selected") .build(); - let data = fs::read_to_string( - "/usr/lib/fedora-kernel-manager/scx_scheds.json", - ) + let data = fs::read_to_string("/usr/lib/fedora-kernel-manager/scx_scheds.json") .expect("Unable to read file"); let res: serde_json::Value = serde_json::from_str(&data).expect("Unable to parse"); if let serde_json::Value::Array(scheds) = &res["scx_schedulers"] { @@ -249,7 +249,7 @@ fn scx_sched_expandable(expander_row: &adw::ExpanderRow, clone!(@weak sched_checkbutton, @weak expander_row, @strong selected_scx_sched => move |_| { if sched_checkbutton.is_active() == true { expander_row.set_title(&branch_row.title()); - *selected_scx_sched.borrow_mut() = sched.to_string();; + *selected_scx_sched.borrow_mut() = sched.to_string(); } }), ); @@ -302,12 +302,23 @@ fn get_current_scx_scheduler() -> String { scx_sched } -fn change_scx_scheduler(scx_sched: &str, - badge_box: >k::Box, - kernel_badges_size_group: >k::SizeGroup, - kernel_badges_size_group0: >k::SizeGroup, - kernel_badges_size_group1: >k::SizeGroup,) -> Result<(), io::Error> { - cmd!("pkexec", "bash", "-c", format!("/usr/lib/fedora-kernel-manager/scripts/scripts/change_scx.sh {}", scx_sched)).run()?; +fn change_scx_scheduler( + scx_sched: &str, + badge_box: >k::Box, + kernel_badges_size_group: >k::SizeGroup, + kernel_badges_size_group0: >k::SizeGroup, + kernel_badges_size_group1: >k::SizeGroup, +) -> Result<(), io::Error> { + cmd!( + "pkexec", + "bash", + "-c", + format!( + "/usr/lib/fedora-kernel-manager/scripts/scripts/change_scx.sh {}", + scx_sched + ) + ) + .run()?; create_current_sched_badge( &badge_box, &get_running_kernel_info(),