gradle-debian-helper relies on an invalid java api directory

Bug #1765883 reported by Tiago Stürmer Daitx
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gradle-debian-helper (Debian)
New
Unknown
gradle-debian-helper (Ubuntu)
Fix Released
Undecided
Unassigned
groovy (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

gradle-debian-helper should:
1) declare the binary package gradle-debian-helper as dependend upon
default-jdk-doc;
2) use the directory file:///usr/share/doc/default-jdk-doc/api in
DebianHelperPlugin.java instead of the current default-jdk one.

The reason for this change is that until openjdk-9 the javadoc binary
would ignore invalid javadoc links and at most throw out a warning, but
since openjdk-10 this behavior changed to an error which causes packages
that calls the javadoc binary to FTBFS whenever an invalid, nonexistent,
or unreacheable link is given.

In gradle-debian-helper the file
gradle-helper-plugin/src/main/java/org/debian/gradle/DebianHelperPlugin.java
currently sets the first javadoc link to
file:///usr/share/doc/default-jdk/api

First, this seems to indicates that the plugin expects that the default-jdk
package will be installed when it's used, but this is not reflected upon
its 'Depends:' (or 'Recommends:').

Second, even if the default-jdk is installed this is problematic because that
directory is actually a relative link to
../openjdk-X-doc/api
which in turn belongs to an openjdk-X-doc package - such package is not
installed by the default-jdk package. Instead of looking for a default-jdk
directory I proposed that it should instead look for a default-jdk-doc
directory as the api link because the default-jdk-doc package does depends
on an openjdk-X-doc package.

This change shouldn't cause much problem for any packages currently
building with the default-jdk set to openjdk-9 (or 8), since if
/usr/share/doc/default-jdk-doc does not exist then the default-jdk-doc
was not installed anyway and the original link to
/usr/share/doc/default-jdk/api would be invalid anyway and these openjdk
versions ignore that.

Without the proposed changes packages would FTBFS unless both default-jdk
and default-jdk-doc are installed after the default-jdk moves to
openjdk-10 (or 11). Also, packages that depend upon default-jdk-headless
would FTBFS unless they moved to depend upon default-jdk.

Tags: patch
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Please consider the attached debdiff for fixing this bug.

tags: added: patch
Changed in gradle-debian-helper (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gradle-debian-helper - 1.6ubuntu1

---------------
gradle-debian-helper (1.6ubuntu1) bionic; urgency=medium

  * Replace javadoc link with default-jdk-doc directory instead of
    default-jdk. LP: #1765883.
  * debian/control: add runtime dependency to default-jdk-doc.

 -- Tiago Stürmer Daitx <email address hidden> Sat, 21 Apr 2018 01:26:08 +0000

Changed in gradle-debian-helper (Ubuntu):
status: New → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

As I understand it, this is fixed in groovy 2.4.15-1ubuntu1.

groovy (2.4.15-1ubuntu1) bionic; urgency=medium

  * Replace HTTP URLs with local files: LP: #1765885.
    - debian/control: build depends on -doc packages so javadoc can
      properly link the apis.
    - debian/patches/10_use_local_docs.patch, debian/control: include
      javadoc apis locally as invalid, unreacheable, or nonexistent
      links cause the build to faild with openjdk-10.

Changed in groovy (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.