From f9e68d9576b53ae769fa564cd13a72544dd6979b Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 11 Sep 2026 21:04:50 -0400 Subject: [PATCH] easel: pack on the box that actually packs, and serve the file the updater reads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two faults, both found by fetching the URLs after deploying rather than assuming them. `--no-mac-metadata` is BSD tar. lith runs GNU tar, which does not merely ignore the flag — it refuses the whole command, so the deploy's pack step died and prompt.ac/easel.tar.gz answered 404 while easel.sh sat there ready to download it. The flag is probed now rather than chosen by platform, because the tar in PATH is the thing that matters and it is not always the one the platform implies. And the Caddy route listed /easel.sh and /easel.tar.gz but not /easel.json, so the manifest every installed Easel fetches once a day to decide whether it is behind fell through to lith's resolver and came back "File type not allowed". An updater that cannot read a version never updates, and never says why. Co-Authored-By: Claude Opus 5 (1M context) --- easel/bin/pack.mjs | 15 +++++++++++---- lith/Caddyfile | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/easel/bin/pack.mjs b/easel/bin/pack.mjs index 561144a479..340b858e54 100755 --- a/easel/bin/pack.mjs +++ b/easel/bin/pack.mjs @@ -42,11 +42,18 @@ for (const entry of INCLUDE) { } mkdirSync(dirname(OUT), { recursive: true }); -// --no-mac-metadata and a fixed mtime keep the tarball byte-stable across -// machines, so a rebuild that changed nothing does not look like a new release. +// BSD tar (macOS) understands --no-mac-metadata; GNU tar (the box this actually +// packs on) does not and refuses the whole command. Probe once rather than +// branching on platform, since the tar in PATH is the thing that matters and it +// is not always the one the platform implies. +let extraFlags = []; +try { + execFileSync("tar", ["--no-mac-metadata", "--version"], { stdio: "ignore" }); + extraFlags = ["--no-mac-metadata", "--no-xattrs"]; +} catch {} + execFileSync("tar", [ - "--no-mac-metadata", - "--no-xattrs", + ...extraFlags, "-czf", OUT, "-C", EASEL, ...INCLUDE, diff --git a/lith/Caddyfile b/lith/Caddyfile index 47f6d982d4..d85706da4e 100644 --- a/lith/Caddyfile +++ b/lith/Caddyfile @@ -736,12 +736,13 @@ # install line is read aloud and typed by hand more often than it is copied. @easel_install { host prompt.ac aesthetic.computer - path /easel.sh /easel.tar.gz + path /easel.sh /easel.tar.gz /easel.json } handle @easel_install { root * /opt/ac/system/public header /easel.sh Content-Type "text/plain; charset=utf-8" header /easel.tar.gz Content-Type "application/gzip" + header /easel.json Content-Type "application/json" # A stale installer is worse than a slow one: it points at a tarball # that may no longer be there. header Cache-Control "public, max-age=300" -- 2.51.2