Package: libbsf-java
Version: 1:2.4.0-4
Severity: grave
Tags: patch
Justification: renders package unusable
The currently-distributed bsf.jar does not contain the adapter classes (in
org/apache/bsf/engines) for most of the optional languages, except XSLT. This
renders the package mostly useless and is contradictory to the description,
which implies that (e.g.) installing rhino will enable JavaScript support.
This is because the build script tests for rhino, and will exclude the engine
for it, if it's not detected. In other words, to build a proper package that's
useful for the maximum number of people, you need to install all the optional
libs at *build time* and make them available to the build script.
I've attached a patch (for debian/patches) which automatically looks for the
optional jars in their default Debian locations (/usr/share/java) and will
include BSF's adapter classes if detected. I suggest also making those packages
strict Build-Depends so as to not accidentally make this mistake in the future.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libbsf-java depends on:
ii default-jre-headless [java2 1:1.6-40 Standard Java or Java compatible R
ii gcj-4.4-jre-headless [java2 4.4.5-2 Java runtime environment using GIJ
ii gcj-jre-headless [java2-run 4:4.4.5-1 Java runtime environment using GIJ
ii openjdk-6-jre-headless [jav 6b20-1.9.1-1 OpenJDK Java runtime, using Hotspo
libbsf-java recommends no packages.
Versions of packages libbsf-java suggests:
ii bsh 2.0b4-12 Java scripting environment (BeanSh
ii jython 2.5.1-2 Python seamlessly integrated with
ii libxalan2-java 2.7.1-5 XSL Transformations (XSLT) process
ii rhino 1.7R2-4 JavaScript engine written in Java
-- no debconf information
diff -ru libbsf-java-2.4.0.debian/build.xml libbsf-java-2.4.0.new/build.xml
--- libbsf-java-2.4.0.orig/build.xml 2010-10-28 14:16:36.697889355 +0100
+++ libbsf-java-2.4.0/build.xml 2010-10-28 14:11:49.987052496 +0100
@@ -88,10 +88,23 @@
<include name="**/test/**" if="junit.present" />
</patternset>
+ <path id="lib.classpath">
+ <fileset dir="${os.jar.dir}">
+ <include name="commons-logging.jar"/>
+ <!-- JACL not packaged by debian -->
+ <!-- Jython support broken for >=2.5 -->
+ <!--<include name="jython.jar"/>-->
+ <!-- NetRexx not packaged by debian -->
+ <include name="js.jar"/>
+ <include name="xalan2.jar"/>
+ </fileset>
+ </path>
+
<path id="compile.classpath">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
+ <path refid="lib.classpath"/>
<pathelement location="${build.dest}" />
</path>
@@ -120,15 +133,15 @@
<!-- ================================================================= -->
<!-- Determines what optional components are available -->
<!-- ================================================================= -->
- <available property="jacl.present" classname="tcl.lang.JACL" />
+ <available property="jacl.present" classname="tcl.lang.JACL" classpathref="lib.classpath" />
- <available property="jython.present" classname="org.python.util.jython" />
+ <available property="jython.present" classname="org.python.util.jython" classpathref="lib.classpath" />
- <available property="netrexx.present" classname="netrexx.lang.Rexx" />
+ <available property="netrexx.present" classname="netrexx.lang.Rexx" classpathref="lib.classpath" />
- <available property="rhino.present" classname="org.mozilla.javascript.Scriptable" />
+ <available property="rhino.present" classname="org.mozilla.javascript.Scriptable" classpathref="lib.classpath" />
- <available property="xalan.present" classname="org.apache.xalan.xslt.EnvironmentCheck" />
+ <available property="xalan.present" classname="org.apache.xalan.xslt.EnvironmentCheck" classpathref="lib.classpath" />
<available property="junit.present" classname="junit.framework.TestCase" />
@@ -212,11 +225,7 @@
<target name="compile" description="Compiles the BSF *.java files." depends="prepare">
<mkdir dir="${build.dest}"/>
<javac srcdir="${src.dir}" destdir="${build.dest}" debug="${project.debug}" deprecation="${project.deprecation}" source="${source.level}">
- <classpath>
- <fileset dir="lib">
- <include name="*.jar"/>
- </fileset>
- </classpath>
+ <classpath refid="compile.classpath"/>
<patternset refid="java.source.files"/>
</javac>
</target>
diff -ru libbsf-java-2.4.0.debian/debian/ant.properties libbsf-java-2.4.0.new/debian/ant.properties
--- libbsf-java-2.4.0.debian/debian/ant.properties 2010-10-28 14:12:27.000000000 +0100
+++ libbsf-java-2.4.0.new/debian/ant.properties 2010-10-28 14:00:26.313888826 +0100
@@ -8,3 +8,4 @@
source.level=1.3
src.dir=src
tests.dir=src
+os.jar.dir=/usr/share/java