From 1910c683d50a316870810bef4f4dad57ae5c7d49 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Tue, 30 Mar 2010 09:44:54 +0000 Subject: Applied the remaining FOSDEM06 patches with minor changes. --- debian/changelog | 3 +- policy.xml | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 97 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index a9d7617..2d1d3b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,8 @@ java-common (0.35) UNRELEASED; urgency=low * Added myself to Uploaders. * Added myself to the list of Authors of the Java Policy. - * Applied minor corrections to the Java Policy. + * Integrated adapted parts of the FOSDEM06 proposal into the Java + Policy. -- Niels Thykier Fri, 26 Mar 2010 21:44:45 +0100 diff --git a/policy.xml b/policy.xml index e3e2945..95f460b 100644 --- a/policy.xml +++ b/policy.xml @@ -11,6 +11,11 @@ java2-runtime"> java-compiler"> java2-compiler"> +default-jdk"> +default-jdk-builddep"> +default-jdk-doc"> +JVM"> +JIT"> ]> @@ -119,15 +124,19 @@ Both &must; be shipped as Java bytecode (*.class files, packaged in a *.jar archive) and with - an "Architecture: all". - It &may; additionally be shipped as machine code, as produced for example - by the GNU Compiler for Java, in a separate architecture-specific - package. + an "Architecture: all". There are rare exceptions to this such as Eclipse + SWT. Exceptions to this rule can only be granted by the Java Team. + Requests &must; be sent to debian-java@lists.debian.org. - This policy does not yet address the issue of documentation (for instance - HTML pages made with javadoc). + The Java bytecode &may; additionally be shipped as machine code, as produced for example + by the GNU Compiler for Java, in a separate architecture-specific package. + + + + Programs and libraries &should; enable JUnit tests, if these are present. + The build &may; ignore test failures. @@ -257,9 +266,7 @@ - Java libraries &must; depend on the needed runtime environment - (&j1r; and/or &j2r;) but &should; not depend (only suggest) - java-virtual-machine. + Class files in a java library &must; be built with debug symbols. @@ -295,6 +302,78 @@ architecture-specific and follow the usual libXXX[version]-java naming convention. + + + Java library packages &should; compile the javadoc API of the + library. The API &must; link against the javadoc API of the + libraries it depends on. This includes the core java classes, + which are provided by &d-jdoc;. The API &must; be registered with + doc-base and &must; be installed in + /usr/share/doc/<package>/api/ or + /usr/share/doc/<package>/api-<component>/. + + + The API &must; be place in a separate doc package. This package + &must; recommend the doc packages it was linked against. + + + + + Native Java Bytecode (gcj packages) + + + Java bytecode compiled into native code is referred to as + gcj-code and packages containing gcj-code as gcj-packages. + + + + gcj-packages has been added in order to improve + performance of Java libraries and programs. This is + particularly useful on architectures where the JVM + does not have a &JIT;. However, this performance comes + at the cost of size, extra compilation time and + creates architecture dependent packages. + + + + Packages &mustnot; ship gcj-code without the permission of + the Java team (debian-java@lists.debian.org). + Source packages that shipped gcj-packages as of March 22nd, + 2010, have been given this permission through the + ratification of this policy. + + + + A request for permission to add gcj should convince + the Java Team that the performance boost of adding + the gcj-packages out-weights the disadvantages. + + + + Source packages compiling gcj-packages &must; Build-Depend on + &d-jbdep;. The gcj-code &should; only be shipped for a selected + set of architectures. + + + + The gcj-code &must; be installed in /usr/lib/gcj/ + and shipped separately from the original jar file. The gcj-package + &must; also install the classmap file generated by aot-compile in + /usr/share/gcj/classmap.d/. + + + + The gcj-package &must; call rebuild-gcj-db in the postinst and + postrm script, if rebuild-gcj-db is present. + + + + The gcj-package &must; depend on the package providing the jar + file, it is a native compilation. + The package containing the jar file &must; declare either a + Suggests or a Recommends relationship on the gcj-package. + + @@ -322,6 +401,8 @@ url="http://www.gnu.org/software/classpath">GNU-Classpath has a list of free versions), it cannot go to main. If your package itself is free, it &must; go to contrib. + Since java libraries do not have a runtime dependency, + this rule does not apply to them. @@ -444,6 +525,11 @@ will be integrated in the policy, one day). + + + Java packages &should; be built with &d-jdk; if possible. + + -- cgit v1.2.3