Skip to content
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 Windows Reproducible Build From SBOM Scripts #3673

Merged
merged 9 commits into from
Mar 4, 2024

Conversation

steelhead31
Copy link
Contributor

@steelhead31 steelhead31 commented Feb 28, 2024

Fixes #3426 

This is the PR for the initial version of the windows reproducible build script, it covers these 5 tasks which were required to make this function correctly.

  1. Add initial version of win repro script
  2. Make reproducible scripts less noisy
  3. Add reproducible patch functions to main scripts
  4. Add Win SDK Version To SBOM
  5. Restructure tooling scripts for clarity.

The script itself has been developed and tested extensively on an Adoptium Windows build machine, however it should work on any windows machine, that has been built and configured with the necessary (specific!) compiler versions.

@github-actions github-actions bot added the documentation Issues that request updates to our documentation label Feb 28, 2024
@steelhead31 steelhead31 added enhancement Issues that enhance the code or documentation of the repo in any way windows Issues that affect or relate to the WINDOWS OS cmp-builds and removed documentation Issues that request updates to our documentation labels Feb 28, 2024
@github-actions github-actions bot added the documentation Issues that request updates to our documentation label Feb 28, 2024
Add initial version of win repro script
Make reproducible scripts less noisy
Add reproducible patch functions to main scripts
Add Win SDK Version To SBOM
Restructure tooling scripts for clarity
@github-actions github-actions bot added macos Issues that affect or relate to the MAC OS testing Issues that enhance or fix our test suites labels Mar 1, 2024
@steelhead31 steelhead31 marked this pull request as ready for review March 1, 2024 15:30
@steelhead31 steelhead31 marked this pull request as draft March 1, 2024 15:31
@steelhead31 steelhead31 changed the title Add win SBOM repro Add Windows Reproducible Build From SBOM Scripts Mar 1, 2024
@steelhead31 steelhead31 marked this pull request as ready for review March 1, 2024 17:07
@steelhead31
Copy link
Contributor Author

Final output from script..


freetype/freetype.h
Checking and getting Tool Summary info:
CycloneDX SBOM has been created in C:\cygwin64\cmp20240301152251\temurin-build\workspace\target\OpenJDK21U-sbom_x64_windows_hotspot_21.0.2_13.json
build.sh : 17:00:30 : All done!
---------------------------------------------
Comparing JDKs
Unzip Source
Unzip Target
Pre-processing src_jdk
Expanding the 'modules' Image to compare extracted files
Expanding the 'src.zip' to normalize file permissions
Expanding jmods to process binaries within
Expanding the 'jrt-fs.jar' to remove signatures from within..
Removing all Signatures from src_jdk
Adding temp Signatures for src_jdk
Generating a RSA private key
...........................++++
...............................................................................................................++++
writing new private key to 'test.key'
-----
Removing all Signatures from src_jdk
Removing jrt-fs.jar MANIFEST.MF BootJDK vendor string lines
***********
SUCCESS :-)
***********
Cleaning any Temurin build-scripts release file BUILD_INFO from src_jdk
Successfully removed all SystemModules jdk.jpackage hash differences from src_jdk
Normalizing ModuleAttributes order in module-info.class, converting to javap
Pre-processing tar_jdk
Expanding the 'modules' Image to compare extracted files
Expanding the 'src.zip' to normalize file permissions
Expanding jmods to process binaries within
Expanding the 'jrt-fs.jar' to remove signatures from within..
Removing all Signatures from tar_jdk
Adding temp Signatures for tar_jdk
Generating a RSA private key
.....................++++
..........................................++++
writing new private key to 'test.key'
-----
Removing all Signatures from tar_jdk
Removing jrt-fs.jar MANIFEST.MF BootJDK vendor string lines
***********
SUCCESS :-)
***********
Cleaning any Temurin build-scripts release file BUILD_INFO from tar_jdk
Successfully removed all SystemModules jdk.jpackage hash differences from tar_jdk
Normalizing ModuleAttributes order in module-info.class, converting to javap
Number of files: 73271
Comparing src_jdk with tar_jdk ... output to file: repro_diff.out
Number of differences: 0
ReproduciblePercent = 100 %
---------------------------------------------
Removing jq
Package jq removed
Removing libjq1
Package libjq1 removed
Removing libonig5
Package libonig5 removed

Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work Scott

@steelhead31 steelhead31 merged commit 2689b39 into adoptium:master Mar 4, 2024
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp-builds documentation Issues that request updates to our documentation enhancement Issues that enhance the code or documentation of the repo in any way macos Issues that affect or relate to the MAC OS testing Issues that enhance or fix our test suites windows Issues that affect or relate to the WINDOWS OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Windows support for building from SBOM script
4 participants