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

UnixPB: Add Zulu7 for JDK8 Build bootstrap, make buildJDK.sh use JDK7 #1325

Merged
merged 7 commits into from
May 18, 2020

Conversation

Willsparker
Copy link
Contributor

ref: adoptium/temurin-build#1732

Add in Zulu-7 to Unix playbook, as it can be a consistent JDK-7 amongst all the distributions, as some new linux distros are unable to install openjdk-7 with their package manager.

@Willsparker Willsparker added this to the May 2020 milestone May 12, 2020
@Willsparker Willsparker requested a review from sxa May 12, 2020 14:13
@Willsparker Willsparker self-assigned this May 12, 2020
@Willsparker
Copy link
Contributor Author

FYI, zulu-7 is installed using the shell module, using wget and tar as both the unarchive and get_url ansible modules would throw the following errors, even with validate_certs: false.

"msg": "Failed to validate the SSL certificate for cdn.azul.com:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python >= 2.7.9 on your managed machine (the python executable used (/usr/bin/python) is version: 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]) or you can install theurllib3, pyOpenSSL, ndg-httpsclient, and pyasn1python modules to perform SNI verification in python >= 2.6. You can use validate_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible. The exception msg was: [Errno 1] _ssl.c:492: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol."
However, running wget manually on the machine did work, hence why shell works.

@Willsparker
Copy link
Contributor Author

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

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

I would prefer to only install this where the distribution doesn't have it's own openjdk7 available - can we adjust the conditionals accordingly to only put this on the recent distros that have it?

@Willsparker Willsparker changed the title UnixPB: Add Zulu7 for JDK8 Build bootstrap UnixPB: Add Zulu7 for JDK8 Build bootstrap, make buildJDK.sh use JDK7 May 13, 2020
@Willsparker
Copy link
Contributor Author

With the latest commit, the PR has include fairly significant changes to buildJDK.sh:

  1. remove code to find the distribution specific versions of JDK8 to set JAVA_HOME with as it's unnecessary as we install jdk8 with adoptopenjdk_install
  2. Remove setting JDK7_BOOT_DIR, as setting JDK_BOOT_DIR takes priority in the build, when building JDK8
  3. Set JDK_BOOT_DIR to be JDK7 when building JDK8 (it was previously setting JDK8).

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

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

Latest changes won't take effect on e.g. Ubuntu 20.04 - can we change the version conditionals to be > or >= comparisons please?

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

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

Ref the issues with unarchive I don't believe we need to install zulu-7 on any distributions which have such an old version of python, and since we've now restricted the distributions which this role runs on, we should probably switch it back to use the unarchive role instead of the shell operation

@Willsparker
Copy link
Contributor Author

https://ci.adoptopenjdk.net/view/Tooling/job/VagrantPlaybookCheck/581/OS=SUSE12,label=infra-vagrant-1/console
Unfortunately, SUSE/SLES12 IS new enough to not have openjdk-7 in it's package repos, but does have a version of python low enough to cause issues with the unarchive repo. For now, I've removed it from the zulu-7 install, as we don't have any SLES build machines (and only one test machine), it shouldn't matter if it uses jdk-8 to build JDK-8 for the playbook check.
That being said, @sxa If you want, I can put back in that shell module task and make it run only for SLES/OpenSUSE.

@Willsparker
Copy link
Contributor Author

@sxa sxa merged commit 975c944 into adoptium:master May 18, 2020
@Willsparker Willsparker deleted the zulu-7 branch June 18, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants