Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: freeze-exception
Dear Release Team, Please consider unblocking the glpk-java package. I justify my request here (below): unblock glpk-java/1.0.13-4 The upstream changes between the testing version and the current unstable version are not very significant. They mostly alter the examples, documentation and Windows support. The most important changes were added by the upstream author, who is also responsible for the Debian package (Heinrich Schuchardt, CCed here), specifically to refactor the library loading which caused the FTBFS in the testing version onwards. He has been proactive in testing it out on all the failing architectures (I used the porterboxes to test out his code), and has patched the upstream code appropriately. The Debian-specific changes only allow for some cleanups and minor changes, which should not affect much. I attach a fitlered diff, excluding examples, documentation and Windows specific changes. Could you please consider unblocking glpk-java? Thanks! Kumar -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
diff -Nru glpk-java-1.0.1/ChangeLog glpk-java-1.0.13/ChangeLog --- glpk-java-1.0.1/ChangeLog 2009-06-06 12:59:51.000000000 -0500 +++ glpk-java-1.0.13/ChangeLog 2010-03-10 13:41:49.000000000 -0600 @@ -1,3 +1,43 @@ +Version 1.0.13, 2010-03-10 + Changed error handling to support callbacks +Version 1.0.12, 2010-03-07 + Changed GlpkCallback to use LinkedList instead of TreeSet +Version 1.0.11, 2010-02-27 + Removed config.h from makefiles + Moved loading of system library to class GLPK + Added error handling + Added callback functionality for the MIP solver +Version 1.0.10, 2010-02-20 + Adjusted examples and makefiles for GLPK 4.43 + Updated documentation concerning loading JNI library +Version 1.0.9, 2010-01-13 + Adjusted examples and makefiles for GLPK 4.42 + Workaround for va_list +Version 1.0.8, 2009-12-04 + Adjusted examples and makefiles for GLPK 4.41 + Moved examples to examples/java + Renamed examples + Corrected examples/java/Lp.java + Added examples/java/Mip.java + Corrected documentation + Adjusted w32/check_jni.bat +Version 1.0.6, 2009-11-04 + Adjusted examples and makefiles for GLPK 4.40 + Fixed error in check_jni.bat +Version 1.0.5, 2009-10-29 + Fixed error in Windows build files +Version 1.0.4, 2009-10-29 + Added documentation + Added check files to Windows directories + Adjusted buildfiles for swigwin-1.3.40 +Version 1.0.3, 2009-07-26 + Adjusted examples and makefiles for GLPK 4.39 + Added usage help to GLPKSwig.java + Correction of typos +Version 1.0.2, 2009-06-11 + Makefile target test renamed to check + Use libtool object file for linking + Add /usr/local/include to include path Version 1.0.1, 2009-06-06 - corrected swig/Makefile to allow testing before install - added target dist to Makefile to create distribution files + Corrected swig/Makefile to allow testing before install + Added target dist to Makefile to create distribution files diff -Nru glpk-java-1.0.1/debian/changelog glpk-java-1.0.13/debian/changelog --- glpk-java-1.0.1/debian/changelog 2010-09-12 22:27:11.000000000 -0500 +++ glpk-java-1.0.13/debian/changelog 2010-09-12 22:27:11.000000000 -0500 @@ -1,3 +1,44 @@ +glpk-java (1.0.13-4) unstable; urgency=medium + + [ Kumar Appaiah ] + * Use update patch from Heinrich Schuchardt which + reworks the callback interface between libglpk-java + and GLPK, and updates the Makefiles. + + -- Debian Scientific Computation Team <pkg-scicomp-de...@lists.alioth.debian.org> Fri, 10 Sep 2010 21:15:56 +0000 + +glpk-java (1.0.13-3) unstable; urgency=medium + + [ Kumar Appaiah ] + * Use patch from Xypron to: + - change sourcepath to classpath in swig/Makefile, as + the former is ignored by gcj. + - Remove extraneous overrides in examples. + (Closes: #576896) + * Standards Version is now 3.9.1 + + -- Debian Scientific Computation Team <pkg-scicomp-de...@lists.alioth.debian.org> Wed, 08 Sep 2010 17:11:30 -0500 + +glpk-java (1.0.13-2) unstable; urgency=low + + * Update minimum dependency of libglpk-dev to 4.43 + (due to glpk_error_hook()) as pointed out by + Heinrich Schuchardt. + + -- Debian Scientific Computation Team <pkg-scicomp-de...@lists.alioth.debian.org> Sun, 21 Mar 2010 15:07:49 -0500 + +glpk-java (1.0.13-1) unstable; urgency=low + + [ Kumar Appaiah ] + * New Upstream Release. + + Fix FTBFS on amd64. (Closes: #572958) + * debian/control: + + Standards Version is now 3.8.4 (No changes needed). + * debian/rules: + + Rename "test" target to "check". + + -- Debian Scientific Computation Team <pkg-scicomp-de...@lists.alioth.debian.org> Thu, 18 Mar 2010 17:58:16 -0500 + glpk-java (1.0.1-1.1) unstable; urgency=low * Non-maintainer upload. diff -Nru glpk-java-1.0.1/debian/control glpk-java-1.0.13/debian/control --- glpk-java-1.0.1/debian/control 2010-09-12 22:27:11.000000000 -0500 +++ glpk-java-1.0.13/debian/control 2010-09-12 22:27:11.000000000 -0500 @@ -3,9 +3,9 @@ Maintainer: Debian Scientific Computation Team <pkg-scicomp-de...@lists.alioth.debian.org> Uploaders: Heinrich Schuchardt <xypron.deb...@gmx.de>, Rafael Laboissiere <raf...@debian.org> -Build-Depends: debhelper (>= 7), cdbs, libglpk-dev (>= 4.38), swig, libtool, +Build-Depends: debhelper (>= 7), cdbs, libglpk-dev (>= 4.43), swig, libtool, default-jdk-builddep -Standards-Version: 3.8.1 +Standards-Version: 3.9.1 Section: java Homepage: http://glpk-java.sourceforge.net Vcs-Git: git://git.debian.org/git/pkg-scicomp/glpk-java.git diff -Nru glpk-java-1.0.1/debian/rules glpk-java-1.0.13/debian/rules --- glpk-java-1.0.1/debian/rules 2010-09-12 22:27:11.000000000 -0500 +++ glpk-java-1.0.13/debian/rules 2010-09-12 22:27:11.000000000 -0500 @@ -5,7 +5,9 @@ include /usr/share/cdbs/1/class/makefile.mk DEB_MAKE_BUILD_TARGET = all prefix=/usr -DEB_MAKE_CHECK_TARGET = test +DEB_MAKE_CHECK_TARGET = check DEB_MAKE_INSTALL_TARGET = prefix=/usr DESTDIR=$(CURDIR)/debian/libglpk-java install DEB_DH_MAKESHLIBS_ARGS_ALL = --no-act +clean:: + find examples -iname '*.class'|xargs $(RM) Binary files /tmp/rUEQbMdMej/glpk-java-1.0.1/doc/glpk-java.pdf and /tmp/kS5UNu5ZYC/glpk-java-1.0.13/doc/glpk-java.pdf differ diff -Nru glpk-java-1.0.1/doc/glpk-java.tex glpk-java-1.0.13/doc/glpk-java.tex diff -Nru glpk-java-1.0.1/examples/GLPKSwig.java glpk-java-1.0.13/examples/GLPKSwig.java diff -Nru glpk-java-1.0.1/examples/java/ErrorDemo.java glpk-java-1.0.13/examples/java/ErrorDemo.java diff -Nru glpk-java-1.0.1/examples/java/Gmpl.java glpk-java-1.0.13/examples/java/Gmpl.java diff -Nru glpk-java-1.0.1/examples/java/LinOrd.java glpk-java-1.0.13/examples/java/LinOrd.java diff -Nru glpk-java-1.0.1/examples/java/Lp.java glpk-java-1.0.13/examples/java/Lp.java diff -Nru glpk-java-1.0.1/examples/java/marbles.mod glpk-java-1.0.13/examples/java/marbles.mod diff -Nru glpk-java-1.0.1/examples/java/Mip.java glpk-java-1.0.13/examples/java/Mip.java diff -Nru glpk-java-1.0.1/examples/java/tiw56r72.mat glpk-java-1.0.13/examples/java/tiw56r72.mat diff -Nru glpk-java-1.0.1/examples/marbles.mod glpk-java-1.0.13/examples/marbles.mod diff -Nru glpk-java-1.0.1/examples/Roy.java glpk-java-1.0.13/examples/Roy.java diff -Nru glpk-java-1.0.1/INSTALL glpk-java-1.0.13/INSTALL --- glpk-java-1.0.1/INSTALL 2009-06-06 11:53:47.000000000 -0500 +++ glpk-java-1.0.13/INSTALL 2010-03-03 01:11:55.000000000 -0600 @@ -8,10 +8,16 @@ ------------ To install glpk-java you will need to install beforehand +- libtool - SWIG - GLPK - Java Compiler +For Debian and Ubuntu the following packages should be installed +- glpk +- java-gcj-compat-dev +- libtool +- swig Unpacking the distribution file ------------------------------- @@ -42,6 +48,10 @@ Save the text file. +On Mac OS X jni.h is in the following path: + + /System/Library/Frameworks/JavaVM.framework/Headers + Compiling the package --------------------- @@ -49,16 +59,16 @@ make clean -The package is compile with the command +The package is compiled with the command make Check the package ----------------- -To check if everything is build correctly use the command +To check if everything is built correctly use the command - make test + make check Install the package ------------------- diff -Nru glpk-java-1.0.1/Makefile glpk-java-1.0.13/Makefile --- glpk-java-1.0.1/Makefile 2009-06-06 13:03:44.000000000 -0500 +++ glpk-java-1.0.13/Makefile 2009-06-11 11:52:54.000000000 -0500 @@ -12,5 +12,5 @@ -find . -name .svn -exec rm {} -r -f \; install: cd swig; $(MAKE) install -test: - cd swig; $(MAKE) test +check: + cd swig; $(MAKE) check diff -Nru glpk-java-1.0.1/swig/GlpkCallback.java glpk-java-1.0.13/swig/GlpkCallback.java --- glpk-java-1.0.1/swig/GlpkCallback.java 1969-12-31 18:00:00.000000000 -0600 +++ glpk-java-1.0.13/swig/GlpkCallback.java 2010-09-12 22:27:11.000000000 -0500 @@ -0,0 +1,31 @@ +package org.gnu.glpk; + +import java.util.LinkedList; + +/** + * This class manages callbacks from the MIP solver. + */ +public class GlpkCallback { + private static LinkedList<GlpkCallbackListener> listeners + = new LinkedList<GlpkCallbackListener>(); + + /** + * callback function called by native library + */ + public static void callback(long cPtr) { + glp_tree tree; + tree = new glp_tree(cPtr, false); + for (GlpkCallbackListener listener : listeners) { + listener.callback(tree); + } + } + + public static void addListener(GlpkCallbackListener listener) { + listeners.add(listener); + } + + public static void removeListener(GlpkCallbackListener listener) { + listeners.remove(listener); + } + +} diff -Nru glpk-java-1.0.1/swig/GlpkCallbackListener.java glpk-java-1.0.13/swig/GlpkCallbackListener.java --- glpk-java-1.0.1/swig/GlpkCallbackListener.java 1969-12-31 18:00:00.000000000 -0600 +++ glpk-java-1.0.13/swig/GlpkCallbackListener.java 2010-02-27 17:28:06.000000000 -0600 @@ -0,0 +1,8 @@ +package org.gnu.glpk; + +/** + * Callback Listener + */ +public interface GlpkCallbackListener { + public void callback(glp_tree tree); +} diff -Nru glpk-java-1.0.1/swig/GlpkException.java glpk-java-1.0.13/swig/GlpkException.java --- glpk-java-1.0.1/swig/GlpkException.java 1969-12-31 18:00:00.000000000 -0600 +++ glpk-java-1.0.13/swig/GlpkException.java 2010-03-02 18:59:35.000000000 -0600 @@ -0,0 +1,26 @@ +package org.gnu.glpk; + +import java.lang.RuntimeException; + +/** + * Exception thrown, when the GLPK native library call fails + */ +public class GlpkException extends RuntimeException { + private static final long serialVersionUID = -7806261799440623428L; + + /** + * Constructs a new GLPK exception. + */ + public GlpkException() { + super(); + } + + /** + * Constructs a new GLPK exception. + * @param message detail message + */ + public GlpkException(String message) { + super(message); + } +} + diff -Nru glpk-java-1.0.1/swig/glpk.i glpk-java-1.0.13/swig/glpk.i --- glpk-java-1.0.1/swig/glpk.i 2009-06-06 11:53:47.000000000 -0500 +++ glpk-java-1.0.13/swig/glpk.i 2010-09-12 22:27:11.000000000 -0500 @@ -1,8 +1,144 @@ %module GLPK + +/* Load the native library + */ +%pragma(java) modulecode=%{ + static { + try { + if (System.getProperty("os.name").toLowerCase().contains("windows")) { + // try to load Windows library + System.loadLibrary("glpk_4_43_java"); + } else { + // try to load Linux library + System.loadLibrary("glpk_java"); + } + } catch (UnsatisfiedLinkError e) { + System.err.println( + "The dynamic link library for GLPK for Java could not be" + + "loaded.\nConsider using\njava -Djava.library.path="); + throw e; + } + } +%} + +/* As there is no good transformation for va_list + * we will just do nothing. + * cf. http://swig.org/Doc1.3/SWIGDocumentation.html#Varargs_nn8 + * This typemap is necessary to compile on amd64 + * Linux. + */ +%typemap(in) (va_list arg) { +} + +/* The function glp_init_iocp is modified to preset + * the callback function. + */ +%typemap(out) void glp_init_iocp { + arg1->cb_func = glp_java_cb; + arg1->cb_info = (void *) jenv; +} + %{ #include "glpk.h" +#include <setjmp.h> +#include <jni.h> + +void glp_java_error_hook(void *in); + +/* + * Static variables to handle errors inside callbacks + */ +#define GLP_JAVA_MAX_CALLBACK_LEVEL 4 +int glp_java_callback_level = 0; +int glp_java_error_occured = 0; +jmp_buf *glp_java_callback_env[GLP_JAVA_MAX_CALLBACK_LEVEL]; + +/** + * Call back function for MIP solver + */ +void glp_java_cb(glp_tree *tree, void *info) { + jclass cls; + jmethodID mid = NULL; + JNIEnv *env = (JNIEnv *) info; + jlong ltree; + + glp_java_callback_level++; + if (glp_java_callback_level >= GLP_JAVA_MAX_CALLBACK_LEVEL) { + glp_java_error_occured = 1; + } else { + glp_java_error_occured = 0; + cls = (*env)->FindClass(env, "org/gnu/glpk/GlpkCallback"); + if (cls != NULL) { + mid = (*env)->GetStaticMethodID( + env, cls, "callback", "(J)V"); + } + if (mid != NULL) { + *(glp_tree **)<ree = tree; + (*env)->CallStaticVoidMethod(env, cls, mid, ltree); + } + if (cls != NULL) { + (*env)->DeleteLocalRef( env, cls ); + } + } + glp_java_callback_level--; + if (glp_java_error_occured) { + longjmp(*glp_java_callback_env[glp_java_callback_level], 1); + } +} + +/** + * This hook function will be processed if an error occured + * calling the glpk library + * @param in pointer to long jump environment + */ +void glp_java_error_hook(void *in) { + glp_java_error_occured = 1; + /* free GLPK memory */ + glp_free_env(); + /* safely return */ + longjmp(*((jmp_buf*)in), 1); +} + +/** + * This function is used to throw a Java exception + * @param env Java environment + * @param message detail message + */ +void glp_java_throw(JNIEnv *env, char *message) { + jclass newExcCls; + newExcCls = (*env)->FindClass(env, "org/gnu/glpk/GlpkException"); + if (newExcCls == NULL) { + newExcCls = (*env)->FindClass(env, "java/lang/IllegalArgumentException"); + } + if (newExcCls != NULL) { + (*env)->ThrowNew(env, newExcCls, message); + } +} %} +// Exception handling +%exception { + jmp_buf glp_java_env; + + glp_java_callback_env[glp_java_callback_level] = &glp_java_env; + if (setjmp(glp_java_env)) { + glp_java_throw(jenv, "function $name failed"); + } else { + glp_error_hook(glp_java_error_hook, &glp_java_env); + $function; + } + glp_java_callback_env[glp_java_callback_level] = NULL; + glp_error_hook(NULL, NULL); +} + +// Add handling for arrays %include "carrays.i" %array_functions(int, intArray) %array_functions(double, doubleArray) + +// Add handling for String arrays in glp_main +%include "various.i" +%apply char **STRING_ARRAY { const char *argv[] }; + +// Add the library to be wrapped %include "glpk.h" + diff -Nru glpk-java-1.0.1/swig/Makefile glpk-java-1.0.13/swig/Makefile --- glpk-java-1.0.1/swig/Makefile 2009-06-06 12:52:42.000000000 -0500 +++ glpk-java-1.0.13/swig/Makefile 2010-09-12 22:27:11.000000000 -0500 @@ -1,41 +1,57 @@ # installation path of the include files -INCLUDE := /usr/include +SWIG_FLAGS := -I/usr/local/include -I/usr/include # copy version-info from glpk package: src/Makefile.am -VERSION_INFO := 23:0:23 +VERSION_INFO := 28:0:28 # copy revision from glpk package: configure.ac -REVISION := 4.38 +REVISION := 4.43 # installation path for package prefix = /usr/local all: echo $(JAVA_HOME) - mkdir -p src/java - mkdir -p java/org/gnu/glpk - swig -I$(INCLUDE) -java -package org.gnu.glpk -o src/java/glpk_wrap.c -outdir java/org/gnu/glpk glpk.i - libtool --mode=compile gcc -c -fPIC src/java/glpk_wrap.c + mkdir -p target/classes + mkdir -p target/apidocs + mkdir -p src/c + mkdir -p src/main/java/org/gnu/glpk + cp *.java src/main/java/org/gnu/glpk + swig $(SWIG_FLAGS) -java -package org.gnu.glpk -o src/c/glpk_wrap.c \ + -outdir src/main/java/org/gnu/glpk glpk.i + libtool --mode=compile gcc $(SWIG_FLAGS) -c -fPIC src/c/glpk_wrap.c libtool --mode=link \ gcc -version-info $(VERSION_INFO) -revision $(REVISION) \ - -g -O -o libglpk_java.la -rpath ${prefix}/lib/jni glpk_wrap.o -lglpk - javac -classpath java/org/gnu/glpk/ java/org/gnu/glpk/*.java - jar cf java/glpk-java.jar -C java/ org + -g -O -o libglpk_java.la -rpath ${prefix}/lib/jni \ + glpk_wrap.lo -lglpk + javadoc -sourcepath ./src/main/java org.gnu.glpk -d ./target/apidocs + jar cf glpk-java-javadoc.jar -C ./target/apidocs . + jar cf glpk-java-sources.jar -C ./src/main/java . + cd src/main/java; \ + find . -name "*.java" > ../../../sources.txt; \ + javac -source 1.6 -target 1.6 \ + -d ../../../target/classes \ + @../../../sources.txt + jar cf glpk-java.jar -C ./target/classes . clean: - rm -f -r src java .libs - rm -f *.o *.la *.lo ../examples/*.class + rm -f -r src target .libs sources.txt + rm -f *.jar *.o *.la *.lo ../examples/*.class target src distclean: clean - rm -f *~ ../examples/*~ ../w32/*~ ../w64/*~ + rm -f *~ ../examples/java/*~ ../w32/*~ ../w64/*~ install: mkdir -p -m 755 $(DESTDIR)${prefix}/lib/jni;true libtool --mode=install install -c libglpk_java.la $(DESTDIR)${prefix}/lib/jni/libglpk_java.la libtool --mode=finish $(DESTDIR)${prefix}/lib/jni mkdir -p -m 755 $(DESTDIR)${prefix}/share/java;true - install -m 644 java/glpk-java.jar $(DESTDIR)${prefix}/share/java/glpk-java-$(REVISION).jar + install -m 644 glpk-java.jar $(DESTDIR)${prefix}/share/java/glpk-java-$(REVISION).jar cd $(DESTDIR)${prefix}/share/java/;ln -f -s glpk-java-$(REVISION).jar glpk-java.jar -test: - cd ../examples;javac -classpath ../swig/java/glpk-java.jar GLPKSwig.java - cd ../examples;java -Djava.library.path=../swig/.libs -classpath ../swig/java/glpk-java.jar:. GLPKSwig marbles.mod - cd ../examples;javac -classpath ../swig/java/glpk-java.jar Roy.java - cd ../examples;java -Djava.library.path=../swig/.libs -classpath ../swig/java/glpk-java.jar:. Roy +check: + cd ../examples/java;javac -source 1.6 -target 1.6 -classpath ../../swig/glpk-java.jar Gmpl.java + cd ../examples/java;java -Djava.library.path=../../swig/.libs -classpath ../../swig/glpk-java.jar:. Gmpl marbles.mod + cd ../examples/java;javac -source 1.6 -target 1.6 -classpath ../../swig/glpk-java.jar Lp.java + cd ../examples/java;java -Djava.library.path=../../swig/.libs -classpath ../../swig/glpk-java.jar:. Lp + cd ../examples/java;javac -source 1.6 -target 1.6 -classpath ../../swig/glpk-java.jar ErrorDemo.java + cd ../examples/java;java -Djava.library.path=../../swig/.libs -classpath ../../swig/glpk-java.jar:. ErrorDemo + cd ../examples/java;javac -source 1.6 -target 1.6 -classpath ../../swig/glpk-java.jar LinOrd.java + cd ../examples/java;java -Djava.library.path=../../swig/.libs -classpath ../../swig/glpk-java.jar:. LinOrd tiw56r72.mat tiw56r72.sol;rm tiw56r72.sol diff -Nru glpk-java-1.0.1/w32/Build_JNI_with_VC10_DLL.bat glpk-java-1.0.13/w32/Build_JNI_with_VC10_DLL.bat diff -Nru glpk-java-1.0.1/w32/Build_JNI_with_VC9_DLL.bat glpk-java-1.0.13/w32/Build_JNI_with_VC9_DLL.bat diff -Nru glpk-java-1.0.1/w32/check_jni.bat glpk-java-1.0.13/w32/check_jni.bat diff -Nru glpk-java-1.0.1/w32/Makefile_JNI_VC9_DLL glpk-java-1.0.13/w32/Makefile_JNI_VC9_DLL diff -Nru glpk-java-1.0.1/w32/Makefile_JNI_VC_DLL glpk-java-1.0.13/w32/Makefile_JNI_VC_DLL diff -Nru glpk-java-1.0.1/w64/Build_JNI_with_VC10_DLL.bat glpk-java-1.0.13/w64/Build_JNI_with_VC10_DLL.bat diff -Nru glpk-java-1.0.1/w64/Build_JNI_with_VC9_DLL.bat glpk-java-1.0.13/w64/Build_JNI_with_VC9_DLL.bat diff -Nru glpk-java-1.0.1/w64/check_jni.bat glpk-java-1.0.13/w64/check_jni.bat diff -Nru glpk-java-1.0.1/w64/Makefile_JNI_VC9_DLL glpk-java-1.0.13/w64/Makefile_JNI_VC9_DLL diff -Nru glpk-java-1.0.1/w64/Makefile_JNI_VC_DLL glpk-java-1.0.13/w64/Makefile_JNI_VC_DLL
signature.asc
Description: Digital signature