[tomcat6] resolves 677414

Dave Knox dknox at fedoraproject.org
Wed Jul 6 18:10:14 UTC 2011


commit 8529967b87df04f1b092067a8d6a644a945ef043
Author: David Knox <dknox at dknox.(none)>
Date:   Wed Jul 6 12:10:06 2011 -0600

    resolves 677414

 tomcat6-6.0.wrapper |   12 ++++++------
 tomcat6.spec        |   19 ++++++++++++++++---
 2 files changed, 22 insertions(+), 9 deletions(-)
---
diff --git a/tomcat6-6.0.wrapper b/tomcat6-6.0.wrapper
index 0e95331..979f0a7 100644
--- a/tomcat6-6.0.wrapper
+++ b/tomcat6-6.0.wrapper
@@ -8,13 +8,13 @@ else
 fi
 
 # Get the tomcat config (use this for environment specific settings)
-#if [ -z "${TOMCAT_CFG}" ]; then
-#  TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
-#fi
+if [ -z "${TOMCAT_CFG}" ]; then
+  TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
+fi
 
-#if [ -r "$TOMCAT_CFG" ]; then
-#  . $TOMCAT_CFG
-#fi
+if [ -r "$TOMCAT_CFG" ]; then
+  . $TOMCAT_CFG
+fi
 
 set_javacmd
 
diff --git a/tomcat6.spec b/tomcat6.spec
index d55251d..552b4f5 100644
--- a/tomcat6.spec
+++ b/tomcat6.spec
@@ -53,7 +53,7 @@
 Name:          tomcat6
 Epoch:         0
 Version:       %{major_version}.%{minor_version}.%{micro_version}
-Release:       10%{?dist}
+Release:       11%{?dist}
 Summary:       Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
 
 Group:         Networking/Daemons
@@ -455,9 +455,19 @@ if [ -d %{_tmppath}/%{name}-confdir.bak ]; then
   %{__rm} -rf %{_tmppath}/%{name}-confdir.bak
 fi
 
+# execute only when update is run
+if [ "$1" -eq "0" ]; then
+   mkdir -p %{workdir}
+   mkdir -p %{tempdir}
+   chown tomcat:tomcat %{workdir}
+   chown tomcat:tomcat %{tempdir}
+   chmod 775 %{workdir}
+   chmod 775 %{tempdir}
+fi
+
 %preun
-# clean tempdir and workdir on removal or upgrade
-%{__rm} -rf %{workdir} %{tempdir}
+# don't remove under any condition
+#%{__rm} -rf %{workdir} %{tempdir}
 if [ "$1" = "0" ]; then
     %{_initrddir}/%{name} stop >/dev/null 2>&1
     /sbin/chkconfig --del %{name}
@@ -573,6 +583,9 @@ fi
 %{appdir}/sample
 
 %changelog
+* Tue Jul 5 2011 David Knox <dknox at redhat.com> 0:6.0.32-11
+- Resolves rhbz 677414 update deletes workdir and tempdir
+
 * Fri Jul 1 2011 David Knox <dknox at redhat.com> 0:6.0.32-10
 - Resolves: rhbz 669969  tomcat jdbc
 


More information about the scm-commits mailing list