From 1860cc5beb8df6e85d0f9690e5852709a534ebd7 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 11 Aug 2026 21:15:26 +0000 Subject: Make independent Hasher archive build portable --- profiles/alt-controller.profile | 2 +- src/main.rs | 5 ++++- 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())); -- cgit v1.2.3