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:
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:
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:
======= ======= ======= ======= ======= ======= ======= = openjdk_ 19+21_amd64/ snap/manifest. yaml \ openjdk_ 19+21_amd64/ snap/manifest. yaml started- at: '2022-05- 05T20:33: 55.570239Z' started- at: '2022-05- 05T22:24: 38.683744Z' timestamp: '2022-05- 05T20:22: 55Z' /launchpad. net/~jgneff/ +snap/snapcraft -openjdk- 4f34018c466452d f809721dd095d9a 4e/+build/ 1753738 timestamp: '2022-05- 05T21:51: 34Z' /launchpad. net/~jgneff/ +snap/snapcraft -openjdk- 4a22e98de08b515 d53b26d9d98a7e7 d4/+build/ 1753760 ======= ======= ======= ======= ======= ======= =
$ diff -r --no-dereference remote1/
remote2/
2c2
< snapcraft-
---
> snapcraft-
865,867c865,867
< build-request-id: lp-71105162
< build-request-
< build_url: https:/
---
> build-request-id: lp-71106341
> build-request-
> build_url: https:/
=======
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. :-)