diff --git a/tomcat.spec b/tomcat.spec index c4c8cf00fa8054584a84b1b21aa9c1718c09db39..b392ab888056b72a6c57f6ce33f1d3e5c5d43268 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -1,33 +1,4 @@ -%define anolis_release 1 -# Copyright (c) 2000-2008, JPackage Project -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the JPackage Project nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# +%define anolis_release 2 %global jspspec 2.3 %global major_version 9 @@ -56,7 +27,7 @@ Name: tomcat Epoch: 1 -Version: %{major_version}.%{minor_version}.%{micro_version} +Version: 9.0.73 Release: %{anolis_release}%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API @@ -87,18 +58,18 @@ Patch6: %{name}-%{major_version}.%{minor_version}-bnd-annotation.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.10 +BuildRequires: wsdl4j +BuildRequires: systemd BuildRequires: findutils -BuildRequires: java-devel >= 1:1.8.0 -BuildRequires: javapackages-local BuildRequires: aqute-bnd BuildRequires: aqute-bndlib -BuildRequires: wsdl4j -BuildRequires: systemd +BuildRequires: ecj >= 1:4.10 +BuildRequires: javapackages-local +BuildRequires: java-devel >= 1:1.8.0 -Requires: java-headless >= 1:1.8.0 -Requires: javapackages-tools Requires: procps +Requires: javapackages-tools +Requires: java-headless >= 1:1.8.0 Requires: %{name}-lib = %{epoch}:%{version}-%{release} Recommends: tomcat-native >= %{native_version} Conflicts: tomcat-native >= 2 @@ -111,22 +82,42 @@ Requires(postun): systemd Provides: %{name}-log4j = %{epoch}:%{version}-%{release} %description -Tomcat is the servlet container that is used in the official Reference -Implementation for the Java Servlet and JavaServer Pages technologies. -The Java Servlet and JavaServer Pages specifications are developed by -Sun under the Java Community Process. - -Tomcat is developed in an open and participatory environment and -released under the Apache Software License version 2.0. Tomcat is intended -to be a collaboration of the best-of-breed developers from around the world. - -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} -BuildArch: noarch - -%description doc -The %{name}-doc package contains documentation files for %{name}. +Tomcat, also known as Apache Tomcat, is an open-source web application server +that is designed to run Java-based applications. It is a lightweight, yet +powerful server that can be used to serve static and dynamic web pages. + +Tomcat provides a robust and scalable platform for deploying web applications +and handling high volumes of traffic. It is widely used in the industry, +particularly for building and deploying Java-based web applications. + +Tomcat is known for its modular architecture, which allows users to customize +and extend the server's functionality. It is built using the Java Servlet API +and the JavaServer Pages (JSP) technology, which makes it a suitable platform +for deploying dynamic web applications. + +One of Tomcat's key features is its ability to support multiple protocols, +including HTTP, HTTPS, and AJP. This allows developers to build web applications +that can be accessed using different protocols, depending on the needs of the +application. + +Another important feature of Tomcat is its support for multiple operating +systems and platforms. It can run on Windows, Linux, and Mac OS X, among others, +making it a versatile choice for web application deployment. + +Tomcat provides various features that make it easy to configure and manage, +such as a web-based administration console, configuration files, and connectors. +The web-based administration console is a user-friendly interface that allows +administrators to configure and manage the server from a web browser. + +Tomcat is often used in conjunction with other technologies, such as Apache HTTP +Server, to provide a complete web application stack. It can be used to host +Java-based applications that use the Spring framework, Hibernate, and other +popular Java libraries. + +Overall, Tomcat is a powerful and flexible web application server that is widely +used in the industry. Its modular architecture, support for multiple protocols +and operating systems, and ease of configuration and management make it an ideal +choice for deploying Java-based web applications. %package admin-webapps Summary: The host-manager and manager web applications for Apache Tomcat @@ -185,6 +176,14 @@ Requires: %{name} = %{epoch}:%{version}-%{release} %description webapps The ROOT web application for Apache Tomcat. +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %prep %autosetup -p0 -n %{packdname} # remove pre-built binaries and windows files @@ -236,25 +235,25 @@ touch HACK %install # build initial path structure -%{__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} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/conf.d +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_bindir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_sbindir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_systemddir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{appdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{bindir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{confdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{confdir}/conf.d /bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir} -%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir} -%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{libdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{logdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{homedir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{tempdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{workdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_unitdir} +%{__install} -m 0775 -d ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} # move things into place # First copy supporting libs to tomcat lib @@ -339,7 +338,7 @@ pushd ${RPM_BUILD_ROOT}%{homedir} popd # Install the maven metadata for the spec impl artifacts as other projects use them -#%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} +#%{__install} -m 0644 -p ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd res/maven for pom in tomcat-el-api.pom tomcat-jsp-api.pom tomcat-servlet-api.pom; do # fix-up version in all pom files @@ -459,17 +458,6 @@ fi %{homedir}/logs %{homedir}/conf -%files doc -%doc {NOTICE,RELEASE*} - -%files admin-webapps -%defattr(0664,root,tomcat,0755) -%{appdir}/host-manager -%{appdir}/manager - -%files docs-webapp -%{appdir}/docs - %files lib %dir %{libdir} %{libdir}/*.jar @@ -492,11 +480,25 @@ fi %{_javadir}/%{name}-el-%{elspec}-api.jar %{libdir}/%{name}-el-%{elspec}-api.jar +%files admin-webapps +%defattr(0664,root,tomcat,0755) +%{appdir}/host-manager +%{appdir}/manager + %files webapps %defattr(0644,tomcat,tomcat,0755) %{appdir}/ROOT +%files docs-webapp +%{appdir}/docs + +%files doc +%doc {NOTICE,RELEASE*} + %changelog +* Wed Apr 12 2023 Xuchun Shang - 1:9.0.73-2 +- Optimize the spec + * Mon Apr 10 2023 Funda Wang - 1:9.0.73-1 - New version 9.0.73