packages: hudson/hudson.spec - install tomcat context configuration into /e...

pawelz pawelz at pld-linux.org
Wed Mar 24 13:47:17 CET 2010


Author: pawelz                       Date: Wed Mar 24 12:47:17 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- install tomcat context configuration into /etc/hudson and symlink it to %{_tomcatconfdir}
- use all these new cool tomcat-related macros
- clear tomcat cache in %postun
- require tomcat and new rpm macros

---- Files affected:
packages/hudson:
   hudson.spec (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: packages/hudson/hudson.spec
diff -u packages/hudson/hudson.spec:1.22 packages/hudson/hudson.spec:1.23
--- packages/hudson/hudson.spec:1.22	Wed Dec 16 12:34:54 2009
+++ packages/hudson/hudson.spec	Wed Mar 24 13:47:11 2010
@@ -18,8 +18,8 @@
 URL:		https://hudson.dev.java.net/
 BuildRequires:	jpackage-utils
 BuildRequires:	rpm-javaprov
-BuildRequires:	rpmbuild(macros) >= 1.300
-Requires:	group(servlet)
+BuildRequires:  rpmbuild(macros) >= 1.546
+Requires:	tomcat
 Requires:	jpackage-utils
 Requires:	jre-X11
 BuildArch:	noarch
@@ -53,21 +53,24 @@
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/hudson,%{_datadir}/hudson,%{_sharedstatedir}/{hudson,tomcat/conf/Catalina/localhost}}
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/hudson/web.xml
-install %{SOURCE2} $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/hudson.xml
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/tomcat-context.xml
+ln -sf %{_sysconfdir}/%{name}/tomcat-context.xml $RPM_BUILD_ROOT%{_tomcatconfdir}/%{name}.xml
 cp -a . $RPM_BUILD_ROOT%{_datadir}/hudson
 ln -sf %{_sysconfdir}/hudson/web.xml $RPM_BUILD_ROOT%{_datadir}/hudson/WEB-INF/web.xml
 
+%postun
+%tomcat_clear_cache %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/hudson
-%config(noreplace) %{_sysconfdir}/hudson/web.xml
-# do not make this file writeable by tomcat. We do not want to allow user to
-# undeploy this app via tomcat manager.
-%config(noreplace) %{_sharedstatedir}/tomcat/conf/Catalina/localhost/hudson.xml
-%{_datadir}/hudson
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hudson/web.xml
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}
+%{_tomcatconfdir}/%{name}.xml
+%{_datadir}/%{name}
 %attr(2775,root,servlet) %dir %{_sharedstatedir}/hudson
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -76,6 +79,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.23  2010/03/24 12:47:11  pawelz
+- install tomcat context configuration into /etc/hudson and symlink it to %{_tomcatconfdir}
+- use all these new cool tomcat-related macros
+- clear tomcat cache in %postun
+- require tomcat and new rpm macros
+
 Revision 1.22  2009/12/16 11:34:54  pawelz
 - up to 1.337
 - R: jre-X11 (because of fonts. Reported by Witek Wołejszo <ww (at) touk (dot) pl>, thx)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/hudson/hudson.spec?r1=1.22&r2=1.23&f=u



More information about the pld-cvs-commit mailing list