Package: biomaj-watcher
Version: 1.2.2-4
Severity: minor

Dear Maintainer,

While working on an update for libquartz-java, I noticed that
biomaj-watcher throws errors when it starts up because quartz uses
SLF4J.  The attached patch addresses the problem and makes the logic in
the postinst a little easier to follow.  The bug is minor because the
lack of quartz logging isn't fatal, but the logs look cleaner without
the exceptions.

I could also process an upload if the patch looks suitable.

Cheers,
tony
diff -Nru biomaj-watcher-1.2.2/debian/changelog biomaj-watcher-1.2.2/debian/changelog
--- biomaj-watcher-1.2.2/debian/changelog	2016-11-08 05:17:13.000000000 -0800
+++ biomaj-watcher-1.2.2/debian/changelog	2017-06-25 13:21:07.000000000 -0700
@@ -1,3 +1,10 @@
+biomaj-watcher (1.2.2-5) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add slf4j libraries required by libquartz-java to the webapp.
+
+ -- tony mancill <[email protected]>  Sun, 25 Jun 2017 13:21:07 -0700
+
 biomaj-watcher (1.2.2-4) unstable; urgency=medium
 
   * Team upload.
diff -Nru biomaj-watcher-1.2.2/debian/postinst biomaj-watcher-1.2.2/debian/postinst
--- biomaj-watcher-1.2.2/debian/postinst	2016-11-08 02:01:43.000000000 -0800
+++ biomaj-watcher-1.2.2/debian/postinst	2017-06-25 13:21:07.000000000 -0700
@@ -30,23 +30,15 @@
 
       java -cp $biomajwatcher_root/bin WatcherConfigurator bmajroot:=$bmajroot bmajconf:=$bmajconf use_ldap:=$use_ldap ldap_host:=$ldap_host ldap_dn:=$ldap_dn opt_filter:=$opt_filter app_login:=$app_login
 
-      # Copy required libs
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/xercesImpl.jar
-      ln -s /usr/share/java/xercesImpl.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/xercesImpl.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/commons-lang.jar 
-      ln -s /usr/share/java/commons-lang.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/commons-lang.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/commons-logging.jar
-      ln -s /usr/share/java/commons-logging.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/commons-logging.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/jdom1.jar
-      ln -s /usr/share/java/jdom1.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/jdom1.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/jsch.jar
-      ln -s /usr/share/java/jsch.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/jsch.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/log4j-1.2.jar
-      ln -s /usr/share/java/log4j-1.2.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/log4j-1.2.jar
-      rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/quartz.jar
-      ln -s /usr/share/java/quartz.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/quartz.jar
+      # clean-up any old references to mail implementations
       rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/*mail.jar
-      ln -s /usr/share/java/javax.mail.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/javax.mail.jar
+
+      # link/copy required libs
+      for library in xercesImpl commons-lang commons-logging jdom1 jsch log4j-1.2 quartz javax.mail slf4j-api slf4j-simple slf4j-log4j12
+      do
+          rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/${library}.jar
+          ln -s /usr/share/java/${library}.jar /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/${library}.jar
+      done
 
       #cp /usr/share/biomaj/lib/biomaj.jar /var/lib/tomcat6/shared/
       rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/biomaj.jar

Attachment: signature.asc
Description: PGP signature

Reply via email to