From 3cb34c719a6e6042afb64eb8f76a391c8c67cb48 Mon Sep 17 00:00:00 2001 From: david knox Date: Feb 28 2011 22:48:39 +0000 Subject: Rebased on tomcat 6.0.32. Corrected order of config files in tomcat6-init. Adjusted permissions on logs and confdir to get it to work. --- diff --git a/.gitignore b/.gitignore index aeb3228..5ff9c77 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ apache-tomcat-6.0.24-src.tar.gz apache-tomcat-6.0.26-src.tar.gz apache-tomcat-6.0.29-src.tar.gz apache-tomcat-6.0.30-src.tar.gz +/apache-tomcat-6.0.32-src.tar.gz diff --git a/sources b/sources index 3290f93..f1dcb10 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 7b811c9092bcb7779bd8df772744ac15 apache-tomcat-6.0.30-src.tar.gz +19a1eaa9c9938b520d3c360d8cf4af22 apache-tomcat-6.0.32-src.tar.gz diff --git a/tomcat6-6.0.init b/tomcat6-6.0.init index 43f53a4..ae5d80d 100644 --- a/tomcat6-6.0.init +++ b/tomcat6-6.0.init @@ -43,22 +43,22 @@ else SU="/bin/su -s /bin/sh" fi -# Get instance specific config file -if [ -r "/etc/sysconfig/${NAME}" ]; then - . /etc/sysconfig/${NAME} -fi - # Get the tomcat config (use this for environment specific settings) -TOMCAT_CFG="${CATALINA_HOME}/conf/tomcat6.conf" +TOMCAT_CFG="/etc/tomcat6/tomcat6.conf" if [ -r "$TOMCAT_CFG" ]; then . $TOMCAT_CFG fi +# Get instance specific config file +if [ -r "/etc/sysconfig/${NAME}" ]; then + . /etc/sysconfig/${NAME} +fi + # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script -TOMCAT_SCRIPT="/usr/sbin/tomcat6" +TOMCAT_SCRIPT="/usr/sbin/${NAME}" # Tomcat program name TOMCAT_PROG="${NAME}" @@ -67,7 +67,8 @@ TOMCAT_PROG="${NAME}" TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file -TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/catalina.out}" +TOMCAT_LOG="${TOMCAT_LOG:-/var/log/tomcat6/catalina.out}" + RETVAL="0" diff --git a/tomcat6.spec b/tomcat6.spec index 74d7245..18cceb0 100644 --- a/tomcat6.spec +++ b/tomcat6.spec @@ -31,7 +31,7 @@ %global jspspec 2.1 %global major_version 6 %global minor_version 0 -%global micro_version 30 +%global micro_version 32 %global packdname apache-tomcat-%{version}-src %global servletspec 2.5 %global elspec 2.1 @@ -72,7 +72,8 @@ Source9: jsp-api-OSGi-MANIFEST.MF Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch +# In 6.0.32 source +#Patch2: %{name}-%{major_version}.%{minor_version}-rhbz-674601.patch BuildArch: noarch BuildRequires: ant @@ -80,17 +81,19 @@ BuildRequires: ant-nodeps BuildRequires: ecj BuildRequires: findutils BuildRequires: jakarta-commons-collections -BuildRequires: apache-commons-daemon -BuildRequires: apache-commons-dbcp -BuildRequires: apache-commons-pool +BuildRequires: jakarta-commons-daemon +BuildRequires: jakarta-commons-dbcp +BuildRequires: jakarta-commons-pool BuildRequires: jakarta-taglibs-standard BuildRequires: java-1.6.0-devel BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: junit BuildRequires: log4j -Requires: apache-commons-daemon -Requires: apache-commons-logging -Requires: apache-commons-collections +Requires: jakarta-commons-daemon +Requires: jakarta-commons-logging +Requires: jakarta-commons-collections +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool Requires: java-1.6.0 Requires: procps Requires: %{name}-lib = %{epoch}:%{version}-%{release} @@ -159,9 +162,9 @@ Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} Requires: ecj -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool +Requires: jakarta-commons-collections +Requires: jakarta-commons-dbcp +Requires: jakarta-commons-pool Requires(preun): coreutils %description lib @@ -207,7 +210,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 -%patch2 -p0 +# %patch2 -p0 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar @@ -269,6 +272,8 @@ zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} +/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out +chmod 775 ${RPM_BUILD__ROOT}%{logdir}/catalina.out %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} @@ -476,7 +481,7 @@ if [ "$1" = "0" ]; then fi %files -%defattr(-,root,tomcat,-) +%defattr(-,root,tomcat,0775) %doc {LICENSE,NOTICE,RELEASE*} %attr(0755,root,root) %{_bindir}/%{name}-digest %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper @@ -486,22 +491,23 @@ fi %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %attr(0765,root,tomcat) %dir %{basedir} -%attr(0765,root,tomcat) %dir %{appdir} -%attr(0765,root,tomcat) %dir %{confdir} -%attr(0765,root,tomcat) %dir %{confdir}/Catalina -%attr(0765,root,tomcat) %dir %{confdir}/Catalina/localhost +%attr(0775,tomcat,root) %dir %{appdir} +%attr(0775,tomcat,root) %dir %{confdir} +%attr(0775,tomcat,root) %dir %{confdir}/Catalina +%attr(0775,tomcat,root) %dir %{confdir}/Catalina/localhost %config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml %config(noreplace) %{confdir}/log4j.properties -%attr(0664,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml +%attr(0664,tomcat,root) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml %attr(0765,tomcat,root) %dir %{cachedir} %attr(0765,tomcat,root) %dir %{tempdir} %attr(0765,tomcat,root) %dir %{workdir} -%attr(0765,root,tomcat) %dir %{logdir} +%attr(0775,tomcat,root) %dir %{logdir} +%attr(0664,tomcat,tomcat) %{logdir}/catalina.out %dir %{homedir} %{bindir}/bootstrap.jar %{bindir}/catalina-tasks.xml @@ -561,6 +567,11 @@ fi %{appdir}/sample %changelog +* Mon Feb 7 2011 David Knox 0:6.0.32-1 +- Rebase on 6.0.32 with several bug fixes and security fixes +- changed apache-commons to jakarta-commons to fix missing +- dependencies during install. + * Thu Feb 3 2011 Alexander Kurtakov 0:6.0.30-1 - Update to 6.0.30. - Drop jdt-core.pom which is gone upstream now.