Comment 6 for bug 1890046

Revision history for this message
John Neffenger (jgneff) wrote :

The build of the OpenJDK Snap package is entirely reproducible except for the timestamps identified by this bug report and the 'snap/manifest.yaml' file added by Launchpad.

I'll attach the file 'openjdk.html' showing the difference in the timestamps in the "SQUASHFS 4:0 superblock" and the timestamps of some of the files. It was created by 'diffoscope' when comparing two locally-built OpenJDK Snap packages.

The only other difference is in the manifest file added by Launchpad when building remotely:

==================================================
$ diff -r --no-dereference remote1/openjdk_19+21_amd64/snap/manifest.yaml \
    remote2/openjdk_19+21_amd64/snap/manifest.yaml
2c2
< snapcraft-started-at: '2022-05-05T20:33:55.570239Z'
---
> snapcraft-started-at: '2022-05-05T22:24:38.683744Z'
865,867c865,867
< build-request-id: lp-71105162
< build-request-timestamp: '2022-05-05T20:22:55Z'
< build_url: https://launchpad.net/~jgneff/+snap/snapcraft-openjdk-4f34018c466452df809721dd095d9a4e/+build/1753738
---
> build-request-id: lp-71106341
> build-request-timestamp: '2022-05-05T21:51:34Z'
> build_url: https://launchpad.net/~jgneff/+snap/snapcraft-openjdk-4a22e98de08b515d53b26d9d98a7e7d4/+build/1753760
==================================================

To fully support reproducible builds even for snaps built on Launchpad, it seems we'll need some way to pass in the 'SOURCE_DATE_EPOCH' variable to the Launchpad build environment, or let Launchpad pick some fixed instant. The 'jdk' part of my Snap package adds the environment variable in the 'override-build' scriptlet, but I don't see any way to set it for the 'snap pack' command. See:

https://github.com/jgneff/openjdk/blob/edge/snap/snapcraft.yaml#L123

I realize we'll likely need a separate Launchpad bug report, but I just thought I might show how close we are to having fully reproducible builds. :-)