Blame SPECS/pki-servlet-engine.spec

23bf51
# Copyright (c) 2000-2008, JPackage Project
23bf51
# All rights reserved.
23bf51
#
23bf51
# Redistribution and use in source and binary forms, with or without
23bf51
# modification, are permitted provided that the following conditions
23bf51
# are met:
23bf51
#
23bf51
# 1. Redistributions of source code must retain the above copyright
23bf51
#    notice, this list of conditions and the following disclaimer.
23bf51
# 2. Redistributions in binary form must reproduce the above copyright
23bf51
#    notice, this list of conditions and the following disclaimer in the
23bf51
#    documentation and/or other materials provided with the
23bf51
#    distribution.
23bf51
# 3. Neither the name of the JPackage Project nor the names of its
23bf51
#    contributors may be used to endorse or promote products derived
23bf51
#    from this software without specific prior written permission.
23bf51
#
23bf51
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23bf51
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23bf51
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23bf51
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23bf51
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23bf51
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23bf51
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23bf51
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23bf51
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23bf51
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23bf51
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23bf51
#
23bf51
23bf51
%global major_version 9
23bf51
%global minor_version 0
23bf51
%global micro_version 7
23bf51
%global redhat_version 16
23bf51
%global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src
23bf51
23bf51
# Specification versions
23bf51
%global servletspec 4.0
23bf51
%global jspspec 2.3
23bf51
%global elspec 3.0
23bf51
23bf51
%global tcuid 91
23bf51
23bf51
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
23bf51
%global basedir %{_var}/lib/tomcat
23bf51
%global appdir %{basedir}/webapps
23bf51
%global homedir %{_datadir}/tomcat
23bf51
%global bindir %{homedir}/bin
23bf51
%global confdir %{_sysconfdir}/tomcat
23bf51
%global libdir %{_javadir}/tomcat
23bf51
%global logdir %{_var}/log/tomcat
23bf51
%global cachedir %{_var}/cache/tomcat
23bf51
%global tempdir %{cachedir}/temp
23bf51
%global workdir %{cachedir}/work
23bf51
%global _initrddir %{_sysconfdir}/init.d
23bf51
%global _systemddir /lib/systemd/system
23bf51
23bf51
Name:          pki-servlet-engine
23bf51
Epoch:         1
23bf51
Version:       %{major_version}.%{minor_version}.%{micro_version}
23bf51
Release:       16%{?dist}
23bf51
Summary:       Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
23bf51
Group:         System Environment/Daemons
23bf51
License:       ASL 2.0
23bf51
URL:           http://tomcat.apache.org/
23bf51
23bf51
#Source0:       http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz
23bf51
Source0:       tomcat-%{version}.redhat-%{redhat_version}-src.zip
23bf51
Source1:       tomcat-%{major_version}.%{minor_version}.conf
23bf51
Source3:       tomcat-%{major_version}.%{minor_version}.sysconfig
23bf51
Source4:       tomcat-%{major_version}.%{minor_version}.wrapper
23bf51
Source6:       tomcat-%{major_version}.%{minor_version}-digest.script
23bf51
Source7:       tomcat-%{major_version}.%{minor_version}-tool-wrapper.script
23bf51
Source8:       tomcat-%{major_version}.%{minor_version}.service
23bf51
Source21:      tomcat-functions
23bf51
Source30:      tomcat-preamble
23bf51
Source31:      tomcat-server
23bf51
Source32:      tomcat-named.service
23bf51
23bf51
Patch0:        tomcat-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
23bf51
Patch1:        tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patch
23bf51
Patch2:        tomcat-8.0.36-CompilerOptionsV9.patch
23bf51
Patch3:        tomcat-%{major_version}.%{minor_version}-catalina-policy.patch
23bf51
23bf51
BuildArch:     noarch
23bf51
23bf51
BuildRequires: ant
23bf51
BuildRequires: findutils
23bf51
BuildRequires: java-devel >= 1:1.8.0
23bf51
BuildRequires: jpackage-utils >= 0:1.7.0
23bf51
BuildRequires: maven-local
23bf51
BuildRequires: systemd-units
23bf51
23bf51
Requires:      ant
23bf51
Requires:      java-headless >= 1:1.8.0
23bf51
Requires:      java-devel >= 1:1.8.0
23bf51
Requires:      jpackage-utils
23bf51
Requires:      procps
23bf51
Requires(pre):    shadow-utils
23bf51
Requires(post):   chkconfig
23bf51
Requires(postun): chkconfig
23bf51
Requires(preun):  chkconfig
23bf51
Requires(post):   systemd-units
23bf51
Requires(preun):  systemd-units
23bf51
Requires(postun): systemd-units
23bf51
Requires(preun): coreutils
23bf51
Requires: pki-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
23bf51
23bf51
# Add bundled so that everyone knows this is Tomcat
23bf51
Provides: bundled(tomcat) = 9.0.7.redhat-%{redhat_version}
23bf51
23bf51
Obsoletes:        pki-servlet-container
23bf51
23bf51
%description
23bf51
Tomcat is the servlet engine that is used in the official Reference
23bf51
Implementation for the Java Servlet and JavaServer Pages technologies.
23bf51
The Java Servlet and JavaServer Pages specifications are developed by
23bf51
Sun under the Java Community Process.
23bf51
23bf51
Tomcat is developed in an open and participatory environment and
23bf51
released under the Apache Software License version 2.0. Tomcat is intended
23bf51
to be a collaboration of the best-of-breed developers from around the world.
23bf51
23bf51
%package -n pki-servlet-%{servletspec}-api
23bf51
Group: Development/Libraries
23bf51
Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes
23bf51
Requires(post): chkconfig
23bf51
Requires(postun): chkconfig
23bf51
23bf51
%description -n pki-servlet-%{servletspec}-api
23bf51
Apache Tomcat Servlet API Implementation Classes.
23bf51
23bf51
%prep
23bf51
%setup -q -n %{packdname}
23bf51
23bf51
# remove pre-built binaries and windows files
23bf51
find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
23bf51
   -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete
23bf51
23bf51
%patch0 -p0
23bf51
%patch1 -p0
23bf51
%patch2 -p0
23bf51
%patch3 -p0
23bf51
23bf51
# Since we don't support ECJ in RHEL anymore, remove the class that requires it
23bf51
%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java
23bf51
23bf51
%build
23bf51
export OPT_JAR_LIST="xalan-j2-serializer"
23bf51
23bf51
# Create a dummy file for later removal
23bf51
touch HACK
23bf51
23bf51
# who needs a build.properties file anyway
23bf51
%{ant} -Dbase.path="." \
23bf51
  -Dbuild.compiler="modern" \
23bf51
  -Dcommons-daemon.jar="HACK" \
23bf51
  -Dcommons-daemon.native.src.tgz="HACK" \
23bf51
  -Djdt.jar="HACK" \
23bf51
  -Dtomcat-native.tar.gz="HACK" \
23bf51
  -Dtomcat-native.home="." \
23bf51
  -Dcommons-daemon.native.win.mgr.exe="HACK" \
23bf51
  -Dnsis.exe="HACK" \
23bf51
  deploy dist-prepare dist-source
23bf51
23bf51
# remove some jars that we don't need
23bf51
%{__rm} output/build/bin/commons-daemon.jar
23bf51
23bf51
%install
23bf51
# build initial path structure
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/conf.d
23bf51
/bin/echo "Place your custom *.conf files here. Shell expansion is supported." > ${RPM_BUILD_ROOT}%{confdir}/conf.d/README
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/tomcats
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir}
23bf51
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir}
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat
23bf51
23bf51
# move things into place
23bf51
# First copy supporting libs to tomcat lib
23bf51
pushd output/build
23bf51
    %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir}
23bf51
    %{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT}%{confdir}
23bf51
    %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir}
23bf51
popd
23bf51
23bf51
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
23bf51
   -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
23bf51
   -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
23bf51
    > ${RPM_BUILD_ROOT}%{confdir}/tomcat.conf
23bf51
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
23bf51
   -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
23bf51
   -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \
23bf51
    > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/tomcat
23bf51
%{__install} -m 0644 %{SOURCE4} \
23bf51
    ${RPM_BUILD_ROOT}%{_sbindir}/tomcat
23bf51
%{__install} -m 0644 %{SOURCE8} \
23bf51
    ${RPM_BUILD_ROOT}%{_unitdir}/tomcat.service
23bf51
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
23bf51
   -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
23bf51
   -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
23bf51
    > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-digest
23bf51
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
23bf51
   -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
23bf51
   -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
23bf51
    > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-tool-wrapper
23bf51
23bf51
%{__install} -m 0644 %{SOURCE21} \
23bf51
    ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/functions
23bf51
%{__install} -m 0755 %{SOURCE30} \
23bf51
    ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/preamble
23bf51
%{__install} -m 0755 %{SOURCE31} \
23bf51
    ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/server
23bf51
%{__install} -m 0644 %{SOURCE32} \
23bf51
    ${RPM_BUILD_ROOT}%{_unitdir}/tomcat@.service
23bf51
23bf51
# Substitute libnames in catalina-tasks.xml
23bf51
sed -i \
23bf51
   "s,el-api.jar,tomcat-el-%{elspec}-api.jar,;
23bf51
    s,servlet-api.jar,tomcat-servlet-%{servletspec}-api.jar,;
23bf51
    s,jsp-api.jar,tomcat-jsp-%{jspspec}-api.jar,;" \
23bf51
    ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml
23bf51
23bf51
# create jsp and servlet API symlinks
23bf51
pushd ${RPM_BUILD_ROOT}%{_javadir}
23bf51
   %{__mv} tomcat/jsp-api.jar tomcat-jsp-%{jspspec}-api.jar
23bf51
   %{__ln_s} tomcat-jsp-%{jspspec}-api.jar tomcat-jsp-api.jar
23bf51
   %{__mv} tomcat/servlet-api.jar tomcat-servlet-%{servletspec}-api.jar
23bf51
   %{__ln_s} tomcat-servlet-%{servletspec}-api.jar tomcat-servlet-api.jar
23bf51
   %{__mv} tomcat/el-api.jar tomcat-el-%{elspec}-api.jar
23bf51
   %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar
23bf51
popd
23bf51
23bf51
pushd ${RPM_BUILD_ROOT}%{libdir}
23bf51
    # symlink JSP and servlet API jars
23bf51
    %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar .
23bf51
    %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar .
23bf51
    %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar .
23bf51
23bf51
    # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap)
23bf51
    %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./
23bf51
popd
23bf51
23bf51
# symlink to the FHS locations where we've installed things
23bf51
pushd ${RPM_BUILD_ROOT}%{homedir}
23bf51
    %{__ln_s} %{appdir} webapps
23bf51
    %{__ln_s} %{confdir} conf
23bf51
    %{__ln_s} %{libdir} lib
23bf51
    %{__ln_s} %{logdir} logs
23bf51
    %{__ln_s} %{tempdir} temp
23bf51
    %{__ln_s} %{workdir} work
23bf51
popd
23bf51
23bf51
# Install the maven metadata
23bf51
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir}
23bf51
pushd output/dist/src/res/maven
23bf51
for pom in *.pom; do
23bf51
    # fix-up version in all pom files
23bf51
    sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
23bf51
done
23bf51
23bf51
# we won't install dbcp, juli-adapters and juli-extras pom files
23bf51
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
23bf51
    %{__cp} -a tomcat-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-$libname.pom
23bf51
    %add_maven_depmap JPP.tomcat-$libname.pom tomcat/$libname.jar
23bf51
done
23bf51
23bf51
# tomcat-util-scan
23bf51
%{__cp} -a tomcat-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-util-scan.pom
23bf51
%add_maven_depmap JPP.tomcat-util-scan.pom tomcat/tomcat-util-scan.jar
23bf51
23bf51
# tomcat-jni
23bf51
%{__cp} -a tomcat-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jni.pom
23bf51
%add_maven_depmap JPP.tomcat-jni.pom tomcat/tomcat-jni.jar
23bf51
23bf51
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
23bf51
%{__cp} -a tomcat-jsp-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
23bf51
%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp"
23bf51
23bf51
%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-el-api.pom
23bf51
%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el"
23bf51
23bf51
%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
23bf51
# Generate a depmap fragment javax.servlet:servlet-api pointing to
23bf51
# tomcat-servlet-3.0-api for backwards compatibility
23bf51
# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here
23bf51
%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-%{servletspec}-api.jar -f "tomcat-servlet-api"
23bf51
23bf51
# replace temporary copy with link
23bf51
%{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/
23bf51
23bf51
# two special pom where jar files have different names
23bf51
%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom
23bf51
%add_maven_depmap JPP.tomcat-catalina-tribes.pom tomcat/catalina-tribes.jar
23bf51
23bf51
%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-coyote.pom tomcat/tomcat-coyote.jar
23bf51
23bf51
%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-juli.pom tomcat/tomcat-juli.jar
23bf51
23bf51
%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-api.pom tomcat/tomcat-api.jar
23bf51
23bf51
%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-util.pom tomcat/tomcat-util.jar
23bf51
23bf51
%{__cp} -a tomcat-jdbc.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-jdbc.pom tomcat/tomcat-jdbc.jar
23bf51
23bf51
# tomcat-websocket-api
23bf51
%{__cp} -a tomcat-websocket-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-websocket-api.pom
23bf51
%add_maven_depmap JPP.tomcat-websocket-api.pom tomcat/websocket-api.jar
23bf51
23bf51
# tomcat-tomcat-websocket
23bf51
%{__cp} -a tomcat-websocket.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom
23bf51
%add_maven_depmap JPP.tomcat-tomcat-websocket.pom tomcat/tomcat-websocket.jar
23bf51
23bf51
# tomcat-jaspic-api
23bf51
%{__cp} -a tomcat-jaspic-api.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom
23bf51
%add_maven_depmap JPP.tomcat-jaspic-api.pom tomcat/jaspic-api.jar
23bf51
23bf51
# Manually change the metadata filenames
23bf51
%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat.xml
23bf51
%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/%{name}-tomcat-servlet-api.xml ${RPM_BUILD_ROOT}%{_datadir}/maven-metadata/tomcat-servlet-api.xml
23bf51
23bf51
%pre
23bf51
# add the tomcat user and group
23bf51
%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || :
23bf51
%{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \
23bf51
    -s /sbin/nologin -r -d %{homedir} tomcat 2>/dev/null || :
23bf51
23bf51
%post
23bf51
# install but don't activate
23bf51
%systemd_post tomcat.service
23bf51
23bf51
# Collapse all of the alternatives installations into one
23bf51
%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \
23bf51
    %{_javadir}/tomcat-jsp-%{jspspec}-api.jar 20200
23bf51
%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \
23bf51
    %{_javadir}/tomcat-servlet-%{servletspec}-api.jar 30000
23bf51
%{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \
23bf51
   %{_javadir}/tomcat-el-%{elspec}-api.jar 20300
23bf51
23bf51
%preun
23bf51
# clean tempdir and workdir on removal or upgrade
23bf51
%{__rm} -rf %{workdir}/* %{tempdir}/*
23bf51
%systemd_preun tomcat.service
23bf51
23bf51
%postun
23bf51
%systemd_postun_with_restart tomcat.service
23bf51
23bf51
# Collapse all of the alternatives removals into one
23bf51
if [ "$1" = "0" ]; then
23bf51
    %{_sbindir}/update-alternatives --remove jsp \
23bf51
        %{_javadir}/tomcat-jsp-%{jspspec}-api.jar
23bf51
    %{_sbindir}/update-alternatives --remove servlet \
23bf51
        %{_javadir}/tomcat-servlet-%{servletspec}-api.jar
23bf51
    %{_sbindir}/update-alternatives --remove elspec \
23bf51
        %{_javadir}/tomcat-el-%{elspec}-api.jar
23bf51
fi
23bf51
23bf51
%files 
23bf51
%defattr(0664,root,tomcat,0755)
23bf51
%doc {LICENSE,NOTICE,RELEASE*}
23bf51
%attr(0755,root,root) %{_bindir}/tomcat-digest
23bf51
%attr(0755,root,root) %{_bindir}/tomcat-tool-wrapper
23bf51
%attr(0755,root,root) %{_sbindir}/tomcat
23bf51
%attr(0644,root,root) %{_unitdir}/tomcat.service
23bf51
%attr(0644,root,root) %{_unitdir}/tomcat@.service
23bf51
%attr(0755,root,root) %dir %{_libexecdir}/tomcat
23bf51
%attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats
23bf51
%attr(0644,root,root) %{_libexecdir}/tomcat/functions
23bf51
%attr(0755,root,root) %{_libexecdir}/tomcat/preamble
23bf51
%attr(0755,root,root) %{_libexecdir}/tomcat/server
23bf51
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tomcat
23bf51
%attr(0755,root,tomcat) %dir %{basedir}
23bf51
%attr(0755,root,tomcat) %dir %{confdir}
23bf51
23bf51
%defattr(0664,tomcat,root,0770)
23bf51
%attr(0770,tomcat,root) %dir %{logdir}
23bf51
23bf51
%defattr(0664,root,tomcat,0770)
23bf51
%attr(0770,root,tomcat) %dir %{cachedir}
23bf51
%attr(0770,root,tomcat) %dir %{tempdir}
23bf51
%attr(0770,root,tomcat) %dir %{workdir}
23bf51
23bf51
%defattr(0644,root,tomcat,0775)
23bf51
%attr(0775,root,tomcat) %dir %{appdir}
23bf51
%attr(0775,root,tomcat) %dir %{confdir}/Catalina
23bf51
%attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost
23bf51
%attr(0755,root,tomcat) %dir %{confdir}/conf.d
23bf51
%{confdir}/conf.d/README
23bf51
%config(noreplace) %{confdir}/tomcat.conf
23bf51
%config(noreplace) %{confdir}/*.policy
23bf51
%config(noreplace) %{confdir}/*.properties
23bf51
%config(noreplace) %{confdir}/context.xml
23bf51
%config(noreplace) %{confdir}/server.xml
23bf51
%attr(0640,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml
23bf51
%attr(0664,root,tomcat) %{confdir}/tomcat-users.xsd
23bf51
%attr(0664,root,tomcat) %config(noreplace) %{confdir}/jaspic-providers.xml
23bf51
%attr(0664,root,tomcat) %{confdir}/jaspic-providers.xsd
23bf51
%config(noreplace) %{confdir}/web.xml
23bf51
%dir %{homedir}
23bf51
%{bindir}/bootstrap.jar
23bf51
%{bindir}/catalina-tasks.xml
23bf51
%{homedir}/lib
23bf51
%{homedir}/temp
23bf51
%{homedir}/webapps
23bf51
%{homedir}/work
23bf51
%{homedir}/logs
23bf51
%{homedir}/conf
23bf51
23bf51
%defattr(-,root,root,-)
23bf51
%dir %{libdir}
23bf51
%{libdir}/*.jar
23bf51
%{_javadir}/*.jar
23bf51
%{bindir}/tomcat-juli.jar
23bf51
%{_mavenpomdir}/JPP.tomcat-annotations-api.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-catalina-ha.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-catalina-tribes.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-catalina.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-jasper-el.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-jasper.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-api.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-juli.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-coyote.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-util.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-jdbc.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-websocket-api.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-tomcat-websocket.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-jaspic-api.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-jni.pom
23bf51
%{_mavenpomdir}/JPP.tomcat-util-scan.pom
23bf51
%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
23bf51
%{_mavenpomdir}/JPP-tomcat-el-api.pom
23bf51
%{_datadir}/maven-metadata/tomcat.xml
23bf51
%exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar
23bf51
23bf51
%files -n pki-servlet-%{servletspec}-api
23bf51
%defattr(-,root,root,-)
23bf51
%doc LICENSE
23bf51
%{_javadir}/tomcat-servlet-%{servletspec}*.jar
23bf51
%{_datadir}/maven-metadata/tomcat-servlet-api.xml
23bf51
%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
23bf51
23bf51
%changelog
23bf51
* Fri May 31 2019 Endi S. Dewata <edewata@redhat.com> - 1:9.0.7-16
23bf51
- Obsoleted pki-servlet-container
23bf51
23bf51
* Tue Apr 23 2019 Endi S. Dewata <edewata@redhat.com> - 1:9.0.7-15
23bf51
- Rename pki-servlet-container into pki-servlet-engine
23bf51
23bf51
* Mon Mar 04 2019 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-14
23bf51
- Update to JWS 5.0.2 distribution
23bf51
- Resolves: rhbz#1658846 CVE-2018-8034 pki-servlet-container: tomcat: host name verification missing in WebSocket client
23bf51
- Resolves: rhbz#1579614 CVE-2018-8014 pki-servlet-container: tomcat: Insecure defaults in CORS filter enable 'supportsCredentials' for all origins
23bf51
- 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
23bf51
- Resolves: rhbz#1641874 - CVE-2018-11784 pki-servlet-container: tomcat: Open redirect in default servlet
23bf51
23bf51
* Fri Aug 03 2018 Fraser Tweedale <ftweedal@redhat.com> - 1:9.0.7-13
23bf51
- Reinstate Maven artifacts and fix maven-metadata JAR path
23bf51
23bf51
* Fri Jul 20 2018 Jean-Frederic Clere <jclere@redhat.com> - 1:9.0.7-12
23bf51
- Add missing BuildRequires: systemd-units
23bf51
23bf51
* Fri Jun 22 2018 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-11
23bf51
- Resolves: rhbz#1594139 Cleanup Provides and Requires
23bf51
23bf51
* Thu Jun 07 2018 Coty Sutherland <csutherl@redhat.com> - 1:9.0.7-10
23bf51
- Create packages for FreeIPA that wrap the JWS distribution of Tomcat