diff --git a/Cargo.lock b/Cargo.lock index 2352608..e009b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -564,7 +564,6 @@ dependencies = [ "thiserror", "tokio", "toml", - "users", "uuid", ] @@ -1778,16 +1777,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "users" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" -dependencies = [ - "libc", - "log", -] - [[package]] name = "utf16_iter" version = "1.0.5" diff --git a/Cargo.toml b/Cargo.toml index 8696816..a91d93a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,5 +17,4 @@ sqlx = { version = "0.8.3", features = ["postgres", "runtime-tokio"] } thiserror = "2.0.11" tokio = { version = "1.43.0", features = ["full"] } toml = "0.8.19" -users = "0.11.0" uuid = { version = "1.11.0", features = ["v7", "fast-rng"] } diff --git a/README.md b/README.md index 0ad510e..daf7a92 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,6 @@ Once you've created your config, just run gregory with `gregory run` - that's it - Add multithreading - Add hook system -- Fix dependencies/running jobs -- update docs with uid ## Other stuff diff --git a/gregory.example.toml b/gregory.example.toml index 819639b..4c28e68 100644 --- a/gregory.example.toml +++ b/gregory.example.toml @@ -12,8 +12,7 @@ max-threads = 10 revision = "2" threads = 6 image = "docker.io/library/debian" - commands = ["echo hi", "sleep 2.432", "whoami"] - uid = 1000 + commands = ["echo hi", "sleep 2.432", "echo helloooooooooo"] volumes = ["librewolf"] [packages.librewolf.packaging.fedora] diff --git a/src/data.rs b/src/data.rs index 5cbb2a3..dd1d470 100644 --- a/src/data.rs +++ b/src/data.rs @@ -4,7 +4,6 @@ use crate::errors::Error; use serde::Deserialize; use std::time; use std::{collections::HashMap, fs, thread}; -use users::get_current_uid; /// The config for gregory #[derive(Debug, Clone, Deserialize)] @@ -75,8 +74,6 @@ pub(crate) struct Job { pub(crate) privileged: bool, #[serde(default = "shell")] pub(crate) shell: String, - #[serde(default = "uid")] - pub(crate) uid: u64, } /// Holds the data for a certain package's config @@ -174,7 +171,3 @@ pub(crate) fn data() -> String { pub(crate) fn dependencies() -> Vec { return Vec::new(); } - -pub(crate) fn uid() -> u64 { - return get_current_uid() as u64; -} diff --git a/src/main.rs b/src/main.rs index 978480f..2fc0eeb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,6 @@ fn run_job(conf: &Config, job_id: String, job: Job) -> JobExitStatus { let mut cmd_args: Vec = vec![ "run".to_string(), "--rm".to_string(), - format!("--user={}", job.uid), format!("--name={job_id}-{run_id}"), format!("--cpus={threads}"), format!("--privileged={}", job.privileged),