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

SBOM makejdk_any_platform_args value --configure-args missing "quotes" #3834

Closed
andrew-m-leonard opened this issue Jun 3, 2024 · 0 comments · Fixed by #3835
Closed

SBOM makejdk_any_platform_args value --configure-args missing "quotes" #3834

andrew-m-leonard opened this issue Jun 3, 2024 · 0 comments · Fixed by #3835
Assignees
Labels
jenkins Issues that enhance or fix our jenkins server

Comments

@andrew-m-leonard
Copy link
Contributor

andrew-m-leonard commented Jun 3, 2024

SBOM makejdk_any_platform_args value --configure-args is missing "quotes", making it very hard to process the space demlimited set of configure-args, eg:

--clean-git-repo --jdk-boot-dir /usr/lib/jvm/jdk-21 --configure-args --disable-warnings-as-errors --enable-dtrace --target-file-name OpenJDK22U-jdk_x64_linux_hotspot_2024-06-01-12-06.tar.gz --create-source-archive --create-jre-image --create-sbom --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b02 --user-openjdk-build-root-directory /home/jenkins/workspace/build-scripts/jobs/jdk22u/jdk22u-linux-x64-temurin/workspace/build/openjdkbuild --freetype-dir bundled --use-jep319-certs --create-debug-image --build-variant temurin jdk22u

--configure-args in this particular case is "--disable-warnings-as-errors --enable-dtrace", but you can't tell that...!!

arguments containing <spaces> need to be quoted so they can be processed as single arguments
eg.

sbom_args="--clean-git-repo --jdk-boot-dir /usr/lib/jvm/jdk-21 --configure-args \"--disable-warnings-as-errors --enable-dtrace\"  --create-source-archive"

# and processed by:
args=( )
IFS= args=($(xargs --max-args=1 <<< "$sbom_args"))
for arg in "${args[@]}"
do
   echo "$arg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jenkins Issues that enhance or fix our jenkins server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant