Package: zemberek-server Version: 0.7.1-12 Severity: important Tags: patch
Hi,During the development of our Debian derivative distro Pardus (We will join to the census shortly), I've found a bug in zemberek-server causes it to fail to start in 64bit systems. Cause of the problem is the wrapper in the package, which is located in /usr/sbin/zemberek-server, uses hard-coded Java paths. Normally, the package should run with the default Java of the system, provided by the debian-alternatives subsystem. I've developed a small patch which makes zemberek-server compatible with debian-alternatives and solves the problem. Currently tested on OpenJDK 6 & 7 without any problems.
Since it's my first patch, I welcome any feedback and improvements. Cheers, Hakan
--- zemberek-server 2013-05-03 14:32:31.239764116 +0300 +++ /usr/sbin/zemberek-server 2013-05-03 14:32:47.914181369 +0300 @@ -5,7 +5,7 @@ ZEMBEREK_DEPENDS="zemberek-server zemberek zemberek-tr mina-core slf4j-api slf4j-nop dbus unix" ZEMBEREK_LOGFILE=/var/log/zemberek-server.log -JAVA_HOME=/usr/lib/jvm/java-6-openjdk +JAVA=`update-alternatives --query java |grep ^Value: |awk '{print $2}'` # FIXME: Remove this hack when the upstream adds logging facility. if [ -n "$ZEMBEREK_LOGFILE" ] && \ @@ -20,5 +20,5 @@ CLASSPATH=$JAVA_REPOS/${dep}.jar:$CLASSPATH done -exec -a "zemberek-server" $JAVA_HOME/bin/java -classpath "$CLASSPATH" -DConfigFile=/etc/zemberek-server.conf \ +exec -a "zemberek-server" $JAVA -classpath "$CLASSPATH" -DConfigFile=/etc/zemberek-server.conf \ -Djava.library.path=/usr/lib/jni net.zemberekserver.server.ZemberekServer