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

The --openjdk-source-location is broken since PR#2702 #4065

Closed
judovana opened this issue Nov 29, 2024 · 7 comments
Closed

The --openjdk-source-location is broken since PR#2702 #4065

judovana opened this issue Nov 29, 2024 · 7 comments

Comments

@judovana
Copy link
Contributor

judovana commented Nov 29, 2024

The https://github.com/adoptium/temurin-build/pull/2702/files#diff-bf1a71b6b982bb100bd797f1aac5049b232b43398baf9494c8f2823c62c8aa82R519 have enforced the copying of .git sources, where the --openjdk-source-location literally intentionally excludes .git from being duplicated.

The basic command of ./makejdk-any-platform.sh --openjdk-source-location ~/git/jdk21u/ jdk21u do not trigger the issue (obviously), but hte ./makejdk-any-platform.sh --openjdk-source-location ~/git/jdk21u/ --create-source-archive jdk21u

originally reported was `./makejdk-any-platform.sh --openjdk-source-location ~/git/jdk21u/ --clean-git-repo --jdk-boot-dir /usr/lib/jvm/java-21-openjdk --configure-args "--disable-warnings-as-errors --enable-dtrace" --destination build_artifacts --target-file-name jdk21.tar.gz --create-source-archive --create-jre-image --create-debug-image --create-sbom --enable-sbom-strace --freetype-dir bundled --skip-alsa --build-variant hotspot jdk21u `

I would like to add condition to existence of .git before mv:

   echo "Temporarily moving VCS source dir to ${tmpSourceVCS}"
  - mv "${sourceDir}/.git" "${tmpSourceVCS}"
  + if [ -e "${sourceDir}/.git" ] ; then mv "${sourceDir}/.git" "${tmpSourceVCS}" ; fi
   echo "Temporarily moving source dir to ${sourceArchiveTargetPath}"

@sxa @jerboaa wdyt?

@judovana
Copy link
Contributor Author

judovana commented Nov 29, 2024

or maybe not copy it at all? I would not expected the .git in sources snaphsot. In addition it is huge. maybe do it optional? Like --create-source-archive having optional parameters of "also git/no git/just checksum" ? Maybe if .git is there, then just print and save out last checkout?

@jerboaa
Copy link
Contributor

jerboaa commented Nov 29, 2024

I would like to add condition to existence of .git before mv:

   echo "Temporarily moving VCS source dir to ${tmpSourceVCS}"
  - mv "${sourceDir}/.git" "${tmpSourceVCS}"
  + if [ -e "${sourceDir}/.git" ] ; then mv "${sourceDir}/.git" "${tmpSourceVCS}" ; fi
   echo "Temporarily moving source dir to ${sourceArchiveTargetPath}"

Seems sensible. The restoration part of the git dir needs to be handled similarly. I don't think the source archive should include any version control files (-1 on just not doing the moving the directory away temporarily). If it's not there to begin with we don't need to move it away, so fine with me.

@sxa
Copy link
Member

sxa commented Nov 29, 2024

+1 from me to everything Severin said above :-)

@judovana
Copy link
Contributor Author

judovana commented Nov 29, 2024

Thanx! Will do.

@jerboaa "The restoration part of the git dir needs to be handled similarly. " I do not parse. Do you suggest if --openjdk-source-location tarballOrDir is there, and it contains .git, it should be extracted/copied?

@judovana
Copy link
Contributor Author

@judovana
Copy link
Contributor Author

Thanx! Will do.

@jerboaa "The restoration part of the git dir needs to be handled similarly. " I do not parse. Do you suggest if --openjdk-source-location tarballOrDir is there, and it contains .git, it should be extracted/copied?

Oh, now I hit the Restoring VCS source dir. Clear now.

@judovana judovana changed the title The --openjdk-source-location is broken since P#2702 The --openjdk-source-location is broken since PR#2702 Nov 29, 2024
@judovana
Copy link
Contributor Author

judovana commented Dec 9, 2024

Should be fixed by #4066

@judovana judovana closed this as completed Dec 9, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Adoptium Backlog Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants