Author: pawelz Date: Mon Jan 26 09:05:21 2009 GMT Module: SPECS Tag: HEAD ---- Log message: - deploy hudson in tomcat - is this a correct way to package .war apps? Please comment. It works out-of-the-box. If you have apache-tomcat installed, you can just rpm -ivh hudson and it works.
---- Files affected: SPECS: hudson.spec (1.2 -> 1.3) ---- Diffs: ================================================================ Index: SPECS/hudson.spec diff -u SPECS/hudson.spec:1.2 SPECS/hudson.spec:1.3 --- SPECS/hudson.spec:1.2 Mon Jan 26 08:50:11 2009 +++ SPECS/hudson.spec Mon Jan 26 10:05:16 2009 @@ -10,10 +10,13 @@ Group: Development/Languages/Java Source0: https://hudson.dev.java.net/files/documents/2402/124475/%{name}.war # Source0-md5: 223788eb7fd27ba970daf8e06053f356 +Source1: %{name}-web.xml +Source2: %{name}-context.xml URL: https://hudson.dev.java.net/ BuildRequires: jpackage-utils BuildRequires: rpm-javaprov BuildRequires: rpmbuild(macros) >= 1.300 +Requires: apache-tomcat Requires: jpackage-utils BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -37,19 +40,28 @@ notice when something is wrong. %prep -%setup -qcT +%setup -qc %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_javadir} -cp -a %{SOURCE0} $RPM_BUILD_ROOT%{_javadir} +install -d $RPM_BUILD_ROOT{%{_sysconfdir}/hudson,%{_datadir}/tomcat/webapps/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 +cp -a * $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/hudson +ln -sf %{_sysconfdir}/hudson/web.xml $RPM_BUILD_ROOT%{_datadir}/tomcat/webapps/hudson/WEB-INF/web.xml %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%{_javadir}/*.war +%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}/tomcat/webapps/hudson +%attr(755,http,http) %dir %{_sharedstatedir}/hudson %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog @@ -57,6 +69,12 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.3 2009/01/26 09:05:16 pawelz +- deploy hudson in tomcat +- is this a correct way to package .war apps? Please comment. It works + out-of-the-box. If you have apache-tomcat installed, you can just + rpm -ivh hudson and it works. + Revision 1.2 2009/01/26 07:50:11 pawelz - up to 1.278 ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/hudson.spec?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
