From ef1b76e880ba0ef33687d2a89aeb1da9e71496be Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Feb 27 2016 15:26:53 +0000 Subject: Fix non-service use and default datasource factory - Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 - Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 - Fix changelog --- diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index 4631d83..ad6e668 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -12,3 +12,11 @@ # To prevent this file to be loaded multiple times. TOMCAT_CFG_LOADED="1" + +if [ -z "${TOMCAT_SYSCONF_LOADED}" ]; then + if [ -z "${TOMCAT_SYSCONF}" ]; then + TOMCAT_SYSCONF="/etc/sysconfig/tomcat" + fi + . $TOMCAT_SYSCONF +fi + diff --git a/tomcat-8.0.sysconfig b/tomcat-8.0.sysconfig index 9e33f1f..d918420 100644 --- a/tomcat-8.0.sysconfig +++ b/tomcat-8.0.sysconfig @@ -8,9 +8,8 @@ # the syntax. If you need to use shell expansion, configure the necessary # variables in /etc/tomcat/tomcat.conf. -# This variable is used to figure out if config is loaded or not. -# Default is empty to load /etc/tomcat/tomcat.conf for overrides. -#TOMCAT_CFG_LOADED="1" +# This variable is used to figure out if this config is loaded or not. +TOMCAT_SYSCONF_LOADED="1" # In new-style instances, if CATALINA_BASE isn't specified, it will # be constructed by joining TOMCATS_BASE and NAME. @@ -31,6 +30,9 @@ CATALINA_TMPDIR="/var/cache/tomcat/temp" # Use JAVA_OPTS to set java.library.path for libtcnative.so #JAVA_OPTS="-Djava.library.path=/usr/lib" +# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 +JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" + # You can change your tomcat locale here #LANG="en_US" diff --git a/tomcat.spec b/tomcat.spec index fadbc5c..1aa07f5 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -675,7 +675,11 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog -* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-3 +* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 +- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 +- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 + +* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 - Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 * Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 @@ -691,7 +695,7 @@ fi * Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Tue Nov 11 2015 Robert Scheck 1:8.0.26-2 +* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 - CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) * Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1