Skip to content

0.9.0

Choose a tag to compare

@mariotaku mariotaku released this 18 Aug 02:42
· 3 commits to main since this release

A package that no TV will install, and a new exit code for it.

Files with no real timestamp

:x: Every file in this package is dated 1970-01-01, and TVs refuse to install a
package like this. Rebuild it from a source tree whose files have real timestamps.

org.rchalaaa.webos.custom-screensaver in apps-repo is the case that prompted this. Every one of its 67 data entries reads 1970-01-01; users on older firmware could not install it, and the report said nothing — the app is plain ES5 and passes every compatibility column. The youtube-webos-cobalt-adfree project hit the same wall on webOS 5.5.0: "the unmodified release IPK is rejected by this firmware", and repacking with non-epoch timestamps fixed it.

Scanning every package published in apps-repo turns up two more: com.github.gprot42.webosterminal and com.leondrolio.x.openttd.

The flag is raised only when every entry carries mtime 0. One stray epoch timestamp is an oddity; all of them means the packager stamped nothing, which is the shape firmware rejects. An mtime that will not parse is not counted, so a malformed header cannot raise it alone.

Where the packages come from

@webosose/ares-cli — the old package name, still on npm at 2.4.0 and not marked deprecated — produces this on Node.js 22 and later, on every platform:

Packager node-tar Node 18/20 Node 22/24
@webosose/ares-cli 2.2.0, 2.4.0 2.2.2 ok 1970-01-01
@webos-tools/cli 3.1.3 6.2.0 ok ok
@webos-tools/cli 3.2.5 7.5.13 ok ok
ares-cli-rs — ok ok

Node 22 moved the Date fields of fs.Stats to prototype getters, so they stopped being own properties. fstream copies a stat with Object.keys(props_).forEach(...) (reader.js:147), which now drops mtime — mode, uid and gid are unaffected, which is why only the timestamps go. node-tar 2 takes its header mtime from that props object and writes 0. node-tar 6 and 7 stat the file themselves and never consult it, so the successor package is unaffected while vendoring the same fstream.

Reproduced on both Windows and Linux, so it is a Node version thing rather than a platform one. All three affected packages in apps-repo were built outside CI, where nothing pins the Node version; every CI-built package in the repo is fine because those workflows still pin Node 14.

The fix for an affected project is to move off the old package name — @webos-tools/cli takes the same ares-package command.

Exit code 6

This is not an incompatibility. No choice of webosRelease makes such a package installable, so reporting it as one sends the submitter after the wrong fix — apps-repo would have read the all-:ok: table and told them to lower their declared release.

Code Meaning
6 The package is built in a way no TV will install.

Ranked above Incompatible (1) and below BadInput (3): a package the tool cannot read leaves the question unanswered, and a package no TV will install is a fault in the package rather than a question of which firmware it runs on.

Fixtures

No new fixture. hand_rolled.ipk is already written with mtime 0 so it stays byte-stable if rebuilt, which makes it the positive case here too; ares_packaged.ipk covers the negative. Its README now says the mtime is load-bearing.