Opened 8 months ago

Last modified 4 months ago

#68116 assigned defect

openjdk11-temurin: fetch failure

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: breun (Nils Breunese)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: lion Cc: cooljeanius (Eric Gallager)
Port: openjdk11-temurin

Description

openjdk11-temurin (and probably other similar jdk ports) fails to fetch on older systems:

https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/158643/steps/install-port/logs/stdio

--->  OpenJDK11U-jdk_x64_mac_hotspot_11.0.20.1_1.tar.gz does not exist in /opt/local/var/macports/distfiles/openjdk11-temurin
--->  Attempting to fetch OpenJDK11U-jdk_x64_mac_hotspot_11.0.20.1_1.tar.gz from https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.20.1%2B1/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG: Fetching distfile failed: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Error: Failed to fetch openjdk11-temurin: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
DEBUG: Error code: NONE

It's fetching from upstream rather than a MacPorts mirror because the port is configured not to mirror:

https://build.macports.org/builders/jobs-mirror/builds/628067/steps/mirror/logs/stdio

Not mirroring openjdk11-temurin due to license

The Portfile contains these lines, but the comment doesn't explain why:

# This port uses prebuilt binaries; 'NoMirror' makes sure MacPorts doesn't mirror/distribute these third-party binaries
license          GPL-2 NoMirror

Why is the port configured this way?

Change History (6)

comment:1 Changed 8 months ago by breun (Nils Breunese)

I believe it wasn’t clear to me whether redistribution was allowed for the various JDK distributions, so I decided to not do that. Back then it also wasn’t possible yet to use {darwin any} as the platform, so the same binary of several hundred megabytes would be mirrored for each OS version, which I thought was wasteful on the mirrors.

If you believe redistribution is allowed and storing these binaries on the mirrors is no problem, then we can remove the NoMirror.

These binaries might still not work on older OS versions. I don’t have access to older OS versions to check this.

comment:2 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

NoMirror prevents us from mirroring the distfile. It does not prevent us from distributing archives; if you want to prevent that too, you would need to add Restrictive.

I have no information about whether redistribution of this software is allowed but I would assume that it is because according to the other item on the license line, it is released under the GPL version 2. The GPL states that copying is allowed and that no further restrictions may be imposed.

comment:3 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

In fact, since we distribute the archives, we are probably obligated by the GPL to also distribute the source by mirroring the distfiles.

comment:4 Changed 8 months ago by jmroot (Joshua Root)

We're not distributing archives currently.

% ./macports-infrastructure/jobs/port_binary_distributable.tcl -v openjdk11-temurin
"openjdk11-temurin" is not distributable because its license "nomirror" is not known to be distributable

comment:5 in reply to:  3 Changed 8 months ago by breun (Nils Breunese)

NoMirror prevents us from mirroring the distfile. It does not prevent us from distributing archives; if you want to prevent that too, you would need to add Restrictive.

As far as I know MacPorts doesn't distribute anything for openjdk11-temurin at this time. NoMirror seems to imply that it's not distributable. Do you see any tarballs on MacPorts infra for this port somewhere?

I have no information about whether redistribution of this software is allowed but I would assume that it is because according to the other item on the license line, it is released under the GPL version 2.

The LICENSE, ASSEMBLY_EXCEPTION and ADDITIONAL_LICENSE_INFO files in the tarball mention the "GPL 2 with classpath exception". I am not a lawyer, but this seems to mean that products that incorporate this source code don't need to be covered by the GPL. So maybe the license line in the Portfile shouldn't say GPL-2, because "GPL-2 with classpath exception" is almost, but not exactly GPL-2? Maybe it's fine to redistribute Eclipse Temurin binary tarballs, but I don't know. I'd have to ask the Eclipse Temurin project (and other distributions that I maintain OpenJDK-based ports for).

In fact, since we distribute the archives, we are probably obligated by the GPL to also distribute the source by mirroring the distfiles.

The distfile in this case is a pre-built binary, and the openjdk11-temurin port currently fetches the tarball directly from the Eclipse Temurin GitHub. As far as I know MacPorts currently doesn't distribute anything for openjdk11-temurin, except a Portfile which tells MacPorts what to fetch and how to install it. It doesn't use or compile any source code.

The Eclipse Temurin project does provide OpenJDK source code tarballs for their binary tarballs (e.g. this for the current version), but I believe the binary result can only be called an Eclipse Temurin build if the OpenJDK source code is built by the temurin-build scripts on the Adoptium CI infrastructure.

To avoid getting this stuff wrong, I decided to avoid redistributing anything via MacPorts infrastructure and letting MacPorts fetch the tarballs directly from the upstream download location.

comment:6 Changed 4 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.