Page MenuHomeFreeBSD

java/openjdk25: Add jre_headless flavor
ClosedPublic

Authored by haraldei on Wed, Nov 12, 1:44 PM.
Tags
None
Referenced Files
F137904892: D53707.diff
Thu, Nov 27, 1:57 AM
Unknown Object (File)
Wed, Nov 26, 12:25 AM
Unknown Object (File)
Tue, Nov 25, 10:50 AM
Unknown Object (File)
Mon, Nov 24, 3:37 PM
Unknown Object (File)
Mon, Nov 24, 3:01 PM
Unknown Object (File)
Mon, Nov 24, 3:01 PM
Unknown Object (File)
Mon, Nov 24, 3:01 PM
Unknown Object (File)
Mon, Nov 24, 3:01 PM
Subscribers
None

Details

Summary

Add flavor to make a headless jre package, where dev tools and x11
support is removed. As requested in Bug #266059.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266059

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 68591
Build 65474: arc lint + arc unit

Event Timeline

haraldei created this revision.

Looks reasonable. I trust you to have tested this change well.

This revision is now accepted and ready to land.Wed, Nov 12, 2:16 PM
java/openjdk25/Makefile
21

Do you need && ${FLAVORS:U} != jre_headless here?

36–43

Nit: Without changing default tab width, the alignment in vi and Emacs looks approximately as shown here.

In D53707#1226353, @fuz wrote:

Looks reasonable. I trust you to have tested this change well.

Will go though my standard tests tomorrow. Tomcat, and a few others.

java/openjdk25/Makefile
21

Good catch! I do think I do.

Won't make a difference to the build itself, but the point it to not require all these dependencies :)

36–43

Ai, I'll fix that.

  • java/openjdk25: Fix review comments
This revision now requires review to proceed.Thu, Nov 13, 8:27 AM
  • java/openjdk25: Fix minor typo causing wrong pkg name

Think I fixed all issues now.

Also tested various network and non-gui apps, in addition to tuxguitar which works despite being a gui app due to using swt instead of awt for the gui.

Also perhaps consider .if ${FLAVOR:Mheadless} to simplify the logic.

java/openjdk25/Makefile
21

FLAVORS is not set at this point and is the wrong macro anyway. You should move the definition of FLAVORS and FLAVOR above this point so that FLAVOR is guaranteed to be set when the .if is evaluated.

32
50
59
92
java/openjdk25/Makefile
21

The editors/emacs port is doing a lot of the same things with flavors as you are here. You may find it helpful to have a gander at it.

java/openjdk25/Makefile
21

I don't understand the point you are trying to make.

java/openjdk25/Makefile
21

After you correctly pointed out that FLAVORS was the wrong variable and that the order should be adjusted, I thought it might be helpful for Harald to look at another port Makefile that does something similar. For example, it defines FLAVOR right after the dependencies and includes some <flavor>_CONFLICTS_INSTALL lines that might be relevant here.

java/openjdk25/Makefile
21

@jrm Thanks, the emacs port seems to have some useful patterns to learn from.

50

Thanks! I found and fixed all of those instances myself as well, but also tried some other matchers that didn't work. I'll try to post a new version today.

  • java/openjdk25: Fix more review comments
  • java/openjdk25: Fix lib dependencies and flavor matchers
  • java/openjdk25: Add CONFLIGS_INSTALL

The commit message was not included, so here's a description instead:

Added CONFLICTS_INSTALL lines to try to prevent the different FLAVORS to
be installed in parallel. Not sure if this is right for this port,
though. While there's no point in having more than one of them installed
at any time, they install to different directories, and are as such not
in conflict with each other.

With https://reviews.freebsd.org/D53782 in mind, it could perhaps be an
idea to install all flavors to the same dest dir, but I think that is
better left for a later patch.

This looks reasonable. I can't say if the conflict is correct, that's for you to decide. What would go wrong with multiple flavours installed at once?

This revision is now accepted and ready to land.Mon, Nov 24, 7:55 PM

I now see that files for each flavor are installed under these different paths:

  • ${PREFIX}/openjdk25
  • ${PREFIX}/openjdk25-headless
  • ${PREFIX}/openjdk25-jre

So, from a filesystem perspective, the conflicts aren't necessary. I second @fuz's question about installing multiple flavors at once.

BTW, I wasn't able to run poudriere tests for the changes here because they don't apply to the HEAD of main.

jrm@ser /usr/ports [main|✔] % arc patch D53707
 INFO  Base commit is not in local repository; trying to fetch.
Created and checked out branch arcpatch-D53707.


    This diff is against commit 3153f9d4d16c93dd7c9950b0fb2236163cf5b089, but
    the commit is nowhere in the working copy. Try to apply it against the
    current working copy state? (459aa00fa3ebf71901823eafe3f54f12a26560cc)
    [Y/n] Y

...

error: patch failed: java/openjdk25/Makefile:112
Applying patch java/openjdk25/Makefile with 5 rejects...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.

 Patch Failed!
Usage Exception: Unable to apply patch!

@fuz There's really no problem with installing all flavors at the same time, except for bloat of course. It was @jrm who wanted me to look into the CONFLICTS_INSTALL stuff. For now I think I'll just revert that, and look back into it if needed later.

@jrm I will rebase to main and submit (hopefully) the last version of the patch for review :)

Rebased to main and:

  • java/openjdk25: Remove CONFLICTS_INSTALL markers again
  • java/openjdk25: Fix Xorg dependencies for non-headless builds
This revision now requires review to proceed.Tue, Nov 25, 10:50 AM
This revision is now accepted and ready to land.Tue, Nov 25, 11:40 AM
This revision was automatically updated to reflect the committed changes.

Thanks for the reviews and help!