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

JDK 8 binaries release file has empty Source string: SOURCE="" #1966

Closed
M-Davies opened this issue Jul 8, 2020 · 2 comments · Fixed by #2036
Closed

JDK 8 binaries release file has empty Source string: SOURCE="" #1966

M-Davies opened this issue Jul 8, 2020 · 2 comments · Fixed by #2036
Assignees
Labels
bug Issues that are problems in the code as reported by the community

Comments

@M-Davies
Copy link
Contributor

M-Davies commented Jul 8, 2020

Platform:
Any
Architecture:
Any

Ref #897

JDK8 binaries have a blank SOURCE string in their release files. They also contain a lot of missing data compared to jdk11+ binaries (could be due to it being an early version?):

JDK8

JAVA_VERSION="1.8.0_262"
OS_NAME="Darwin"
OS_VERSION="11.2"
OS_ARCH="x86_64"
SOURCE=""

JDK11

IMPLEMENTOR="AdoptOpenJDK"
IMPLEMENTOR_VERSION="AdoptOpenJDK"
JAVA_VERSION="11.0.8"
JAVA_VERSION_DATE="2020-07-14"
MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.vm.ci jdk.management jdk.unsupported jdk.internal.vm.compiler jdk.aot jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.pack jdk.rmic jdk.scripting.nashorn jdk.scripting.nashorn.shell jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom jdk.zipfs"
OS_ARCH="x86_64"
OS_NAME="Darwin"
SOURCE=".:git:824f8474f533"
@M-Davies M-Davies added the bug Issues that are problems in the code as reported by the community label Jul 8, 2020
@karianna karianna added this to TODO in temurin-build via automation Jul 8, 2020
@austin0
Copy link
Contributor

austin0 commented Aug 17, 2020

I've been looking into this a bit and have managed to figure a few things out. There seems to be very little information about how the release file is generated and what can be found is either a) not applicable to jdk8u or b) completely outdated.

What I have found is that the "SOURCE" field is populated by this code:

https://github.com/AdoptOpenJDK/openjdk-jdk8u/blob/b29c71adf8448c390ba48a109e474f25388c9244/make/common/MakeBase.gmk

# The source ids can come from the Mercurial repository, or in the files
# $(HGTIP_FILENAME) which contains the id but is also positioned in the same
# directory as the original $(HGDIR) directory.
# These should not be := assignments, only used from the root Makefile.
HG_VERSION = $(shell $(HG) version 2> /dev/null)
HG_DIRECTORY=.hg
HGTIP_FILENAME=.hgtip
HG_SEARCH = ./REPO ./*/REPO ./*/*/REPO ./*/*/*/REPO
REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
    $(shell $(CD) $(SRC_ROOT) ; ( $(LS) -d $(HG_SEARCH:%/REPO=%/$(HG_DIRECTORY)) ; \
        $(LS) $(HG_SEARCH:%/REPO=%/$(HGTIP_FILENAME)) ) \
        2> /dev/null)))))

# Emit the repo:id pairs to $@
define GetSourceTips
	$(CD) $(SRC_ROOT) ; \
	for i in $(REPO_LIST) IGNORE ; do \
	  if [ "$${i}" = "IGNORE" ] ; then \
	    continue; \
	  elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
	    $(PRINTF) " %s:%s" \
	        "$${i}" `$(HG) id -i --repository $${i}` ; \
	  elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \
	    $(PRINTF) " %s:%s" \
	        "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
	  fi; \
	done >> $@
	$(PRINTF) "\n" >> $@
endef

# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
define CreateHgTip
	$(HG) id -i --repository $1' > $1/$(HGTIP_FILENAME); \
	$(ECHO) $1/$(HGTIP_FILENAME)
endef

Following this I've been able to manually create a .hgtip file based on a local repo and have it populate the source field (https://ci.adoptopenjdk.net/view/Failing%20Builds/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-linux-x64-hotspot/710/).

JAVA_VERSION="1.8.0_272"
OS_NAME="Linux"
OS_VERSION="2.6"
OS_ARCH="amd64"
SOURCE=" .:fbad06cacb73"

The course of action I'm planning to take now is to have the build scripts create a .hgtip after the jdk8u mirror repo is cloned and put the git sha of the mirror into it. If anyone can see any potential issues or a better way to do it let me know.

@austin0
Copy link
Contributor

austin0 commented Aug 19, 2020

PR to resolve this is open #2036.

@karianna karianna moved this from TODO to In Progress in temurin-build Aug 26, 2020
@karianna karianna modified the milestones: August 2020, September 2020 Aug 26, 2020
temurin-build automation moved this from In Progress to Done Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are problems in the code as reported by the community
Projects
No open projects
temurin-build
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants