Skip to content

Commit 10aff6f

Browse files
authored
Merge pull request #191 from justrach/release/0.4.12
release: v0.4.12 — add `kuri update`, and actually install kuri-mobile
2 parents 62c0ad0 + 32ffb6a commit 10aff6f

9 files changed

Lines changed: 457 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All notable changes to kuri are documented here.
44

5+
## [0.4.12] — 2026-07-25
6+
7+
A hotfix for two problems that made the *installed* product diverge from the built one.
8+
9+
### Fixes
10+
11+
- **The installer never installed `kuri-mobile`.** `install.sh` copied out `kuri`, `kuri-agent`, `kuri-fetch` and `kuri-browse` — but not `kuri-mobile`, which has shipped inside the release tarball since 0.4.6. Because `kuri android` and `kuri ios` exec it as a *sibling* binary, every install since then left those subcommands failing with `failed to exec 'kuri-mobile'` despite a successful-looking install. Four releases of mobile work were undeliverable through the documented install path
12+
13+
### Features
14+
15+
- **`kuri update`** (alias `kuri upgrade`). Previously the only way to upgrade was to remember an installer URL and pipe it to a shell; `kuri update` was simply an unknown argument. It reads the stable channel manifest, compares the published version against the one compiled in, and installs if they differ
16+
- `--check` reports what would happen and changes nothing
17+
- `--dir=<path>` overrides the destination; by default it installs next to the running binary, so an update replaces *this* install rather than creating a second one that may or may not win on PATH
18+
- The SHA-256 is verified **in process** rather than shelled out. `install.sh` tries `shasum`, then `sha256sum`, then `openssl`, and silently skips verification when none is present — a verification step that depends on what happens to be on PATH is one that can quietly not happen
19+
- Binaries are installed by writing a temp file beside the target and `rename`-ing over it. Copying onto a running executable fails with `ETXTBSY` on Linux and can corrupt a concurrently-executing image elsewhere; rename is atomic and leaves the running process on its old inode
20+
- `curl` is used purely as transport, deliberately: routing this through the in-tree TLS stack would let a TLS regression break the one command meant to repair it
21+
522
## [0.4.11] — 2026-07-25
623

724
### Fixes — kuri no longer takes over your machine

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .kuri,
3-
.version = "0.4.11",
3+
.version = "0.4.12",
44
.dependencies = .{
55
.quickjs = .{
66
.url = "https://github.com/mitchellh/zig-quickjs-ng/archive/main.tar.gz",

install.sh

100755100644
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ tar -xzf "$TMP/kuri.tar.gz" -C "$TMP"
7676
# ── Install binaries ──────────────────────────────────────────────────────────
7777
mkdir -p "$INSTALL_DIR"
7878

79-
BINS="kuri kuri-agent kuri-fetch kuri-browse"
79+
# kuri-mobile must be here: `kuri android`/`kuri ios` exec it as a *sibling*
80+
# binary, so omitting it leaves those subcommands failing with "failed to exec"
81+
# on an otherwise successful install. It shipped in the tarball from v0.4.6 but
82+
# was missing from this list until v0.4.12.
83+
BINS="kuri kuri-agent kuri-fetch kuri-browse kuri-mobile"
8084
INSTALLED=""
8185
for BIN in $BINS; do
8286
if [ -f "$TMP/$BIN" ]; then

kuri-mobile/build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .kuri_mobile,
3-
.version = "0.4.11",
3+
.version = "0.4.12",
44
.dependencies = .{},
55
.fingerprint = 0x41cfa5929f72d020,
66
.minimum_zig_version = "0.17.0-dev.813+2153f8143",

kuri-mobile/src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
5353
return;
5454
}
5555
if (std.mem.eql(u8, sub, "--version")) {
56-
try writeStdout("kuri-mobile 0.4.11\n");
56+
try writeStdout("kuri-mobile 0.4.12\n");
5757
return;
5858
}
5959

src/browse_main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const markdown = @import("crawler/markdown.zig");
44
const validator = @import("crawler/validator.zig");
55
const http_fetch = @import("util/http_fetch.zig");
66

7-
const version = "0.4.11";
7+
const version = "0.4.12";
88
const user_agent = "kuri-browse/" ++ version;
99

1010
pub fn main(init: std.process.Init.Minimal) !void {

src/fetch_main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const markdown = @import("crawler/markdown.zig");
55
const js_engine = @import("js_engine.zig");
66
const http_fetch = @import("util/http_fetch.zig");
77

8-
const version = "0.4.11";
8+
const version = "0.4.12";
99

1010
pub fn main(init: std.process.Init.Minimal) !void {
1111
var gpa_impl: std.heap.DebugAllocator(.{}) = .init;

src/main.zig

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ const Bridge = @import("bridge/bridge.zig").Bridge;
66
const launcher = @import("chrome/launcher.zig");
77
const api_token = @import("server/api_token.zig");
88
const lifecycle = @import("lifecycle.zig");
9+
const updater = @import("update.zig");
910

10-
const version = "0.4.11";
11+
const version = "0.4.12";
1112

1213
const CliAction = enum {
1314
run,
1415
help,
1516
version,
1617
mobile,
1718
token,
19+
update,
1820
};
1921

2022
pub fn main(init: std.process.Init.Minimal) !void {
@@ -57,6 +59,22 @@ pub fn main(init: std.process.Init.Minimal) !void {
5759
compat.writeToStdout("\n");
5860
return;
5961
},
62+
.update => {
63+
var opts: updater.Options = .{};
64+
for (args[2..]) |a| {
65+
if (std.mem.eql(u8, a, "--check")) {
66+
opts.check_only = true;
67+
} else if (std.mem.startsWith(u8, a, "--dir=")) {
68+
opts.dir = a["--dir=".len..];
69+
} else {
70+
printUnknownArgument(a);
71+
std.process.exit(1);
72+
}
73+
}
74+
const code = try updater.run(gpa, version, opts);
75+
if (code != 0) std.process.exit(code);
76+
return;
77+
},
6078
.run => {},
6179
}
6280

@@ -135,6 +153,13 @@ fn parseCliAction(args: []const []const u8) !CliAction {
135153
return .token;
136154
}
137155

156+
// `upgrade` is accepted too: it is what half of people type, and failing
157+
// an upgrade command over vocabulary is a poor way to meet a user who is
158+
// trying to get onto a newer version.
159+
if (std.mem.eql(u8, args[1], "update") or std.mem.eql(u8, args[1], "upgrade")) {
160+
return .update;
161+
}
162+
138163
return error.UnknownArgument;
139164
}
140165

@@ -189,6 +214,7 @@ fn printUsage() void {
189214
\\ kuri android <cmd> Drive Android devices (delegates to kuri-mobile)
190215
\\ kuri ios <cmd> Drive iOS sims/devices (delegates to kuri-mobile)
191216
\\ kuri token Print the API token (creates one if missing)
217+
\\ kuri update Update to the current release (--check to only report)
192218
\\ kuri -h, --help Show this help
193219
\\ kuri -V, --version Print version and exit
194220
\\
@@ -229,6 +255,11 @@ test "parseCliAction recognises token subcommand" {
229255
try std.testing.expectEqual(CliAction.token, try parseCliAction(&.{ "kuri", "token" }));
230256
}
231257

258+
test "parseCliAction recognises update and its upgrade alias" {
259+
try std.testing.expectEqual(CliAction.update, try parseCliAction(&.{ "kuri", "update" }));
260+
try std.testing.expectEqual(CliAction.update, try parseCliAction(&.{ "kuri", "upgrade" }));
261+
}
262+
232263
test "parseCliAction rejects unknown argument" {
233264
try std.testing.expectError(error.UnknownArgument, parseCliAction(&.{ "kuri", "--wat" }));
234265
}
@@ -262,4 +293,5 @@ test {
262293
_ = @import("storage/local.zig");
263294
_ = @import("storage/auth_profiles.zig");
264295
_ = @import("util/tls.zig");
296+
_ = @import("update.zig");
265297
}

0 commit comments

Comments
 (0)