Page MenuHomeFreeBSD

Add OpenJDK 23 to ports
ClosedPublic

Authored by haraldei_anduin.net on Dec 24 2024, 4:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 2, 11:04 PM
Unknown Object (File)
Wed, Jan 29, 10:18 AM
Unknown Object (File)
Jan 6 2025, 4:19 PM
Unknown Object (File)
Jan 6 2025, 11:34 AM
Unknown Object (File)
Jan 6 2025, 10:49 AM
Unknown Object (File)
Jan 6 2025, 9:11 AM
Unknown Object (File)
Jan 4 2025, 8:55 AM
Unknown Object (File)
Dec 31 2024, 5:14 PM

Details

Summary

Pretty much just a copy of the java/openjdk22 port, but updated for OpenJDK 23.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

haraldei_anduin.net created this revision.

Some minor tweaks. Apart from that there are two more files which needs to be addressed:

  • java/Makefile
  • Mk/bsd.java.mk
java/openjdk23/Makefile
16

This should be USES=autoreconf:build

98

I think we should just keep it FreeBSD

99

This should point to FreeBSD website rather than anything else.

java/openjdk23/pkg-descr
1

Mostly this file remains unchanged. So no point in adding the word Initial.

4

12 has reached EOL. So we should not mention it here.

I fired off some poudriere jobs to test the build and will report back when they are done. On quick inspection, I see you need an openjdk23 entry in java/Makefile.

haraldei_anduin.net added inline comments.
java/openjdk23/Makefile
98

This is the same as for the other openjdk versions. I'll leave it for now, and wait to see if any of the other reviewers have any opinions on it.

99

This is the same as for the other openjdk versions. I'll leave it for now, and wait to see if any of the other reviewers have any opinions on it.

Mk/bsd.java.mk
187 ↗(On Diff #148377)

These are not the only changes that are required. There are other changes that should be done. Recheck the bsd.java.mk file.

One very minor stuff, we can update the comment in Mk/bsd.default-versions.mk

And FWIW, we should consider changing the JAVA_DEFAULT in the future. :-)

Mk/bsd.java.mk
184 ↗(On Diff #148377)

HOME=${LOCALBASE}/openjdk22 ?

java/openjdk23/distinfo
2

This seems copied from java/openjdk22, not a serious issue, but this distinfo file can be generated from this comment make makesum
Having TIMESTAMP earlier than the port is created is a bit odd.

Another thing also not directly related to this openjdk23 port is that the bootstrap chain would be long this time. It would be 23 -> 22 -> 21 -> 20 -> 19 -> 18 -> 17. We may want to create bootstrap-openjdk21 in the future, before openjdk17 decommission.

Mk/bsd.java.mk
185 ↗(On Diff #148377)

Also this openjdk22 addition (fix missing) part is better to be in another commit. We can land this one first.

Mk/bsd.java.mk
184 ↗(On Diff #148377)

Good catch, but I removed it entirely as suggested in your next comment :)

Think I got all the parts of Mk/bsd.java.mk covered now, but please check as I'm not all that familiar with how it works.

Also updated the timestamp in the distinfo file, and removed the openjdk22 entry from Mk/bsd.java.mk.

haraldei_anduin.net marked 3 inline comments as done.

I have created a bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283600 for adding the openjdk22. Have a look at it as it will give some idea about the changes required.

Another thing also not directly related to this openjdk23 port is that the bootstrap chain would be long this time. It would be 23 -> 22 -> 21 -> 20 -> 19 -> 18 -> 17. We may want to create bootstrap-openjdk21 in the future, before openjdk17 decommission.

Considering 17 as an LTS version of somewhat although openjdk builds are not considered LTS I think we should concentrate on bootstrap-openjdk21 and decommission 18, 29 and 20.

Another thing also not directly related to this openjdk23 port is that the bootstrap chain would be long this time. It would be 23 -> 22 -> 21 -> 20 -> 19 -> 18 -> 17. We may want to create bootstrap-openjdk21 in the future, before openjdk17 decommission.

Considering 17 as an LTS version of somewhat although openjdk builds are not considered LTS I think we should concentrate on bootstrap-openjdk21 and decommission 18, 29 and 20.

I think that's exactly what I mean? 21 is another LTS and eventually we need to use it as the next bootstrap base.

I have created a bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283600 for adding the openjdk22. Have a look at it as it will give some idea about the changes required.

Thanks!

diizzy added inline comments.
java/openjdk23/Makefile
42

CC, CXX, CPP are already defined by the framework?

43
72

Are you sure these (CC, CXX CPP) needs to be defined as they're set by the framework?

83

Are *-include and *-lib necessary? They don't get picked up by pkgconfig or are you missing USES= localbase:ldflags or localbase?

@haraldei_anduin.net for the next update (if any) please generate patches with git diff -U999999 or git show -U9999999 so that phabricator will be able to expand context.

I think the main thing from my point of view is to fix the regex in bsd,java,mk

Mk/bsd.default-versions.mk
76 ↗(On Diff #148403)

I think we should add 22 at the same time here, unless there is a reason not to. Was there a discussion about doing that separately perhaps instead that I missed? Same comment for other files.

Mk/bsd.java.mk
281 ↗(On Diff #148403)

It looks like there is an extra / that has been added here for expanding 21+. It should be :S/^21+/21 23+/:S/^23+/23/ (note the removal of the / in 21 13+

java/openjdk23/Makefile
30

Nit: seems more indented than surrounding lines

59–62

I think this is the right thing to do, since upstream has for some reason been poor about pushing tags to the jdk23u repo, but in reality we're somewhere in between 23.0.1 and 23.0.2.

java/openjdk23/Makefile
30

Note that Phabricator may render hard tabs poorly, and it is possible that this is not actually an issue.

Mk/bsd.default-versions.mk
76 ↗(On Diff #148403)

Yes, it was suggested to do that separately, and there's a patch for that here. I'll probably rebase on top of that when it's merged.

Mk/bsd.java.mk
281 ↗(On Diff #148403)

Good catch! I'll fix.

Updated regex in Mk/bsd.java.mk and fixed indentation in openjdk23/Makefile

Mk/bsd.default-versions.mk
76 ↗(On Diff #148403)

Great. The diff there looks good to me.

java/openjdk23/Makefile
30

That's fair. Was just going by what I could see

I have pushed the commit for openjdk22 so you might rebase and update the patch.

Rebased on top of bofh's openjdk22 additions.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 27 2024, 7:42 PM
Closed by commit R11:aa17c509fe7c: java/openjdk23: Add port (authored by haraldei_anduin.net, committed by jrm). · Explain Why
This revision was automatically updated to reflect the committed changes.
arrowd added inline comments.
java/openjdk23/Makefile
41

Why this var? If the port doesn't build with multiple jobs, the MAKE_JOBS_UNSAFE=yes knob should be set.

42

Why this knob? C.UTF-8 is default, unless meson or cabal is used.

java/openjdk23/files/patch-configure
6

This patch is probably useless, since we're using autoreconf.

@arrowd, thanks for catching those things. I believe Harald will investigate the original reasons for setting LOCALE to C and test with the default locale.

In D48194#1100442, @jrm wrote:

@arrowd, thanks for catching those things. I believe Harald will investigate the original reasons for setting LOCALE to C and test with the default locale.

IIRC the original reason was simply that the build failed when using other locales. However, that was many versions ago now and may no longer be the case.