-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for reproducible builds #38
Conversation
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
Since we are here, is there a change we can make in https://github.com/opensearch-project/OpenSearch Gradle plugin plugin to avoid having to put this in every plugin implementation? |
The main project already has it in the main build.gradle and is inherited in the plugins/build.gradle. Is that what you refer to? |
This PR (into a plugin) adds |
OK from what I understand there are 3 (4 with optional) places were we can the reproducible fixes
For number 3 I think you are saying there's another way to do it but I don't know where would that be. Please point me to the right direction and I'm happy to give it a go. |
@inglor precisely I believe that plugins can inherit these options by including |
Hey @inglor so there are some common custom gradle plugins that is being used by all OpenSearch plugins, so all the common logic need not be re-written inside all OpenSearch plugins gradle code. Example 1: opensearch.opensearchplugin Example 2: opensearch.pluginzip So the ask is if its possible to add the reproducible build logic into one of these custom gradle plugins, so that it need not be added manually to each and every plugin (like done for AD opensearch-project/anomaly-detection#579) |
Something like modifying |
@prudhvigodithi I guess something as simple as this could work:
|
@inglor so are we proceeding with this branch or do you want me to close it? |
Didn't have much time to test this properly. If you think my patch would work as is then I can raise a PR against OpenSearch project tomorrow or the day after. Kinda busy the next days so I recon I might have more time next week for more testing. |
No rush, test when you have time. |
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
@AmiStrn opened a PR for the OpenSearch gradle plugin. Just to confirm my understanding, once that one is merged then from the next release and after any plugin is going to be using that, right? I'm just not sure when the gradle plugin is published to maven repo so it can be used from other projects. |
If I may hop in :) |
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
Yes, that's what I was after. So this PR will no longer be necessary. @inglor Let's confirm when that works and close this without merging? |
Covered by opensearch-project/OpenSearch#4746 |
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> (cherry picked from commit e44158d)
As per gradle [docs] add support to remove timestamps and package with same order which is required from [reproducible] builds This is a result of the discussion in opensearch-project/opensearch-plugin-template-java#38 to apply for all plugins going forward. [docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives [reproducible]: https://reproducible-builds.org/ Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org> Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> (cherry picked from commit e44158d)
Description
As per gradle docs add support to remove timestamps and package with same order which is required from reproducible builds
Issues Resolved
As per the suggestion in the
opensearch-project/anomaly-detection
PR 579By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.