From 7d21a720d9dbbd55a2017283d8ee5dd75590fe19 Mon Sep 17 00:00:00 2001 From: Ivan Afonichev Date: Mar 02 2016 17:53:07 +0000 Subject: Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 --- diff --git a/tomcat-8.0.conf b/tomcat-8.0.conf index 8550df7..3f43006 100644 --- a/tomcat-8.0.conf +++ b/tomcat-8.0.conf @@ -1,6 +1,7 @@ # System-wide configuration file for tomcat services # This will be loaded by systemd as an environment file, -# so please keep the syntax. +# so please keep the syntax. For shell expansion support +# place your custom files as /etc/tomcat/conf.d/*.conf # # There are 2 "classes" of startup behavior in this package. # The old one, the default service named tomcat.service. diff --git a/tomcat-preamble b/tomcat-preamble index 0079a8c..1271dca 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -11,6 +11,14 @@ if [ -z "${TOMCAT_CFG_LOADED}" ]; then . $TOMCAT_CFG fi +if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then + for file in ${TOMCAT_CONFD}/*.conf ; do + if [ -f "$file" ] ; then + . "$file" + fi + done +fi + if [ -z "$CATALINA_BASE" ]; then if [ -n "$NAME" ]; then if [ -z "$TOMCATS_BASE" ]; then diff --git a/tomcat.spec b/tomcat.spec index 1aa07f5..3a8850e 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -57,7 +57,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons @@ -324,6 +324,8 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/conf.d +/bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out @@ -600,6 +602,8 @@ fi %attr(0775,root,tomcat) %dir %{appdir} %attr(0775,root,tomcat) %dir %{confdir}/Catalina %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0775,root,tomcat) %dir %{confdir}/conf.d +%attr(0664,tomcat,tomcat) %{confdir}/conf.d/README %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties @@ -675,6 +679,10 @@ fi %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service %changelog +* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 +- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 +- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 + * 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