[tomcat6/f15] Resolves rhbz 677414

Dave Knox dknox at fedoraproject.org
Wed Jul 6 00:07:01 UTC 2011


commit aec1e3712ebd14186fe8de99796bd2eb6f7bd804
Author: David Knox <dknox at dknox.(none)>
Date:   Tue Jul 5 17:52:25 2011 -0600

    Resolves rhbz 677414

 tomcat6.spec |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/tomcat6.spec b/tomcat6.spec
index 742e12f..284be73 100644
--- a/tomcat6.spec
+++ b/tomcat6.spec
@@ -53,7 +53,7 @@
 Name:          tomcat6
 Epoch:         0
 Version:       %{major_version}.%{minor_version}.%{micro_version}
-Release:       4%{?dist}
+Release:       5%{?dist}
 Summary:       Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
 
 Group:         Networking/Daemons
@@ -453,15 +453,26 @@ 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}
-if [ "$1" = "0" ]; then
+# Don't remove workdir and tempdir under any condition
+if [ $1 -eq 0  ]; then
+#	%{__rm} -rf %{workdir} %{tempdir}
     %{_initrddir}/%{name} stop >/dev/null 2>&1
     /sbin/chkconfig --del %{name}
 fi
 
 
+
 %postun
 %update_maven_depmap
 
@@ -572,6 +583,11 @@ fi
 %{appdir}/sample
 
 %changelog
+* Tue Jul 5 2011 David Knox <dknox at redhat.com> 0:6.0.32-5
+- Resolves rhbz 677414 - change %preun so erasing work
+- and temp dirs occurs only on removal. Add recreation of
+- tempdir and workdir only on update in %posttrans.
+
 * Fri Jul 1 2011 David Knox <dknox at redhat.com> 0:6.0.32-4
 - Resolves thbz 669969 - DataSourceFactory config in sysconfig
 


More information about the scm-commits mailing list