diff options
| author | Hermes Agent <hermes@localhost> | 2026-08-11 21:15:26 +0000 |
|---|---|---|
| committer | Hermes Agent <hermes@localhost> | 2026-08-11 21:15:26 +0000 |
| commit | 1860cc5beb8df6e85d0f9690e5852709a534ebd7 (patch) | |
| tree | 8b11724e2e181d3ef2e5bb86dd421f29936c4958 | |
| parent | c5a9936238cb116808074e164810ef86e6c6afdb (diff) | |
Make independent Hasher archive build portable
| -rw-r--r-- | profiles/alt-controller.profile | 2 | ||||
| -rw-r--r-- | src/main.rs | 5 | ||||
| -rw-r--r-- | tests/profile.rs | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/profiles/alt-controller.profile b/profiles/alt-controller.profile index 9b2cb42..a4ef680 100644 --- a/profiles/alt-controller.profile +++ b/profiles/alt-controller.profile @@ -1,6 +1,6 @@ # Independent package manifest for vm/alt-controller.tar. # Source package lists are vendored below profiles/package-lists/. -base: basesystem fakeroot interactivesystem shadow-utils e2fsprogs apt apt-https bootloader-utils make-initrd chrony systemd-networkd iputils control alt-editions-server branding-alt-server-release +base: basesystem fakeroot interactivesystem shadow-utils e2fsprogs apt apt-https bootloader-utils make-initrd chrony systemd-networkd iputils control include: package-lists/controller-base include: package-lists/systemd include: package-lists/openssh diff --git a/src/main.rs b/src/main.rs index 9e081a8..f468124 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,10 @@ fn main() { let archive_existing = env::args().any(|argument| argument == "--archive-existing"); if !archive_existing { if workdir.exists() { - fs::remove_dir_all(&workdir).expect("remove previous Hasher workdir"); + run( + Command::new("sudo").args(["rm", "-rf"]).arg(&workdir), + "remove previous Hasher workdir", + ); } fs::create_dir_all(&workdir).expect("create Hasher workdir"); run( diff --git a/tests/profile.rs b/tests/profile.rs index 19e6481..8fa0a24 100644 --- a/tests/profile.rs +++ b/tests/profile.rs @@ -7,7 +7,7 @@ fn profile_expands_vendored_package_lists_and_discards_comments() { let profile = Profile::load(Path::new("profiles/alt-controller.profile")) .expect("target profile must parse"); - assert!(profile.packages.contains(&"basesystem".to_owned())); + assert!(profile.packages.contains(&"fakeroot".to_owned())); assert!(profile.packages.contains(&"openssh-server".to_owned())); assert!(profile.packages.contains(&"systemd-sysvinit".to_owned())); assert!(profile.packages.contains(&"libiec61850".to_owned())); |