Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609326 - >=dev-java/oracle-jdk-bin-1.8.0.121 - add visualvm useflag
Summary: >=dev-java/oracle-jdk-bin-1.8.0.121 - add visualvm useflag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 616374 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-14 10:17 UTC by Guido Jäkel
Modified: 2017-04-26 11:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Jäkel 2017-02-14 10:17:30 UTC
Starting with  ebuild dev-java/oracle-jdk-bin-1.8.0.121 , the JVisualVM component is cut out from the source bin tarball.

        [...]
        # provided, they generally lag behind what Gentoo has available.
        rm -vf jre/lib/*/libavplugin* || die
        [...]

Yes, there is such a package, but it pull's in a huge bunch of dependencies to build. Because this already no source but a binary package, i would like to used it as provided.

Therefore I vote to introduce a USE flag named  visualvm  to cut it out just on request. Here my suggestion for a patch:

--- oracle-jdk-bin-1.8.0.121.ebuild.20170124-093929     2017-01-24 09:39:29.000000000 +0100
+++ oracle-jdk-bin-1.8.0.121.ebuild     2017-02-14 10:44:51.630738000 +0100
@@ -61,7 +61,7 @@
 LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
 SLOT="1.8"
 KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc64-solaris ~x64-solaris"
-IUSE="alsa commercial cups derby doc examples +fontconfig headless-awt javafx jce nsplugin selinux source"
+IUSE="alsa commercial cups derby doc examples +fontconfig headless-awt javafx jce nsplugin selinux source +visualvm"
 REQUIRED_USE="javafx? ( alsa fontconfig )"
 
 RESTRICT="fetch preserve-libs strip"
@@ -237,8 +237,12 @@
        # provided, they generally lag behind what Gentoo has available.
        rm -vf jre/lib/*/libavplugin* || die
 
-       # We package this as dev-util/visualvm.
-       rm -vfr lib/visualvm || die
+#      # We package this as dev-util/visualvm.
+       if ! use visualvm ; then
+         einfo "visualvm excluded by useflag. Note: You may also use the package  dev-util/visualvm  for installation."
+         rm -vfr lib/visualvm || die
+         rm -vf  bin/jvisualvm || die
+       fi
 
        dodoc COPYRIGHT
        dodir "${dest}"

BTW: The current ebuild don't remove the starter  bin/jvisualvm  which will result into a strange error message if you try to launch jvisualvm as used to before.
Comment 1 James Le Cuirot gentoo-dev 2017-02-17 12:12:01 UTC
Fair enough. I was on the fence about whether to add a flag. In the end, I felt it was more likely that nobody cared. I'll do this on or before the next bump.
Comment 2 Guido Jäkel 2017-02-17 15:31:28 UTC
(In reply to James Le Cuirot from comment #1)
> Fair enough. I was on the fence about whether to add a flag. In the end, I
> felt it was more likely that nobody cared. I'll do this on or before the
> next bump.

Dear James,

you see: My name is nobody :) Thank you in advance.
Comment 3 Till Schäfer 2017-02-21 19:39:24 UTC
+1 for having a possibility to re-add jvisualvm (which is not provided by icedtea)

Additionally, the binary file of jvisualvm is still present, but the execution fails with the error message: 

Cannot read cluster file: /opt/oracle-jdk-bin-1.8.0.121/etc/visualvm.clusters
Comment 4 wyvern5 2017-02-26 19:01:05 UTC
The missing visualvm.clusters file also prevents manually downloaded visualvm (from https://visualvm.github.io/) from running. From its launcher script:

if [ ! -f "$basedir"/etc/visualvm.clusters ]; then
    echo Cannot read cluster file: "$basedir"/etc/visualvm.clusters 1>&2
    exit 1
fi

So, this isn't just breaking the bundled `jvisualvm`.
Comment 5 Guido Jäkel 2017-02-27 07:24:12 UTC
(In reply to Till Schäfer from comment #3)

Dear Till, thank you for your vote and additional information.

> Additionally, the binary file of jvisualvm is still present, but the
> execution fails with the error message: 
> 
> Cannot read cluster file: /opt/oracle-jdk-bin-1.8.0.121/etc/visualvm.clusters

That's what i try to say with my 'BTW'.
Comment 6 James Le Cuirot gentoo-dev 2017-04-23 12:22:17 UTC
*** Bug 616374 has been marked as a duplicate of this bug. ***
Comment 7 James Le Cuirot gentoo-dev 2017-04-26 09:49:16 UTC
Fixed!
Comment 8 Ladislav Zitka 2017-04-26 11:23:56 UTC
Well, it is fixed from USE flag capability, but the message is little bit misleading when you don't use USE flag and try to run you get:
ares ~ # jvisualvm 
* jvisualvm is not available for oracle-jdk-bin-1.8 on x86_64
* IMPORTANT: some Java tools are not available on some VMs on some architectures

I think the message should say something more about how to get it working with via USE flag or saying:
* jvisualvm is not available in current configuration, you might need to enable visualvm USE flag

What do you think guys?