tangled
alpha
login
or
join now
althaea.zone
/
wire
ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
2
fork
atom
overview
issues
pulls
pipelines
Compare changes
Choose any two refs to compare.
base:
trunk
stable
rollback-hacking
push-mymqkymklvnm
push-mqrqqzmuuknv
mrshmllow/cargo-vm-tests
v1.1.1
v1.1.0
v1.0.0
v1.0.0-beta.0
v1.0.0-alpha.1
v1.0.0-alpha.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
compare:
trunk
stable
rollback-hacking
push-mymqkymklvnm
push-mqrqqzmuuknv
mrshmllow/cargo-vm-tests
v1.1.1
v1.1.0
v1.0.0
v1.0.0-beta.0
v1.0.0-alpha.1
v1.0.0-alpha.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
go
+33
-13
5 changed files
expand all
collapse all
unified
split
CHANGELOG.md
crates
core
src
hive
steps
keys.rs
key_agent
src
keys.proto
main.rs
garnix.yaml
+5
CHANGELOG.md
···
7
7
8
8
## [Unreleased] - yyyy-mm-dd
9
9
10
10
+
### Fixed
11
11
+
12
12
+
- Fix a bug where key permissions where being printed in decimal format instead
13
13
+
of octal.
14
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
111
-
fn get_u32_permission(key: &Key) -> Result<u32, KeyError> {
111
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
173
-
permissions: get_u32_permission(key)?,
173
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
12
-
uint32 permissions = 4;
12
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
29
-
"{} {}:{} {}",
30
30
-
spec.destination, spec.user, spec.group, spec.permissions
29
29
+
"{} {}:{} {:o}",
30
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
71
-
permissions.set_mode(spec.permissions);
71
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)?;
+22
-7
garnix.yaml
···
1
1
builds:
2
2
-
exclude: []
3
3
-
include:
4
4
-
- packages.x86_64-linux.docs
5
5
-
- packages.x86_64-linux.docs-unstable
6
6
-
- packages.*.wire
7
7
-
- packages.*.wire-small
8
8
-
branch: trunk
2
2
+
- exclude: []
3
3
+
include:
4
4
+
- packages.x86_64-linux.docs
5
5
+
- packages.x86_64-linux.docs-unstable
6
6
+
- packages.*.wire
7
7
+
- packages.*.wire-small
8
8
+
branch: trunk
9
9
+
- exclude: []
10
10
+
include:
11
11
+
- packages.x86_64-linux.docs
12
12
+
- packages.x86_64-linux.docs-unstable
13
13
+
- packages.*.wire
14
14
+
- packages.*.wire-small
15
15
+
branch: stable
16
16
+
# used to run garnix on an arbitrary commit in a throwaway branch
17
17
+
- exclude: []
18
18
+
include:
19
19
+
- packages.x86_64-linux.docs
20
20
+
- packages.x86_64-linux.docs-unstable
21
21
+
- packages.*.wire
22
22
+
- packages.*.wire-small
23
23
+
branch: arbitrary