From 7d7781ca2404b56d3b0a455e550b072cccbee980 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Jun 04 2021 14:29:44 +0000 Subject: Add back logrotate config file per devel list request --- diff --git a/tomcat-9.0.logrotate b/tomcat-9.0.logrotate new file mode 100644 index 0000000..082092a --- /dev/null +++ b/tomcat-9.0.logrotate @@ -0,0 +1,11 @@ +# This is an example config only and is disabled by default +# If you wish to use it, you'll need to update /etc/tomcat/logging.properties +# to prevent catalina*.log from being rotated by Tomcat +@@@TCLOG@@@/catalina*.log { + copytruncate + weekly + rotate 52 + compress + missingok + create 0644 tomcat tomcat +} diff --git a/tomcat.spec b/tomcat.spec index 4fd3e6d..3c95116 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -56,7 +56,7 @@ Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API License: ASL 2.0 @@ -65,6 +65,7 @@ Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{vers Source1: %{name}-%{major_version}.%{minor_version}.conf Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper +Source5: %{name}-%{major_version}.%{minor_version}.logrotate Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script Source11: %{name}-%{major_version}.%{minor_version}.service @@ -233,6 +234,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir} +%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} @@ -270,6 +272,8 @@ popd ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service +%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ + > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}.disabled %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ @@ -395,6 +399,7 @@ fi %attr(0755,root,root) %{_libexecdir}/%{name}/preamble %attr(0755,root,root) %{_libexecdir}/%{name}/server %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}.disabled %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} @@ -467,6 +472,9 @@ fi %{appdir}/ROOT %changelog +* Fri Jun 04 2021 Coty Sutherland 1:9.0.45-4 +- Add back logrotate config file per devel list request + * Fri Jun 04 2021 Coty Sutherland 1:9.0.45-3 - Drop geronimo-jaxrpc, which provided the webservices naming factory resources that are generally unused