From b806b35b9562859b4cc48adcf4aa3719f934d70e Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 14:57:09 -0400 Subject: [PATCH 01/31] First stab at creating the single RPM distribution for FreeIPA --- tomcat-8.5-jsvc.service | 22 - tomcat-8.5.logrotate | 8 - ... => tomcat-9.0-bootstrap-MANIFEST.MF.patch | 0 ....patch => tomcat-9.0-catalina-policy.patch | 0 ...-digest.script => tomcat-9.0-digest.script | 0 ....properties => tomcat-9.0-log4j.properties | 0 ...ch => tomcat-9.0-tomcat-users-webapp.patch | 0 ...r.script => tomcat-9.0-tool-wrapper.script | 0 tomcat-8.5.conf => tomcat-9.0.conf | 0 tomcat-8.5.service => tomcat-9.0.service | 0 tomcat-8.5.sysconfig => tomcat-9.0.sysconfig | 0 tomcat-8.5.wrapper => tomcat-9.0.wrapper | 0 tomcat.spec | 669 ++---------------- 13 files changed, 57 insertions(+), 642 deletions(-) delete mode 100644 tomcat-8.5-jsvc.service delete mode 100644 tomcat-8.5.logrotate rename tomcat-8.5-bootstrap-MANIFEST.MF.patch => tomcat-9.0-bootstrap-MANIFEST.MF.patch (100%) rename tomcat-8.5-catalina-policy.patch => tomcat-9.0-catalina-policy.patch (100%) rename tomcat-8.5-digest.script => tomcat-9.0-digest.script (100%) rename tomcat-8.5-log4j.properties => tomcat-9.0-log4j.properties (100%) rename tomcat-8.5-tomcat-users-webapp.patch => tomcat-9.0-tomcat-users-webapp.patch (100%) rename tomcat-8.5-tool-wrapper.script => tomcat-9.0-tool-wrapper.script (100%) rename tomcat-8.5.conf => tomcat-9.0.conf (100%) rename tomcat-8.5.service => tomcat-9.0.service (100%) rename tomcat-8.5.sysconfig => tomcat-9.0.sysconfig (100%) rename tomcat-8.5.wrapper => tomcat-9.0.wrapper (100%) diff --git a/tomcat-8.5-jsvc.service b/tomcat-8.5-jsvc.service deleted file mode 100644 index f480324..0000000 --- a/tomcat-8.5-jsvc.service +++ /dev/null @@ -1,22 +0,0 @@ -# Systemd unit file for tomcat -# -# To create clones of this service: -# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined -# before tomcat-sysd is called. -# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat -# to override tomcat defaults - -[Unit] -Description=Apache Tomcat Web Application Container JSVC wrapper -After=syslog.target network.target - -[Service] -Type=simple -EnvironmentFile=/etc/tomcat/tomcat.conf -Environment="NAME=" "USE_JSVC=true" -EnvironmentFile=-/etc/sysconfig/tomcat -ExecStart=/usr/libexec/tomcat/server start -ExecStop=/usr/libexec/tomcat/server stop - -[Install] -WantedBy=multi-user.target diff --git a/tomcat-8.5.logrotate b/tomcat-8.5.logrotate deleted file mode 100644 index a87b4c0..0000000 --- a/tomcat-8.5.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -@@@TCLOG@@@/catalina.out { - copytruncate - weekly - rotate 52 - compress - missingok - create 0644 tomcat tomcat -} diff --git a/tomcat-8.5-bootstrap-MANIFEST.MF.patch b/tomcat-9.0-bootstrap-MANIFEST.MF.patch similarity index 100% rename from tomcat-8.5-bootstrap-MANIFEST.MF.patch rename to tomcat-9.0-bootstrap-MANIFEST.MF.patch diff --git a/tomcat-8.5-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch similarity index 100% rename from tomcat-8.5-catalina-policy.patch rename to tomcat-9.0-catalina-policy.patch diff --git a/tomcat-8.5-digest.script b/tomcat-9.0-digest.script similarity index 100% rename from tomcat-8.5-digest.script rename to tomcat-9.0-digest.script diff --git a/tomcat-8.5-log4j.properties b/tomcat-9.0-log4j.properties similarity index 100% rename from tomcat-8.5-log4j.properties rename to tomcat-9.0-log4j.properties diff --git a/tomcat-8.5-tomcat-users-webapp.patch b/tomcat-9.0-tomcat-users-webapp.patch similarity index 100% rename from tomcat-8.5-tomcat-users-webapp.patch rename to tomcat-9.0-tomcat-users-webapp.patch diff --git a/tomcat-8.5-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script similarity index 100% rename from tomcat-8.5-tool-wrapper.script rename to tomcat-9.0-tool-wrapper.script diff --git a/tomcat-8.5.conf b/tomcat-9.0.conf similarity index 100% rename from tomcat-8.5.conf rename to tomcat-9.0.conf diff --git a/tomcat-8.5.service b/tomcat-9.0.service similarity index 100% rename from tomcat-8.5.service rename to tomcat-9.0.service diff --git a/tomcat-8.5.sysconfig b/tomcat-9.0.sysconfig similarity index 100% rename from tomcat-8.5.sysconfig rename to tomcat-9.0.sysconfig diff --git a/tomcat-8.5.wrapper b/tomcat-9.0.wrapper similarity index 100% rename from tomcat-8.5.wrapper rename to tomcat-9.0.wrapper diff --git a/tomcat.spec b/tomcat.spec index 3ab4438..f0cee80 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -28,17 +28,18 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -%global jspspec 2.3 -%global major_version 8 -%global minor_version 5 -%global micro_version 30 -%global packdname apache-tomcat-%{version}-src -%global servletspec 3.1 -%global elspec 3.0 -%global tcuid 91 -# Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java -%global native_version 1.2.8 +%global major_version 9 +%global minor_version 0 +%global micro_version 7 +%global redhat_version 10 +%global packdname apache-tomcat-%{version}.redhat-%{redhat_version}-src +# Specification versions +%global servletspec 4.0 +%global jspspec 2.3 +%global elspec 3.0 + +%global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %global basedir %{_var}/lib/%{name} @@ -54,26 +55,20 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -# Fedora doesn't seem to have this macro, so we define it if it doesn't exist -%{!?_mavendepmapfragdir: %global _mavendepmapfragdir /usr/share/maven-metadata} -# Fedora 24 erroneously uses %%{_datadir}/maven-fragments instead of /maven-metadata for some reason... -# Override the mavendepmapfragdir var on fc24 -%{?fc24: %global _mavendepmapfragdir /usr/share/maven-metadata} - Name: tomcat Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API - Group: System Environment/Daemons License: ASL 2.0 URL: http://tomcat.apache.org/ -Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz + +#Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz +Source0: tomcat-9.0.7.redhat-10-src.zip 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 Source8: servlet-api-OSGi-MANIFEST.MF @@ -84,7 +79,6 @@ Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF Source15: tomcat-api-OSGi-MANIFEST.MF Source16: tomcat-juli-OSGi-MANIFEST.MF -Source20: %{name}-%{major_version}.%{minor_version}-jsvc.service Source21: tomcat-functions Source30: tomcat-preamble Source31: tomcat-server @@ -98,14 +92,13 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.4.0 +BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool -BuildRequires: tomcat-taglibs-standard -BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 # add_maven_depmap is deprecated, using javapackages-local for now @@ -121,13 +114,12 @@ Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool -Requires: java-headless >= 1:1.6.0 +Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps -Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Recommends: tomcat-native >= %{native_version} Requires(pre): shadow-utils Requires(post): chkconfig +Requires(postun): chkconfig Requires(preun): chkconfig Requires(post): systemd-units Requires(preun): systemd-units @@ -136,6 +128,27 @@ Requires(postun): systemd-units # added after log4j sub-package was removed Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +# Leftover requires/provides from removing the subpackages +# they still apply in instances where the old version is installed. + +#%%package jsp-%%{jspspec}-api +Provides: jsp = %{jspspec} +Obsoletes: %{name}-jsp-2.2-api + +#%%package lib +Requires: ecj >= 1:4.6.3 +Requires(preun): coreutils + +#%%package servlet-%%{servletspec}-api +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.0-api + +#%%package el-%%{elspec}-api +Provides: el_api = %{elspec} +Obsoletes: %{name}-el-2.2-api + %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. @@ -146,104 +159,9 @@ 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 admin-webapps -Group: Applications/System -Summary: The host-manager and manager web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description admin-webapps -The host-manager and manager web applications for Apache Tomcat. - -%package docs-webapp -Group: Applications/Text -Summary: The docs web application for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description docs-webapp -The docs web application for Apache Tomcat. - -%package javadoc -Group: Documentation -Summary: Javadoc generated documentation for Apache Tomcat -Requires: jpackage-utils - -%description javadoc -Javadoc generated documentation for Apache Tomcat. - -%package jsvc -Group: System Environment/Daemons -Summary: Apache jsvc wrapper for Apache Tomcat as separate service -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: apache-commons-daemon-jsvc - -%description jsvc -Systemd service to start tomcat with jsvc, -which allows tomcat to perform some privileged operations -(e.g. bind to a port < 1024) and then switch identity to a non-privileged user. - -%package jsp-%{jspspec}-api -Group: Development/Libraries -Summary: Apache Tomcat JavaServer Pages v%{jspspec} API Implementation Classes -Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api -Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release} -Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release} -Requires(post): chkconfig -Requires(postun): chkconfig - -%description jsp-%{jspspec}-api -Apache Tomcat JSP API Implementation Classes. - -%package lib -Group: Development/Libraries -Summary: Libraries needed to run the Tomcat Web container -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 >= 1:4.2.1 -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool -Requires(preun): coreutils - -%description lib -Libraries needed to run the Tomcat Web container. - -%package servlet-%{servletspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description servlet-%{servletspec}-api -Apache Tomcat Servlet API Implementation Classes. - -%package el-%{elspec}-api -Group: Development/Libraries -Summary: Apache Tomcat Expression Language v%{elspec} API Implementation Classes -Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api -Requires(post): chkconfig -Requires(postun): chkconfig - -%description el-%{elspec}-api -Apache Tomcat EL API Implementation Classes. - -%package webapps -Group: Applications/Internet -Summary: The ROOT and examples web applications for Apache Tomcat -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: tomcat-taglibs-standard >= 0:1.1 - -%description webapps -The ROOT and examples web applications for Apache Tomcat. - %prep %setup -q -n %{packdname} + # remove pre-built binaries and windows files find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \ -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete @@ -251,10 +169,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch0 -p0 %patch1 -p0 %patch2 -p0 -%patch3 -p0 - -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) webapps/examples/WEB-INF/lib/jstl.jar -%{__ln_s} $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) webapps/examples/WEB-INF/lib/standard.jar +#%%patch3 -p0 %build export OPT_JAR_LIST="xalan-j2-serializer" @@ -281,17 +196,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source javadoc + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar -pushd output/dist/src/webapps/docs/appdev/sample/src -%{__mkdir_p} ../web/WEB-INF/classes -%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java -pushd ../web -%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war * -popd -popd # inject OSGi manifests mkdir -p META-INF @@ -321,10 +229,8 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF # 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}%{_javadocdir}/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir} %{__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} @@ -334,7 +240,6 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF /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} -/bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out %{__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} @@ -348,10 +253,7 @@ pushd output/build %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__cp} -a conf/*.{policy,properties,xml,xsd} ${RPM_BUILD_ROOT}%{confdir} %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir} - %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir} popd -# javadoc -%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ @@ -365,10 +267,6 @@ popd ${RPM_BUILD_ROOT}%{_sbindir}/%{name} %{__install} -m 0644 %{SOURCE11} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service -%{__install} -m 0644 %{SOURCE20} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service -%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name} %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ @@ -407,10 +305,6 @@ popd pushd output/build %{_bindir}/build-jar-repository lib apache-commons-collections \ apache-commons-dbcp apache-commons-pool ecj 2>&1 - # need to use -p here with b-j-r otherwise the examples webapp fails to - # load with a java.io.IOException - %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \ - tomcat-taglibs-standard/taglibs-standard-impl.jar tomcat-taglibs-standard/taglibs-standard-compat.jar 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -437,28 +331,6 @@ pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{workdir} work popd -# install sample webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample -pushd ${RPM_BUILD_ROOT}%{appdir}/sample -%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war -popd -%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war - -# Allow linking for example webapp -%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF -echo '' > context.xml -echo '' >> context.xml -echo ' ' >> context.xml -echo '' >> context.xml -popd - -pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-impl) jstl.jar -%{__ln_s} -f $(build-classpath tomcat-taglibs-standard/taglibs-standard-compat) standard.jar -popd - - # Install the maven metadata %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir} pushd output/dist/src/res/maven @@ -470,29 +342,29 @@ 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 %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar -f "tomcat-lib" + %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar done # tomcat-util-scan %{__cp} -a %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar # tomcat-jni %{__cp} -a %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar -f "tomcat-lib" +%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-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 -f "tomcat-jsp-api" -a "org.eclipse.jetty.orbit:javax.servlet.jsp" +%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -a "org.eclipse.jetty.orbit:javax.servlet.jsp" %{__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 -f "tomcat-el-api" -a "org.eclipse.jetty.orbit:javax.el" +%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -a "org.eclipse.jetty.orbit:javax.el" %{__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 -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -539,15 +411,11 @@ done # install but don't activate %systemd_post %{name}.service -%post jsp-%{jspspec}-api +# Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 - -%post servlet-%{servletspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 - -%post el-%{elspec}-api %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 @@ -559,30 +427,16 @@ done %postun %systemd_postun_with_restart %{name}.service -%postun jsp-%{jspspec}-api +# Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar -fi - -%postun servlet-%{servletspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar -fi - -%postun el-%{elspec}-api -if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove elspec \ %{_javadir}/%{name}-el-%{elspec}-api.jar fi -%triggerun -- tomcat < 0:7.0.22-2 -/usr/bin/systemd-sysv-convert -- save tomcat > /dev/null 2>&1 || : -# Run these becasue the SysV package being removed won't do them -/sbin/chkconfig --del tomcat > /dev/null 2>&1 || : -/bin/systemctl try-restart tomcat.service > /dev/null 2>&1 || : - %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} @@ -634,24 +488,6 @@ fi %{homedir}/logs %{homedir}/conf -%files admin-webapps -%defattr(0664,root,tomcat,0755) -%{appdir}/host-manager -%{appdir}/manager - -%files docs-webapp -%defattr(-,root,root,-) -%{appdir}/docs - -%files javadoc -%defattr(-,root,root,-) -%{_javadocdir}/%{name} - -%files jsp-%{jspspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-jsp-api -%defattr(-,root,root,-) -%{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files lib -f output/dist/src/res/maven/.mfiles-tomcat-lib %defattr(-,root,root,-) %dir %{libdir} %{libdir}/*.jar @@ -671,404 +507,13 @@ fi %{_mavenpomdir}/JPP.%{name}-websocket-api.pom %{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom %{_mavenpomdir}/JPP.%{name}-jaspic-api.pom +%{_mavenpomdir}/JPP.%{name}-jni.pom +%{_mavenpomdir}/JPP.%{name}-util-scan.pom +%{_mavenpomdir}/JPP-%{name}-jsp-api.pom +%{_mavenpomdir}/JPP-%{name}-servlet-api.pom +%{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml -%exclude %{libdir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-servlet-%{servletspec}*.jar -%exclude %{_javadir}/%{name}-el-%{elspec}-api.jar -%exclude %{_javadir}/%{name}-jsp-%{jspspec}*.jar - -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar - -%files el-%{elspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-el-api -%defattr(-,root,root,-) -%doc LICENSE -%{_javadir}/%{name}-el-%{elspec}-api.jar -%{libdir}/%{name}-el-%{elspec}-api.jar - -%files webapps -%defattr(0644,tomcat,tomcat,0755) -%{appdir}/ROOT -%{appdir}/examples -%{appdir}/sample - -%files jsvc -%defattr(755,root,root,0755) -%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service -%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out %changelog -* Tue May 01 2018 Coty Sutherland - 1:8.5.30-1 -- Update to 8.5.30 - -* Thu Mar 15 2018 Coty Sutherland - 1:8.5.29-1 -- Update to 8.5.29 -- Resolves: rhbz#1548290 CVE-2018-1304 tomcat: Incorrect handling of empty string URL in security constraints can lead to unitended exposure of resources -- Resolves: rhbz#1548284 CVE-2018-1305 tomcat: Late application of security constraints can lead to resource exposure for unauthorised users - -* Fri Feb 09 2018 Igor Gnatenko - 1:8.0.49-2 -- Escape macros in %%changelog - -* Thu Feb 01 2018 Coty Sutherland - 1:8.0.49-1 -- Update to 8.0.49 - -* Tue Dec 12 2017 Merlin Mathesius - 1:8.0.47-3 -- Cleanup spec file conditionals - -* Tue Oct 24 2017 Troy Dawson - 1:8.0.47-2 -- Change "zip -u" to "zip" -- Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition - -* Wed Oct 04 2017 Coty Sutherland - 1:8.0.47-1 -- Update to 8.0.47 -- Resolves: rhbz#1497682 CVE-2017-12617 tomcat: Remote Code Execution bypass for CVE-2017-12615 - -* Mon Aug 21 2017 Coty Sutherland - 1:8.0.46-1 -- Update to 8.0.46 -- Resolves: rhbz#1480620 CVE-2017-7674 tomcat: Cache Poisoning - -* Thu Jul 27 2017 Fedora Release Engineering - 1:8.0.44-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Jun 09 2017 Coty Sutherland - 1:8.0.44-1 -- Resolves: rhbz#1459160 CVE-2017-5664 tomcat: Security constrained bypass in error page mechanism - -* Tue Apr 11 2017 Coty Sutherland - 1:8.0.43-1 -- Update to 8.0.43 - -* Fri Mar 31 2017 Coty Sutherland - 1:8.0.42-1 -- Update to 8.0.42 - -* Thu Feb 16 2017 Coty Sutherland - 1:8.0.41-1 -- Update to 8.0.41 -- Resolves: rhbz#1403825 CVE-2016-8745 tomcat: information disclosure due to incorrect Processor sharing - -* Sat Feb 11 2017 Fedora Release Engineering - 1:8.0.39-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Nov 29 2016 Coty Sutherland - 1:8.0.39-1 -- Update to 8.0.39 -- Resolves: rhbz#1397493 CVE-2016-6816 CVE-2016-6817 CVE-2016-8735 tomcat: various flaws - -* Tue Oct 25 2016 Coty Sutherland - 1:8.0.38-1 -- Update to 8.0.38 - -* Sun Oct 23 2016 Coty Sutherland - 1:8.0.37-3 -- Resolves: rhbz#1383216 CVE-2016-6325 tomcat: tomcat writable config files allow privilege escalation -- Resolves: rhbz#1382310 CVE-2016-5425 tomcat: Local privilege escalation via systemd-tmpfiles service - -* Tue Sep 13 2016 Coty Sutherland - 1:8.0.37-1 -- Rebase to 8.0.37 -- Resolves: rhbz#1375581 CVE-2016-5388 CGI sets environmental variable based on user supplied Proxy request header -- Resolves: rhbz#1370262 catalina.out is no longer in use in the main package, but still gets rotated - -* Thu Aug 11 2016 Coty Sutherland - 1:8.0.36-2 -- Related: rhbz#1349469 Correct typo in changelog entry - -* Mon Aug 08 2016 Coty Sutherland - 1:8.0.36-1 -- Resolves: rhbz#1349469 CVE-2016-3092 tomcat: Usage of vulnerable FileUpload package can result in denial of service (updates to 8.0.36) -- Resolves: rhbz#1364056 The command tomcat-digest doesn't work -- Resolves: rhbz#1363884 The tomcat-tool-wrapper script is broken -- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully -- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled) -- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out -- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded -- Resolves: rhbz#1359737 Missing maven depmap for the following artifacts: org.apache.tomcat:tomcat-websocket, org.apache.tomcat:tomcat-websocket-api -- Resolves: asfbz#59960 Building javadocs with java8 fails - -* Wed Mar 2 2016 Ivan Afonichev - 1:8.0.32-4 -- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905 -- Add /etc/tomcat/conf.d/ with shell expansion support, resolves rhbz#1293636 - -* Sat Feb 27 2016 Ivan Afonichev - 1:8.0.32-3 -- Load sysconfig from tomcat.conf, resolves: rhbz#1311771, rhbz#1311905 -- Set default javax.sql.DataSource factory to apache commons one, resolves rhbz#1214381 - -* Sun Feb 21 2016 Ivan Afonichev - 1:8.0.32-2 -- Fix symlinks from $CATALINA_HOME/lib perspective, resolves: rhbz#1308685 - -* Thu Feb 11 2016 Ivan Afonichev - 1:8.0.32-1 -- Updated to 8.0.32 -- Remove log4j support. It has never been working actually. See rhbz#1236297 -- Move shipped config to /etc/sysconfig/tomcat. /etc/tomcat/tomcat.conf can now be used to override it with shell expansion, resolves rhbz#1293636 -- Recommend tomcat-native, resolves: rhbz#1243132 - -* Wed Feb 10 2016 Coty Sutherland 1:8.0.26-4 -- Resolves: rhbz#1286800 Failed to start component due to wrong allowLinking="true" in context.xml -- Program /bin/nologin does not exist (#1302718) - -* Fri Feb 05 2016 Fedora Release Engineering - 1:8.0.26-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Nov 11 2015 Robert Scheck 1:8.0.26-2 -- CATALINA_OPTS are only read when SECURITY_MANAGER is true (#1147105) - -* Thu Aug 27 2015 Alexander Kurtakov 1:8.0.26-1 -- Update to 8.0.26. - -* Fri Jul 10 2015 Alexander Kurtakov 1:8.0.24-2 -- Update to 8.0.24. - -* Fri Jun 19 2015 Alexander Kurtakov 1:8.0.23-2 -- Drop javax.el:el-api alias. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.23-1 -- Update to 8.0.23. - -* Thu Jun 18 2015 Alexander Kurtakov 1:8.0.20-3 -- Drop jetty alias for servlet. - -* Tue Jun 09 2015 Michal Srb - 1:8.0.20-2 -- Fix metadata for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Thu Mar 5 2015 Alexander Kurtakov 1:8.0.18-5 -- Rebuild against tomcat-taglibs-standard. - -* Wed Mar 4 2015 Alexander Kurtakov 1:8.0.18-4 -- Fix epoch bumped el_1_0_api that would override all other glassfish/jboss/etc. due to wrong epoch. -- Drop old provides. - -* Tue Mar 03 2015 Stephen Gallagher 1:8.0.18-3 -- Bump epoch to maintain upgrade path from Fedora 22 - -* Mon Feb 16 2015 Michal Srb - 0:8.0.18-2 -- Install POM files for org.apache.tomcat:{tomcat-jni,tomcat-util-scan} - -* Sun Feb 15 2015 Ivan Afonichev 0:8.0.18-1 -- Updated to 8.0.18 - -* Sat Sep 20 2014 Ivan Afonichev 0:8.0.12-1 -- Updated to 8.0.12 -- Substitute libnames in catalina-tasks.xml, resolves: rhbz#1126439 -- Use CATALINA_OPTS only on start, resolves: rhbz#1051194 - -* Mon Jun 16 2014 Michal Srb - 0:7.0.54-3 -- jsp-api requires el-api - -* Sun Jun 08 2014 Fedora Release Engineering - 0:7.0.54-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Jun 5 2014 Alexander Kurtakov 0:7.0.54-1 -- Update to upstream 7.0.54 - fixes compile with Java 8. - -* Wed May 21 2014 Alexander Kurtakov 0:7.0.52-3 -- Drop servlet/el api provides to reduce user machines ending with both. - -* Sun Mar 30 2014 Ivan Afonichev 0:7.0.52-2 -- Don't provide maven javax.jsp:jsp-api and javax.servlet.jsp:javax.servlet.jsp-api resolves: rhbz#1076949 -- Move log4j support into subpackage, resolves: rhbz#1027716 - -* Wed Mar 26 2014 Ivan Afonichev 0:7.0.52-1 -- Updated to 7.0.52 -- Rewrite jsvc implementation, resolves: rhbz#1051743 -- Switch to java-headless R, resolves: rhbz#1068566 -- Create and own %%{_localstatedir}/lib/tomcats, resolves: rhbz#1026741 -- Add pom for tomcat-jdbc, resolves: rhbz#1011003 - -* Tue Jan 21 2014 Mikolaj Izdebski - 0:7.0.47-3 -- Fix installation of Maven metadata for tomcat-juli.jar -- Resolves: rhbz#1033664 - -* Wed Jan 15 2014 Stanislav Ochotnicky - 0:7.0.47-2 -- Rebuild for bug #1033664 - -* Sun Nov 03 2013 Ivan Afonichev 0:7.0.47-1 -- Updated to 7.0.47 -- Fix java.security.policy - -* Sun Aug 04 2013 Fedora Release Engineering - 0:7.0.42-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Jul 12 2013 Ivan Afonichev 0:7.0.42-2 -- Remove jpackage-utils R - -* Thu Jul 11 2013 Dmitry Tikhonov 0:7.0.42-1 -- Updated to 7.0.42 - -* Tue Jun 11 2013 Paul Komkoff 0:7.0.40-3 -- Dropped systemv inits. Bye-bye. -- Updated the systemd wrappers to allow running multiple instances. - Added wrapper scripts to do that, ported the original non-named - service file to work with the same wrappers, updated - /usr/sbin/tomcat to call systemctl. - -* Sat May 11 2013 Ivan Afonichev 0:7.0.40-1 -- Updated to 7.0.40 -- Resolves: rhbz 956569 added missing commons-pool link -- Remove ant-nodeps BR - -* Mon Mar 4 2013 Mikolaj Izdebski - 0:7.0.37-2 -- Add depmaps for org.eclipse.jetty.orbit -- Resolves: rhbz#917626 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.39-1 -- Updated to 7.0.39 - -* Wed Feb 20 2013 Ivan Afonichev 0:7.0.37-1 -- Updated to 7.0.37 - -* Mon Feb 4 2013 Ivan Afonichev 0:7.0.35-1 -- Updated to 7.0.35 -- systemd SuccessExitStatus=143 for proper stop exit code processing - -* Mon Dec 24 2012 Ivan Afonichev 0:7.0.34-1 -- Updated to 7.0.34 -- ecj >= 4.2.1 now required -- Resolves: rhbz 889395 concat classpath correctly; chdir to $CATALINA_HOME - -* Fri Dec 7 2012 Ivan Afonichev 0:7.0.33-2 -- Resolves: rhbz 883806 refix logdir ownership - -* Sun Dec 2 2012 Ivan Afonichev 0:7.0.33-1 -- Updated to 7.0.33 -- Resolves: rhbz 873620 need chkconfig for update-alternatives - -* Wed Oct 17 2012 Ivan Afonichev 0:7.0.32-1 -- Updated to 7.0.32 -- Resolves: rhbz 842620 symlinks to taglibs - -* Fri Aug 24 2012 Ivan Afonichev 0:7.0.29-1 -- Updated to 7.0.29 -- Add pidfile as tmpfile -- Use systemd for running as unprivileged user -- Resolves: rhbz 847751 upgrade path was broken -- Resolves: rhbz 850343 use new systemd-rpm macros - -* Sat Jul 21 2012 Fedora Release Engineering - 0:7.0.28-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 2 2012 Ivan Afonichev 0:7.0.28-1 -- Updated to 7.0.28 -- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp -- Resolves: rhbz 814900 Added tomcat-coyote POM -- Resolves: rhbz 810775 Remove systemv stuff from %%post scriptlet -- Remove redhat-lsb R - -* Mon Apr 9 2012 Ivan Afonichev 0:7.0.27-2 -- Fixed native download hack - -* Sat Apr 7 2012 Ivan Afonichev 0:7.0.27-1 -- Updated to 7.0.27 -- Fixed jakarta-taglibs-standard BR and R - -* Wed Mar 21 2012 Stanislav Ochotnicky - 0:7.0.26-2 -- Add more depmaps to J2EE apis to help jetty/glassfish updates - -* Wed Mar 14 2012 Juan Hernandez 0:7.0.26-2 -- Added the POM files for tomcat-api and tomcat-util (#803495) - -* Wed Feb 22 2012 Ivan Afonichev 0:7.0.26-1 -- Updated to 7.0.26 -- Bug 790334: Change ownership of logdir for logrotate - -* Thu Feb 16 2012 Krzysztof Daniel 0:7.0.25-4 -- Bug 790694: Priorities of jsp, servlet and el packages updated. - -* Wed Feb 8 2012 Krzysztof Daniel 0:7.0.25-3 -- Dropped indirect dependecy to tomcat 5 - -* Sun Jan 22 2012 Ivan Afonichev 0:7.0.25-2 -- Added hack for maven depmap of tomcat-juli absolute link [ -f ] pass correctly - -* Sat Jan 21 2012 Ivan Afonichev 0:7.0.25-1 -- Updated to 7.0.25 -- Removed EntityResolver patch (changes already in upstream sources) -- Place poms and depmaps in the same package as jars -- Added javax.servlet.descriptor to export-package of servlet-api -- Move several chkconfig actions and reqs to systemv subpackage -- New maven depmaps generation method -- Add patch to support java7. (patch sent upstream). -- Require java >= 1:1.6.0 - -* Fri Jan 13 2012 Krzysztof Daniel 0:7.0.23-5 -- Exported javax.servlet.* packages in version 3.0 as 2.6 to make - servlet-api compatible with Eclipse. - -* Thu Jan 12 2012 Ivan Afonichev 0:7.0.23-4 -- Move jsvc support to subpackage - -* Wed Jan 11 2012 Alexander Kurtakov 0:7.0.23-2 -- Add EntityResolver setter patch to jasper for jetty's need. (patch sent upstream). - -* Mon Dec 12 2011 Joseph D. Wagner 0:7.0.23-3 -- Added support to /usr/sbin/tomcat-sysd and /usr/sbin/tomcat for - starting tomcat with jsvc, which allows tomcat to perform some - privileged operations (e.g. bind to a port < 1024) and then switch - identity to a non-privileged user. Must add USE_JSVC="true" to - /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat. - -* Mon Nov 28 2011 Ivan Afonichev 0:7.0.23-1 -- Updated to 7.0.23 - -* Fri Nov 11 2011 Ivan Afonichev 0:7.0.22-2 -- Move tomcat-juli.jar to lib package -- Drop %%update_maven_depmap as in tomcat6 -- Provide native systemd unit file ported from tomcat6 - -* Thu Oct 6 2011 Ivan Afonichev 0:7.0.22-1 -- Updated to 7.0.22 - -* Mon Oct 03 2011 Rex Dieter - 0:7.0.21-3.1 -- rebuild (java), rel-eng#4932 - -* Mon Sep 26 2011 Ivan Afonichev 0:7.0.21-3 -- Fix basedir mode - -* Tue Sep 20 2011 Roland Grunberg 0:7.0.21-2 -- Add manifests for el-api, jasper-el, jasper, tomcat, and tomcat-juli. - -* Thu Sep 8 2011 Ivan Afonichev 0:7.0.21-1 -- Updated to 7.0.21 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-3 -- Require java = 1:1.6.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-2 -- Require java < 1.7.0 - -* Mon Aug 15 2011 Ivan Afonichev 0:7.0.20-1 -- Updated to 7.0.20 - -* Tue Jul 26 2011 Ivan Afonichev 0:7.0.19-1 -- Updated to 7.0.19 - -* Tue Jun 21 2011 Ivan Afonichev 0:7.0.16-1 -- Updated to 7.0.16 - -* Mon Jun 6 2011 Ivan Afonichev 0:7.0.14-3 -- Added initial systemd service -- Fix some paths - -* Sat May 21 2011 Ivan Afonichev 0:7.0.14-2 -- Fixed http source link -- Securify some permissions -- Added licenses for el-api and servlet-api -- Added dependency on jpackage-utils for the javadoc subpackage - -* Sat May 14 2011 Ivan Afonichev 0:7.0.14-1 -- Updated to 7.0.14 - -* Thu May 5 2011 Ivan Afonichev 0:7.0.12-4 -- Provided local paths for libs -- Fixed dependencies -- Fixed update temp/work cleanup - -* Mon May 2 2011 Ivan Afonichev 0:7.0.12-3 -- Fixed package groups -- Fixed some permissions -- Fixed some links -- Removed old tomcat6 crap - -* Thu Apr 28 2011 Ivan Afonichev 0:7.0.12-2 -- Package now named just tomcat instead of tomcat7 -- Removed Provides: %%{name}-log4j -- Switched to apache-commons-* names instead of jakarta-commons-* . -- Remove the old changelog -- BR/R java >= 1:1.6.0 , same for java-devel -- Removed old tomcat6 crap - -* Wed Apr 27 2011 Ivan Afonichev 0:7.0.12-1 -- Tomcat7 +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 +- Create single RPM for FreeIPA to use From df584c8d778d31537386eb07f12f01d2992d83b3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:00:29 -0400 Subject: [PATCH 02/31] Initialized to use tito. --- .tito/packages/.readme | 3 +++ .tito/tito.props | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 .tito/packages/.readme create mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme new file mode 100644 index 0000000..b9411e2 --- /dev/null +++ b/.tito/packages/.readme @@ -0,0 +1,3 @@ +the .tito/packages directory contains metadata files +named after their packages. Each file has the latest tagged +version and the project's relative directory. diff --git a/.tito/tito.props b/.tito/tito.props new file mode 100644 index 0000000..eab3f19 --- /dev/null +++ b/.tito/tito.props @@ -0,0 +1,5 @@ +[buildconfig] +builder = tito.builder.Builder +tagger = tito.tagger.VersionTagger +changelog_do_not_remove_cherrypick = 0 +changelog_format = %s (%ae) From 007cf5606ecb8f0b535766ec2a0f616333ac428d Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:02:39 -0400 Subject: [PATCH 03/31] Automatic commit of package [tomcat] release [9.0.7-1]. Created by command: /usr/bin/tito tag 1.0 --- .tito/packages/tomcat | 1 + tomcat.spec | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .tito/packages/tomcat diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat new file mode 100644 index 0000000..c814425 --- /dev/null +++ b/.tito/packages/tomcat @@ -0,0 +1 @@ +9.0.7-1 ./ diff --git a/tomcat.spec b/tomcat.spec index f0cee80..850bde4 100644 --- a/tomcat.spec +++ b/tomcat.spec @@ -515,5 +515,8 @@ fi %{_datadir}/maven-metadata/tomcat.xml %changelog +* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 +- new package built with tito + * Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 - Create single RPM for FreeIPA to use From cd6fcc4e55771b873cdd88ad9fdfde2bf81648e4 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 8 Jun 2018 15:09:23 -0400 Subject: [PATCH 04/31] Switch tito to use NoTgzBuilder since I'm using a zip... --- .tito/tito.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tito/tito.props b/.tito/tito.props index eab3f19..70eda22 100644 --- a/.tito/tito.props +++ b/.tito/tito.props @@ -1,5 +1,5 @@ [buildconfig] -builder = tito.builder.Builder +builder = tito.builder.NoTgzBuilder tagger = tito.tagger.VersionTagger changelog_do_not_remove_cherrypick = 0 changelog_format = %s (%ae) From 246d44ac3852c87d918d60d2779dfc79c2c4e6d5 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:13:20 -0400 Subject: [PATCH 05/31] Update sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 927322b..8a82736 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-tomcat-8.5.30-src.tar.gz) = 53729cfd1859872109f816df2642e3cd776a7faf8c55b1d50df0459f12958aacbf36debe6e8f10c19ab0a5bb2973fa63a2fec57f83ecaf19f4cf9d82e4a20265 +SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 From da3ae2f84c9f1eda77b5e180e0f274b2f56f548c Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:27:31 -0400 Subject: [PATCH 06/31] Rename spec file --- tomcat.spec => pki-servlet-container.spec | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tomcat.spec => pki-servlet-container.spec (100%) diff --git a/tomcat.spec b/pki-servlet-container.spec similarity index 100% rename from tomcat.spec rename to pki-servlet-container.spec From 5061e0a17cceee8425d3fa3b95593627831c48b1 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Mon, 11 Jun 2018 14:28:49 -0400 Subject: [PATCH 07/31] Regroup source files --- pki-servlet-container.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 850bde4..27c511f 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -71,9 +71,9 @@ Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper Source6: %{name}-%{major_version}.%{minor_version}-digest.script Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: servlet-api-OSGi-MANIFEST.MF -Source9: jsp-api-OSGi-MANIFEST.MF -Source11: %{name}-%{major_version}.%{minor_version}.service +Source8: %{name}-%{major_version}.%{minor_version}.service +Source9: servlet-api-OSGi-MANIFEST.MF +Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF Source13: jasper-el-OSGi-MANIFEST.MF Source14: jasper-OSGi-MANIFEST.MF @@ -203,10 +203,10 @@ export OPT_JAR_LIST="xalan-j2-serializer" # inject OSGi manifests mkdir -p META-INF -cp -p %{SOURCE8} META-INF/MANIFEST.MF +cp -p %{SOURCE9} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/servlet-api.jar META-INF/MANIFEST.MF -cp -p %{SOURCE9} META-INF/MANIFEST.MF +cp -p %{SOURCE11} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF cp -p %{SOURCE12} META-INF/MANIFEST.MF @@ -265,7 +265,7 @@ popd > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_sbindir}/%{name} -%{__install} -m 0644 %{SOURCE11} \ +%{__install} -m 0644 %{SOURCE8} \ ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ From be9ac2b0c2f096d92b8c189bbd7879e5741e75ff Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:04:37 -0400 Subject: [PATCH 08/31] Add serlvet-api package back for FreeIPA --- pki-servlet-container.spec | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 27c511f..96c8b15 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -139,12 +139,6 @@ Obsoletes: %{name}-jsp-2.2-api Requires: ecj >= 1:4.6.3 Requires(preun): coreutils -#%%package servlet-%%{servletspec}-api -Provides: servlet = %{servletspec} -Provides: servlet6 -Provides: servlet3 -Obsoletes: %{name}-servlet-3.0-api - #%%package el-%%{elspec}-api Provides: el_api = %{elspec} Obsoletes: %{name}-el-2.2-api @@ -159,6 +153,19 @@ 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 servlet-%{servletspec}-api +Group: Development/Libraries +Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes +Provides: servlet = %{servletspec} +Provides: servlet6 +Provides: servlet3 +Obsoletes: %{name}-servlet-3.1-api +Requires(post): chkconfig +Requires(postun): chkconfig + +%description servlet-%{servletspec}-api +Apache Tomcat Servlet API Implementation Classes. + %prep %setup -q -n %{packdname} @@ -364,7 +371,7 @@ done # 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 -%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar +%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" # replace temporary copy with link %{__ln_s} -f $(abs2rel %{bindir}/tomcat-juli.jar %{libdir}) ${RPM_BUILD_ROOT}%{libdir}/ @@ -510,10 +517,14 @@ fi %{_mavenpomdir}/JPP.%{name}-jni.pom %{_mavenpomdir}/JPP.%{name}-util-scan.pom %{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-servlet-api.pom %{_mavenpomdir}/JPP-%{name}-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%defattr(-,root,root,-) +%doc LICENSE +%{_javadir}/%{name}-servlet-%{servletspec}*.jar + %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 - new package built with tito From 2a25d68d4e88734356b6a8967b8efd397f987007 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 10:24:54 -0400 Subject: [PATCH 09/31] Update all references for %{name} to 'tomcat' to maintain directory structures, etc and reduce changes that FreeIPA will need to make in order to use this package --- pki-servlet-container.spec | 210 ++++++++++++++++++------------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 96c8b15..05a1c01 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -42,14 +42,14 @@ %global tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ -%global basedir %{_var}/lib/%{name} +%global basedir %{_var}/lib/tomcat %global appdir %{basedir}/webapps -%global homedir %{_datadir}/%{name} +%global homedir %{_datadir}/tomcat %global bindir %{homedir}/bin -%global confdir %{_sysconfdir}/%{name} -%global libdir %{_javadir}/%{name} -%global logdir %{_var}/log/%{name} -%global cachedir %{_var}/cache/%{name} +%global confdir %{_sysconfdir}/tomcat +%global libdir %{_javadir}/tomcat +%global logdir %{_var}/log/tomcat +%global cachedir %{_var}/cache/tomcat %global tempdir %{cachedir}/temp %global workdir %{cachedir}/work %global _initrddir %{_sysconfdir}/init.d @@ -66,12 +66,12 @@ URL: http://tomcat.apache.org/ #Source0: http://www.apache.org/dist/tomcat/tomcat-%%{major_version}/v%%{version}/src/%%{packdname}.tar.gz Source0: tomcat-9.0.7.redhat-10-src.zip -Source1: %{name}-%{major_version}.%{minor_version}.conf -Source3: %{name}-%{major_version}.%{minor_version}.sysconfig -Source4: %{name}-%{major_version}.%{minor_version}.wrapper -Source6: %{name}-%{major_version}.%{minor_version}-digest.script -Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script -Source8: %{name}-%{major_version}.%{minor_version}.service +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 Source9: servlet-api-OSGi-MANIFEST.MF Source11: jsp-api-OSGi-MANIFEST.MF Source12: el-api-OSGi-MANIFEST.MF @@ -84,9 +84,9 @@ Source30: tomcat-preamble Source31: tomcat-server Source32: tomcat-named.service -Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch -Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch -Patch2: %{name}-8.0.36-CompilerOptionsV9.patch +Patch0: tomcat-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch +Patch1: tomcat-%{major_version}.%{minor_version}-tomcat-users-webapp.patch +Patch2: tomcat-8.0.36-CompilerOptionsV9.patch Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch @@ -126,14 +126,14 @@ Requires(preun): systemd-units Requires(postun): systemd-units # added after log4j sub-package was removed -Provides: %{name}-log4j = %{epoch}:%{version}-%{release} +Provides: tomcat-log4j = %{epoch}:%{version}-%{release} # Leftover requires/provides from removing the subpackages # they still apply in instances where the old version is installed. #%%package jsp-%%{jspspec}-api Provides: jsp = %{jspspec} -Obsoletes: %{name}-jsp-2.2-api +Obsoletes: tomcat-jsp-2.2-api #%%package lib Requires: ecj >= 1:4.6.3 @@ -141,7 +141,7 @@ Requires(preun): coreutils #%%package el-%%{elspec}-api Provides: el_api = %{elspec} -Obsoletes: %{name}-el-2.2-api +Obsoletes: tomcat-el-2.2-api %description Tomcat is the servlet container that is used in the official Reference @@ -159,7 +159,7 @@ Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} Provides: servlet6 Provides: servlet3 -Obsoletes: %{name}-servlet-3.1-api +Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig @@ -252,7 +252,7 @@ zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF %{__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} -d -m 0755 ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat # move things into place # First copy supporting libs to tomcat lib @@ -265,48 +265,48 @@ popd %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \ - > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf + > ${RPM_BUILD_ROOT}%{confdir}/tomcat.conf %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \ - > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} + > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/tomcat %{__install} -m 0644 %{SOURCE4} \ - ${RPM_BUILD_ROOT}%{_sbindir}/%{name} + ${RPM_BUILD_ROOT}%{_sbindir}/tomcat %{__install} -m 0644 %{SOURCE8} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat.service %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-digest %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \ -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \ - > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper + > ${RPM_BUILD_ROOT}%{_bindir}/tomcat-tool-wrapper %{__install} -m 0644 %{SOURCE21} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/functions + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/functions %{__install} -m 0755 %{SOURCE30} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/preamble + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/preamble %{__install} -m 0755 %{SOURCE31} \ - ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/server + ${RPM_BUILD_ROOT}%{_libexecdir}/tomcat/server %{__install} -m 0644 %{SOURCE32} \ - ${RPM_BUILD_ROOT}%{_unitdir}/%{name}@.service + ${RPM_BUILD_ROOT}%{_unitdir}/tomcat@.service # Substitute libnames in catalina-tasks.xml sed -i \ - "s,el-api.jar,%{name}-el-%{elspec}-api.jar,; - s,servlet-api.jar,%{name}-servlet-%{servletspec}-api.jar,; - s,jsp-api.jar,%{name}-jsp-%{jspspec}-api.jar,;" \ + "s,el-api.jar,tomcat-el-%{elspec}-api.jar,; + s,servlet-api.jar,tomcat-servlet-%{servletspec}-api.jar,; + s,jsp-api.jar,tomcat-jsp-%{jspspec}-api.jar,;" \ ${RPM_BUILD_ROOT}%{bindir}/catalina-tasks.xml # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar - %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar - %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar - %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar - %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar - %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar + %{__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 popd pushd output/build @@ -316,9 +316,9 @@ popd pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars - %{__ln_s} ../../java/%{name}-jsp-%{jspspec}-api.jar . - %{__ln_s} ../../java/%{name}-servlet-%{servletspec}-api.jar . - %{__ln_s} ../../java/%{name}-el-%{elspec}-api.jar . + %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . + %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . + %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar @@ -348,17 +348,17 @@ 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 %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$libname.pom - %add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar + %{__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 %{name}-util-scan.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%add_maven_depmap JPP.%{name}-util-scan.pom %{name}/%{name}-util-scan.jar +%{__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 %{name}-jni.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-jni.pom -%add_maven_depmap JPP.%{name}-jni.pom %{name}/%{name}-jni.jar +%{__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 @@ -377,35 +377,35 @@ done %{__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.%{name}-catalina-tribes.pom -%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar +%{__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.%{name}-tomcat-coyote.pom -%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.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.%{name}-tomcat-juli.pom -%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.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.%{name}-tomcat-api.pom -%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.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.%{name}-tomcat-util.pom -%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.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.%{name}-tomcat-jdbc.pom -%add_maven_depmap JPP.%{name}-tomcat-jdbc.pom %{name}/tomcat-jdbc.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.%{name}-websocket-api.pom -%add_maven_depmap JPP.%{name}-websocket-api.pom %{name}/websocket-api.jar +%{__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.%{name}-tomcat-websocket.pom -%add_maven_depmap JPP.%{name}-tomcat-websocket.pom %{name}/tomcat-websocket.jar +%{__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.%{name}-jaspic-api.pom -%add_maven_depmap JPP.%{name}-jaspic-api.pom %{name}/jaspic-api.jar +%{__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 %pre @@ -416,48 +416,48 @@ done %post # install but don't activate -%systemd_post %{name}.service +%systemd_post tomcat.service # Collapse all of the alternatives installations into one %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200 + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar 20200 %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000 + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar 30000 %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar 20300 + %{_javadir}/tomcat-el-%{elspec}-api.jar 20300 %preun # clean tempdir and workdir on removal or upgrade %{__rm} -rf %{workdir}/* %{tempdir}/* -%systemd_preun %{name}.service +%systemd_preun tomcat.service %postun -%systemd_postun_with_restart %{name}.service +%systemd_postun_with_restart tomcat.service # Collapse all of the alternatives removals into one if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ - %{_javadir}/%{name}-jsp-%{jspspec}-api.jar + %{_javadir}/tomcat-jsp-%{jspspec}-api.jar %{_sbindir}/update-alternatives --remove servlet \ - %{_javadir}/%{name}-servlet-%{servletspec}-api.jar + %{_javadir}/tomcat-servlet-%{servletspec}-api.jar %{_sbindir}/update-alternatives --remove elspec \ - %{_javadir}/%{name}-el-%{elspec}-api.jar + %{_javadir}/tomcat-el-%{elspec}-api.jar fi %files %defattr(0664,root,tomcat,0755) %doc {LICENSE,NOTICE,RELEASE*} -%attr(0755,root,root) %{_bindir}/%{name}-digest -%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper -%attr(0755,root,root) %{_sbindir}/%{name} -%attr(0644,root,root) %{_unitdir}/%{name}.service -%attr(0644,root,root) %{_unitdir}/%{name}@.service -%attr(0755,root,root) %dir %{_libexecdir}/%{name} +%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 %attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats -%attr(0644,root,root) %{_libexecdir}/%{name}/functions -%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) %{_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 %attr(0755,root,tomcat) %dir %{basedir} %attr(0755,root,tomcat) %dir %{confdir} @@ -475,7 +475,7 @@ fi %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost %attr(0755,root,tomcat) %dir %{confdir}/conf.d %{confdir}/conf.d/README -%config(noreplace) %{confdir}/%{name}.conf +%config(noreplace) %{confdir}/tomcat.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml @@ -500,30 +500,30 @@ fi %{libdir}/*.jar %{_javadir}/*.jar %{bindir}/tomcat-juli.jar -%{_mavenpomdir}/JPP.%{name}-annotations-api.pom -%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom -%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom -%{_mavenpomdir}/JPP.%{name}-catalina.pom -%{_mavenpomdir}/JPP.%{name}-jasper-el.pom -%{_mavenpomdir}/JPP.%{name}-jasper.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-jdbc.pom -%{_mavenpomdir}/JPP.%{name}-websocket-api.pom -%{_mavenpomdir}/JPP.%{name}-tomcat-websocket.pom -%{_mavenpomdir}/JPP.%{name}-jaspic-api.pom -%{_mavenpomdir}/JPP.%{name}-jni.pom -%{_mavenpomdir}/JPP.%{name}-util-scan.pom -%{_mavenpomdir}/JPP-%{name}-jsp-api.pom -%{_mavenpomdir}/JPP-%{name}-el-api.pom +%{_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 %files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api %defattr(-,root,root,-) %doc LICENSE -%{_javadir}/%{name}-servlet-%{servletspec}*.jar +%{_javadir}/tomcat-servlet-%{servletspec}*.jar %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 058b0e8daebe259bc5ef5bd7ce08c2406237ba21 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:11:15 -0400 Subject: [PATCH 10/31] Change package name to 'pki-servlet-container' Add servlet-api sub-package back for FreeIPA to use Note that sub-package name differs parent because it was too lengthy otherwise --- pki-servlet-container.spec | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 05a1c01..e70f0e9 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -55,7 +55,7 @@ %global _initrddir %{_sysconfdir}/init.d %global _systemddir /lib/systemd/system -Name: tomcat +Name: pki-servlet-container Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} @@ -153,7 +153,7 @@ 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 servlet-%{servletspec}-api +%package -n pki-servlet-%{servletspec}-api Group: Development/Libraries Summary: Apache Tomcat Java Servlet v%{servletspec} API Implementation Classes Provides: servlet = %{servletspec} @@ -163,7 +163,7 @@ Obsoletes: tomcat-servlet-3.1-api Requires(post): chkconfig Requires(postun): chkconfig -%description servlet-%{servletspec}-api +%description -n pki-servlet-%{servletspec}-api Apache Tomcat Servlet API Implementation Classes. %prep @@ -407,6 +407,9 @@ done %{__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 %pre # add the tomcat user and group @@ -519,11 +522,14 @@ fi %{_mavenpomdir}/JPP-tomcat-jsp-api.pom %{_mavenpomdir}/JPP-tomcat-el-api.pom %{_datadir}/maven-metadata/tomcat.xml +%exclude %{_javadir}/tomcat-servlet-%{servletspec}*.jar -%files servlet-%{servletspec}-api -f output/dist/src/res/maven/.mfiles-tomcat-servlet-api +%files -n pki-servlet-%{servletspec}-api %defattr(-,root,root,-) %doc LICENSE %{_javadir}/tomcat-servlet-%{servletspec}*.jar +%{_datadir}/maven-metadata/tomcat-servlet-api.xml +%{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog * Fri Jun 08 2018 Coty Sutherland 9.0.7-1 From 94c5c759fa8161a5721be071d032fdbf6dcbaf89 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:16:32 -0400 Subject: [PATCH 11/31] Forgot to add requirement on the pki-servlet-api sub-package --- pki-servlet-container.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index e70f0e9..bbc7381 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -143,6 +143,8 @@ Requires(preun): coreutils Provides: el_api = %{elspec} Obsoletes: tomcat-el-2.2-api +Requires: pki-servlet-%{servletspec}-api = %{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. From 89dafd74b5ac0a5ba7162b478bfb93a271a37ee3 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:17:16 -0400 Subject: [PATCH 12/31] Sync up release number with JWS build so that you can immediately know where it came from --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index bbc7381..9d1278e 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,7 +56,7 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: 1 +Epoch: %{redhat_version} Version: %{major_version}.%{minor_version}.%{micro_version} Release: 1%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API From bd4ede044e90f6b9791c1410d65daaa597730dcd Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 12:20:26 -0400 Subject: [PATCH 13/31] Reset Epoch back to 1 and set Release to sync up with the JWS builds... --- pki-servlet-container.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 9d1278e..f42105b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -56,9 +56,9 @@ %global _systemddir /lib/systemd/system Name: pki-servlet-container -Epoch: %{redhat_version} +Epoch: 1 Version: %{major_version}.%{minor_version}.%{micro_version} -Release: 1%{?dist} +Release: %{redhat_version}%{?dist} Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API Group: System Environment/Daemons License: ASL 2.0 From a108316ffea1b0513751297408c3e7ded58586cd Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Tue, 12 Jun 2018 17:06:01 +0000 Subject: [PATCH 14/31] Repo creation --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From 41eaee89d11e80f822a45a3de6f8821c64163604 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:19:54 -0400 Subject: [PATCH 15/31] Adjust changelog --- pki-servlet-container.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index f42105b..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -534,8 +534,5 @@ fi %{_mavenpomdir}/JPP-tomcat-servlet-api.pom %changelog -* Fri Jun 08 2018 Coty Sutherland 9.0.7-1 -- new package built with tito - -* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-1 -- Create single RPM for FreeIPA to use +* Thu Jun 07 2018 Coty Sutherland - 1:9.0.7-10 +- Create packages for FreeIPA that wrap the JWS distribution of Tomcat From e8d6a98c1b59a5bed4186a74e2c7beae58a3c381 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:27:19 -0400 Subject: [PATCH 16/31] Removing dist-source since it's not used in the JWS build --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..be80869 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare dist-source + deploy dist-prepare # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From 3438c668950aed1524ef251e505a98eaeeb5c425 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:56:58 -0400 Subject: [PATCH 17/31] Revert "Removing dist-source since it's not used in the JWS build" This reverts commit 322c052855ac896914b539360461b5aa68216d44. --- pki-servlet-container.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index be80869..24cf81b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -205,7 +205,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ - deploy dist-prepare + deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar From 5e1b6dae43bf5857b3b3631221ba2e2ccbb6707b Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 14:59:25 -0400 Subject: [PATCH 18/31] Remove unused dependency on commons-daemon --- pki-servlet-container.spec | 4 +--- tomcat-9.0-digest.script | 2 +- tomcat-9.0-tool-wrapper.script | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 24cf81b..6cba1f0 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -95,7 +95,6 @@ BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: apache-commons-collections -BuildRequires: apache-commons-daemon BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 @@ -110,7 +109,6 @@ BuildRequires: geronimo-jaxrpc BuildRequires: wsdl4j BuildRequires: systemd-units -Requires: apache-commons-daemon Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-pool @@ -191,7 +189,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ - -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \ + -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-native.tar.gz="HACK" \ diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index ce4aa0f..731d4cf 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 949d46d..40e39ff 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -34,7 +34,7 @@ export CLASSPATH MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" # Set parameters set_classpath $BASE_JARS From 4dbb64044f54561b92cbe9409dfad46435ab9d5a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:11:27 -0400 Subject: [PATCH 19/31] Remove webservices dependencies that were unused (not packaged, ever) --- pki-servlet-container.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 6cba1f0..72300df 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -105,8 +105,6 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif BuildRequires: junit -BuildRequires: geronimo-jaxrpc -BuildRequires: wsdl4j BuildRequires: systemd-units Requires: apache-commons-collections @@ -196,8 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \ - -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \ -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ From 64e9d1cc4ace82d953e83ae1b24b9dc5fe3f89fb Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:12:15 -0400 Subject: [PATCH 20/31] Remove unused system property --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 72300df..33501c7 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Djava.7.home=%{java_home} \ -Dexecute.validate=false \ deploy dist-prepare dist-source From 3fb00aaf2c139e2863e822f4d65d83487e623613 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:18:30 -0400 Subject: [PATCH 21/31] execute.validate is false by default --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 33501c7..8570b59 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -197,7 +197,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ - -Dexecute.validate=false \ deploy dist-prepare dist-source # remove some jars that we'll replace with symlinks later From 573c4ceb528bc5cd7e462c5c929d44f1ab390d26 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:24:03 -0400 Subject: [PATCH 22/31] The no.build.dbcp property went away in Tomcat 8 --- pki-servlet-container.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 8570b59..ef198f1 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -194,7 +194,6 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dno.build.dbcp=true \ -Dversion="%{version}" \ -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source From 5621db464f562b6f91d3e43b6af40d25858b5cee Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:31:11 -0400 Subject: [PATCH 23/31] Remove all of the unused apache-commons-* depedencies Remove junit dependency (not sure why that was there) Remove systemd-units BuildRequires --- pki-servlet-container.spec | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef198f1..ef27220 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -94,9 +94,6 @@ BuildArch: noarch BuildRequires: ant BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils -BuildRequires: apache-commons-collections -BuildRequires: apache-commons-dbcp -BuildRequires: apache-commons-pool BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 %if 0%{?fedora} >= 27 || 0%{?rhel} > 7 @@ -104,12 +101,7 @@ BuildRequires: jpackage-utils >= 0:1.7.0 # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro BuildRequires: javapackages-local %endif -BuildRequires: junit -BuildRequires: systemd-units -Requires: apache-commons-collections -Requires: apache-commons-dbcp -Requires: apache-commons-pool Requires: java-headless >= 1:1.8.0 Requires: jpackage-utils Requires: procps @@ -178,15 +170,12 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # we don't care about the tarballs and we're going to replace - # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar - # so just create a dummy file for later removal + # Create a dummy file for later removal touch HACK # who needs a build.properties file anyway %{ant} -Dbase.path="." \ -Dbuild.compiler="modern" \ - -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ -Djdt.jar="$(build-classpath ecj)" \ @@ -303,8 +292,7 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} popd pushd output/build - %{_bindir}/build-jar-repository lib apache-commons-collections \ - apache-commons-dbcp apache-commons-pool ecj 2>&1 + %{_bindir}/build-jar-repository lib ecj 2>&1 popd pushd ${RPM_BUILD_ROOT}%{libdir} @@ -312,9 +300,6 @@ pushd ${RPM_BUILD_ROOT}%{libdir} %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar - %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar - %{__ln_s} $(build-classpath apache-commons-pool) commons-pool.jar %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) From adb27b54eae882eaa87e1a1f76163627de83008f Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:48:54 -0400 Subject: [PATCH 24/31] ECJ seems to be going away and the FreeIPA folks say they don't need it, so removing it here --- pki-servlet-container.spec | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index ef27220..26d3053 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -92,7 +92,6 @@ Patch3: disableJavadocFailOnWarning.patch BuildArch: noarch BuildRequires: ant -BuildRequires: ecj >= 1:4.6.3 BuildRequires: findutils BuildRequires: java-devel >= 1:1.8.0 BuildRequires: jpackage-utils >= 0:1.7.0 @@ -124,7 +123,6 @@ Provides: jsp = %{jspspec} Obsoletes: tomcat-jsp-2.2-api #%%package lib -Requires: ecj >= 1:4.6.3 Requires(preun): coreutils #%%package el-%%{elspec}-api @@ -168,6 +166,9 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %patch2 -p0 #%%patch3 -p0 +# Since we don't support ECJ in RHEL anymore, remove the class that requires it +%{__rm} -f java/org/apache/jasper/compiler/JDTCompiler.java + %build export OPT_JAR_LIST="xalan-j2-serializer" # Create a dummy file for later removal @@ -178,7 +179,7 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dbuild.compiler="modern" \ -Dcommons-daemon.jar="HACK" \ -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="$(build-classpath ecj)" \ + -Djdt.jar="HACK" \ -Dtomcat-native.tar.gz="HACK" \ -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ @@ -187,8 +188,8 @@ export OPT_JAR_LIST="xalan-j2-serializer" -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source - # remove some jars that we'll replace with symlinks later - %{__rm} output/build/bin/commons-daemon.jar output/build/lib/ecj.jar + # remove some jars that we don't need + %{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF @@ -291,16 +292,11 @@ pushd ${RPM_BUILD_ROOT}%{_javadir} %{__ln_s} tomcat-el-%{elspec}-api.jar tomcat-el-api.jar popd -pushd output/build - %{_bindir}/build-jar-repository lib ecj 2>&1 -popd - pushd ${RPM_BUILD_ROOT}%{libdir} # symlink JSP and servlet API jars %{__ln_s} ../../java/tomcat-jsp-%{jspspec}-api.jar . %{__ln_s} ../../java/tomcat-servlet-%{servletspec}-api.jar . %{__ln_s} ../../java/tomcat-el-%{elspec}-api.jar . - %{__ln_s} $(build-classpath ecj) jasper-jdt.jar # Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap) %{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./ From a6663e4ef4757cacd0ac4d57660505b741034b39 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Tue, 12 Jun 2018 15:59:47 -0400 Subject: [PATCH 25/31] Minor formatting adjustment --- pki-servlet-container.spec | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 26d3053..fa2fcef 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -171,25 +171,26 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name " %build export OPT_JAR_LIST="xalan-j2-serializer" - # Create a dummy file for later removal - touch HACK - # who needs a build.properties file anyway - %{ant} -Dbase.path="." \ - -Dbuild.compiler="modern" \ - -Dcommons-daemon.jar="HACK" \ - -Dcommons-daemon.native.src.tgz="HACK" \ - -Djdt.jar="HACK" \ - -Dtomcat-native.tar.gz="HACK" \ - -Dtomcat-native.home="." \ - -Dcommons-daemon.native.win.mgr.exe="HACK" \ - -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ - deploy dist-prepare dist-source +# Create a dummy file for later removal +touch HACK - # remove some jars that we don't need - %{__rm} output/build/bin/commons-daemon.jar +# who needs a build.properties file anyway +%{ant} -Dbase.path="." \ + -Dbuild.compiler="modern" \ + -Dcommons-daemon.jar="HACK" \ + -Dcommons-daemon.native.src.tgz="HACK" \ + -Djdt.jar="HACK" \ + -Dtomcat-native.tar.gz="HACK" \ + -Dtomcat-native.home="." \ + -Dcommons-daemon.native.win.mgr.exe="HACK" \ + -Dnsis.exe="HACK" \ + -Dversion="%{version}" \ + -Dversion.build="%{micro_version}" \ + deploy dist-prepare dist-source + +# remove some jars that we don't need +%{__rm} output/build/bin/commons-daemon.jar # inject OSGi manifests mkdir -p META-INF From 1fc89451d77a5e24e8490748fb0d9e73a8e4bca8 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:02:14 -0400 Subject: [PATCH 26/31] Remove JSVC support from tomcat-functions for this tomcat package --- tomcat-functions | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tomcat-functions b/tomcat-functions index ab08fa2..ac7f00d 100644 --- a/tomcat-functions +++ b/tomcat-functions @@ -13,28 +13,12 @@ _save_function() { eval "$NEWNAME_FUNC" } -run_jsvc(){ - if [ -x /usr/bin/jsvc ]; then - TOMCAT_USER="${TOMCAT_USER:-tomcat}" - JSVC="/usr/bin/jsvc" - - JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out" - if [ "$1" = "stop" ]; then - JSVC_OPTS="${JSVC_OPTS} -stop" - fi - - exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}" - else - echo "Can't find /usr/bin/jsvc executable" - fi - -} - _save_function run run_java run() { if [ "${USE_JSVC}" = "true" ] ; then - run_jsvc $@ + echo "JSVC support is not available with this Tomcat package." + exit 1 else run_java $@ fi From b95cdbe8d1e6806fa856eef18a2a20dd78d64fb5 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:20:45 -0400 Subject: [PATCH 27/31] Sync all RPM wrapper scripts with JWS Tomcat --- tomcat-9.0-catalina-policy.patch | 27 ++++-------------- tomcat-9.0-digest.script | 16 +++++++---- tomcat-9.0-tool-wrapper.script | 16 +++++++---- tomcat-9.0.conf | 47 +++++++++++++++++++------------- tomcat-9.0.service | 3 +- tomcat-9.0.sysconfig | 4 +-- tomcat-named.service | 2 +- tomcat-preamble | 1 - 8 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tomcat-9.0-catalina-policy.patch b/tomcat-9.0-catalina-policy.patch index 3694929..f3a5007 100644 --- a/tomcat-9.0-catalina-policy.patch +++ b/tomcat-9.0-catalina-policy.patch @@ -1,6 +1,6 @@ ---- conf/catalina.policy~ 2016-06-17 10:20:17.649171968 -0400 -+++ conf/catalina.policy 2016-06-17 10:23:35.358309244 -0400 -@@ -50,6 +50,36 @@ grant codeBase "file:${java.home}/lib/ex +--- conf/catalina.policy.orig 2018-03-16 12:18:17.835746805 -0400 ++++ conf/catalina.policy 2018-06-13 13:52:33.586872659 -0400 +@@ -50,6 +50,21 @@ grant codeBase "file:${java.home}/lib/ex permission java.security.AllPermission; }; @@ -9,28 +9,13 @@ +// Allowing everything in /usr/share/java allows too many unknowns to be permitted +// Specifying the individual jars that tomcat needs to function with the security manager +// is the safest way forward. -+grant codeBase "file:/usr/share/java/tomcat-servlet-3.0-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-servlet-4.0-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-api.jar" { ++grant codeBase "file:/usr/share/java/tomcat-jsp-2.3-api.jar" { + permission java.security.AllPermission; +}; -+grant codeBase "file:/usr/share/java/tomcat-el-2.2-api.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/log4j.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/ecj.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-pool.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-dbcp.jar" { -+ permission java.security.AllPermission; -+}; -+grant codeBase "file:/usr/share/java/apache-commons-collections.jar" { ++grant codeBase "file:/usr/share/java/tomcat-el-3.0-api.jar" { + permission java.security.AllPermission; +}; + diff --git a/tomcat-9.0-digest.script b/tomcat-9.0-digest.script index 731d4cf..d2b626c 100644 --- a/tomcat-9.0-digest.script +++ b/tomcat-9.0-digest.script @@ -22,22 +22,26 @@ fi set_javacmd -# CLASSPATH munging -if [ -n "$JSSE_HOME" ]; then - CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)" -fi CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" BASE_OPTIONS="" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0-tool-wrapper.script b/tomcat-9.0-tool-wrapper.script index 40e39ff..e427dbc 100644 --- a/tomcat-9.0-tool-wrapper.script +++ b/tomcat-9.0-tool-wrapper.script @@ -22,22 +22,26 @@ fi set_javacmd -# CLASSPATH munging -if [ -n "$JSSE_HOME" ]; then - CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)" -fi CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-api.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-util-scan.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-coyote.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/catalina.jar" +CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/servlet-api.jar" export CLASSPATH # Configuration MAIN_CLASS="org.apache.catalina.startup.Tool" BASE_OPTIONS="" BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\"" -BASE_JARS="tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote tomcat/tomcat-api tomcat/tomcat-util-scan" +#BASE_JARS="tomcat/tomcat-util tomcat/tomcat-util-scan" +#BASE_JARS="${BASE_JARS} tomcat/tomcat-coyote tomcat/catalina" +#BASE_JARS="${BASE_JARS} tomcat/servlet-api" # Set parameters -set_classpath $BASE_JARS +#set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS diff --git a/tomcat-9.0.conf b/tomcat-9.0.conf index 3f43006..d680192 100644 --- a/tomcat-9.0.conf +++ b/tomcat-9.0.conf @@ -1,7 +1,6 @@ -# System-wide configuration file for tomcat services # This will be loaded by systemd as an environment file, # so please keep the syntax. For shell expansion support -# place your custom files as /etc/tomcat/conf.d/*.conf +# place your custom files as /etc/tomcat/conf.d/*.conf. # # There are 2 "classes" of startup behavior in this package. # The old one, the default service named tomcat.service. @@ -15,37 +14,47 @@ # This variable is used to figure out if config is loaded or not. TOMCAT_CFG_LOADED="1" -# In new-style instances, if CATALINA_BASE isn't specified, it will -# be constructed by joining TOMCATS_BASE and NAME. -TOMCATS_BASE="/var/lib/tomcats/" - # Where your java installation lives -JAVA_HOME="/usr/lib/jvm/jre" +#JAVA_HOME="/usr/lib/jvm/java" # Where your tomcat installation lives +CATALINA_BASE="@@@TCHOME@@@" CATALINA_HOME="@@@TCHOME@@@" - -# System-wide tmp -CATALINA_TMPDIR="/var/cache/tomcat/temp" +CATALINA_TMPDIR="@@@TCTEMP@@@" # You can pass some parameters to java here if you wish to #JAVA_OPTS="-Xminf0.1 -Xmaxf0.3" -# Use JAVA_OPTS to set java.library.path for libtcnative.so -#JAVA_OPTS="-Djava.library.path=/usr/lib" - -# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381 -JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory" - # You can change your tomcat locale here #LANG="en_US" # Run tomcat under the Java Security Manager SECURITY_MANAGER="false" -# Time to wait in seconds, before killing process -# TODO(stingray): does nothing, fix. -# SHUTDOWN_WAIT="30" +# DEPRECATED VARIABLES +# +# TOMCAT_USER has been deprecated. To update the tomcat process owner, +# please see User in tomcat.service. +# +# TOMCAT_GROUP has been deprecated. To update the tomcat process group, +# please see Group in tomcat.service. +# +# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set +# TimeoutStopSec in tomcat.service. +# +# SHUTDOWN_VERBOSE has been deprecated. There is no replacement for this behavior. +# +# CATALINA_PID has been deprecated. A replacement for this behavior is to set +# PIDFile in tomcat.service. +# +# CONNECTOR_PORT has been deprecated. There is no replacement for this behavior. +# Set init script output file +# +# TOMCAT_LOG has been deprecated. Output from start/stop/status operations are +# logged to the system's journal. +# +# LOGGING_CONFIG has been deprecated. To update the logging properties in use, use: +# LOGGING_PROPERTIES="${CATALINA_HOME}/lib/log4j.properties" # If you wish to further customize your tomcat environment, # put your own definitions here diff --git a/tomcat-9.0.service b/tomcat-9.0.service index 2b20aa0..bf90428 100644 --- a/tomcat-9.0.service +++ b/tomcat-9.0.service @@ -15,8 +15,7 @@ EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/libexec/tomcat/server start SuccessExitStatus=143 User=tomcat -Group=tomcat - +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-9.0.sysconfig b/tomcat-9.0.sysconfig index 3117bf7..39db94a 100644 --- a/tomcat-9.0.sysconfig +++ b/tomcat-9.0.sysconfig @@ -7,5 +7,5 @@ # CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME} #CATALINA_BASE="@@@TCHOME@@@" -# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you -# can override. +# Please take a look at /etc/tomcat/tomcat.conf to have an idea +# what you can override. diff --git a/tomcat-named.service b/tomcat-named.service index 9bbcb17..66cf45c 100644 --- a/tomcat-named.service +++ b/tomcat-named.service @@ -19,7 +19,7 @@ ExecStart=/usr/libexec/tomcat/server start ExecStop=/usr/libexec/tomcat/server stop SuccessExitStatus=143 User=tomcat -Group=tomcat +UMask=027 [Install] WantedBy=multi-user.target diff --git a/tomcat-preamble b/tomcat-preamble index 1271dca..c3c1183 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -42,7 +42,6 @@ if [ -n "$JSSE_HOME" ]; then fi CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" -CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)" if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" From 5782fd71526a74189e4fbdbceab14f2d36bf761a Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Wed, 13 Jun 2018 14:25:50 -0400 Subject: [PATCH 28/31] Remove overrides for version so that this package matches JWS' version information --- pki-servlet-container.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index fa2fcef..0c39d1b 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -185,8 +185,6 @@ touch HACK -Dtomcat-native.home="." \ -Dcommons-daemon.native.win.mgr.exe="HACK" \ -Dnsis.exe="HACK" \ - -Dversion="%{version}" \ - -Dversion.build="%{micro_version}" \ deploy dist-prepare dist-source # remove some jars that we don't need From 38e917d3438f16ad167a2620bc83b15799646fe9 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:16:40 -0400 Subject: [PATCH 29/31] Add ant and tools jars to the classpath to enable JSP compilation at runtime --- pki-servlet-container.spec | 2 ++ tomcat-preamble | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/pki-servlet-container.spec b/pki-servlet-container.spec index 0c39d1b..bb8ee5d 100644 --- a/pki-servlet-container.spec +++ b/pki-servlet-container.spec @@ -101,7 +101,9 @@ BuildRequires: jpackage-utils >= 0:1.7.0 BuildRequires: javapackages-local %endif +Requires: ant Requires: java-headless >= 1:1.8.0 +Requires: java-devel >= 1:1.8.0 Requires: jpackage-utils Requires: procps Requires(pre): shadow-utils diff --git a/tomcat-preamble b/tomcat-preamble index c3c1183..07d28a3 100644 --- a/tomcat-preamble +++ b/tomcat-preamble @@ -43,6 +43,11 @@ fi CLASSPATH="${CLASSPATH}${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" +# Since ECJ is no longer available, add ant, ant-launcher, and tools jars to the +# classpath so that runtime compilation of JSPs still works. +CLASSPATH="${CLASSPATH}:/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar" +CLASSPATH="${CLASSPATH}:/usr/lib/jvm/java/lib/tools.jar" + if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" if [ ! -f "${LOGGING_PROPERTIES}" ] ; then From b389c980dc435d0f5df6adb5c60821a0ca6214ca Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:21:55 -0400 Subject: [PATCH 30/31] Remove zip from sources repo and add to brew --- .gitignore | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fd61fdd..0853083 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ apache-tomcat-*-src.tar.gz - +/tomcat-9.0.7.redhat-10-src.zip diff --git a/sources b/sources index 8a82736..b5348c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tomcat-9.0.7.redhat-10-src.zip) = 0eee2cccfd08704350095b1fdd1472d2f85b81e6b8d8bf3a3f4e5005fe3bb18503438c2a5499af0dc21ab4e1d0636c2ee276aae52af823881ed0f444fb65fc81 +32bca41cb6e6a99498966ac885e4922e tomcat-9.0.7.redhat-10-src.zip From 822812e4fc104cb8713a66204b06435afac27231 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Fri, 15 Jun 2018 14:27:30 -0400 Subject: [PATCH 31/31] Remove tito things that were needed to build in copr --- .tito/packages/.readme | 3 --- .tito/packages/tomcat | 1 - .tito/tito.props | 5 ----- 3 files changed, 9 deletions(-) delete mode 100644 .tito/packages/.readme delete mode 100644 .tito/packages/tomcat delete mode 100644 .tito/tito.props diff --git a/.tito/packages/.readme b/.tito/packages/.readme deleted file mode 100644 index b9411e2..0000000 --- a/.tito/packages/.readme +++ /dev/null @@ -1,3 +0,0 @@ -the .tito/packages directory contains metadata files -named after their packages. Each file has the latest tagged -version and the project's relative directory. diff --git a/.tito/packages/tomcat b/.tito/packages/tomcat deleted file mode 100644 index c814425..0000000 --- a/.tito/packages/tomcat +++ /dev/null @@ -1 +0,0 @@ -9.0.7-1 ./ diff --git a/.tito/tito.props b/.tito/tito.props deleted file mode 100644 index 70eda22..0000000 --- a/.tito/tito.props +++ /dev/null @@ -1,5 +0,0 @@ -[buildconfig] -builder = tito.builder.NoTgzBuilder -tagger = tito.tagger.VersionTagger -changelog_do_not_remove_cherrypick = 0 -changelog_format = %s (%ae)