2008-04-07 22:37:26 +00:00
# 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.
#
2018-06-08 18:57:09 +00:00
%global major_version 9
%global minor_version 0
2020-04-21 19:53:08 +00:00
%global micro_version 30
%global redhat_version 4
2018-06-08 18:57:09 +00:00
%global packdname apache-tomcat-%{version} .redhat-%{redhat_version} -src
# Specification versions
%global servletspec 4.0
2014-09-21 00:11:01 +00:00
%global jspspec 2.3
%global elspec 3.0
2016-02-13 22:44:02 +00:00
2018-06-08 18:57:09 +00:00
%global tcuid 91
2008-04-07 22:37:26 +00:00
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
2018-06-12 14:24:54 +00:00
%global basedir %{_var}/lib/tomcat
2010-03-29 17:59:55 +00:00
%global appdir %{basedir} /webapps
2018-06-12 14:24:54 +00:00
%global homedir %{_datadir} /tomcat
2011-06-06 21:23:05 +00:00
%global bindir %{homedir} /bin
2018-06-12 14:24:54 +00:00
%global confdir %{_sysconfdir} /tomcat
%global libdir %{_javadir} /tomcat
%global logdir %{_var}/log/tomcat
%global cachedir %{_var}/cache/tomcat
2010-03-29 17:59:55 +00:00
%global tempdir %{cachedir} /temp
%global workdir %{cachedir} /work
%global _initrddir %{_sysconfdir} /init.d
2011-06-06 21:23:05 +00:00
%global _systemddir /lib/systemd/system
2008-04-07 22:37:26 +00:00
2019-04-23 18:25:50 +00:00
Name : pki-servlet-engine
2018-06-12 16:20:26 +00:00
Epoch : 1
2010-12-02 16:10:02 +00:00
Version : %{major_version} .%{minor_version} .%{micro_version}
2020-04-21 19:53:08 +00:00
Release : 1%{?dist}
2010-12-02 16:10:02 +00:00
Summary : Apache Servlet/JSP Engine, RI for Servlet %{servletspec} /JSP %{jspspec} API
2011-05-01 22:09:32 +00:00
Group : System Environment/Daemons
2010-12-02 16:10:02 +00:00
License : ASL 2.0
URL : http://tomcat.apache.org/
2018-06-08 18:57:09 +00:00
#Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz
2018-11-09 16:42:09 +00:00
Source0 : tomcat-%{version} .redhat-%{redhat_version} -src.zip
2018-06-12 14:24:54 +00:00
Source1 : tomcat-%{major_version} .%{minor_version} .conf
Source3 : tomcat-%{major_version} .%{minor_version} .sysconfig
Source4 : tomcat-%{major_version} .%{minor_version} .wrapper
Source6 : tomcat-%{major_version} .%{minor_version} -digest.script
Source7 : tomcat-%{major_version} .%{minor_version} -tool-wrapper.script
Source8 : tomcat-%{major_version} .%{minor_version} .service
2014-03-25 23:34:21 +00:00
Source21 : tomcat-functions
2013-06-11 17:35:03 +00:00
Source30 : tomcat-preamble
Source31 : tomcat-server
Source32 : tomcat-named.service
2012-01-11 22:58:04 +00:00
2018-06-12 14:24:54 +00:00
Patch0 : tomcat-%{major_version} .%{minor_version} -bootstrap-MANIFEST.MF.patch
Patch1 : tomcat-%{major_version} .%{minor_version} -tomcat-users-webapp.patch
2020-04-21 19:53:08 +00:00
Patch2 : tomcat-9.0.30-CompilerOptionsRemoval.patch
2018-06-21 17:33:12 +00:00
Patch3 : tomcat-%{major_version} .%{minor_version} -catalina-policy.patch
2020-04-21 19:53:08 +00:00
Patch4 : removeUnusedDependencies.patch
2011-04-27 05:54:04 +00:00
2010-12-02 16:10:02 +00:00
BuildArch : noarch
2008-04-07 22:37:26 +00:00
BuildRequires : ant
BuildRequires : findutils
2018-06-08 18:57:09 +00:00
BuildRequires : java-devel >= 1:1.8.0
2008-04-07 22:37:26 +00:00
BuildRequires : jpackage-utils >= 0:1.7.0
2018-08-03 08:53:35 +00:00
BuildRequires : maven-local
2018-07-20 06:39:03 +00:00
BuildRequires : systemd-units
2018-03-15 16:57:12 +00:00
2018-06-15 18:16:40 +00:00
Requires : ant
2018-06-08 18:57:09 +00:00
Requires : java-headless >= 1:1.8.0
2018-06-15 18:16:40 +00:00
Requires : java-devel >= 1:1.8.0
2013-07-11 20:44:06 +00:00
Requires : jpackage-utils
2010-12-02 16:10:02 +00:00
Requires : procps
Requires(pre) : shadow-utils
2011-01-03 08:54:46 +00:00
Requires(post) : chkconfig
2018-06-08 18:57:09 +00:00
Requires(postun) : chkconfig
2011-01-03 08:54:46 +00:00
Requires(preun) : chkconfig
2011-11-10 21:48:56 +00:00
Requires(post) : systemd-units
Requires(preun) : systemd-units
Requires(postun) : systemd-units
2008-04-07 22:37:26 +00:00
Requires(preun) : coreutils
2018-06-12 16:16:32 +00:00
Requires : pki-servlet-%{servletspec} -api = %{epoch} :%{version} -%{release}
2018-06-22 13:56:09 +00:00
# Add bundled so that everyone knows this is Tomcat
2020-04-21 19:53:08 +00:00
Provides : bundled(tomcat) = 9.0.30.redhat-%{redhat_version}
2018-06-22 13:56:09 +00:00
2019-06-01 02:33:07 +00:00
Obsoletes : pki-servlet-container
2018-06-08 18:57:09 +00:00
%description
2019-04-23 18:25:50 +00:00
Tomcat is the servlet engine that is used in the official Reference
2018-06-08 18:57:09 +00:00
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.
2008-04-07 22:37:26 +00:00
2018-06-08 18:57:09 +00:00
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.
2008-04-07 22:37:26 +00:00
2018-06-12 16:11:15 +00:00
%package -n pki-servlet-%{servletspec}-api
2018-06-12 14:04:37 +00:00
Group : Development/Libraries
Summary : Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes
Requires(post) : chkconfig
Requires(postun) : chkconfig
2018-06-12 16:11:15 +00:00
%description -n pki-servlet-%{servletspec}-api
2018-06-12 14:04:37 +00:00
Apache Tomcat Servlet API Implementation Classes.
2008-04-07 22:37:26 +00:00
%prep
2011-01-03 08:54:46 +00:00
%setup -q -n %{packdname}
2018-06-08 18:57:09 +00:00
2008-04-07 22:37:26 +00:00
# remove pre-built binaries and windows files
2008-09-05 17:14:04 +00:00
find . -type f \( -name " * . b a t " -o -name " * . c l a s s " -o -name Thumbs.db -o -name " * . g z " -o \
2010-12-02 16:15:01 +00:00
-name " * . j a r " -o -name " * . w a r " -o -name " * . z i p " \) -delete
2008-04-07 22:37:26 +00:00
%patch0 -p0
%patch1 -p0
2016-07-01 18:45:28 +00:00
%patch2 -p0
2018-06-21 17:33:12 +00:00
%patch3 -p0
2020-04-21 19:53:08 +00:00
%patch4 -p0
2008-04-07 22:37:26 +00:00
2018-06-12 19:48:54 +00:00
# Since we don't support ECJ in RHEL anymore, remove the class that requires it
%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java
2008-04-07 22:37:26 +00:00
%build
2011-01-03 08:54:46 +00:00
export OPT_JAR_LIST=" x a l a n - j 2 - s e r i a l i z e r "
2018-06-12 19:59:47 +00:00
# Create a dummy file for later removal
touch HACK
# who needs a build.properties file anyway
%{ant} -Dbase.path=" . " \
-Dbuild.compiler=" m o d e r n " \
-Dcommons-daemon.jar=" H A C K " \
-Dcommons-daemon.native.src.tgz=" H A C K " \
-Djdt.jar=" H A C K " \
-Dtomcat-native.tar.gz=" H A C K " \
-Dtomcat-native.home=" . " \
-Dcommons-daemon.native.win.mgr.exe=" H A C K " \
-Dnsis.exe=" H A C K " \
deploy dist-prepare dist-source
# remove some jars that we don't need
2020-04-21 19:53:08 +00:00
#%%{__rm} output/build/bin/commons-daemon.jar
2008-04-07 22:37:26 +00:00
%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} %{_initrddir}
2011-06-06 21:23:05 +00:00
%{__install} -d -m 0755 ${RPM_BUILD_ROOT} %{_systemddir}
2008-04-07 22:37:26 +00:00
%{__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}
2010-06-29 21:51:36 +00:00
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{confdir}
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{confdir} /Catalina/localhost
2016-03-02 17:53:07 +00:00
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{confdir} /conf.d
/bin/echo " P l a c e y o u r c u s t o m * . c o n f f i l e s h e r e . S h e l l e x p a n s i o n i s s u p p o r t e d . " > ${RPM_BUILD_ROOT} %{confdir} /conf.d/README
2008-04-07 22:37:26 +00:00
%{__install} -d -m 0755 ${RPM_BUILD_ROOT} %{libdir}
2010-06-29 21:51:36 +00:00
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{logdir}
2014-03-25 23:34:21 +00:00
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{_localstatedir} /lib/tomcats
2010-06-29 21:51:36 +00:00
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{homedir}
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{tempdir}
%{__install} -d -m 0775 ${RPM_BUILD_ROOT} %{workdir}
2011-11-10 21:48:56 +00:00
%{__install} -d -m 0755 ${RPM_BUILD_ROOT} %{_unitdir}
2018-06-12 14:24:54 +00:00
%{__install} -d -m 0755 ${RPM_BUILD_ROOT} %{_libexecdir} /tomcat
2010-03-29 17:59:55 +00:00
2008-04-07 22:37:26 +00:00
# move things into place
2010-03-29 17:59:55 +00:00
# First copy supporting libs to tomcat lib
2011-01-03 08:54:46 +00:00
pushd output/build
2008-04-07 22:37:26 +00:00
%{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT} %{bindir}
2018-03-15 16:57:12 +00:00
%{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT} %{confdir}
2008-04-07 22:37:26 +00:00
%{__cp} -a lib/*.jar ${RPM_BUILD_ROOT} %{libdir}
popd
2010-12-02 16:15:01 +00:00
2008-04-07 22:37:26 +00:00
%{__sed} -e " s | \ @ \ @ \ @ T C H O M E \ @ \ @ \ @ | %{homedir} | g " \
2010-06-29 21:51:36 +00:00
-e " s | \ @ \ @ \ @ T C T E M P \ @ \ @ \ @ | %{tempdir} | g " \
-e " s | \ @ \ @ \ @ L I B D I R \ @ \ @ \ @ | %{_libdir} | g " %{SOURCE1} \
2018-06-12 14:24:54 +00:00
> ${RPM_BUILD_ROOT} %{confdir} /tomcat.conf
2008-04-07 22:37:26 +00:00
%{__sed} -e " s | \ @ \ @ \ @ T C H O M E \ @ \ @ \ @ | %{homedir} | g " \
2010-06-29 21:51:36 +00:00
-e " s | \ @ \ @ \ @ T C T E M P \ @ \ @ \ @ | %{tempdir} | g " \
-e " s | \ @ \ @ \ @ L I B D I R \ @ \ @ \ @ | %{_libdir} | g " %{SOURCE3} \
2018-06-12 14:24:54 +00:00
> ${RPM_BUILD_ROOT} %{_sysconfdir} /sysconfig/tomcat
2008-04-07 22:37:26 +00:00
%{__install} -m 0644 %{SOURCE4} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_sbindir} /tomcat
2018-06-11 18:28:49 +00:00
%{__install} -m 0644 %{SOURCE8} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_unitdir} /tomcat.service
2008-04-07 22:37:26 +00:00
%{__sed} -e " s | \ @ \ @ \ @ T C H O M E \ @ \ @ \ @ | %{homedir} | g " \
2010-06-29 21:51:36 +00:00
-e " s | \ @ \ @ \ @ T C T E M P \ @ \ @ \ @ | %{tempdir} | g " \
-e " s | \ @ \ @ \ @ L I B D I R \ @ \ @ \ @ | %{_libdir} | g " %{SOURCE6} \
2018-06-12 14:24:54 +00:00
> ${RPM_BUILD_ROOT} %{_bindir} /tomcat-digest
2008-04-07 22:37:26 +00:00
%{__sed} -e " s | \ @ \ @ \ @ T C H O M E \ @ \ @ \ @ | %{homedir} | g " \
2010-06-29 21:51:36 +00:00
-e " s | \ @ \ @ \ @ T C T E M P \ @ \ @ \ @ | %{tempdir} | g " \
-e " s | \ @ \ @ \ @ L I B D I R \ @ \ @ \ @ | %{_libdir} | g " %{SOURCE7} \
2018-06-12 14:24:54 +00:00
> ${RPM_BUILD_ROOT} %{_bindir} /tomcat-tool-wrapper
2013-06-11 17:35:03 +00:00
2014-03-25 23:34:21 +00:00
%{__install} -m 0644 %{SOURCE21} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_libexecdir} /tomcat/functions
2013-06-11 17:35:03 +00:00
%{__install} -m 0755 %{SOURCE30} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_libexecdir} /tomcat/preamble
2013-06-11 17:35:03 +00:00
%{__install} -m 0755 %{SOURCE31} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_libexecdir} /tomcat/server
2013-06-11 17:35:03 +00:00
%{__install} -m 0644 %{SOURCE32} \
2018-06-12 14:24:54 +00:00
${RPM_BUILD_ROOT} %{_unitdir} /tomcat@.service
2013-06-11 17:35:03 +00:00
2014-09-21 00:11:01 +00:00
# Substitute libnames in catalina-tasks.xml
sed -i \
2018-06-12 14:24:54 +00:00
" s , e l - a p i . j a r , t o m c a t - e l - %{elspec} - a p i . j a r , ;
s,servlet-api.jar,tomcat-servlet-%{servletspec} -api.jar,;
s,jsp-api.jar,tomcat-jsp-%{jspspec} -api.jar,;" \
2014-09-21 00:11:01 +00:00
${RPM_BUILD_ROOT} %{bindir} /catalina-tasks.xml
2008-04-07 22:37:26 +00:00
# create jsp and servlet API symlinks
pushd ${RPM_BUILD_ROOT} %{_javadir}
2018-06-12 14:24:54 +00:00
%{__mv} tomcat/jsp-api.jar tomcat-jsp-%{jspspec} -api.jar
%{__ln_s} tomcat-jsp-%{jspspec} -api.jar tomcat-jsp-api.jar
%{__mv} tomcat/servlet-api.jar tomcat-servlet-%{servletspec} -api.jar
%{__ln_s} tomcat-servlet-%{servletspec} -api.jar tomcat-servlet-api.jar
%{__mv} tomcat/el-api.jar tomcat-el-%{elspec} -api.jar
%{__ln_s} tomcat-el-%{elspec} -api.jar tomcat-el-api.jar
2008-04-07 22:37:26 +00:00
popd
2010-04-08 23:50:29 +00:00
2008-04-07 22:37:26 +00:00
pushd ${RPM_BUILD_ROOT} %{libdir}
# symlink JSP and servlet API jars
2018-06-12 14:24:54 +00:00
%{__ln_s} ../../java/tomcat-jsp-%{jspspec} -api.jar .
%{__ln_s} ../../java/tomcat-servlet-%{servletspec} -api.jar .
%{__ln_s} ../../java/tomcat-el-%{elspec} -api.jar .
2010-12-02 16:15:01 +00:00
2018-08-03 08:53:35 +00:00
# Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap)
%{__cp} -a ${RPM_BUILD_ROOT} %{bindir} /tomcat-juli.jar ./
2008-04-07 22:37:26 +00:00
popd
2010-12-02 16:15:01 +00:00
2008-04-07 22:37:26 +00:00
# symlink to the FHS locations where we've installed things
pushd ${RPM_BUILD_ROOT} %{homedir}
%{__ln_s} %{appdir} webapps
%{__ln_s} %{confdir} conf
%{__ln_s} %{libdir} lib
%{__ln_s} %{logdir} logs
%{__ln_s} %{tempdir} temp
%{__ln_s} %{workdir} work
popd
2018-08-03 08:53:35 +00:00
# Install the maven metadata
%{__install} -d -m 0755 ${RPM_BUILD_ROOT} %{_mavenpomdir}
pushd output/dist/src/res/maven
for pom in *.pom; do
# fix-up version in all pom files
sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
done
# we won't install dbcp, juli-adapters and juli-extras pom files
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
%{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-$libname.pom
%add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar
done
# tomcat-util-scan
%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-util-scan.pom
%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar
# tomcat-jni
%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-jni.pom
%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP-tomcat-jsp-api.pom
%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a " o r g . e c l i p s e . j e t t y . o r b i t : j a v a x . s e r v l e t . j s p "
%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP-tomcat-el-api.pom
%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a " o r g . e c l i p s e . j e t t y . o r b i t : j a v a x . e l "
%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP-tomcat-servlet-api.pom
# Generate a depmap fragment javax.servlet:servlet-api pointing to
# tomcat-servlet-3.0-api for backwards compatibility
# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here
2018-08-03 13:01:00 +00:00
%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-%{servletspec} -api.jar -f " t o m c a t - s e r v l e t - a p i "
2018-08-03 08:53:35 +00:00
# replace temporary copy with link
%{__ln_s} -f $(abs2rel %{bindir} /tomcat-juli.jar %{libdir} ) ${RPM_BUILD_ROOT} %{libdir} /
# two special pom where jar files have different names
%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-catalina-tribes.pom
%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar
%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-coyote.pom
%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar
%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-juli.pom
%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar
%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-api.pom
%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar
%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-util.pom
%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar
%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-jdbc.pom
%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar
# tomcat-websocket-api
%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-websocket-api.pom
%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar
# tomcat-tomcat-websocket
%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-tomcat-websocket.pom
%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar
# tomcat-jaspic-api
%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT} %{_mavenpomdir} /JPP.tomcat-jaspic-api.pom
%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar
# Manually change the metadata filenames
%{__mv} ${RPM_BUILD_ROOT} %{_datadir} /maven-metadata/%{name} .xml ${RPM_BUILD_ROOT} %{_datadir} /maven-metadata/tomcat.xml
%{__mv} ${RPM_BUILD_ROOT} %{_datadir} /maven-metadata/%{name} -tomcat-servlet-api.xml ${RPM_BUILD_ROOT} %{_datadir} /maven-metadata/tomcat-servlet-api.xml
2008-04-07 22:37:26 +00:00
%pre
# add the tomcat user and group
%{_sbindir} /groupadd -g %{tcuid} -r tomcat 2>/dev/null || :
%{_sbindir} /useradd -c " A p a c h e T o m c a t " -u %{tcuid} -g tomcat \
2016-02-02 16:36:08 +00:00
-s /sbin/nologin -r -d %{homedir} tomcat 2>/dev/null || :
2008-04-07 22:37:26 +00:00
%post
# install but don't activate
2018-06-12 14:24:54 +00:00
%systemd_post tomcat.service
2008-04-07 22:37:26 +00:00
2018-06-08 18:57:09 +00:00
# Collapse all of the alternatives installations into one
2008-04-07 22:37:26 +00:00
%{_sbindir} /update-alternatives --install %{_javadir} /jsp.jar jsp \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-jsp-%{jspspec} -api.jar 20200
2008-04-07 22:37:26 +00:00
%{_sbindir} /update-alternatives --install %{_javadir} /servlet.jar servlet \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-servlet-%{servletspec} -api.jar 30000
2010-07-01 18:04:47 +00:00
%{_sbindir} /update-alternatives --install %{_javadir} /elspec.jar elspec \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-el-%{elspec} -api.jar 20300
2010-06-29 21:51:36 +00:00
2008-04-07 22:37:26 +00:00
%preun
# clean tempdir and workdir on removal or upgrade
2011-05-04 21:42:20 +00:00
%{__rm} -rf %{workdir} /* %{tempdir} /*
2018-06-12 14:24:54 +00:00
%systemd_preun tomcat.service
2008-04-07 22:37:26 +00:00
2010-03-26 17:07:32 +00:00
%postun
2018-06-12 14:24:54 +00:00
%systemd_postun_with_restart tomcat.service
2010-03-26 17:07:32 +00:00
2018-06-08 18:57:09 +00:00
# Collapse all of the alternatives removals into one
2008-04-07 22:37:26 +00:00
if [ " $ 1 " = " 0 " ]; then
%{_sbindir} /update-alternatives --remove jsp \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-jsp-%{jspspec} -api.jar
2008-04-07 22:37:26 +00:00
%{_sbindir} /update-alternatives --remove servlet \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-servlet-%{servletspec} -api.jar
2010-06-29 21:51:36 +00:00
%{_sbindir} /update-alternatives --remove elspec \
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-el-%{elspec} -api.jar
2010-06-29 21:51:36 +00:00
fi
2014-06-05 12:29:45 +00:00
%files
2011-05-01 22:09:32 +00:00
%defattr (0664,root,tomcat,0755)
2011-01-03 08:54:46 +00:00
%doc {LICENSE,NOTICE,RELEASE*}
2018-06-12 14:24:54 +00:00
%attr (0755,root,root) %{_bindir} /tomcat-digest
%attr (0755,root,root) %{_bindir} /tomcat-tool-wrapper
%attr (0755,root,root) %{_sbindir} /tomcat
%attr (0644,root,root) %{_unitdir} /tomcat.service
%attr (0644,root,root) %{_unitdir} /tomcat@.service
%attr (0755,root,root) %dir %{_libexecdir} /tomcat
2014-03-25 23:34:21 +00:00
%attr (0755,root,root) %dir %{_localstatedir} /lib/tomcats
2018-06-12 14:24:54 +00:00
%attr (0644,root,root) %{_libexecdir} /tomcat/functions
%attr (0755,root,root) %{_libexecdir} /tomcat/preamble
%attr (0755,root,root) %{_libexecdir} /tomcat/server
%attr (0644,root,root) %config (noreplace) %{_sysconfdir} /sysconfig/tomcat
2011-09-26 17:37:13 +00:00
%attr (0755,root,tomcat) %dir %{basedir}
2011-05-20 21:44:00 +00:00
%attr (0755,root,tomcat) %dir %{confdir}
2016-10-23 23:11:56 +00:00
2012-12-06 21:56:04 +00:00
%defattr (0664,tomcat,root,0770)
%attr (0770,tomcat,root) %dir %{logdir}
2016-10-23 23:11:56 +00:00
2011-05-20 21:44:00 +00:00
%defattr (0664,root,tomcat,0770)
%attr (0770,root,tomcat) %dir %{cachedir}
%attr (0770,root,tomcat) %dir %{tempdir}
%attr (0770,root,tomcat) %dir %{workdir}
2016-10-23 23:11:56 +00:00
%defattr (0644,root,tomcat,0775)
2011-04-13 19:15:12 +00:00
%attr (0775,root,tomcat) %dir %{appdir}
%attr (0775,root,tomcat) %dir %{confdir} /Catalina
%attr (0775,root,tomcat) %dir %{confdir} /Catalina/localhost
2016-10-23 23:11:56 +00:00
%attr (0755,root,tomcat) %dir %{confdir} /conf.d
%{confdir} /conf.d/README
2018-06-12 14:24:54 +00:00
%config (noreplace) %{confdir} /tomcat.conf
2016-10-23 23:11:56 +00:00
%config (noreplace) %{confdir} /*.policy
%config (noreplace) %{confdir} /*.properties
%config (noreplace) %{confdir} /context.xml
%config (noreplace) %{confdir} /server.xml
%attr (0640,root,tomcat) %config (noreplace) %{confdir} /tomcat-users.xml
2018-03-15 16:57:12 +00:00
%attr (0664,root,tomcat) %{confdir} /tomcat-users.xsd
%attr (0664,root,tomcat) %config (noreplace) %{confdir} /jaspic-providers.xml
%attr (0664,root,tomcat) %{confdir} /jaspic-providers.xsd
2016-10-23 23:11:56 +00:00
%config (noreplace) %{confdir} /web.xml
2010-06-29 21:51:36 +00:00
%dir %{homedir}
%{bindir} /bootstrap.jar
%{bindir} /catalina-tasks.xml
%{homedir} /lib
%{homedir} /temp
%{homedir} /webapps
%{homedir} /work
%{homedir} /logs
%{homedir} /conf
2008-04-07 22:37:26 +00:00
2010-12-02 16:15:01 +00:00
%defattr (-,root,root,-)
2018-03-15 16:57:12 +00:00
%dir %{libdir}
%{libdir} /*.jar
%{_javadir} /*.jar
2011-11-10 18:44:19 +00:00
%{bindir} /tomcat-juli.jar
2018-08-03 08:53:35 +00:00
%{_mavenpomdir} /JPP.tomcat-annotations-api.pom
%{_mavenpomdir} /JPP.tomcat-catalina-ha.pom
%{_mavenpomdir} /JPP.tomcat-catalina-tribes.pom
%{_mavenpomdir} /JPP.tomcat-catalina.pom
%{_mavenpomdir} /JPP.tomcat-jasper-el.pom
%{_mavenpomdir} /JPP.tomcat-jasper.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-api.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-juli.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-coyote.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-util.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-jdbc.pom
%{_mavenpomdir} /JPP.tomcat-websocket-api.pom
%{_mavenpomdir} /JPP.tomcat-tomcat-websocket.pom
%{_mavenpomdir} /JPP.tomcat-jaspic-api.pom
%{_mavenpomdir} /JPP.tomcat-jni.pom
%{_mavenpomdir} /JPP.tomcat-util-scan.pom
%{_mavenpomdir} /JPP-tomcat-jsp-api.pom
%{_mavenpomdir} /JPP-tomcat-el-api.pom
%{_datadir} /maven-metadata/tomcat.xml
2018-06-12 16:11:15 +00:00
%exclude %{_javadir} /tomcat-servlet-%{servletspec} *.jar
2012-01-11 22:58:04 +00:00
2018-06-12 16:11:15 +00:00
%files -n pki-servlet-%{servletspec}-api
2018-06-12 14:04:37 +00:00
%defattr (-,root,root,-)
%doc LICENSE
2018-06-12 14:24:54 +00:00
%{_javadir} /tomcat-servlet-%{servletspec} *.jar
2018-08-03 08:53:35 +00:00
%{_datadir} /maven-metadata/tomcat-servlet-api.xml
%{_mavenpomdir} /JPP-tomcat-servlet-api.pom
2018-06-12 14:04:37 +00:00
2008-04-07 22:37:26 +00:00
%changelog
2020-04-21 19:53:08 +00:00
* Thu Apr 23 2020 Coty Sutherland <csutherl@redhat.com> - 1:9.0.30-1
- Resolves: rhbz#1721684 Rebase pki-servlet-engine to 9.0.30
- Update to JWS 5.3.0 distribution
- Remove new dependencies that PKI doesn't need (and are not provided by RHEL 8)
2019-06-01 02:33:07 +00:00
* Fri May 31 2019 Endi S. Dewata <edewata@redhat.com> - 1:9.0.7-16
- Obsoleted pki-servlet-container
2019-04-23 18:43:38 +00:00
* Tue Apr 23 2019 Endi S. Dewata <edewata@redhat.com> - 1:9.0.7-15
- Rename pki-servlet-container into pki-servlet-engine
2019-03-04 20:28:28 +00:00
* Mon Mar 04 2019 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-14
- Update to JWS 5.0.2 distribution
- Resolves: rhbz#1658846 CVE-2018-8034 pki-servlet-container: tomcat: host name verification missing in WebSocket client
- Resolves: rhbz#1579614 CVE-2018-8014 pki-servlet-container: tomcat: Insecure defaults in CORS filter enable 'supportsCredentials' for all origins
2018-11-09 16:42:09 +00:00
- Resolves: rhbz#1619232 - CVE-2018-8037 pki-servlet-container: tomcat: Due to a mishandling of close in NIO/NIO2 connectors user sessions can get mixed up
- Resolves: rhbz#1641874 - CVE-2018-11784 pki-servlet-container: tomcat: Open redirect in default servlet
2018-08-03 13:01:00 +00:00
* Fri Aug 03 2018 Fraser Tweedale <ftweedal@redhat.com> - 1:9.0.7-13
- Reinstate Maven artifacts and fix maven-metadata JAR path
2018-07-20 06:39:03 +00:00
* Fri Jul 20 2018 Jean-Frederic Clere <jclere@redhat.com> - 1:9.0.7-12
- Add missing BuildRequires: systemd-units
2018-06-22 13:57:28 +00:00
* Fri Jun 22 2018 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-11
- Resolves: rhbz#1594139 Cleanup Provides and Requires
2018-06-12 18:19:54 +00:00
* Thu Jun 07 2018 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-10
- Create packages for FreeIPA that wrap the JWS distribution of Tomcat