ALPHA: wire is a tool to deploy nixos systems wire.althaea.zone/

Compare changes

Choose any two refs to compare.

Changed files
+19 -6
crates
core
src
hive
steps
key_agent
+5
CHANGELOG.md
··· 7 7 8 8 ## [Unreleased] - yyyy-mm-dd 9 9 10 + ### Fixed 11 + 12 + - Fix a bug where key permissions where being printed in decimal format instead 13 + of octal. 14 + 10 15 ## [v1.1.1] - 2025-01-05 11 16 12 17 ### Fixed
+2 -2
crates/core/src/hive/steps/keys.rs
··· 108 108 } 109 109 } 110 110 111 - fn get_u32_permission(key: &Key) -> Result<u32, KeyError> { 111 + fn get_u32_unix_mode(key: &Key) -> Result<u32, KeyError> { 112 112 u32::from_str_radix(&key.permissions, 8).map_err(KeyError::ParseKeyPermissions) 113 113 } 114 114 ··· 170 170 .expect("Failed to convert usize buf length to i32"), 171 171 user: key.user.clone(), 172 172 group: key.group.clone(), 173 - permissions: get_u32_permission(key)?, 173 + unix_mode: get_u32_unix_mode(key)?, 174 174 destination: destination.into_os_string().into_string().unwrap(), 175 175 digest: Sha256::digest(&buf).to_vec(), 176 176 last: false,
+1 -1
crates/key_agent/src/keys.proto
··· 9 9 string destination = 1; 10 10 string user = 2; 11 11 string group = 3; 12 - uint32 permissions = 4; 12 + uint32 unix_mode = 4; 13 13 uint32 length = 5; 14 14 bool last = 6; 15 15 /// Sha256 digest
+3 -3
crates/key_agent/src/main.rs
··· 26 26 27 27 fn pretty_keyspec(spec: &KeySpec) -> String { 28 28 format!( 29 - "{} {}:{} {}", 30 - spec.destination, spec.user, spec.group, spec.permissions 29 + "{} {}:{} {:o}", 30 + spec.destination, spec.user, spec.group, spec.unix_mode 31 31 ) 32 32 } 33 33 ··· 68 68 let mut file = File::create(path).await?; 69 69 let mut permissions = file.metadata().await?.permissions(); 70 70 71 - permissions.set_mode(spec.permissions); 71 + permissions.set_mode(spec.unix_mode); 72 72 file.set_permissions(permissions).await?; 73 73 74 74 let user = User::from_name(&spec.user)?;
+8
garnix.yaml
··· 13 13 - packages.*.wire 14 14 - packages.*.wire-small 15 15 branch: stable 16 + # used to run garnix on an arbitrary commit in a throwaway branch 17 + - exclude: [] 18 + include: 19 + - packages.x86_64-linux.docs 20 + - packages.x86_64-linux.docs-unstable 21 + - packages.*.wire 22 + - packages.*.wire-small 23 + branch: arbitrary