Bug 250980

Summary: biology/igv: update to 2.8.10
Product: Ports & Packages Reporter: Mikael Urankar <mikael>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: jwb
Priority: --- Flags: bugzilla: maintainer-feedback? (yuri)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
v1
none
Unified diff to 2.8.12 none

Description Mikael Urankar freebsd_committer 2020-11-09 12:23:11 UTC
Created attachment 219489 [details]
v1

drop openjfx dependency, it doesn't seem to be necessary
Comment 1 Jason W. Bacon freebsd_committer 2020-11-24 14:07:04 UTC
Created attachment 219925 [details]
Unified diff to 2.8.12

Attaching a minor update to Mikael's patch bringing it to 2.8.12.

It also seems fine to me without the openjfx dep and there's no mention of jfx in the build instructions on Github.
Comment 2 Jason W. Bacon freebsd_committer 2020-11-25 14:49:55 UTC
And for anyone who doesn't want to muck around with patches, my work-in-progress port is here:

https://github.com/outpaddling/freebsd-ports-wip
Comment 3 Jason W. Bacon freebsd_committer 2020-11-26 15:39:22 UTC
The updated port is failing poudriere because it tries to download during build phase:

A problem occurred configuring root project 'igv'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve net.sf.proguard:proguard-gradle:6.1.1.
     Required by:
         project :
      > Could not resolve net.sf.proguard:proguard-gradle:6.1.1.
         > Could not get resource 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.1.1/proguard-gradle-6.1.1.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.1.1/proguard-gradle-6.1.1.pom'.
               > repo.maven.apache.org: Name does not resolve

My first instinct here is to add proguard-gradle-6.1.1.pom to DISTFILES and edit out the fetch in build.gradle, but I'm not familiar with gradle builds so maybe there's a better approach?
Comment 4 Yuri Victorovich freebsd_committer 2020-11-28 22:27:58 UTC
I get this error with the latest patch:

> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/share/gradle/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()
> WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
Comment 5 Yuri Victorovich freebsd_committer 2020-11-28 22:35:25 UTC
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
> A problem occurred configuring root project 'igv'.
> > Could not resolve all artifacts for configuration ':classpath'.
>    > Could not resolve net.sf.proguard:proguard-gradle:6.1.1.
>      Required by:
>          project :
>       > Could not resolve net.sf.proguard:proguard-gradle:6.1.1.
>          > Could not get resource 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.1.1/proguard-gradle-6.1.1.pom'.
>             > Could not GET 'https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-gradle/6.1.1/proguard-gradle-6.1.1.pom'.
>                > repo.maven.apache.org: Name does not resolve
Comment 6 Jason W. Bacon freebsd_committer 2020-11-29 14:06:20 UTC
I'm wondering if this really needs to be built with gradle.

The plist contains a shell script, a bunch of jar files, and a bunch of data files, all of which I suspect are in the platform-independent binary dist:

https://data.broadinstitute.org/igv/projects/downloads/2.8/IGV_2.8.13.zip

Do the platform-specific bundles at https://data.broadinstitute.org/igv/projects/downloads/2.8/ actually contain anything important that we need to replicate?  Or do they just package igv into a Mac app or Windows installer and bundle Java?
Comment 7 Jason W. Bacon freebsd_committer 2020-11-29 14:47:32 UTC
(In reply to Jason W. Bacon from comment #6)

This seems to work, though I haven't tested extensively yet:

https://github.com/outpaddling/freebsd-ports-wip/tree/master/igv-bin
Comment 8 Mikael Urankar freebsd_committer 2020-11-29 16:35:12 UTC
(In reply to Jason W. Bacon from comment #7)
yeah, it'll be easier to maintain
Comment 9 Jason W. Bacon freebsd_committer 2020-11-29 18:17:21 UTC
(In reply to Mikael Urankar from comment #8)

One could argue that there's a security benefit to building from source vs trusting somebody else's jar files, but I'm not sure it's worth the effort.  Java source builds always seem to be a PITA in my experience.
Comment 10 Yuri Victorovich freebsd_committer 2020-11-29 18:21:08 UTC
Yes, there is a security benefit to not trust other people's builds.
Many people don't seem to understand or care about this.
Comment 11 Yuri Victorovich freebsd_committer 2020-11-29 21:19:38 UTC
biology/igv doesn't build because devel/gradle uses Java-8 and this somehow leaks into the igv build. When devel/gradle is upgraded to use Java-11 igv builds fine.
Comment 12 Yuri Victorovich freebsd_committer 2020-11-29 21:24:14 UTC
I am wondering if devel/gradle should just be switched to the latest Java version.
Comment 13 Jason W. Bacon freebsd_committer 2020-11-29 21:55:14 UTC
Nice diagnosis.

Seems a bunch of ports depend on gradle.  If gradle is built with openjdk11, will it be a problem to target openjdk8?  Or make all gradle depdndents inherit the openjdk dep?

I wonder how far we are from switching the default to Java 11 given that updates to 8 stopped a year ago.  Maybe use the upstream jar files until that transition is complete, noting in the Makefile that a source build is preferred for security reasons and it's already in the repo history.

Another option is use an older IGV version that will work with openjdk8 and doesn't depend on openjfx8-devel for now.  We don't have to have the latest right away.  The first priority is to unbreak the port.
Comment 14 Yuri Victorovich freebsd_committer 2020-11-29 22:23:11 UTC
(In reply to Jason W. Bacon from comment #13)

Actually, I take it back. The mere presence of Java-8 was affecting it, not the Gradle use of it. I already found the solution - setting the JAVA_HOME environment variable fixes it.

So maybe it's best if Gradle just stays with the default Java version.

I am not sure why the default is kept at Java-8.
Comment 15 commit-hook freebsd_committer 2020-11-30 01:07:25 UTC
A commit references this bug:

Author: yuri
Date: Mon Nov 30 01:06:38 UTC 2020
New revision: 556609
URL: https://svnweb.freebsd.org/changeset/ports/556609

Log:
  biology/igv: 2.5.3 -> 2.8.13

  PR:		250980

Changes:
  head/biology/igv/Makefile
  head/biology/igv/distinfo
  head/biology/igv/files/igv.sh.in
  head/biology/igv/pkg-plist
Comment 16 Jason W. Bacon freebsd_committer 2020-11-30 13:45:28 UTC
Well done.

There's problem with the build, though:

<<<ROOT@coral.acadix>>> /usr/ports/biology/igv 1011 # make distclean deinstall install
===>  Cleaning for igv-2.8.13
===>  Deleting distfiles for igv-2.8.13
===>  Deinstalling for igv
===>   igv not installed, skipping
===>  Deinstalling for igv
===>   igv not installed, skipping
===>  License MIT accepted by the user
===>   igv-2.8.13 depends on file: /usr/local/sbin/pkg - found
=> tools.png doesn't seem to exist in /usr/ports/distfiles/igv-2.8.13.
===> /!\ Error /!\
     The :img group used for tools.png is missing
     from MASTER_SITES. Check for typos, or errors.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/biology/igv
*** Error code 1

Stop.
make: stopped in /usr/ports/biology/igv
Comment 17 Yuri Victorovich freebsd_committer 2020-11-30 17:29:25 UTC
(In reply to Jason W. Bacon from comment #16)

Thanks, Jason!
Comment 18 commit-hook freebsd_committer 2020-11-30 17:30:00 UTC
A commit references this bug:

Author: yuri
Date: Mon Nov 30 17:29:49 UTC 2020
New revision: 556663
URL: https://svnweb.freebsd.org/changeset/ports/556663

Log:
  biology/igv: Fix fetch by fixing a small left-over mistake

  PR:		250980
  Reported by:	jwb

Changes:
  head/biology/igv/Makefile