Page MenuHomeFreeBSD

java/openjdk19: Bootstrap port from prebuilt package
ClosedPublic

Authored by haraldei on Thu, Jan 8, 10:03 PM.
Tags
None
Referenced Files
F141972790: D54608.diff
Wed, Jan 14, 9:19 AM
Unknown Object (File)
Tue, Jan 13, 10:51 AM
Unknown Object (File)
Mon, Jan 12, 2:14 PM
Unknown Object (File)
Mon, Jan 12, 11:34 AM
Unknown Object (File)
Sat, Jan 10, 5:26 AM
Unknown Object (File)
Fri, Jan 9, 5:25 PM
Unknown Object (File)
Fri, Jan 9, 2:06 PM
Unknown Object (File)
Fri, Jan 9, 12:07 PM
Subscribers

Details

Summary

Change the way the port is bootstrapped, by extracting a prebuild
package to the work dir, instead of installing the previous openjdk
version to the system.

Still waiting for ppc64 and ppc64le bootstrap packages, but that just
be an update of distinfo (hopefully).

Test Plan
  • Build on aarch64 passed
  • Build on amd64 passes
  • build on i386 passes

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

haraldei created this revision.
  • java/openjdk19: Update bootstraps + add ppc64

Where does openjdk19-19.0.2+7.1_4.${JDK_ARCH}.tar.xz come from and how is it produced? It seems that the port will never be selfcontained in the ports tree, no?

Where does openjdk19-19.0.2+7.1_4.${JDK_ARCH}.tar.xz come from and how is it produced?

From pkg.freebsd.org. It's the release pkg file that has been extracted, moved to the boot-jdk directory and compressed and packed with tar. The only exception is the ppc64(le) tarballs as there's no official packages of these, so they are built by pkubaj@.

It seems that the port will never be selfcontained in the ports tree, no?

The OpenJDK ports were never self contained. They either depended on the port of the previous version, or in some cases a bootstrap-jdk that was installed to the system. The main difference in this approach is that we don't rely on the previous jdk, and we don't install the bootstrap-jdk to the system.

Where does openjdk19-19.0.2+7.1_4.${JDK_ARCH}.tar.xz come from and how is it produced?

From pkg.freebsd.org. It's the release pkg file that has been extracted, moved to the boot-jdk directory and compressed and packed with tar. The only exception is the ppc64(le) tarballs as there's no official packages of these, so they are built by pkubaj@.

It seems that the port will never be selfcontained in the ports tree, no?

The OpenJDK ports were never self contained. They either depended on the port of the previous version, or in some cases a bootstrap-jdk that was installed to the system. The main difference in this approach is that we don't rely on the previous jdk, and we don't install the bootstrap-jdk to the system.

I see, it applies the Münchhausen trilemma which is logically flawed, but we cannot change it.

How to solve this in the future with newer FreeBSD versions? If there is an so bump in base, the base package is unusable unless compat is installed or the build JDK is rebuilt?

Where does openjdk19-19.0.2+7.1_4.${JDK_ARCH}.tar.xz come from and how is it produced?

From pkg.freebsd.org. It's the release pkg file that has been extracted, moved to the boot-jdk directory and compressed and packed with tar. The only exception is the ppc64(le) tarballs as there's no official packages of these, so they are built by pkubaj@.

It seems that the port will never be selfcontained in the ports tree, no?

The OpenJDK ports were never self contained. They either depended on the port of the previous version, or in some cases a bootstrap-jdk that was installed to the system. The main difference in this approach is that we don't rely on the previous jdk, and we don't install the bootstrap-jdk to the system.

I see, it applies the Münchhausen trilemma which is logically flawed, but we cannot change it.

No, we can only try to make the best of it. Java is needed to build the JDK, so having a presumably good package to build from is as good as it gets, I think. I plan to document the scripts I use to generate these boot-jdk tarballs, and hopefully we can automate it completely from the build system at some point. This is the first step.

How to solve this in the future with newer FreeBSD versions? If there is an so bump in base, the base package is unusable unless compat is installed or the build JDK is rebuilt?

I've been thinking about this, but don't have a good answer yet. We may need to keep bootstrap-jdks for each major FreeBSD base version as well as each supported OpenJDK. These packages are from FreeBSD 14.3 and seem to work fine on 15 as well for now. But it's definitely a thing to be aware of.

Where does openjdk19-19.0.2+7.1_4.${JDK_ARCH}.tar.xz come from and how is it produced?

From pkg.freebsd.org. It's the release pkg file that has been extracted, moved to the boot-jdk directory and compressed and packed with tar. The only exception is the ppc64(le) tarballs as there's no official packages of these, so they are built by pkubaj@.

It seems that the port will never be selfcontained in the ports tree, no?

The OpenJDK ports were never self contained. They either depended on the port of the previous version, or in some cases a bootstrap-jdk that was installed to the system. The main difference in this approach is that we don't rely on the previous jdk, and we don't install the bootstrap-jdk to the system.

I see, it applies the Münchhausen trilemma which is logically flawed, but we cannot change it.

No, we can only try to make the best of it. Java is needed to build the JDK, so having a presumably good package to build from is as good as it gets, I think. I plan to document the scripts I use to generate these boot-jdk tarballs, and hopefully we can automate it completely from the build system at some point. This is the first step.

How to solve this in the future with newer FreeBSD versions? If there is an so bump in base, the base package is unusable unless compat is installed or the build JDK is rebuilt?

I've been thinking about this, but don't have a good answer yet. We may need to keep bootstrap-jdks for each major FreeBSD base version as well as each supported OpenJDK. These packages are from FreeBSD 14.3 and seem to work fine on 15 as well for now. But it's definitely a thing to be aware of.

Thank you for looking so much forward. I absolutely agree with your approach.

If I could get a review on this patch today, it would be really helpful. As java/openjdk18 is expiring today, we need this in place to be able to build any of the jdks from 19 and up.

Thanks!

This revision is now accepted and ready to land.Mon, Jan 12, 1:02 PM