Bug#910098: groovy: improve doc linking and add missing dependencies

2018-10-02 Thread Tiago Daitx
Please consider this patch and disregard the old one.

I have dropped the ignore rule - it does not even use the
debian/docs.gradle file - and replaced the default-jdk-doc/api with
default-jdk/api as previously discussed in bug #896439 (ie. do not use
the -doc paths according to Debian Policy 3.9.7).
On Tue, Oct 2, 2018 at 6:41 PM Tiago Daitx  wrote:
>
> Please consider the attached patch.
>
> It includes one additional "fix" from the Ubuntu delta to get
> groovydoc to ignore a file which was causing groovydoc to output a NUL
> char to stdout, that in turn caused the archive builders to fail -
> something about the python script giving up due to the output. I
> believe the debian builders are not affected, but in case you see any
> value on it, please use it. And if you really don't care about this
> patch let me know and I will send another debdiff without it.
>
> Note: for the Ubuntu side we have discussed cleaning up the output
> from sbuild, it's on my todo list, I consider the exclude list to be a
> temporary fix.



-- 
Tiago Stürmer Daitx
Software Engineer
tiago.da...@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE
diff -Nru groovy-2.4.15/debian/changelog groovy-2.4.15/debian/changelog
--- groovy-2.4.15/debian/changelog	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/changelog	2018-09-27 18:46:07.0 +0100
@@ -1,3 +1,14 @@
+groovy (2.4.15-4) cosmic; urgency=medium
+
+  * Replace HTTP URLs with local files: (Closes: #910098)
+- debian/control: build depends on -doc packages so javadoc can
+  properly link the apis.
+- debian/patches/10_fix_javadoc_links.patch: include javadoc apis
+  locally, since openjdk 10 any invalid, unreacheable, or
+  nonexistent doc link causes the build to fail.
+
+ -- Tiago Stürmer Daitx   Mon, 24 Sep 2018 12:19:05 +
+
 groovy (2.4.15-3) unstable; urgency=medium
 
   * Team upload.
diff -Nru groovy-2.4.15/debian/control groovy-2.4.15/debian/control
--- groovy-2.4.15/debian/control	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/control	2018-09-24 13:33:43.0 +0100
@@ -1,6 +1,7 @@
 Uploaders: Felix Natter 
 Build-Depends:
  ant,
+ ant-doc,
  ant-optional,
  antlr,
  bnd (>= 2.1.0),
@@ -14,6 +16,7 @@
  gradle-debian-helper,
  ivy,
  junit4,
+ junit4-doc,
  libasm-java (>= 6.0~alpha-2~),
  libbsf-java,
  libcommons-cli-java,
@@ -24,6 +27,7 @@
  libjline2-java,
  libqdox-java,
  libservlet3.1-java,
+ libservlet3.1-java-doc,
  libxstream-java,
  locales-all | language-pack-en,
  maven-repo-helper,
@@ -75,7 +79,7 @@
 Section: doc
 Architecture: all
 Depends: ${misc:Depends}
-Recommends: default-jdk-doc
+Recommends: default-jdk-doc, juni4-doc, libservlet3.1-java-doc
 Suggests: groovy
 Description: Agile dynamic language for the Java Virtual Machine (documentation)
  Groovy is an agile dynamic language for the JVM combining lots of great
diff -Nru groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch
--- groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch	2018-09-24 13:32:01.0 +0100
@@ -3,18 +3,20 @@
 Forwarded: not-needed
 --- a/gradle/docs.gradle
 +++ b/gradle/docs.gradle
-@@ -33,9 +33,7 @@
+@@ -33,9 +33,9 @@ def javadocSpec = {
  overview = rootProject.file('src/main/overviewj.html')
  footer = doc.footer
  source = rootProject.useIndy()?'1.7':'1.6'
 -links('http://docs.oracle.com/javase/8/docs/api/', 'http://docs.oracle.com/javaee/7/api/',
 -'http://commons.apache.org/proper/commons-cli/javadocs/api-release/', 'http://junit.org/junit4/javadoc/latest/',
 -'http://docs.oracle.com/javaee/6/api/', 'http://www.antlr2.org/javadoc/')
-+links('file:/usr/share/doc/default-jre/api/')
++links('file:///usr/share/doc/ant/api/', 'file:///usr/share/doc/default-jdk/api/',
++  'file:///usr/share/doc/libservlet3.1-java-doc/api',
++  'file:///usr/share/doc/junit4/api/')
  }
  }
  
-@@ -53,12 +51,7 @@
+@@ -53,12 +53,10 @@ def groovydocSpec = {
  overviewText = resources.text.fromFile(rootProject.file('src/main/overview.html'))
  }
  includePrivate = false
@@ -24,7 +26,10 @@
 -link 'http://junit.org/junit4/javadoc/latest/', 'org.junit.', 'junit.'
 -link 'http://www.antlr2.org/javadoc/', 'antlr.'
 -link 'http://commons.apache.org/proper/commons-cli/javadocs/api-release/', 'org.apache.commons.cli.'
-+link 'file:/usr/share/doc/default-jre/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
++link 'file:///usr/share/doc/libservlet3.1-java-doc/api', 'javax.servlet.', 'javax.management.'
++link 'file:///usr/share/doc/default-jdk/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
++link 'file:///usr/share/doc/ant/

Bug#910098: groovy: improve doc linking and add missing dependencies

2018-10-02 Thread Tiago Daitx
Please consider the attached patch.

It includes one additional "fix" from the Ubuntu delta to get
groovydoc to ignore a file which was causing groovydoc to output a NUL
char to stdout, that in turn caused the archive builders to fail -
something about the python script giving up due to the output. I
believe the debian builders are not affected, but in case you see any
value on it, please use it. And if you really don't care about this
patch let me know and I will send another debdiff without it.

Note: for the Ubuntu side we have discussed cleaning up the output
from sbuild, it's on my todo list, I consider the exclude list to be a
temporary fix.
diff -Nru groovy-2.4.15/debian/changelog groovy-2.4.15/debian/changelog
--- groovy-2.4.15/debian/changelog	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/changelog	2018-09-27 18:46:07.0 +0100
@@ -1,3 +1,18 @@
+groovy (2.4.15-4) cosmic; urgency=medium
+
+  * Replace HTTP URLs with local files: (Closes: #910098)
+- debian/control: build depends on -doc packages so javadoc can
+  properly link the apis.
+- debian/patches/10_fix_javadoc_links.patch: include javadoc apis
+  locally, since openjdk 10 any invalid, unreacheable, or
+  nonexistent doc link causes the build to fail.
+  * debian/patches/11_exclude_groovydoc.patch: exclude file
+org/codehaus/groovy/runtime/EncodingGroovyMethodsSupport.java from
+groovydoc because groovydoc complains about a NUL char and throws
+it to the build log, this causes the archive builders to fail.
+
+ -- Tiago Stürmer Daitx   Mon, 24 Sep 2018 12:19:05 +
+
 groovy (2.4.15-3) unstable; urgency=medium
 
   * Team upload.
diff -Nru groovy-2.4.15/debian/control groovy-2.4.15/debian/control
--- groovy-2.4.15/debian/control	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/control	2018-09-24 13:33:43.0 +0100
@@ -1,6 +1,7 @@
 Uploaders: Felix Natter 
 Build-Depends:
  ant,
+ ant-doc,
  ant-optional,
  antlr,
  bnd (>= 2.1.0),
@@ -14,6 +16,7 @@
  gradle-debian-helper,
  ivy,
  junit4,
+ junit4-doc,
  libasm-java (>= 6.0~alpha-2~),
  libbsf-java,
  libcommons-cli-java,
@@ -24,6 +27,7 @@
  libjline2-java,
  libqdox-java,
  libservlet3.1-java,
+ libservlet3.1-java-doc,
  libxstream-java,
  locales-all | language-pack-en,
  maven-repo-helper,
@@ -75,7 +79,7 @@
 Section: doc
 Architecture: all
 Depends: ${misc:Depends}
-Recommends: default-jdk-doc
+Recommends: default-jdk-doc, juni4-doc, libservlet3.1-java-doc
 Suggests: groovy
 Description: Agile dynamic language for the Java Virtual Machine (documentation)
  Groovy is an agile dynamic language for the JVM combining lots of great
diff -Nru groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch
--- groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch	2018-09-05 05:00:55.0 +0100
+++ groovy-2.4.15/debian/patches/10_fix_javadoc_links.patch	2018-09-24 13:32:01.0 +0100
@@ -3,18 +3,20 @@
 Forwarded: not-needed
 --- a/gradle/docs.gradle
 +++ b/gradle/docs.gradle
-@@ -33,9 +33,7 @@
+@@ -33,9 +33,9 @@ def javadocSpec = {
  overview = rootProject.file('src/main/overviewj.html')
  footer = doc.footer
  source = rootProject.useIndy()?'1.7':'1.6'
 -links('http://docs.oracle.com/javase/8/docs/api/', 'http://docs.oracle.com/javaee/7/api/',
 -'http://commons.apache.org/proper/commons-cli/javadocs/api-release/', 'http://junit.org/junit4/javadoc/latest/',
 -'http://docs.oracle.com/javaee/6/api/', 'http://www.antlr2.org/javadoc/')
-+links('file:/usr/share/doc/default-jre/api/')
++links('file:///usr/share/doc/ant/api/', 'file:///usr/share/doc/default-jdk-doc/api/',
++  'file:///usr/share/doc/libservlet3.1-java-doc/api',
++  'file:///usr/share/doc/junit4/api/')
  }
  }
  
-@@ -53,12 +51,7 @@
+@@ -53,12 +53,10 @@ def groovydocSpec = {
  overviewText = resources.text.fromFile(rootProject.file('src/main/overview.html'))
  }
  includePrivate = false
@@ -24,7 +26,10 @@
 -link 'http://junit.org/junit4/javadoc/latest/', 'org.junit.', 'junit.'
 -link 'http://www.antlr2.org/javadoc/', 'antlr.'
 -link 'http://commons.apache.org/proper/commons-cli/javadocs/api-release/', 'org.apache.commons.cli.'
-+link 'file:/usr/share/doc/default-jre/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
++link 'file:///usr/share/doc/libservlet3.1-java-doc/api', 'javax.servlet.', 'javax.management.'
++link 'file:///usr/share/doc/default-jdk-doc/api/', 'java.', 'org.xml.', 'javax.', 'org.w3c.'
++link 'file:///usr/share/doc/ant/api/', 'org.apache.tools.ant.'
++link 'file:///usr/share/doc/junit4/api/', 'org.junit.'
  }
  
  allprojects {
diff -Nru groovy-2.4.15/debian/patches/11_exclude_groovydoc.patch groovy-2.4.15/debian/patches/11_exclude_groovydoc.patch
--- groovy-2.4.15/debian/patches/11_exclude_groo

Bug#910098: groovy: improve doc linking and add missing dependencies

2018-10-02 Thread Tiago Stürmer Daitx
Package: groovy
Version: 2.4.15-3
Severity: normal

Dear Maintainer,

The groovy doc linking can be improved by adding a few docs that
have been packaged in Debian. Also, the previous fix for the jre
doc link was using a URI with a single slash, which although works
is not the standard.

Additionally to that it was linking to default-jre/api, even though
the actual doc apis files are in the default-jdk-doc package which
is included in the b-deps. IMHO since the files and b-deps are from
this package the hardcoded path should be enforced to use the same
default-jdk-doc api path.

I will attach the patch as soon as I have a bug number for the
changelog entry.

Regards,
Tiago

-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic'), (400, 'cosmic-proposed')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-7-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled