Compare commits
No commits in common. "c0b1f5989ff4317b16b1ac660ddfc79add3f17cc" and "522d12929b0a27488eff22ecf1be0013643625bd" have entirely different histories.
c0b1f5989f
...
522d12929b
6 changed files with 1 additions and 24 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -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"] }
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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<String> {
|
||||
return Vec::new();
|
||||
}
|
||||
|
||||
pub(crate) fn uid() -> u64 {
|
||||
return get_current_uid() as u64;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,6 @@ fn run_job(conf: &Config, job_id: String, job: Job) -> JobExitStatus {
|
|||
let mut cmd_args: Vec<String> = vec![
|
||||
"run".to_string(),
|
||||
"--rm".to_string(),
|
||||
format!("--user={}", job.uid),
|
||||
format!("--name={job_id}-{run_id}"),
|
||||
format!("--cpus={threads}"),
|
||||
format!("--privileged={}", job.privileged),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue