The in-process tar library ran as the runner user, so archiving failed on
root-only files such as /etc/default/cacerts from ca-certificates-java
(regression #72), and extraction could skip root-owned paths without failing.
- Create and extract with sudo tar; the file list is piped NUL-separated on
stdin so large packages don't exceed the argument size limit.
- Keep directory symlinks such as /lib on extract.
- Hand archives back to the runner user for the cache save.
- Disable the command timeout for tar and maintainer scripts.
- Record the installed (versioned) entries in manifest_main.json; it held
unversioned names with no files.
- Return every installed package on a cache hit so outputs include deps.
- Split runInstallScripts into per-script runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
package-version-list held every installed package and both outputs were
identical. Outputs also carried arch suffixes inconsistently and followed
install order.
- package-version-list lists only requested packages; all-package-version-list
lists every installed package.
- Entries are name=version, with :arch only for packages installed for a
non-native architecture (e.g. libc6:i386), so native output matches v1.
- Entries are sorted with PackageName.compareTo.
- Requested packages are matched by name, and by arch when both specify one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every job in a run uploaded capa_artifacts-<run id>, so only the first
upload succeeded. Add the run attempt, job and step IDs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On runners with aria2 installed, ts-apt uses apt-fast and spawns
scripts/dist/apt-fast.sh relative to its own module. Bundling moved that
module, so the action failed with "spawn .../scripts/dist/apt-fast.sh
ENOENT".
Write the bundle to dist/action/index.js and copy ts-apt's scripts/dist
to dist/scripts/dist, which is where ts-apt looks from there. Point
action.yml at the new entrypoint and include both in the action bundle
artifact. Workflow artifacts drop file modes, so the action marks the
script executable at startup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Instruments opened its log files at the relative path cache-apt-pkgs/
before that directory existed, so the action crashed at startup with
ENOENT. It also pointed artifact uploads there while Cache uses
~/cache-apt-pkgs. Resolve both with a shared resolveCacheDir helper and
create the directory before opening the logs.
The artifact upload was also never awaited, so a failed upload became an
unhandled rejection. Await it and report failures as a warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Manifest.from built every entry with an empty file list and buildFileList
was never called, so tar.create was handed no paths. node-tar throws "no
paths specified to add to archive" for that, so every cache miss failed
before saving.
The runner now builds each manifest entry from buildFileList and passes
the manifest to archiveAndSave. Packages with no files (e.g.
metapackages) are skipped on archive and on restore since tar can't
create an empty archive. Manifest.from is removed.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Restore extracted archives sorted by filename, so packages whose install
scripts depend on files from other packages could break. Restore now
follows the entry order in manifest_all.json, which comes from the apt
install output, and fails explicitly when an archive is missing.
Refs #196
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Pull dev upstream to staging. (#112)
* Use awk to enclose filename in single quotes tar #99
* Add null field separator so filenames don't get broken up.
* Move upload logs up in the action sequence so it captures data before it gets deleted.
* Fix awk (#109)
---------
Co-authored-by: sn-o-w <cristian.silaghi@mozilla.ro>
* Fix awk delimiter.
Pull in fix by @sn-o-w in d0ee83b497 mentioned in issue #99
* Swap out Bash based APT query logic for Golang version. (#117)
* First version of a Golang version of command handling in general. (#118)
---------
Co-authored-by: sn-o-w <cristian.silaghi@mozilla.ro>