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"