+12
CHANGELOG.md
+12
CHANGELOG.md
···
7
8
## [Unreleased] - yyyy-mm-dd
9
10
+
### Fixed
11
+
12
+
- Fix a bug where key permissions where being printed in decimal format instead
13
+
of octal.
14
+
15
+
## [v1.1.1] - 2025-01-05
16
+
17
+
### Fixed
18
+
19
+
- Fix a bug where wire was attempting to SSH to the local machine when `buildOnTarget` &
20
+
`allowLocalDeployment` where true.
21
+
22
## [v1.1.0] - 2025-12-31
23
24
### Added
+3
-3
Cargo.lock
+3
-3
Cargo.lock
···
3157
3158
[[package]]
3159
name = "wire"
3160
-
version = "1.1.0"
3161
dependencies = [
3162
"clap",
3163
"clap-markdown",
···
3183
3184
[[package]]
3185
name = "wire-core"
3186
-
version = "1.1.0"
3187
dependencies = [
3188
"aho-corasick",
3189
"anyhow",
···
3222
3223
[[package]]
3224
name = "wire-key-agent"
3225
-
version = "1.1.0"
3226
dependencies = [
3227
"anyhow",
3228
"base64",
···
3157
3158
[[package]]
3159
name = "wire"
3160
+
version = "1.1.1"
3161
dependencies = [
3162
"clap",
3163
"clap-markdown",
···
3183
3184
[[package]]
3185
name = "wire-core"
3186
+
version = "1.1.1"
3187
dependencies = [
3188
"aho-corasick",
3189
"anyhow",
···
3222
3223
[[package]]
3224
name = "wire-key-agent"
3225
+
version = "1.1.1"
3226
dependencies = [
3227
"anyhow",
3228
"base64",
+1
-1
Cargo.toml
+1
-1
Cargo.toml
+1
-1
crates/core/src/commands/mod.rs
+1
-1
crates/core/src/commands/mod.rs
+3
-3
crates/core/src/hive/steps/activate.rs
+3
-3
crates/core/src/hive/steps/activate.rs
···
58
let child = run_command(
59
&CommandArguments::new(command_string, ctx.modifiers)
60
.mode(crate::commands::ChildOutputMode::Nix)
61
-
.on_target(if apply_objective.should_apply_locally {
62
None
63
} else {
64
Some(&ctx.node.target)
···
121
122
let child = run_command(
123
&CommandArguments::new(command_string, ctx.modifiers)
124
-
.on_target(if apply_objective.should_apply_locally {
125
None
126
} else {
127
Some(&ctx.node.target)
···
150
let reboot = run_command(
151
&CommandArguments::new("reboot now", ctx.modifiers)
152
.log_stdout()
153
-
.on_target(Some(&ctx.node.target))
154
.elevated(ctx.node),
155
)
156
.await?;
···
58
let child = run_command(
59
&CommandArguments::new(command_string, ctx.modifiers)
60
.mode(crate::commands::ChildOutputMode::Nix)
61
+
.execute_on_remote(if apply_objective.should_apply_locally {
62
None
63
} else {
64
Some(&ctx.node.target)
···
121
122
let child = run_command(
123
&CommandArguments::new(command_string, ctx.modifiers)
124
+
.execute_on_remote(if apply_objective.should_apply_locally {
125
None
126
} else {
127
Some(&ctx.node.target)
···
150
let reboot = run_command(
151
&CommandArguments::new("reboot now", ctx.modifiers)
152
.log_stdout()
153
+
.execute_on_remote(Some(&ctx.node.target))
154
.elevated(ctx.node),
155
)
156
.await?;
+2
-5
crates/core/src/hive/steps/build.rs
+2
-5
crates/core/src/hive/steps/build.rs
···
51
let status = run_command_with_env(
52
&CommandArguments::new(command_string, ctx.modifiers)
53
// build remotely if asked for AND we arent applying locally
54
-
//
55
-
// (building remotely but applying locally does not logically
56
-
// make any sense)
57
-
.on_target(
58
if ctx.node.build_remotely
59
&& let Objective::Apply(apply_objective) = ctx.objective
60
-
&& apply_objective.should_apply_locally
61
{
62
Some(&ctx.node.target)
63
} else {
···
51
let status = run_command_with_env(
52
&CommandArguments::new(command_string, ctx.modifiers)
53
// build remotely if asked for AND we arent applying locally
54
+
.execute_on_remote(
55
if ctx.node.build_remotely
56
&& let Objective::Apply(apply_objective) = ctx.objective
57
+
&& !apply_objective.should_apply_locally
58
{
59
Some(&ctx.node.target)
60
} else {
+3
-3
crates/core/src/hive/steps/keys.rs
+3
-3
crates/core/src/hive/steps/keys.rs
···
108
}
109
}
110
111
-
fn get_u32_permission(key: &Key) -> Result<u32, KeyError> {
112
u32::from_str_radix(&key.permissions, 8).map_err(KeyError::ParseKeyPermissions)
113
}
114
···
170
.expect("Failed to convert usize buf length to i32"),
171
user: key.user.clone(),
172
group: key.group.clone(),
173
-
permissions: get_u32_permission(key)?,
174
destination: destination.into_os_string().into_string().unwrap(),
175
digest: Sha256::digest(&buf).to_vec(),
176
last: false,
···
266
267
let mut child = run_command(
268
&CommandArguments::new(command_string, ctx.modifiers)
269
-
.on_target(if apply_objective.should_apply_locally {
270
None
271
} else {
272
Some(&ctx.node.target)
···
108
}
109
}
110
111
+
fn get_u32_unix_mode(key: &Key) -> Result<u32, KeyError> {
112
u32::from_str_radix(&key.permissions, 8).map_err(KeyError::ParseKeyPermissions)
113
}
114
···
170
.expect("Failed to convert usize buf length to i32"),
171
user: key.user.clone(),
172
group: key.group.clone(),
173
+
unix_mode: get_u32_unix_mode(key)?,
174
destination: destination.into_os_string().into_string().unwrap(),
175
digest: Sha256::digest(&buf).to_vec(),
176
last: false,
···
266
267
let mut child = run_command(
268
&CommandArguments::new(command_string, ctx.modifiers)
269
+
.execute_on_remote(if apply_objective.should_apply_locally {
270
None
271
} else {
272
Some(&ctx.node.target)
+3
crates/key_agent/Cargo.toml
+3
crates/key_agent/Cargo.toml
+1
-1
crates/key_agent/src/keys.proto
+1
-1
crates/key_agent/src/keys.proto
+3
-3
crates/key_agent/src/main.rs
+3
-3
crates/key_agent/src/main.rs
···
26
27
fn pretty_keyspec(spec: &KeySpec) -> String {
28
format!(
29
-
"{} {}:{} {}",
30
-
spec.destination, spec.user, spec.group, spec.permissions
31
)
32
}
33
···
68
let mut file = File::create(path).await?;
69
let mut permissions = file.metadata().await?.permissions();
70
71
-
permissions.set_mode(spec.permissions);
72
file.set_permissions(permissions).await?;
73
74
let user = User::from_name(&spec.user)?;
···
26
27
fn pretty_keyspec(spec: &KeySpec) -> String {
28
format!(
29
+
"{} {}:{} {:o}",
30
+
spec.destination, spec.user, spec.group, spec.unix_mode
31
)
32
}
33
···
68
let mut file = File::create(path).await?;
69
let mut permissions = file.metadata().await?.permissions();
70
71
+
permissions.set_mode(spec.unix_mode);
72
file.set_permissions(permissions).await?;
73
74
let user = User::from_name(&spec.user)?;
+1
-1
doc/guides/installation.md
+1
-1
doc/guides/installation.md
+1
-1
doc/package.json
+1
-1
doc/package.json
+1
-1
doc/snippets/guides/installation/flake.nix
+1
-1
doc/snippets/guides/installation/flake.nix
+22
-7
garnix.yaml
+22
-7
garnix.yaml
···
1
builds:
2
+
- exclude: []
3
+
include:
4
+
- packages.x86_64-linux.docs
5
+
- packages.x86_64-linux.docs-unstable
6
+
- packages.*.wire
7
+
- packages.*.wire-small
8
+
branch: trunk
9
+
- exclude: []
10
+
include:
11
+
- packages.x86_64-linux.docs
12
+
- packages.x86_64-linux.docs-unstable
13
+
- packages.*.wire
14
+
- packages.*.wire-small
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