#1 Updated to Tomcat 9
Closed 5 years ago by csutherl. Opened 6 years ago by phanes.
http://source.surroindustries.com/Upstream-Modifications/tomcat-9.git master  into  master

removed line comments, removed typo in changelog
Phanes • 6 years ago  
updated to 9.0.1 and removed osgi hacks
Phanes • 6 years ago  
sources
file modified
+1 -1
@@ -1,1 +1,1 @@

- SHA512 (apache-tomcat-8.0.47-src.tar.gz) = 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702

+ SHA512 (apache-tomcat-9.0.1-src.tar.gz) = 6116b05f448c24e691c4b56372a41cfd8900adc5e759f2f5026c808de48d65705763236fca46f69321d351f37f5dbc7aa49db8c097b8a3155e367fe21aa0d384

tomcat-8.0-bootstrap-MANIFEST.MF.patch
file removed
-9
@@ -1,9 +0,0 @@

- --- res/META-INF/bootstrap.jar.manifest.orig	2010-04-06 10:11:09.000000000 -0600

- +++ res/META-INF/bootstrap.jar.manifest	2010-04-06 10:45:56.000000000 -0600

- @@ -1,6 +1,5 @@

-  Manifest-Version: 1.0

-  Main-Class: org.apache.catalina.startup.Bootstrap

- -Class-Path: commons-daemon.jar

-  Specification-Title: Apache Tomcat Bootstrap

-  Specification-Version: @VERSION_MAJOR_MINOR@

-  Specification-Vendor: Apache Software Foundation

tomcat-8.0-catalina-policy.patch
file removed
-39
@@ -1,39 +0,0 @@

- --- 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

-          permission java.security.AllPermission;

-  };

-  

- +// ========== RHEL SPECIFIC CODE PERMISSIONS =======================================

- +

- +// 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" {

- +        permission java.security.AllPermission;

- +};

- +grant codeBase "file:/usr/share/java/tomcat-jsp-2.2-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" {

- +        permission java.security.AllPermission;

- +};

- +

-  

-  // ========== CATALINA CODE PERMISSIONS =======================================

-  

tomcat-8.0-digest.script
file removed
-45
@@ -1,45 +0,0 @@

- #!/bin/sh

- #

- # tomcat-digest script

- # JPackage Project <http://www.jpackage.org/>

- 

- # Source functions library

- if [ -f /usr/share/java-utils/java-functions ] ; then

-   . /usr/share/java-utils/java-functions

- else

-   echo "Can't find functions library, aborting"

-   exit 1

- fi

- 

- # Get the tomcat config (use this for environment specific settings)

- if [ -z "${TOMCAT_CFG}" ]; then

-     TOMCAT_CFG="/etc/tomcat/tomcat.conf"

- fi

- 

- if [ -r "$TOMCAT_CFG" ]; then

-     . $TOMCAT_CFG

- 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"

- export CLASSPATH

- 

- # Configuration

- 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"

- 

- # Set parameters

- set_classpath $BASE_JARS

- set_flags $BASE_FLAGS

- set_options $BASE_OPTIONS

- 

- # Let's start

- run -server org.apache.catalina.realm.RealmBase "$@"

tomcat-8.0-jsvc.service
file removed
-22
@@ -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

tomcat-8.0-log4j.properties
file removed
-11
@@ -1,11 +0,0 @@

- log4j.rootLogger=debug, R 

- log4j.appender.R=org.apache.log4j.RollingFileAppender 

- log4j.appender.R.File=${catalina.base}/logs/tomcat.log 

- log4j.appender.R.MaxFileSize=10MB 

- log4j.appender.R.MaxBackupIndex=10 

- log4j.appender.R.layout=org.apache.log4j.PatternLayout 

- log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 

- log4j.logger.org.apache.catalina=DEBUG, R

- log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R

- log4j.logger.org.apache.catalina.core=DEBUG, R

- log4j.logger.org.apache.catalina.session=DEBUG, R

tomcat-8.0-tomcat-users-webapp.patch
file removed
-17
@@ -1,17 +0,0 @@

- --- conf/tomcat-users.xml~	2008-01-28 17:41:06.000000000 -0500

- +++ conf/tomcat-users.xml	2008-03-07 19:40:07.000000000 -0500

- @@ -23,4 +23,14 @@

-    <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>

-    <user username="role1" password="<must-be-changed>" roles="role1"/>

-  -->

- +

- +<!-- <role rolename="admin"/> -->

- +<!-- <role rolename="admin-gui"/> -->

- +<!-- <role rolename="admin-script"/> -->

- +<!-- <role rolename="manager"/> -->

- +<!-- <role rolename="manager-gui"/> -->

- +<!-- <role rolename="manager-script"/> -->

- +<!-- <role rolename="manager-jmx"/> -->

- +<!-- <role rolename="manager-status"/> -->

- +<!-- <user name="admin" password="<must-be-changed>" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" /> -->

-  </tomcat-users>

tomcat-8.0-tool-wrapper.script
file removed
-45
@@ -1,45 +0,0 @@

- #!/bin/sh

- #

- # tomcat-digest script

- # JPackage Project <http://www.jpackage.org/>

- 

- # Source functions library

- if [ -f /usr/share/java-utils/java-functions ] ; then

-   . /usr/share/java-utils/java-functions

- else

-   echo "Can't find functions library, aborting"

-   exit 1

- fi

- 

- # Get the tomcat config (use this for environment specific settings)

- if [ -z "${TOMCAT_CFG}" ]; then

-     TOMCAT_CFG="/etc/tomcat/tomcat.conf"

- fi

- 

- if [ -r "$TOMCAT_CFG" ]; then

-     . $TOMCAT_CFG

- 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"

- export CLASSPATH

- 

- # Configuration

- 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"

- 

- # Set parameters

- set_classpath $BASE_JARS

- set_flags $BASE_FLAGS

- set_options $BASE_OPTIONS

- 

- # Let's start

- run "$@"

tomcat-8.0.36-CompilerOptionsV9.patch
file removed
-24
@@ -1,24 +0,0 @@

- --- java/org/apache/jasper/compiler/JDTCompiler.java~	2016-07-01 14:39:19.728255958 -0400

- +++ java/org/apache/jasper/compiler/JDTCompiler.java	2016-07-01 14:39:37.191311760 -0400

- @@ -312,9 +312,6 @@

-              } else if(opt.equals("1.8")) {

-                  settings.put(CompilerOptions.OPTION_Source,

-                               CompilerOptions.VERSION_1_8);

- -            } else if(opt.equals("1.9")) {

- -                settings.put(CompilerOptions.OPTION_Source,

- -                             CompilerOptions.VERSION_1_9);

-              } else {

-                  log.warn("Unknown source VM " + opt + " ignored.");

-                  settings.put(CompilerOptions.OPTION_Source,

- @@ -361,11 +358,6 @@

-                               CompilerOptions.VERSION_1_8);

-                  settings.put(CompilerOptions.OPTION_Compliance,

-                          CompilerOptions.VERSION_1_8);

- -            } else if(opt.equals("1.9")) {

- -                settings.put(CompilerOptions.OPTION_TargetPlatform,

- -                             CompilerOptions.VERSION_1_9);

- -                settings.put(CompilerOptions.OPTION_Compliance,

- -                        CompilerOptions.VERSION_1_9);

-              } else {

-                  log.warn("Unknown target VM " + opt + " ignored.");

-                  settings.put(CompilerOptions.OPTION_TargetPlatform,

tomcat-8.0.conf
file removed
-52
@@ -1,52 +0,0 @@

- # 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

- #

- # There are 2 "classes" of startup behavior in this package.

- # The old one, the default service named tomcat.service.

- # The new named instances are called tomcat@instance.service.

- #

- # Use this file to change default values for all services.

- # Change the service specific ones to affect only one service.

- # For tomcat.service it's /etc/sysconfig/tomcat, for

- # tomcat@instance it's /etc/sysconfig/tomcat@instance.

- 

- # 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"

- 

- # Where your tomcat installation lives

- CATALINA_HOME="@@@TCHOME@@@"

- 

- # System-wide tmp

- CATALINA_TMPDIR="/var/cache/tomcat/temp"

- 

- # 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"

- 

- # If you wish to further customize your tomcat environment,

- # put your own definitions here

- # (i.e. LD_LIBRARY_PATH for some jdbc drivers)

tomcat-8.0.logrotate
file removed
-8
@@ -1,8 +0,0 @@

- @@@TCLOG@@@/catalina.out {

-     copytruncate

-     weekly

-     rotate 52

-     compress

-     missingok

-     create 0644 tomcat tomcat

- }

tomcat-8.0.service
file removed
-22
@@ -1,22 +0,0 @@

- # Systemd unit file for default tomcat

- # 

- # To create clones of this service:

- # DO NOTHING, use tomcat@.service instead.

- 

- [Unit]

- Description=Apache Tomcat Web Application Container

- After=syslog.target network.target

- 

- [Service]

- Type=simple

- EnvironmentFile=/etc/tomcat/tomcat.conf

- Environment="NAME="

- EnvironmentFile=-/etc/sysconfig/tomcat

- ExecStart=/usr/libexec/tomcat/server start

- SuccessExitStatus=143

- User=tomcat

- Group=tomcat

- 

- 

- [Install]

- WantedBy=multi-user.target

tomcat-8.0.sysconfig
file removed
-11
@@ -1,11 +0,0 @@

- # Service-specific configuration file for tomcat. This will be sourced by

- # systemd for the default service (tomcat.service)

- # If you want to customize named instance, make a similar file

- # and name it tomcat@instancename.

- 

- # You will not need to set this, usually. For default service it equals

- # 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.

tomcat-8.0.wrapper
file removed
-24
@@ -1,24 +0,0 @@

- #!/bin/bash

- 

- if [ "$1" = "version" ]; then

-   . /usr/libexec/tomcat/preamble

-   exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \

-     org.apache.catalina.util.ServerInfo

- fi

- 

- SRV="tomcat"

- if [ -n "$2" ]; then

-   SRV="tomcat@$2"

- fi

- 

- if [ "$1" = "start" ]; then

-   systemctl start ${SRV}.service

- elif [ "$1" = "stop" ]; then

-   systemctl stop ${SRV}.service

- elif [ "$1" = "version" ]; then

-   ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \

-     org.apache.catalina.util.ServerInfo

- else

-   echo "Usage: $0 {start|stop|version} [server-id]"

-   exit 1

- fi

tomcat.spec
file modified
+32 -45
@@ -28,14 +28,23 @@

  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  #

  

+ # Java server pages version

  %global jspspec 2.3

- %global major_version 8

+ 

+ # Tomcat Release Version

+ %global major_version 9

  %global minor_version 0

- %global micro_version 47

+ %global micro_version 1

  %global packdname apache-tomcat-%{version}-src

- %global servletspec 3.1

- %global elspec 3.0

+ # Servlet version

+ %global servletspec 4.0

+ 

+ # Unified Expression Language Version

+ %global elspec 3.1

+ 

+ # The tomcat user's UID

  %global tcuid 91

+ 

  #Recommended version is specified in java/org/apache/catalina/core/AprLifecycleListener.java

  %global native_version 1.1.33

  
@@ -70,14 +79,7 @@

  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

- Source9:       jsp-api-OSGi-MANIFEST.MF

  Source11:      %{name}-%{major_version}.%{minor_version}.service

- Source12:      el-api-OSGi-MANIFEST.MF

- 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
@@ -85,21 +87,21 @@

  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

  

  BuildArch:     noarch

  

  BuildRequires: ant

- BuildRequires: ecj >= 1:4.4.0

+ 

+ # JDT Core batch compiler

+ BuildRequires: ecj >= 1:4.7.1

  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: jpackage-utils >= 0:1.7.0

+ BuildRequires: java-devel >= 1:1.8.0

+ BuildRequires: jpackage-utils >= 0:1.7.5

  %if 0%{?fedora} >= 27

  # add_maven_depmap is deprecated, using javapackages-local for now

  # See https://fedora-java.github.io/howto/latest/#_add_maven_depmap_macro
@@ -114,11 +116,15 @@

  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}

+ 

+ %if 0%{?fedora}

  Recommends:    tomcat-native >= %{native_version}

+ %endif

+ 

  Requires(pre):    shadow-utils

  Requires(post):   chkconfig

  Requires(preun):  chkconfig
@@ -241,10 +247,6 @@

  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

  

- %patch0 -p0

- %patch1 -p0

- %patch2 -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

  
@@ -295,30 +297,6 @@

  popd

  popd

  

- # inject OSGi manifests

- mkdir -p META-INF

- cp -p %{SOURCE8} 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

- touch META-INF/MANIFEST.MF

- zip output/build/lib/jsp-api.jar META-INF/MANIFEST.MF

- cp -p %{SOURCE12} META-INF/MANIFEST.MF

- touch META-INF/MANIFEST.MF

- zip output/build/lib/el-api.jar META-INF/MANIFEST.MF

- cp -p %{SOURCE13} META-INF/MANIFEST.MF

- touch META-INF/MANIFEST.MF

- zip output/build/lib/jasper-el.jar META-INF/MANIFEST.MF

- cp -p %{SOURCE14} META-INF/MANIFEST.MF

- touch META-INF/MANIFEST.MF

- zip output/build/lib/jasper.jar META-INF/MANIFEST.MF

- cp -p %{SOURCE15} META-INF/MANIFEST.MF

- touch META-INF/MANIFEST.MF

- zip output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF

- cp -p %{SOURCE16} META-INF/MANIFEST.MF

- touch META-INF/MANIFEST.MF

- zip output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF

- 

  %install

  # build initial path structure

  %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
@@ -611,6 +589,9 @@

  %attr(0775,root,tomcat) %dir %{confdir}/Catalina

  %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost

  %attr(0755,root,tomcat) %dir %{confdir}/conf.d

+ 

+ %attr(0755,root,tomcat) %{confdir}/jaspic-providers.xml

+ 

  %{confdir}/conf.d/README

  %config(noreplace) %{confdir}/%{name}.conf

  %config(noreplace) %{confdir}/*.policy
@@ -690,6 +671,11 @@

  %attr(0660,tomcat,tomcat) %verify(not size md5 mtime) %{logdir}/catalina.out

  

  %changelog

+ * Tue Oct 24 2017 Bagira <punches.chris@gmail.com> 1:9.0.1-1

+ - Update to 9.0.1

+ - Removed previous tomcat patches

+ - Removed OSGi Manifest hacks

+ 

  * Tue Oct 24 2017 Troy Dawson <tdawson@redhat.com> - 1:8.0.47-2

  - Change "zip -u" to "zip"

  - Resolves: rhbz#1495241 [tomcat] zip -u in spec file causes race condition
@@ -1044,3 +1030,4 @@

  

  * Wed Apr 27 2011 Ivan Afonichev <ivan.afonichev@gmail.com> 0:7.0.12-1

  - Tomcat7

+ 

no initial comment

-updated to tomcat 9.0.1
-removed OSGi hacks
-minor, misc fixes

1 new commit added

  • removed line comments, removed typo in changelog
6 years ago

I appreciate the contribution, but there are two reasons I cannot accept this at this time:

1) Tomcat 9.0.1 is not yet stable (it's beta) and I think we should wait until it is stable given it's current state
2) (Probably more importantly) If we update to 9 (or even 8.5) we will break dogtag-pki/FreeIPA. See https://pagure.io/dogtagpki/issue/2560 which depends on https://pagure.io/tomcatjss/issue/1. I'd like to hold off on updating (as expressed in https://bugzilla.redhat.com/show_bug.cgi?id=1321205#c46) until the issues there are addressed so that we don't have to drop those packages from rawhide.

Tomcat 9.0.10 is in the repos for Rawhide and f29.

https://apps.fedoraproject.org/packages/tomcat

Looks like the PR can be cancelled/resolved.

Pull-Request has been closed by csutherl

5 years ago