Bug#855689: jython.jar does not provide a Class-Path
Gilles Filippini
pini at debian.org
Tue Feb 21 21:09:43 UTC 2017
Hi Ole,
On Tue, 21 Feb 2017 09:54:48 +0100 Ole Streicher <olebole at debian.org> wrote:
> Package: jython
> Version: 2.5.3-14
> Severity: serious
>
> There is no classpath for the dependencies of jython.jar defined in its
> manifest:
>
> $ unzip -p /usr/share/java/jython.jar META-INF/MANIFEST.MF | \
> grep Class-Path
> $
>
> This leads to the problem that dependent packages need to specify the
> classpath themself, which is difficult since it is not documented in
> /usr/share/docs/jython. Also, it requires tracking internal changes of
> jython, since some of the dependent jar names are version dependent;
> namely antlr3-runtime-3.2.jar, which makes it difficult to handle for
> the dependencies over long time (f.e. for backports).
>
> Java policy requires to have the classpath documented. I would ask you
> to do this in the manifest (at least for the strong dependencies), since
> this makes the usage much easier.
Would the attached patch do the trick?
Thanks,
_g.
-------------- next part --------------
diff -Nru jython-2.5.3/debian/changelog jython-2.5.3/debian/changelog
--- jython-2.5.3/debian/changelog 2016-12-11 17:02:02.000000000 +0100
+++ jython-2.5.3/debian/changelog 2017-02-21 20:22:33.000000000 +0100
@@ -1,3 +1,9 @@
+jython (2.5.3-15) UNRELEASED; urgency=medium
+
+ * Set 'Class-Path' into jython.jar's manifest (closes: #855689)
+
+ -- Gilles Filippini <pini at debian.org> Tue, 21 Feb 2017 20:22:33 +0100
+
jython (2.5.3-14) unstable; urgency=medium
* debian/jython_perl: fix use of abs_path
diff -Nru jython-2.5.3/debian/patches/04-runtime-classpath.patch jython-2.5.3/debian/patches/04-runtime-classpath.patch
--- jython-2.5.3/debian/patches/04-runtime-classpath.patch 1970-01-01 01:00:00.000000000 +0100
+++ jython-2.5.3/debian/patches/04-runtime-classpath.patch 2017-02-21 20:22:33.000000000 +0100
@@ -0,0 +1,12 @@
+Index: jython/build.xml
+===================================================================
+--- jython.orig/build.xml
++++ jython/build.xml
+@@ -721,6 +721,7 @@ The readme text for the next release wil
+ excludes="org/python/expose/generate/**,org/python/version.properties"/>
+ </nameunion>
+ <manifest>
++ <attribute name="Class-Path" value="${RuntimeClasspath}"/>
+ <attribute name="Main-Class" value="org.python.util.jython" />
+ <attribute name="Built-By" value="${user.name}" />
+ <!-- info section. ATTN: no blanks, no '.' in the names -->
diff -Nru jython-2.5.3/debian/patches/series jython-2.5.3/debian/patches/series
--- jython-2.5.3/debian/patches/series 2016-12-11 17:02:02.000000000 +0100
+++ jython-2.5.3/debian/patches/series 2017-02-21 20:22:33.000000000 +0100
@@ -1,3 +1,4 @@
01-build.patch
02-jnr_refactoring.patch
03-default-cachedir.patch
+04-runtime-classpath.patch
diff -Nru jython-2.5.3/debian/rules jython-2.5.3/debian/rules
--- jython-2.5.3/debian/rules 2016-12-11 17:02:02.000000000 +0100
+++ jython-2.5.3/debian/rules 2017-02-21 20:22:33.000000000 +0100
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+RTCLASSPATH := $(shell grep '^\s*appendJar' debian/jython_perl | sed "s/^.*('//;s/').*$$//" | tr '\n' ' ')
+
%:
dh $@ --with python2 --with maven-repo-helper
@@ -31,7 +33,7 @@
override_dh_auto_build:
# Build the class files.
- ant -nouserlib developer-build jar javadoc
+ ant -nouserlib developer-build jar javadoc -DRuntimeClasspath="$(RTCLASSPATH)"
# -nouserlib is required to prevent conflicts with the ant jython plugin
# Generate OSGi metadata for jython.jar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 508 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20170221/c1b4cc21/attachment-0001.sig>
More information about the pkg-java-maintainers
mailing list