From ca9b3ca854599bdbb28554d11a0296e6acbd706a Mon Sep 17 00:00:00 2001 From: dscanteianu Date: Mon, 9 Dec 2024 17:31:04 +0000 Subject: [PATCH 1/2] add initial python version of script to add metadata to sbom --- combiner.py | 19 +++++++++++++++++++ configureBuild.sh | 1 + sample-metadata.json | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 combiner.py create mode 100644 sample-metadata.json diff --git a/combiner.py b/combiner.py new file mode 100644 index 000000000..87022dea4 --- /dev/null +++ b/combiner.py @@ -0,0 +1,19 @@ +import json + +with open("sample-metadata.json", "r") as metadata_file: + with open("workspace/target/OpenJDK-sbom.json", "r") as sbom_file: + metadata = json.loads(metadata_file.read()) + sbom = json.loads(sbom_file.read()) + if "metadata" not in sbom: + sbom["metadata"] = {} + if "properties" not in sbom["metadata"]: + sbom["metadata"]["properties"] = [] + properties_to_skip = [] + for property in metadata: + if property in properties_to_skip: + continue + sbom["metadata"]["properties"].append( + {"name": property, "value": metadata[property]} + ) + with open("sbom_modified.json", "w") as out: + out.write(json.dumps(sbom, indent=True)) diff --git a/configureBuild.sh b/configureBuild.sh index 8606be3ec..2b9f4966d 100755 --- a/configureBuild.sh +++ b/configureBuild.sh @@ -163,6 +163,7 @@ setVariablesForConfigure() { BUILD_CONFIG[TEST_IMAGE_PATH]=$openjdk_test_image_path BUILD_CONFIG[DEBUG_IMAGE_PATH]=$openjdk_debug_image_path BUILD_CONFIG[STATIC_LIBS_IMAGE_PATH]=$static_libs_path + BUILD_CONFIG[USER_SUPPLIED_CONFIGURE_ARGS]="--build=x86_64-unknown-linux-gnu --openjdk-target=x86_64-unknown-linux-gnu" } # Set the repository to build from, defaults to adoptium if not set by the user diff --git a/sample-metadata.json b/sample-metadata.json new file mode 100644 index 000000000..1fcd637c0 --- /dev/null +++ b/sample-metadata.json @@ -0,0 +1,35 @@ +{ + "vendor": "Eclipse Adoptium", + "os": "linux", + "arch": "x64", + "variant": "temurin", + "version": { + "minor": 0, + "patch": null, + "msi_product_version": "21.0.4.7", + "security": 4, + "pre": null, + "adopt_build_number": 0, + "major": 21, + "version": "21.0.4+7-LTS", + "semver": "21.0.4+7.0.LTS", + "build": 7, + "opt": "LTS" + }, + "scmRef": "jdk-21.0.4+7_adopt", + "buildRef": "https://github.com/adoptium/temurin-build/commit/1271f10a26c47e1489a814dd2731f936a588d621", + "version_data": "jdk21u", + "binary_type": "sbom", + "sha256": "6477888ef26a89c98941cc77505cee0ad46739da9ebe5aceaadb3a69452dc8f5", + "full_version_output": "openjdk version \"21.0.4\" 2024-07-16 LTS\nOpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS)\nOpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode, sharing)\n", + "makejdk_any_platform_args": " --clean-git-repo --jdk-boot-dir /usr/lib/jvm/jdk-20 --configure-args \" --disable-warnings-as-errors --enable-dtrace\" --target-file-name OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz --release --clean-libs --tag jdk-21.0.4+7_adopt --create-source-archive --create-jre-image --create-sbom --enable-sbom-strace --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b03 --user-openjdk-build-root-directory /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild --freetype-dir bundled --use-jep319-certs --create-debug-image --build-variant temurin jdk21u\n", + "configure_arguments": "Runnable configure script is not present\nGenerating runnable configure script at /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/configure-support/generated-configure.sh\nUsing autoconf at /usr/bin/autoconf [autoconf (GNU Autoconf) 2.69]\nconfigure: Configuration created at Tue Jul 16 23:22:03 UTC 2024.\nchecking for basename... /usr/bin/basename\nchecking for dirname... /usr/bin/dirname\nchecking for file... /usr/bin/file\nchecking for ldd... /usr/bin/ldd\nchecking for echo... echo [builtin]\nchecking for tr... /usr/bin/tr\nchecking for uname... /usr/bin/uname\nchecking for wc... /usr/bin/wc\nchecking for grep that handles long lines and -e... /usr/bin/grep\nchecking for egrep... /usr/bin/grep -E\nchecking for a sed that does not truncate output... /usr/bin/sed\nchecking for cygpath... [not found]\nchecking for wslpath... [not found]\nchecking for cmd.exe... [not found]\nchecking build system type... x86_64-pc-linux-gnu\nchecking host system type... x86_64-pc-linux-gnu\nchecking target system type... x86_64-pc-linux-gnu\nchecking openjdk-build os-cpu... linux-x86_64\nchecking openjdk-build C library... gnu\nchecking openjdk-target os-cpu... linux-x86_64\nchecking openjdk-target C library... gnu\nchecking compilation type... native\nchecking for top-level directory... /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src\nchecking for bash... /usr/bin/bash\nchecking for cat... /usr/bin/cat\nchecking for chmod... /usr/bin/chmod\nchecking for cp... /usr/bin/cp\nchecking for cut... /usr/bin/cut\nchecking for date... /usr/bin/date\nchecking for gdiff... [not found]\nchecking for diff... /usr/bin/diff\nchecking for expr... /usr/bin/expr\nchecking for find... /usr/bin/find\nchecking for gunzip... /usr/bin/gunzip\nchecking for pigz... /usr/bin/pigz\nchecking for head... /usr/bin/head\nchecking for ln... /usr/bin/ln\nchecking for ls... /usr/bin/ls\nchecking for gmkdir... [not found]\nchecking for mkdir... /usr/bin/mkdir\nchecking for mktemp... /usr/bin/mktemp\nchecking for mv... /usr/bin/mv\nchecking for gawk... /usr/bin/gawk\nchecking for printf... printf [builtin]\nchecking for rm... /usr/bin/rm\nchecking for rmdir... /usr/bin/rmdir\nchecking for sh... /usr/bin/sh\nchecking for sort... /usr/bin/sort\nchecking for tail... /usr/bin/tail\nchecking for gtar... /usr/bin/gtar\nchecking for tee... /usr/bin/tee\nchecking for touch... /usr/bin/touch\nchecking for xargs... /usr/bin/xargs\nchecking for fgrep... /usr/bin/grep -F\nchecking for df... /usr/bin/df\nchecking for git... /usr/local/bin/git\nchecking for nice... /usr/bin/nice\nchecking for greadlink... [not found]\nchecking for readlink... /usr/bin/readlink\nchecking for whoami... /usr/bin/whoami\nchecking for lsb_release... [not found]\nchecking for cmp... /usr/bin/cmp\nchecking for uniq... /usr/bin/uniq\nconfigure: CI environment variable set to true\nchecking for build environment type... ci, default (calculated from 'auto')\nchecking if custom source is suppressed (openjdk-only)... disabled, default\nchecking for --enable-debug... disabled, default\nchecking which debug level to use... release\nchecking which variants of the JVM to build... server\nchecking if absolute paths should be allowed in the build output... no, release build\nchecking for devkit... gcc-11.3.0 - Centos7.9.2009 in /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03\nchecking for toolchain path... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin\nchecking for sysroot... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/x86_64-linux-gnu/sysroot\nchecking for extra path... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin\nchecking where to store configuration... in current directory\nchecking what configuration name to use... /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild\nchecking for zypper... [not found]\nchecking for apt-get... [not found]\nchecking for yum... /usr/bin/yum\nchecking for pandoc... [not found]\nchecking for gmake... /usr/local/bin/gmake\nconfigure: Testing potential make at /usr/local/bin/gmake, found using gmake in PATH\nconfigure: Using GNU make at /usr/local/bin/gmake (version: GNU Make 4.1)\nchecking if make --output-sync is supported... yes\nchecking for make --output-sync value... none, default\nchecking if find supports -delete... yes\nchecking what type of tar was found... gnu\nchecking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly... yes\nchecking for unzip... /usr/bin/unzip\nchecking for zip... /usr/bin/zip\nchecking for greadelf... [not found]\nchecking for readelf... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/readelf\nchecking for dot... [not found]\nchecking for stat... /usr/bin/stat\nchecking for time... time [builtin]\nchecking for flock... /usr/bin/flock\nchecking for dtrace... /usr/bin/dtrace\nchecking for gpatch... [not found]\nchecking for patch... /usr/bin/patch\nchecking if date is a GNU compatible version... yes\nchecking for ulimit... ulimit [builtin]\nchecking bash version... 4.2.46\nchecking if bash supports pipefail... yes\nchecking if bash supports errexit (-e)... yes\nchecking for pkg-config... /usr/bin/pkg-config\nchecking pkg-config is at least version 0.9.0... yes\nchecking for default LOG value... \nchecking for JMOD compression type... zip-6, default\nchecking if packaged modules are kept... enabled, default\nchecking for --with-build-user... admin, from command line\nchecking for --with-jdk-rc-name... OpenJDK Platform, default\nchecking for --with-vendor-name... Eclipse Adoptium, from command line\nchecking for --with-jdk-rc-company-name... Eclipse Adoptium, default\nchecking for --with-vendor-url... https://adoptium.net/, from command line\nchecking for --with-vendor-bug-url... https://github.com/adoptium/adoptium-support/issues, from command line\nchecking for --with-vendor-vm-bug-url... https://github.com/adoptium/adoptium-support/issues, from command line\nchecking for --with-version-string... , default\nchecking for --with-version-feature... 21, default\nchecking for --with-version-date... 2024-07-16, default\nchecking for --with-vendor-version-string... Temurin-21.0.4+7, from command line\nchecking for --with-macosx-bundle-name-base... OpenJDK, default\nchecking for --with-macosx-bundle-id-base... net.java.openjdk, default\nchecking for --with-macosx-bundle-build-version... 7, default\nchecking for version string... 21.0.4+7-LTS\nconfigure: Found potential Boot JDK using configure arguments\nchecking for Boot JDK... /usr/lib/jvm/jdk-20\nchecking Boot JDK version... openjdk version \"20.0.2\" 2023-07-18 OpenJDK Runtime Environment Temurin-20.0.2+9 (build 20.0.2+9) OpenJDK 64-Bit Server VM Temurin-20.0.2+9 (build 20.0.2+9, mixed mode, sharing)\nchecking for java [Boot JDK]... $BOOT_JDK/bin/java\nchecking for javac [Boot JDK]... $BOOT_JDK/bin/javac\nchecking for javadoc [Boot JDK]... $BOOT_JDK/bin/javadoc\nchecking for jar [Boot JDK]... $BOOT_JDK/bin/jar\nchecking if Boot JDK jar supports --date=TIMESTAMP... true\nchecking if Boot JDK is 32 or 64 bits... 64\nchecking for local Boot JDK Class Data Sharing (CDS)... yes, created\nchecking for Build JDK... yes, will use output dir\nchecking for docs-reference JDK... no, using interim javadoc for the docs-reference targets\nchecking what source date to use... 1721088000, from 'version'\nchecking if we should build headless-only (no GUI)... disabled, default\nchecking if linker should clean out unused code (linktime-gc)... disabled, default\nchecking for graphviz dot... no, cannot generate full docs\nchecking for pandoc... no, cannot generate full docs\nchecking for --enable-full-docs... disabled, from default 'auto'\nchecking for cacerts file... default\nchecking for cacerts source... /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/sbin/../security/certs\nchecking for --enable-unlimited-crypto... enabled, default\nchecking for jni library path... default\nchecking if static build is available... no\nchecking if static build is enabled... disabled, default\nconfigure: Using default toolchain gcc (GNU Compiler Collection)\nchecking for gcc... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/gcc\nchecking resolved symbolic links for CC... no symlink\nconfigure: Using gcc C compiler version 11.3.0 [gcc (GCC) 11.3.0]\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables... \nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/gcc accepts -g... yes\nchecking for /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/gcc option to accept ISO C89... none needed\nchecking for g++... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/g++\nchecking resolved symbolic links for CXX... no symlink\nconfigure: Using gcc C++ compiler version 11.3.0 [g++ (GCC) 11.3.0]\nchecking whether we are using the GNU C++ compiler... yes\nchecking whether /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/g++ accepts -g... yes\nchecking how to run the C preprocessor... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/gcc -E\nchecking how to run the C++ preprocessor... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/g++ -E\nconfigure: Using gcc linker version 2.39 [GNU gold (GNU Binutils 2.39) 1.16]\nconfigure: comparing linker version to minimum version 2.25\nchecking for ar... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/ar\nchecking for strip... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/strip\nchecking for nm... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/nm\nchecking for gobjcopy... [not found]\nchecking for objcopy... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/objcopy\nchecking for gobjdump... [not found]\nchecking for objdump... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/objdump\nchecking for c++filt... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/c++filt\nchecking if @file is supported by gcc... yes\nchecking if CC supports \"-m64\"... yes\nchecking if CXX supports \"-m64\"... yes\nchecking if both CC and CXX support \"-m64\"... yes\nchecking for jtreg... [not found]\nchecking for jtreg test harness... no, not found\nchecking for jtreg jdk... no, using BOOT_JDK\nchecking for jmh (Java Microbenchmark Harness)... no, disabled\nchecking for jib... no\nchecking for ANSI C header files... yes\nchecking for sys/types.h... yes\nchecking for sys/stat.h... yes\nchecking for stdlib.h... yes\nchecking for string.h... yes\nchecking for memory.h... yes\nchecking for strings.h... yes\nchecking for inttypes.h... yes\nchecking for stdint.h... yes\nchecking for unistd.h... yes\nchecking stdio.h usability... yes\nchecking stdio.h presence... yes\nchecking for stdio.h... yes\nchecking size of int *... 8\nchecking for target address size... 64 bits\nchecking whether byte ordering is bigendian... no\nchecking for --enable-branch-protection... disabled, default\nchecking if CC supports \"-fdebug-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if CXX supports \"-fdebug-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if both CC and CXX support \"-fdebug-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking for --enable-warnings-as-errors... disabled, from command line\nchecking if CC supports \"-Xassembler -mrelax-relocations=no\"... yes\nchecking if CXX supports \"-Xassembler -mrelax-relocations=no\"... yes\nchecking if both CC and CXX support \"-Xassembler -mrelax-relocations=no\"... yes\nchecking if TARGET is x86... no\nchecking if CC supports \"-fno-delete-null-pointer-checks\"... yes\nchecking if CXX supports \"-fno-delete-null-pointer-checks\"... yes\nchecking if both CC and CXX support \"-fno-delete-null-pointer-checks\"... yes\nchecking if CC supports \"-fno-lifetime-dse\"... yes\nchecking if CXX supports \"-fno-lifetime-dse\"... yes\nchecking if both CC and CXX support \"-fno-lifetime-dse\"... yes\nchecking if CC supports \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if CXX supports \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if both CC and CXX support \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking how to prevent absolute paths in output... using compiler options\nchecking if CC supports \"-ffp-contract=off\"... yes\nchecking if CXX supports \"-ffp-contract=off\"... yes\nchecking if both CC and CXX support \"-ffp-contract=off\"... yes\nchecking if BUILD is x86... no\nchecking if BUILD_CC supports \"-fno-delete-null-pointer-checks\"... yes\nchecking if BUILD_CXX supports \"-fno-delete-null-pointer-checks\"... yes\nchecking if both BUILD_CC and BUILD_CXX support \"-fno-delete-null-pointer-checks\"... yes\nchecking if BUILD_CC supports \"-fno-lifetime-dse\"... yes\nchecking if BUILD_CXX supports \"-fno-lifetime-dse\"... yes\nchecking if both BUILD_CC and BUILD_CXX support \"-fno-lifetime-dse\"... yes\nchecking if BUILD_CC supports \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if BUILD_CXX supports \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking if both BUILD_CC and BUILD_CXX support \"-fmacro-prefix-map=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/src/=\"... yes\nchecking how to prevent absolute paths in output... using compiler options\nchecking if BUILD_CC supports \"-ffp-contract=off\"... yes\nchecking if BUILD_CXX supports \"-ffp-contract=off\"... yes\nchecking if both BUILD_CC and BUILD_CXX support \"-ffp-contract=off\"... yes\nchecking how to run strip... --strip-debug\nchecking what type of native debug symbols to use... external\nchecking if we should add external native debug symbols to the shipped bundles... no\nchecking if native coverage is available... yes\nchecking for --enable-native-coverage... disabled, default\nchecking if AddressSanitizer (asan) is available... yes\nchecking for --enable-asan... disabled, default\nchecking if UndefinedBehaviorSanitizer (ubsan) is available... yes\nchecking for --enable-ubsan... disabled, default\nchecking if LeakSanitizer (lsan) is available... yes\nchecking for --enable-lsan... disabled, default\nchecking if fallback linker enabled... disabled, default\nchecking if static link of stdc++ is possible... yes\nchecking how to link with libstdc++... static\nchecking alsa/asoundlib.h usability... yes\nchecking alsa/asoundlib.h presence... yes\nchecking for alsa/asoundlib.h... yes\nchecking for which libjpeg to use... bundled\nchecking for which giflib to use... bundled\nchecking for PNG... yes\nchecking for which libpng to use... bundled\nchecking for compress in -lz... yes\nchecking for which zlib to use... bundled\nchecking for which lcms to use... bundled\nchecking for which harfbuzz to use... bundled\nchecking cups/cups.h usability... yes\nchecking cups/cups.h presence... yes\nchecking for cups/cups.h... yes\nchecking cups/ppd.h usability... yes\nchecking cups/ppd.h presence... yes\nchecking for cups/ppd.h... yes\nchecking fontconfig/fontconfig.h usability... yes\nchecking fontconfig/fontconfig.h presence... yes\nchecking for fontconfig/fontconfig.h... yes\nUsing freetype: bundled\nchecking for --enable-hsdis-bundling... disabled, default\nchecking what hsdis backend to use... 'none', hsdis will not be built\nchecking if hsdis should be bundled... no\nchecking for --enable-libffi-bundling... disabled, default\nchecking for cos in -lm... yes\nchecking for dlopen in -ldl... yes\nchecking for X... libraries /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/x86_64-linux-gnu/sysroot/usr/lib64, headers /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/x86_64-linux-gnu/sysroot/usr/include\nchecking whether -R must be followed by a space... no\nchecking for gethostbyname... yes\nchecking for connect... yes\nchecking for remove... yes\nchecking for shmat... yes\nchecking for IceConnectionNumber in -lICE... yes\nchecking for X11/extensions/shape.h... yes\nchecking for X11/extensions/Xrender.h... yes\nchecking for X11/extensions/XTest.h... yes\nchecking for X11/Intrinsic.h... yes\nchecking for X11/extensions/Xrandr.h... yes\nchecking for JVM features enabled by the user... 'dtrace'\nchecking for JVM features disabled by the user... none\nchecking if platform is supported by CDS... yes\nchecking if JVM feature 'cds' is available... yes\nchecking for dtrace tool and platform support... /usr/bin/dtrace\nchecking sys/sdt.h usability... yes\nchecking sys/sdt.h presence... yes\nchecking for sys/sdt.h... yes\nchecking if JVM feature 'dtrace' is available... yes\nchecking if platform is supported by JVMCI... yes\nchecking if JVM feature 'jvmci' is available... yes\nchecking if platform is supported by Shenandoah... yes\nchecking if JVM feature 'shenandoahgc' is available... yes\nchecking if static-build is enabled in configure... no, use --enable-static-build to enable static build.\nchecking if JVM feature 'static-build' is available... no\nchecking if platform is supported by ZGC... yes\nchecking if JVM feature 'zgc' is available... yes\nconfigure: Default JVM features explicitly enabled for 'server': 'dtrace'\nchecking JVM features to use for variant 'server'... 'cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc'\nchecking what hotspot build time to use... 2024-07-16T00:00:00Z (from --with-source-date)\nchecking if the jtreg failure handler is available... no (jtreg not present)\nchecking if the jtreg failure handler should be built... disabled, from default 'auto'\nchecking if the jtreg test thread factory is available... no (jtreg not present)\nchecking if the jtreg test thread factory should be built... disabled, from default 'auto'\nchecking if the CDS classlist generation should be enabled... enabled, from default 'auto'\nchecking if any translations should be excluded... no\nchecking if static man pages should be copied... enabled, default\nchecking if CDS archive is available... yes\nchecking if a default CDS archive should be generated... enabled, from default 'auto'\nchecking if CDS archive is available... yes\nchecking if compatible cds region alignment enabled... disabled, default\nchecking for number of cores... 16\nchecking for memory size... 64239 MB\nchecking for appropriate number of jobs to run in parallel... 16\nchecking whether to use javac server... enabled, default\nchecking flags for boot jdk java command ... -Duser.language=en -Duser.country=US -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/configure-support/classes.jsa -Xshare:auto \nchecking flags for boot jdk java command for big workloads... -Xms64M -Xmx1600M\nchecking flags for bootcycle boot jdk java command for big workloads... -Xms64M -Xmx1600M\nchecking flags for boot jdk java command for small workloads... -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1\nchecking for --enable-icecc... disabled, default\nchecking if precompiled headers are available... yes\nchecking for --enable-precompiled-headers... enabled, from default 'auto'\nchecking for ccache... /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/ccache\nchecking if ccache is available... yes\nchecking if ccache is enabled... disabled, from command line\nchecking if build directory is on local disk... yes\nconfigure: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/configure-support/config.status\nconfig.status: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/spec.gmk\nconfig.status: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/bootcycle-spec.gmk\nconfig.status: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/buildjdk-spec.gmk\nconfig.status: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/compare.sh\nconfig.status: creating /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild/Makefile\n\n====================================================\nA new configuration has been successfully created in\n/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild\nusing configure arguments '--verbose --with-vendor-name='Eclipse Adoptium' --with-vendor-url=https://adoptium.net/ --with-vendor-bug-url=https://github.com/adoptium/adoptium-support/issues --with-vendor-vm-bug-url=https://github.com/adoptium/adoptium-support/issues --with-version-opt=LTS --without-version-pre --with-version-build=7 --with-vendor-version-string=Temurin-21.0.4+7 --with-boot-jdk=/usr/lib/jvm/jdk-20 --with-devkit=/usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03 --with-debug-level=release --with-native-debug-symbols=external --with-source-date=version --disable-ccache --with-build-user=admin --with-jvm-variants=server --with-cacerts-src=/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/sbin/../security/certs --disable-warnings-as-errors --enable-dtrace --with-freetype=bundled --with-zlib=bundled'.\n\nConfiguration summary:\n* Name: /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild\n* Debug level: release\n* HS debug level: product\n* JVM variants: server\n* JVM features: server: 'cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc' \n* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64\n* Version string: 21.0.4+7-LTS (21.0.4)\n* Source date: 1721088000 (2024-07-16T00:00:00Z)\n\nTools summary:\n* Boot JDK: openjdk version \"20.0.2\" 2023-07-18 OpenJDK Runtime Environment Temurin-20.0.2+9 (build 20.0.2+9) OpenJDK 64-Bit Server VM Temurin-20.0.2+9 (build 20.0.2+9, mixed mode, sharing) (at /usr/lib/jvm/jdk-20)\n* Toolchain: gcc (GNU Compiler Collection)\n* Devkit: gcc-11.3.0 - Centos7.9.2009 (/usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03)\n* C Compiler: Version 11.3.0 (at /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/gcc)\n* C++ Compiler: Version 11.3.0 (at /usr/local/devkit/gcc-11.3.0-Centos7.9.2009-b03/bin/g++)\n\nBuild performance summary:\n* Build jobs: 16\n* Memory limit: 64239 MB\n\n", + "make_command_args": "mkdir /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/./build//straceOutput && strace -o /home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/./build//straceOutput/outputFile -ff -e trace=open,openat,execve make product-images legacy-jre-image test-image static-libs-image\n", + "BUILD_CONFIGURATION_param": "{\n \"ARCHITECTURE\": \"x64\",\n \"TARGET_OS\": \"linux\",\n \"VARIANT\": \"temurin\",\n \"JAVA_TO_BUILD\": \"jdk21u\",\n \"TEST_LIST\": [\n \"sanity.openjdk\",\n \"sanity.system\",\n \"extended.system\",\n \"sanity.perf\",\n \"sanity.functional\",\n \"extended.functional\",\n \"extended.openjdk\",\n \"extended.perf\",\n \"special.functional\"\n ],\n \"DYNAMIC_LIST\": [\n \"extended.openjdk\"\n ],\n \"NUM_MACHINES\": [\n \"3\"\n ],\n \"SCM_REF\": \"jdk-21.0.4+7_adopt\",\n \"BUILD_REF\": \"v2024.07.01\",\n \"CI_REF\": \"v2024.07.01\",\n \"HELPER_REF\": \"v2024.07.01\",\n \"AQA_REF\": \"v1.0.2-release\",\n \"AQA_AUTO_GEN\": false,\n \"BUILD_ARGS\": \"--create-source-archive --create-jre-image --create-sbom --enable-sbom-strace --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b03\",\n \"NODE_LABEL\": \"build&&linux&&x64\",\n \"ADDITIONAL_TEST_LABEL\": \"!(centos6||rhel6)\",\n \"KEEP_TEST_REPORTDIR\": false,\n \"ACTIVE_NODE_TIMEOUT\": \"5\",\n \"CODEBUILD\": false,\n \"DOCKER_IMAGE\": \"adoptopenjdk/centos7_build_image\",\n \"DOCKER_ARGS\": \"\",\n \"DOCKER_NODE\": \"\",\n \"DOCKER_REGISTRY\": \"\",\n \"DOCKER_CREDENTIAL\": \"\",\n \"PLATFORM_CONFIG_LOCATION\": \"i/t/master/build-farm/platform-specific-configurations\",\n \"CONFIGURE_ARGS\": \"--enable-dtrace\",\n \"OVERRIDE_FILE_NAME_VERSION\": \"\",\n \"USE_ADOPT_SHELL_SCRIPTS\": true,\n \"RELEASE\": true,\n \"WEEKLY\": false,\n \"PUBLISH_NAME\": \"jdk-21.0.4+7\",\n \"ADOPT_BUILD_NUMBER\": \"\",\n \"ENABLE_REPRODUCIBLE_COMPARE\": false,\n \"ENABLE_TESTS\": true,\n \"ENABLE_TESTDYNAMICPARALLEL\": true,\n \"ENABLE_INSTALLERS\": true,\n \"ENABLE_SIGNER\": true,\n \"CLEAN_WORKSPACE\": true,\n \"CLEAN_WORKSPACE_AFTER\": false,\n \"CLEAN_WORKSPACE_BUILD_OUTPUT_ONLY_AFTER\": true\n}", + "openjdk_built_config": "# ============================\n# OPENJDK BUILD CONFIGURATION:\n# ============================\nBUILD_CONFIG[ADOPTIUM_DEVKIT_LOCATION]=\"\"\nBUILD_CONFIG[ADOPT_PATCHES]=\"true\"\nBUILD_CONFIG[ALSA]=\"true\"\nBUILD_CONFIG[ASSEMBLE_EXPLODED_IMAGE]=\"false\"\nBUILD_CONFIG[BRANCH]=\"dev\"\nBUILD_CONFIG[BUILD_FULL_NAME]=\"/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild\"\nBUILD_CONFIG[BUILD_REPRODUCIBLE_DATE]=\"\"\nBUILD_CONFIG[BUILD_VARIANT]=\"temurin\"\nBUILD_CONFIG[CLEAN_DOCKER_BUILD]=\"false\"\nBUILD_CONFIG[CLEAN_GIT_REPO]=\"true\"\nBUILD_CONFIG[CLEAN_LIBS]=\"true\"\nBUILD_CONFIG[CONTAINER_AS_ROOT]=\"\"\nBUILD_CONFIG[CONTAINER_COMMAND]=\"false\"\nBUILD_CONFIG[CONTAINER_IMAGE]=\"ubuntu:18.04\"\nBUILD_CONFIG[CONTAINER_NAME]=\"openjdk_container\"\nBUILD_CONFIG[COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG]=\"false\"\nBUILD_CONFIG[COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG]=\"false\"\nBUILD_CONFIG[CREATE_DEBUG_IMAGE]=\"true\"\nBUILD_CONFIG[CREATE_JRE_IMAGE]=\"true\"\nBUILD_CONFIG[CREATE_SBOM]=\"true\"\nBUILD_CONFIG[CREATE_SOURCE_ARCHIVE]=\"true\"\nBUILD_CONFIG[CROSSCOMPILE]=\"false\"\nBUILD_CONFIG[CUSTOM_CACERTS]=\"true\"\nBUILD_CONFIG[DEBUG_DOCKER]=\"false\"\nBUILD_CONFIG[DEBUG_IMAGE_PATH]=\"debug-image\"\nBUILD_CONFIG[DISABLE_ADOPT_BRANCH_SAFETY]=\"false\"\nBUILD_CONFIG[DOCKER_FILE_PATH]=\"\"\nBUILD_CONFIG[DOCKER_SOURCE_VOLUME_NAME]=\"openjdk-source-volume-jdk21u-temurin\"\nBUILD_CONFIG[ENABLE_SBOM_STRACE]=\"true\"\nBUILD_CONFIG[FREETYPE]=\"true\"\nBUILD_CONFIG[FREETYPE_DIRECTORY]=\"bundled\"\nBUILD_CONFIG[FREETYPE_FONT_BUILD_TYPE_PARAM]=\"\"\nBUILD_CONFIG[FREETYPE_FONT_VERSION]=\"86bc8a95056c97a810986434a3f268cbe67f2902\"\nBUILD_CONFIG[GRADLE_USER_HOME_DIR]=\"\"\nBUILD_CONFIG[JDK_BOOT_DIR]=\"/usr/lib/jvm/jdk-20\"\nBUILD_CONFIG[JDK_PATH]=\"jdk\"\nBUILD_CONFIG[JRE_PATH]=\"jre\"\nBUILD_CONFIG[JVM_VARIANT]=\"server\"\nBUILD_CONFIG[KEEP_CONTAINER]=\"false\"\nBUILD_CONFIG[MACOSX_CODESIGN_IDENTITY]=\"\"\nBUILD_CONFIG[MAKE_ARGS_FOR_ANY_PLATFORM]=\"product-images legacy-jre-image\"\nBUILD_CONFIG[MAKE_COMMAND_NAME]=\"make\"\nBUILD_CONFIG[MAKE_EXPLODED]=\"false\"\nBUILD_CONFIG[NUM_PROCESSORS]=\"1\"\nBUILD_CONFIG[OPENJDK_BUILD_NUMBER]=\"\"\nBUILD_CONFIG[OPENJDK_BUILD_REPO_BRANCH]=\"master\"\nBUILD_CONFIG[OPENJDK_BUILD_REPO_URI]=\"https://github.com/adoptium/temurin-build.git\"\nBUILD_CONFIG[OPENJDK_CORE_VERSION]=\"jdk21\"\nBUILD_CONFIG[OPENJDK_FEATURE_NUMBER]=\"21\"\nBUILD_CONFIG[OPENJDK_FOREST_NAME]=\"jdk21u\"\nBUILD_CONFIG[OPENJDK_LOCAL_SOURCE_ARCHIVE]=\"false\"\nBUILD_CONFIG[OPENJDK_LOCAL_SOURCE_ARCHIVE_ABSPATH]=\"\"\nBUILD_CONFIG[OPENJDK_SOURCE_DIR]=\"src\"\nBUILD_CONFIG[OPENJDK_UPDATE_VERSION]=\"\"\nBUILD_CONFIG[OS_ARCHITECTURE]=\"x86_64\"\nBUILD_CONFIG[OS_FULL_VERSION]=\"CentOS Linux 7 (Kernel: 6.5.0-1023-azure)\"\nBUILD_CONFIG[OS_KERNEL_NAME]=\"linux\"\nBUILD_CONFIG[PATCHES]=\"\"\nBUILD_CONFIG[RELEASE]=\"true\"\nBUILD_CONFIG[REPOSITORY]=\"https://github.com/adoptium/jdk21u\"\nBUILD_CONFIG[REUSE_CONTAINER]=\"true\"\nBUILD_CONFIG[SHALLOW_CLONE_OPTION]=\"\"\nBUILD_CONFIG[SIGN]=\"false\"\nBUILD_CONFIG[STATIC_LIBS_IMAGE_PATH]=\"static-libs\"\nBUILD_CONFIG[TAG]=\"jdk-21.0.4+7_adopt\"\nBUILD_CONFIG[TARGET_DIR]=\"target/\"\nBUILD_CONFIG[TARGET_FILE_NAME]=\"OpenJDK21U-jdk_x64_linux_hotspot_21.0.4_7.tar.gz\"\nBUILD_CONFIG[TEST_IMAGE_PATH]=\"test\"\nBUILD_CONFIG[TMP_CONTAINER_NAME]=\"openjdk-copy-src\"\nBUILD_CONFIG[TMP_SPACE_BUILD]=\"false\"\nBUILD_CONFIG[USER_OPENJDK_BUILD_ROOT_DIRECTORY]=\"/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace/build/openjdkbuild\"\nBUILD_CONFIG[USER_SUPPLIED_CONFIGURE_ARGS]=\" --disable-warnings-as-errors --enable-dtrace\"\nBUILD_CONFIG[USER_SUPPLIED_MAKE_ARGS]=\"\"\nBUILD_CONFIG[USE_ADOPTIUM_DEVKIT]=\"gcc-11.3.0-Centos7.9.2009-b03\"\nBUILD_CONFIG[USE_JEP319_CERTS]=\"true\"\nBUILD_CONFIG[USE_SSH]=\"false\"\nBUILD_CONFIG[VENDOR]=\"Undefined Vendor\"\nBUILD_CONFIG[WORKING_DIR]=\"./build/\"\nBUILD_CONFIG[WORKSPACE_DIR]=\"/home/jenkins/workspace/build-scripts/jobs/release/jobs/jdk21u/jdk21u-release-linux-x64-temurin/workspace\"\n", + "openjdk_source": "https://github.com/adoptium/jdk21u/commit/13710926b7986179157e4f609419b7943d95783e", + "build_env_docker_image_digest": "adoptopenjdk/centos7_build_image@sha256:39716987759c60bf15db18a5b4684a10368d1f6e5ad649bee89b4e537f0c8326 adoptopenjdk/centos7_build_image@sha256:c1d76fbf77279fde3f6138bfd81390145fe854ba6c03cd36636db215a95801a2\n", + "dependency_version_alsa": "https://ftp2.osuosl.org/pub/blfs/conglomeration/alsa-lib/alsa-lib-1.1.6.tar.bz2\n", + "dependency_version_freetype": "", + "dependency_version_freemarker": "" +} \ No newline at end of file From c4b2d6b825047ebbe817f6d3a31d3b8a1d58ac87 Mon Sep 17 00:00:00 2001 From: dscanteianu Date: Mon, 9 Dec 2024 17:48:23 +0000 Subject: [PATCH 2/2] combiner --- combiner.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/combiner.py b/combiner.py index 87022dea4..8354160e2 100644 --- a/combiner.py +++ b/combiner.py @@ -8,10 +8,23 @@ sbom["metadata"] = {} if "properties" not in sbom["metadata"]: sbom["metadata"]["properties"] = [] - properties_to_skip = [] + properties_to_skip = [ + "version" + ] # todo: do we flatten this? or put it somewhere else in some meaningful way? cyclone dx wasn't expecting a dict + properties_to_flatten = [ + "" + ] # todo: BUILD_CONFIGURATION_param - are these redundant/should we just skip this, or is this what andrew means we should add to that bash script arg for property in metadata: if property in properties_to_skip: continue + if property in properties_to_flatten: + for sub in metadata[property]: + sbom["metadata"]["properties"].append( + {"name": sub, "value": json.dumps(metadata[property])} + ) + print(property) + print(metadata[property]) + print("\n\n\n") sbom["metadata"]["properties"].append( {"name": property, "value": metadata[property]} )