Closed
Description
We currently have a reproducible qunit.js
release artifact.
It is byte-for-byte identical between what one can independently generate using npm run build
(release doc), and what we have published to the npm registry and on code.jquery.com CDN.
As a next step, I'd like for downstream tarball created by npm to also be reproducible, and for the verification process to be automated from a nighly Travis CI cronjob (e.g. build latest release tag, and compare against downloaded tarball).
Some pointers to get going:
- npm tarballs are available from the URL pattern
https://registry.npmjs.org/NAME/-/NAME-VERSION.tgz
such ashttps://registry.npmjs.org/oojs/-/oojs-5.0.0.tgz
for[email protected]
- Probably the only thing that might be non-deterministic is file timestamps and compression file order. However, I think both of these were already made deterministic by npm for other projects. I'm seeing all files consistenly have a timestamp in the year 1985, and the compression order appears to be consistently alphabetical. We just have to verify this, but otherwise probably nothing to do.
- See Travis CI - Cron jobs docs for setting up a nighly job.
- You can use
git tag --sort=v:refname --list '[0-9]*'
to find the latest tag, as sorted by SemVer. - diffoscope might be of use.
See also:
- Prior art at Make QUnit releases deterministic (reproducible builds) #1538.
- Related thread at improve colors of project badge jvm-repo-rebuild/reproducible-central#54.