commit tomcat.11902 for openSUSE:Leap:15.1:Update
Hello community, here is the log from the commit of package tomcat.11902 for openSUSE:Leap:15.1:Update checked in at 2020-01-31 08:05:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.1:Update/tomcat.11902 (Old) and /work/SRC/openSUSE:Leap:15.1:Update/.tomcat.11902.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "tomcat.11902" Fri Jan 31 08:05:54 2020 rev:1 rq:768824 version:9.0.30 Changes: -------- New Changes file: --- /dev/null 2019-12-19 10:12:34.003146842 +0100 +++ /work/SRC/openSUSE:Leap:15.1:Update/.tomcat.11902.new.26092/tomcat.changes 2020-01-31 08:05:57.683387536 +0100 @@ -0,0 +1,746 @@ +------------------------------------------------------------------- +Wed Jan 29 16:49:29 UTC 2020 - Matei Albu <malbu@suse.com> + +- Modified patch: + * tomcat-9.0.30-java8compat.patch + + add missing casts (bsc#1162081) + +------------------------------------------------------------------- +Mon Jan 20 13:36:39 UTC 2020 - Fridrich Strba <fstrba@suse.com> + +- Added patch: + * tomcat-9.0.30-java8compat.patch + + Cast java.nio.ByteBuffer and java.nio.CharBuffer to + java.nio.Buffer in order to avoid calling Java 9+ APIs + (functions with co-variant return types) (bsc#1161025) + +------------------------------------------------------------------- +Tue Dec 24 15:42:56 UTC 2019 - Matei Albu <malbu@suse.com> + +- Update to Tomcat 9.0.30. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.30_(markt) +- Fixed CVEs: + - CVE-2019-12418 (bsc#1159723) + - CVE-2019-17563 (bsc#1159729) +- Rebased patch: + - tomcat-9.0-JDTCompiler-java.patch + - tomcat-9.0-javadoc.patch + +------------------------------------------------------------------- +Thu Jul 4 12:13:10 UTC 2019 - Matei Albu <malbu@suse.com> + +- Update to Tomcat 9.0.21. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.21_(markt) +- Rebased patch: + - tomcat-9.0-javadoc.patch + - tomcat-9.0-disable-osgi-build.patch + - tomcat-9.0-javac-release.patch + +------------------------------------------------------------------- +Tue May 21 14:33:37 UTC 2019 - Matei Albu <malbu@suse.com> + +- Update to Tomcat 9.0.20. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.20_(markt) + Notable packaging changes: + - File /usr/share/java/tomcat/catalina-jmx-remote.jar was removed. + The classes contained in this jar were merged into + /usr/share/java/tomcat/catalina.jar. +- increase maximum number of threads and open files for tomcat (bsc#1111966) +- Fixed CVEs: + - CVE-2019-10072 (bsc#1139924) + - CVE-2019-0199 (bsc#1131055) + - CVE-2019-0221 (bsc#1136085) +- Rebased patch: + - tomcat-9.0-JDTCompiler-java.patch + - tomcat-9.0-javadoc.patch + +------------------------------------------------------------------- +Tue Feb 19 17:22:16 UTC 2019 - malbu@suse.com + +- Don't overwrite changes made to server.xml contexts when updating + bundled webapps. + +------------------------------------------------------------------- +Mon Feb 18 15:55:12 UTC 2019 - malbu@suse.com + +- Set javac target to 1.8 when building docs samples and serverxmltool + +------------------------------------------------------------------- +Tue Feb 5 09:50:35 UTC 2019 - malbu@suse.com + +- Move webapps bundled with Tomcat to /usr/share/tomcat/tomcat-webapps + (bsc#1092341). Affected packages: + - tomcat-webapps + - tomcat-admin-webapps + - tomcat-docs-webapp +- Remove %doc directive from tomcat-docs-webapps files section so that + zypper installs files even if rpm.install.excludedocs is set to yes. + +------------------------------------------------------------------- +Mon Feb 4 15:35:43 UTC 2019 - malbu@suse.com + +- Require Java 1.8 or later (bsc#1123407) + +------------------------------------------------------------------- +Sat Jan 26 08:07:36 UTC 2019 - Fridrich Strba <fstrba@suse.com> + +- Clean up OSGi manifest injection +- Put embed maven metadata into embed subpackage +- Use the .mfiles* lists generated by %%add_maven_depmap macro + +------------------------------------------------------------------- +Wed Jan 16 17:05:36 UTC 2019 - malbu@suse.com + +- Fix tomcat-tool-wrapper classpath error (bsc#1120745) + +------------------------------------------------------------------- +Fri Jan 11 15:46:43 UTC 2019 - malbu@suse.com + +- Fix tomcat-digest classpath error (bsc#1120745) + +------------------------------------------------------------------- +Sat Dec 29 10:08:17 UTC 2018 - ecsos@opensuse.org + +- Update to Tomcat 9.0.14. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.14_(markt) + +------------------------------------------------------------------- +Wed Dec 5 08:05:30 UTC 2018 - Fridrich Strba <fstrba@suse.com> + +- Add pom files for tomcat-jdbc and tomcat-dbcp +- Add org.eclipse.jetty.orbit* aliases to correspondant artifacts + +------------------------------------------------------------------- +Fri Nov 09 07:16:23 UTC 2018 - sean@suspend.net + +- Update to Tomcat 9.0.13. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.13_(markt) + +------------------------------------------------------------------- +Thu Oct 18 08:12:41 UTC 2018 - malbu@suse.com + +- Update to Tomcat 9.0.12. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.12_(markt) +- Fixed CVEs: + - CVE-2018-11784 (bsc#1110850) +- Rebased patches: + - tomcat-9.0-disable-osgi-build.patch + - tomcat-9.0-javadoc.patch + - tomcat-9.0-sle.catalina.policy.patch + - tomcat-9.0-tomcat-users-webapp.patch + +------------------------------------------------------------------- +Tue Sep 11 10:34:02 UTC 2018 - ecsos@opensuse.org + +- Declare following files to config(noreplace) to prevent override + access rights: + - host-manager/META-INF/context.xml + - manager/META-INF/context.xml + +------------------------------------------------------------------- +Sun Aug 26 22:01:07 UTC 2018 - malbu@suse.com + +- Empty tomcat-9.0.sysconfig to avoid overwriting of customer's + configuration during update (bsc#1067720) + +------------------------------------------------------------------- +Tue Aug 16 14:13:23 UTC 2018 - malbu@suse.com + +- Update to Tomcat 9.0.10. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.10_(markt) +- Fixed CVEs: + - CVE-2018-1336 (bsc#1102400) + - CVE-2018-8014 (bsc#1093697) + - CVE-2018-8034 (bsc#1102379) + - CVE-2018-8037 (bsc#1102410) +- Rebased patch tomcat-9.0-JDTCompiler-java.patch +- Added patch tomcat-9.0-disable-osgi-build.patch to disable adding + OSGi metadata to JAR files + +------------------------------------------------------------------- +Wed Feb 16 16:38:14 UTC 2018 - malbu@suse.de + +- Update to Tomcat 9.0.5. See changelog at + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html#Tomcat_9.0.5_(markt) + +------------------------------------------------------------------- +Wed Jan 17 09:34:14 UTC 2018 - fstrba@suse.com + +- Modified patch: + * tomcat-9.0-javadoc.patch + + Don't append to javadoc --add-modules since we are building + with source=8 + + Avoid accessing Internet URLs from build environment + +------------------------------------------------------------------- +Fri Dec 1 21:46:18 UTC 2017 - malbu@suse.com + +- Update to Tomcat 9.0.2: + * Major update for tomcat8 from tomcat9 + * For full changelog please read upstream changes at: + + http://tomcat.apache.org/tomcat-9.0-doc/changelog.html + * Rename all tomcat-8.0-* files to tomcat-9.0-* +- Changed patches: + * Deleted: tomcat-8.0-bootstrap-MANIFEST.MF.patch + * Deleted: tomcat-8.0-sle.catalina.policy.patch + * Deleted: tomcat-8.0-tomcat-users-webapp.patch + * Deleted: tomcat-8.0.33-JDTCompiler-java.patch + * Deleted: tomcat-8.0.44-javadoc.patch + * Deleted: tomcat-8.0.9-property-build.windows.patch + * Added: tomcat-9.0-JDTCompiler-java.patch + * Added: tomcat-9.0-bootstrap-MANIFEST.MF.patch + * Added: tomcat-9.0-javadoc.patch + * Added: tomcat-9.0-sle.catalina.policy.patch + * Added: tomcat-9.0-tomcat-users-webapp.patch +- Renamed subpackage tomcat-3_1-api to tomcat-4_0-api + to reflect the new Servlet API version. +- Commented out JAVA_HOME in /etc/tomcat/tomcat.conf ++++ 549 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Leap:15.1:Update/.tomcat.11902.new.26092/tomcat.changes New: ---- _constraints apache-tomcat-9.0.30-src.tar.gz apache-tomcat-9.0.30-src.tar.gz.asc el-api-OSGi-MANIFEST.MF jasper-OSGi-MANIFEST.MF jasper-el-OSGi-MANIFEST.MF jsp-api-OSGi-MANIFEST.MF servlet-api-OSGi-MANIFEST.MF tomcat-9.0-JDTCompiler-java.patch tomcat-9.0-bootstrap-MANIFEST.MF.patch tomcat-9.0-digest.script tomcat-9.0-disable-osgi-build.patch tomcat-9.0-javadoc.patch tomcat-9.0-jsvc.service tomcat-9.0-log4j.properties tomcat-9.0-sle.catalina.policy.patch tomcat-9.0-tomcat-users-webapp.patch tomcat-9.0-tool-wrapper.script tomcat-9.0.30-java8compat.patch tomcat-9.0.conf tomcat-9.0.init tomcat-9.0.logrotate tomcat-9.0.service tomcat-9.0.sysconfig tomcat-9.0.wrapper tomcat-api-OSGi-MANIFEST.MF tomcat-functions tomcat-juli-OSGi-MANIFEST.MF tomcat-named.service tomcat-preamble tomcat-rpmlintrc tomcat-server tomcat-serverxml-tool.sh tomcat-serverxml-tool.tar.gz tomcat.changes tomcat.keyring tomcat.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tomcat.spec ++++++ ++++ 803 lines (skipped) ++++++ _constraints ++++++ <constraints> <hardware> <physicalmemory> <size unit="M">2048</size> </physicalmemory> </hardware> </constraints> ++++++ el-api-OSGi-MANIFEST.MF ++++++ Export-Package: javax.el;version="2.2.0" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . Bundle-Version: 2.2.0 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-SymbolicName: javax.el DynamicImport-Package: org.apache.el Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J 2SE-1.3 ++++++ jasper-OSGi-MANIFEST.MF ++++++ Export-Package: org.apache.jasper;version="7.0.21",org.apache.jasper.c ompiler;version="7.0.21",org.apache.jasper.compiler.tagplugin;version ="7.0.21",org.apache.jasper.resources;version="7.0.21",org.apache.jas per.runtime;version="7.0.21",org.apache.jasper.security;version="7.0. 19",org.apache.jasper.servlet;version="7.0.21",org.apache.jasper.tagp lugins.jstl;version="7.0.21",org.apache.jasper.tagplugins.jstl.core;v ersion="7.0.21",org.apache.jasper.util;version="7.0.21",org.apache.ja sper.xmlparser;version="7.0.21" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . Bundle-Version: 7.0.21 Bundle-Localization: plugin Bundle-Name: %bundleName Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.jasper Import-Package: javax.servlet;version="[2.4.0, 3.0.0]",javax.servlet.h ttp;version="[2.4.0, 3.0.0]",javax.servlet.jsp;version="[2.0.0, 2.2.0 ]",javax.servlet.jsp.el;version="[2.0.0, 2.2.0]",javax.servlet.jsp.re sources;version="[2.0.0, 2.2.0]",javax.servlet.jsp.tagext;version="[2 .0.0, 2.2.0]",javax.servlet.resources;version="[2.4.0, 3.0.0]",javax. xml.parsers,org.apache.commons.el;version="[1.0.0,2.0.0)",org.apache. commons.logging;version="[1.0.0,2.0.0)",org.apache.tools.ant;resoluti on:=optional,org.apache.tools.ant.taskdefs;resolution:=optional,org.a pache.tools.ant.types;resolution:=optional,org.apache.tools.ant.util; resolution:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml. sax.helpers,org.apache.tomcat;version="7.0.21",org.apache.juli.loggin g;version="7.0.21",javax.el;version="2.2.0",org.eclipse.jdt.internal. compiler,org.eclipse.jdt.internal.compiler.parser,org.eclipse.jdt.int ernal.compiler.parser.diagnose,org.eclipse.jdt.internal.compiler.flow ,org.eclipse.jdt.internal.compiler.util,org.eclipse.jdt.internal.comp iler.impl,org.eclipse.jdt.internal.compiler.lookup,org.eclipse.jdt.in ternal.compiler.codegen,org.eclipse.jdt.internal.compiler.batch,org.e clipse.jdt.internal.compiler.classfmt,org.eclipse.jdt.internal.compil er.ast,org.eclipse.jdt.internal.compiler.problem,org.eclipse.jdt.inte rnal.compiler.env,org.eclipse.jdt.internal.core.util,org.eclipse.jdt. core.compiler Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J 2SE-1.3 ++++++ jasper-el-OSGi-MANIFEST.MF ++++++ Export-Package: org.apache.el;version="7.0.21" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . Bundle-Version: 7.0.21 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Import-Package: javax.el;version="2.2" Bundle-SymbolicName: org.apache.el Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J 2SE-1.3 ++++++ jsp-api-OSGi-MANIFEST.MF ++++++ Bundle-Vendor: %bundleProvider Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3 Bundle-Name: %bundleName Bundle-SymbolicName: javax.servlet.jsp Export-Package: javax.servlet.jsp; version=2.2,javax.servlet.jsp.el; v ersion=2.2,javax.servlet.jsp.resources; version=2.2,javax.servlet.jsp .tagext; version=2.2 Bundle-Version: 2.2.0.v200806031607 Bundle-ManifestVersion: 2 Import-Package: javax.servlet; version=3.0,javax.servlet.http; version =3.0,javax.servlet.resources; version=3.0,javax.el;version="2.2.0" ++++++ servlet-api-OSGi-MANIFEST.MF ++++++ Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4 Bundle-SymbolicName: javax.servlet Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-Version: 3.0.0 Bundle-Vendor: %bundleProvider Export-Package: javax.servlet;version="3.0", javax.servlet;version="2.6", javax.servlet.http;version="3.0", javax.servlet.http;version="2.6", javax.servlet.annotation;version="2.6", javax.servlet.descriptor;version="3.0", javax.servlet.descriptor;version="2.6", javax.servlet.resources;version="3.0", javax.servlet.resources;version="2.6" ++++++ tomcat-9.0-JDTCompiler-java.patch ++++++ Index: apache-tomcat-9.0.30-src/java/org/apache/jasper/compiler/JDTCompiler.java =================================================================== --- apache-tomcat-9.0.30-src.orig/java/org/apache/jasper/compiler/JDTCompiler.java +++ apache-tomcat-9.0.30-src/java/org/apache/jasper/compiler/JDTCompiler.java @@ -312,21 +312,21 @@ public class JDTCompiler extends org.apa CompilerOptions.VERSION_1_7); } else if(opt.equals("1.8")) { settings.put(CompilerOptions.OPTION_Source, - CompilerOptions.VERSION_1_8); + "1.8"); // CompilerOptions.VERSION_1_8 // Version format changed from Java 9 onwards. // Support old format that was used in EA implementation as well } else if(opt.equals("9") || opt.equals("1.9")) { settings.put(CompilerOptions.OPTION_Source, - CompilerOptions.VERSION_9); + "9"); // CompilerOptions.VERSION_9 } else if(opt.equals("10")) { settings.put(CompilerOptions.OPTION_Source, - CompilerOptions.VERSION_10); + "10"); // CompilerOptions.VERSION_10 } else if(opt.equals("11")) { settings.put(CompilerOptions.OPTION_Source, - CompilerOptions.VERSION_11); + "11"); // CompilerOptions.VERSION_11 } else if(opt.equals("12")) { settings.put(CompilerOptions.OPTION_Source, - CompilerOptions.VERSION_12); + "12"); // CompilerOptions.VERSION_12 } else if(opt.equals("13")) { // Constant not available in latest ECJ version shipped with // Tomcat. May be supported in a snapshot build. @@ -375,31 +375,31 @@ public class JDTCompiler extends org.apa CompilerOptions.VERSION_1_7); } else if(opt.equals("1.8")) { settings.put(CompilerOptions.OPTION_TargetPlatform, - CompilerOptions.VERSION_1_8); + "1.8"); // CompilerOptions.VERSION_1_8 settings.put(CompilerOptions.OPTION_Compliance, - CompilerOptions.VERSION_1_8); + "1.8"); // CompilerOptions.VERSION_1_8 // Version format changed from Java 9 onwards. // Support old format that was used in EA implementation as well } else if(opt.equals("9") || opt.equals("1.9")) { settings.put(CompilerOptions.OPTION_TargetPlatform, - CompilerOptions.VERSION_9); + "9"); // CompilerOptions.VERSION_9 settings.put(CompilerOptions.OPTION_Compliance, - CompilerOptions.VERSION_9); + "9"); // CompilerOptions.VERSION_9 } else if(opt.equals("10")) { settings.put(CompilerOptions.OPTION_TargetPlatform, - CompilerOptions.VERSION_10); + "10"); // CompilerOptions.VERSION_10 settings.put(CompilerOptions.OPTION_Compliance, - CompilerOptions.VERSION_10); + "10"); // CompilerOptions.VERSION_10 } else if(opt.equals("11")) { settings.put(CompilerOptions.OPTION_TargetPlatform, - CompilerOptions.VERSION_11); + "11"); // CompilerOptions.VERSION_11 settings.put(CompilerOptions.OPTION_Compliance, - CompilerOptions.VERSION_11); + "11"); // CompilerOptions.VERSION_11 } else if(opt.equals("12")) { settings.put(CompilerOptions.OPTION_TargetPlatform, - CompilerOptions.VERSION_12); + "12"); // CompilerOptions.VERSION_12 settings.put(CompilerOptions.OPTION_Compliance, - CompilerOptions.VERSION_12); + "12"); // CompilerOptions.VERSION_12) } else if(opt.equals("13")) { // Constant not available in latest ECJ version shipped with // Tomcat. May be supported in a snapshot build. ++++++ tomcat-9.0-bootstrap-MANIFEST.MF.patch ++++++ --- 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-9.0-digest.script ++++++ #!/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 tomcat/servlet" # 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-9.0-disable-osgi-build.patch ++++++ Index: apache-tomcat-9.0.21-src/build.xml =================================================================== --- apache-tomcat-9.0.21-src.orig/build.xml +++ apache-tomcat-9.0.21-src/build.xml @@ -730,7 +730,7 @@ </target> <target name="build-bnd" unless="bnd.uptodate" - depends="setup-bnd,build-prepare"> + depends="setup-bnd,build-prepare" if="add.osgi.jar.metadata"> <mkdir dir="${tomcat.bnd}" /> <copy todir="${tomcat.bnd}" overwrite="yes" filtering="yes" @@ -3199,7 +3199,7 @@ Read the Building page on the Apache Tom <!-- ======================= Macros, Taskdefs etc ======================== --> - <target name="download-bnd" > + <target name="download-bnd" if="add.osgi.jar.metadata"> <!-- Download bnd --> <antcall target="downloadfile"> <param name="sourcefile" value="${bnd.loc}"/> @@ -3221,7 +3221,7 @@ Read the Building page on the Apache Tom </antcall> </target> - <target name="setup-bnd" depends="download-bnd"> + <target name="setup-bnd" depends="download-bnd" if="add.osgi.jar.metadata"> <!-- Add bnd tasks to project --> <path id="bndlib.classpath"> <fileset file="${bnd.jar}" /> @@ -3261,7 +3261,7 @@ Read the Building page on the Apache Tom <zipfileset file="@{notice}" fullpath="META-INF/NOTICE" /> <zipfileset file="@{license}" fullpath="META-INF/LICENSE" /> </jar> - <antcall target="add-osgi" > + <antcall target="add-osgi" if:set="add.osgi.jar.metadata"> <param name="jarfile" value="@{jarfile}" /> <param name="addOSGi" value="@{addOSGi}" /> </antcall> ++++++ tomcat-9.0-javadoc.patch ++++++ Index: apache-tomcat-9.0.30-src/build.xml =================================================================== --- apache-tomcat-9.0.30-src.orig/build.xml +++ apache-tomcat-9.0.30-src/build.xml @@ -1890,7 +1890,7 @@ Apache Tomcat ${version} native binaries source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -1912,7 +1912,7 @@ Apache Tomcat ${version} native binaries source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -1933,7 +1933,7 @@ Apache Tomcat ${version} native binaries source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -1950,11 +1950,11 @@ Apache Tomcat ${version} native binaries encoding="UTF-8" docencoding="UTF-8" charset="UTF-8" - additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}" + additionalparam="-breakiterator -notimestamp" source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -1971,11 +1971,11 @@ Apache Tomcat ${version} native binaries encoding="UTF-8" docencoding="UTF-8" charset="UTF-8" - additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}" + additionalparam="-breakiterator -notimestamp" source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -1995,7 +1995,7 @@ Apache Tomcat ${version} native binaries additionalparam="-breakiterator -notimestamp" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2011,11 +2011,11 @@ Apache Tomcat ${version} native binaries encoding="UTF-8" docencoding="UTF-8" charset="UTF-8" - additionalparam="-breakiterator -notimestamp ${java9.javadoc.options}" + additionalparam="-breakiterator -notimestamp" source="${compile.source}" maxmemory="512m" failonerror="true" - failonwarning="true"> + failonwarning="false"> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2026,8 +2026,6 @@ Apache Tomcat ${version} native binaries <link href="../elapi"/> <link href="../websocketapi"/> <link href="../jaspicapi"/> - <link href="https://docs.oracle.com/javase/8/docs/api/"/> - <link href="https://javaee.github.io/javaee-spec/javadocs/"/> <packageset dir="${tomcat.dist}/src/java/"> <include name="org/**"/> <exclude name="org/apache/el/parser/**"/> ++++++ tomcat-9.0-jsvc.service ++++++ # 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" ExecStart=/usr/lib/tomcat/server start ExecStop=/usr/lib/tomcat/server stop [Install] WantedBy=multi-user.target ++++++ tomcat-9.0-log4j.properties ++++++ log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.home}/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-9.0-sle.catalina.policy.patch ++++++ Index: conf/catalina.policy =================================================================== --- conf/catalina.policy.orig +++ conf/catalina.policy @@ -167,6 +167,9 @@ grant { permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat"; // Precompiled JSPs need access to these packages. + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.servlet"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.compiler"; permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el"; permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; permission java.lang.RuntimePermission @@ -216,6 +219,15 @@ grant codeBase "file:${catalina.home}/we }; +// Additional basic permissions for web applications. +grant codeBase "file:/usr/share/java/tomcat-servlet-api.jar" { + permission java.security.AllPermission; +}; + +grant codeBase "file:/usr/share/java/tomcat-el-api.jar" { + permission java.security.AllPermission; +}; + // You can assign additional permissions to particular web applications by // adding additional "grant" entries here, based on the code base for that // application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files. ++++++ tomcat-9.0-tomcat-users-webapp.patch ++++++ Index: conf/tomcat-users.xml =================================================================== --- conf/tomcat-users.xml.orig +++ conf/tomcat-users.xml @@ -41,4 +41,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="adminadmin" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" /> --> </tomcat-users> ++++++ tomcat-9.0-tool-wrapper.script ++++++ #!/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 tomcat/servlet" # Set parameters set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS # Let's start run "$@" ++++++ tomcat-9.0.30-java8compat.patch ++++++ ++++ 3470 lines (skipped) ++++++ tomcat-9.0.conf ++++++ # 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/libi64/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-9.0.init ++++++ #!/bin/bash # Copyright (c) 2008 SuSE Linux AG Nuernberg, Germany. # # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot # - heavily rewritten by Deepak Bhole and Jason Corley # - merged with previous SUSE's rctomcat55 by Petr Mladek and jpackage.org # original by Michal Vyskocil # # /etc/init.d/tomcat # # and its symbolic link # # /usr/sbin/rctomcat # # System startup script for the Tomcat servlet container # ### BEGIN INIT INFO # Provides: tomcat # Required-Start: $network $syslog $remote_fs # Should-Start: $named $syslog $time # Required-Stop: $network $syslog $remote_fs # Should-Stop: $named $syslog $time # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Tomcat Servlet Container # Description: Start and Stop Apache Tomcat ### END INIT INFO # set a minimalist PATH PATH="/bin:/sbin:/usr/bin:/usr/sbin" # Source LSB function library. if [ -r /lib/lsb/init-functions ]; then . /lib/lsb/init-functions else exit 1 fi DISTRIB_ID=`lsb_release -i -s 2>/dev/null` NAME="$(basename $0)" unset ISBOOT if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then NAME="${NAME:3}" ISBOOT="1" fi # remove SUSE's rc name if [ "${NAME:0:2}" = "rc" ]; then NAME="${NAME:2}" fi # For SELinux we need to use 'runuser' not 'su' if [ -x "/sbin/runuser" ]; then SU="/sbin/runuser" else SU="/bin/su" fi # Get the tomcat config (use this for environment specific settings) TOMCAT_CFG="/etc/tomcat/tomcat.conf" if [ -r "$TOMCAT_CFG" ]; then . $TOMCAT_CFG fi # Define which connector port to use CONNECTOR_PORT="${CONNECTOR_PORT:-8080}" # Path to the tomcat launch script TOMCAT_SCRIPT="/usr/sbin/dtomcat" # Tomcat program name TOMCAT_PROG="${NAME}" # Define the tomcat username TOMCAT_USER="${TOMCAT_USER:-tomcat}" # Define the tomcat log file TOMCAT_LOG="${TOMCAT_LOG:-${CATALINA_HOME}/logs/${NAME}-initd.log}" # Define the tomcat pid file export CATALINA_PID="/var/run/${NAME}.pid" RETVAL="0" # pulled from RHEL4 /etc/rc.d/init.d/functions function checkpid() { local i for i in $* ; do if [ -d "/proc/${i}" ]; then return 0 fi done return 1 } # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_failed <num> set local and overall rc status to <num><num> # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status . /etc/rc.status # First reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signalling is not supported) are # considered a success. # Look for open ports, as the function name might imply function findFreePorts() { local isSet1="false" local isSet2="false" local isSet3="false" local lower="8000" randomPort1="0" randomPort2="0" randomPort3="0" local -a listeners="( $( netstat -ntl | \ awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}' ) )" while [ "$isSet1" = "false" ] || \ [ "$isSet2" = "false" ] || \ [ "$isSet3" = "false" ]; do let port="${lower}+${RANDOM:0:4}" if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then if [ "$isSet1" = "false" ]; then export randomPort1="$port" isSet1="true" elif [ "$isSet2" = "false" ]; then export randomPort2="$port" isSet2="true" elif [ "$isSet3" = "false" ]; then export randomPort3="$port" isSet3="true" fi fi done } function makeHomeDir() { if [ ! -d "$CATALINA_HOME" ]; then echo "$CATALINA_HOME does not exist, creating" if [ ! -d "/usr/share/${NAME}" ]; then mkdir /usr/share/${NAME} cp -pLR /usr/share/tomcat/* /usr/share/${NAME} fi mkdir -p /var/log/${NAME} \ /var/cache/${NAME} \ /var/tmp/${NAME} ln -fs /var/cache/${NAME} ${CATALINA_HOME}/work ln -fs /var/tmp/${NAME} ${CATALINA_HOME}/temp cp -pLR /usr/share/${NAME}/bin $CATALINA_HOME cp -pLR /usr/share/${NAME}/conf $CATALINA_HOME ln -fs /usr/share/java/tomcat ${CATALINA_HOME}/lib ln -fs /usr/share/tomcat/webapps ${CATALINA_HOME}/webapps chown --no-dereference ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi } function parseOptions() { options="" options="$options $( awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \ $TOMCAT_CFG )" # if [ -r "/etc/sysconfig/${NAME}" ]; then # options="$options $( # awk '!/^#/ && !/^$/ { ORS=" "; # print "export ", $0, ";" }' \ # /etc/sysconfig/${NAME} # )" # fi TOMCAT_SCRIPT="$options ${TOMCAT_SCRIPT}" } # See how we were called. function start() { echo -n "Starting Tomcat ($CATALINA_BASE)" if [ -f "/var/run/rc${NAME}" ] ; then if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid if checkpid $kpid 2>&1; then echo "$NAME process already running" rc_failed 0 else echo -n "lock file found but no process running for pid $kpid, continuing" rc_failed 7 fi fi fi # fix permissions on the log and pid files export CATALINA_PID="/var/run/${NAME}.pid" touch $CATALINA_PID chown --no-dereference ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID touch $TOMCAT_LOG chown --no-dereference ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG if [ "$CATALINA_HOME" != "/usr/share/tomcat" ]; then # Create a tomcat directory if it doesn't exist makeHomeDir # If CATALINA_HOME doesn't exist modify port number so that # multiple instances don't interfere with each other findFreePorts sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \ -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \ ${CATALINA_HOME}/conf/server.xml fi parseOptions if [ "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ >> $TOMCAT_LOG 2>&1 else $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 fi RETVAL="$?" if [ "$RETVAL" -eq 0 ]; then rc_failed 0 touch /var/run/rc${NAME} else rc_failed 7 fi rc_status -v } ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. # Status has a slightly different for the status command: # 0 - service running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running # NOTE: checkproc returns LSB compliant status values. function status() { echo -n "Checking for Tomcat ($CATALINA_BASE)" if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid if checkpid $kpid 2>&1; then rc_failed 0 else rc_failed 2 fi else #don't be dependent on procps #pid="$(/usr/bin/pgrep -u tomcat java)" pid="$(ps U tomcat o pid,cmd | grep java | grep -v 'grep java')" if [ -n "$pid" ]; then echo "$0 running (${pid}) but no PID file exists" rc_failed 0 else rc_failed 3 fi fi rc_status -v } function stop() { echo -n "Shutting down Tomcat ($CATALINA_BASE)" if [ -f "/var/run/rc${NAME}" ]; then parseOptions $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1 RETVAL="$?" if [ "$RETVAL" -eq "0" ]; then count="0" if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \ [ "$count" -gt "$SHUTDOWN_WAIT" ]; do if [ "$SHUTDOWN_VERBOSE" = "true" ]; then echo "waiting for processes $kpid to exit" fi sleep 1 let count="${count}+1" done if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then if [ "$SHUTDOWN_VERBOSE" = "true" ]; then echo "killing processes which didn't stop after $SHUTDOWN_WAIT seconds" echo -n -e "after " echo -n "$SHUTDOWN_WAIT seconds" fi kill -9 $kpid fi rc_failed 0 if [ "$count" -gt "0" ]; then echo -n -e "\n" fi fi rm -f /var/run/rc${NAME} /var/run/${NAME}.pid if [ "${CLEAR_WORK}" = "true" ]; then echo -n "Cleaning work directory: " find ${CATALINA_HOME}/work/{Catalina,temp} -mindepth 2 -type d -print0 | xargs -0 rm -rf if [ "$?" -eq "0" ]; then log_success_msg echo -n -e "\n" fi fi else rc_failed 1 fi fi rc_status -v } # See how we were called. case "$1" in start) start ;; stop) stop ;; try-restart) ## Stop the service and if this succeeds (i.e. the ## service was running before), start it again. ## Note: try-restart is not (yet) part of LSB (as of 0.7.5) $0 status >/dev/null && $0 restart # Remember status and be quiet rc_status ;; restart) stop sleep 2 start rc_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons ## do this on signal 1 (SIGHUP). ## If it does not support it, restart. echo -n "Reload service Tomcat ($CATALINA_BASE)" ## if it supports it: #killproc -HUP $TOMCAT_BIN #touch /var/run/FOO.pid #rc_status -v ## Otherwise: $0 stop && $0 start rc_status ;; reload) ## Like force-reload, but if daemon does not support ## signalling, do nothing (!) # If it supports signalling: #echo -n "Reload service FOO" #killproc -HUP $TOMCAT_BIN #touch /var/run/FOO.pid #rc_status -v ## Otherwise if it does not support reload: rc_failed 3 rc_status -v ;; status) status ;; probe) ## Optional: Probe for the necessity of a reload, ## give out the argument which is required for a reload. ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" exit 1 ;; esac rc_exit ++++++ tomcat-9.0.logrotate ++++++ @@@TCLOG@@@/catalina.out { copytruncate weekly rotate 52 compress missingok su root tomcat create 0644 tomcat tomcat } ++++++ tomcat-9.0.service ++++++ # 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] TasksMax=576 LimitNOFILE=8192 Type=simple EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=" EnvironmentFile=-/etc/sysconfig/tomcat ExecStart=/usr/lib/tomcat/server start ExecStop=/usr/lib/tomcat/server stop SuccessExitStatus=143 User=tomcat Group=tomcat [Install] WantedBy=multi-user.target ++++++ tomcat-9.0.wrapper ++++++ #!/bin/bash if [ "$1" = "version" ]; then . /usr/lib/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-api-OSGi-MANIFEST.MF ++++++ Export-Package: org.apache.tomcat;version="7.0.21" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . Bundle-Version: 7.0.21 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.tomcat Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J 2SE-1.3 ++++++ tomcat-functions ++++++ #!/bin/bash if [ -r /usr/share/java-utils/java-functions ]; then . /usr/share/java-utils/java-functions else echo "Can't read Java functions library, aborting" exit 1 fi _save_function() { local ORIG_FUNC=$(declare -f $1) local NEWNAME_FUNC="$2${ORIG_FUNC#$1}" eval "$NEWNAME_FUNC" } run_jsvc(){ if [ -x /usr/bin/jsvc ]; then 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 $@ else run_java $@ fi } ++++++ tomcat-juli-OSGi-MANIFEST.MF ++++++ Export-Package: org.apache.juli;version="7.0.21",org.apache.juli.loggi ng;version="7.0.21" Bundle-Vendor: %bundleProvider Bundle-ClassPath: . Bundle-Version: 7.0.21 Bundle-Name: %bundleName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.juli Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J 2SE-1.3 ++++++ tomcat-named.service ++++++ # Systemd unit file for tomcat instances. # # To create clones of this service: # 0. systemctl enable tomcat@name.service # 1. create catalina.base directory structure in # /var/lib/tomcats/name # 2. profit. [Unit] Description=Apache Tomcat Web Application Container After=syslog.target network.target [Service] Type=simple EnvironmentFile=/etc/tomcat/tomcat.conf Environment="NAME=%I" EnvironmentFile=-/etc/sysconfig/tomcat@%I ExecStart=/usr/lib/tomcat/server start ExecStop=/usr/lib/tomcat/server stop SuccessExitStatus=143 User=tomcat Group=tomcat [Install] WantedBy=multi-user.target ++++++ tomcat-preamble ++++++ #!/bin/bash . /usr/lib/tomcat/functions # Get the tomcat config (use this for environment specific settings) if [ -z "${TOMCAT_CFG_LOADED}" ]; then if [ -z "${TOMCAT_CFG}" ]; then TOMCAT_CFG="/etc/tomcat/tomcat.conf" fi . $TOMCAT_CFG fi if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then for file in ${TOMCAT_CONFD}/*.conf ; do if [ -f "$file" ] ; then . "$file" fi done fi if [ -z "$CATALINA_BASE" ]; then if [ -n "$NAME" ]; then if [ -z "$TOMCATS_BASE" ]; then TOMCATS_BASE="/var/lib/tomcats/" fi CATALINA_BASE="${TOMCATS_BASE}${NAME}" else CATALINA_BASE="${CATALINA_HOME}" fi fi # Include the optional setenv.sh script. # (See section 3.4 of https://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt) if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then . "$CATALINA_BASE/bin/setenv.sh" elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then . "$CATALINA_HOME/bin/setenv.sh" fi VERBOSE=1 set_javacmd cd ${CATALINA_HOME} # CLASSPATH munging if [ ! -z "$CLASSPATH" ] ; then CLASSPATH="$CLASSPATH": fi 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}:$(build-classpath commons-daemon 2>/dev/null)" if [ -z "$LOGGING_PROPERTIES" ] ; then LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties" if [ ! -f "${LOGGING_PROPERTIES}" ] ; then LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties" fi fi ++++++ tomcat-rpmlintrc ++++++ #fix of bnc#520532 addFilter(".*non-etc-or-var-file-marked-as-conffile /usr/share/tomcat/tomcat-webapps/ROOT.*") ++++++ tomcat-server ++++++ #!/bin/bash . /usr/lib/tomcat/preamble MAIN_CLASS=org.apache.catalina.startup.Bootstrap FLAGS="$JAVA_OPTS" OPTIONS="-Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ -Djava.util.logging.config.file=${LOGGING_PROPERTIES} \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" if [ "$1" = "start" ] ; then FLAGS="${FLAGS} $CATALINA_OPTS" if [ "${SECURITY_MANAGER}" = "true" ] ; then OPTIONS="${OPTIONS} \ -Djava.security.manager \ -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy" fi run start elif [ "$1" = "stop" ] ; then run stop fi ++++++ tomcat-serverxml-tool.sh ++++++ #!/bin/bash JAR=/usr/lib/tomcat/serverxmltool.jar SERVERXML=/etc/tomcat/server.xml function usage { echo "Usage: <script> add|remove docBase path [contextXmlFile]" } if [[ -z "$1" || -z "$2" ]]; then usage exit 1 fi CMD="$1" DOCBASE="$2" CTXPATH="$3" CONTEXTXML=${4:-''} if [ "$CMD" = "add" ]; then XSLT="add-context.xslt" elif [ "$CMD" = "remove" ]; then XSLT="remove-context.xslt" else usage exit 1; fi SUFIX=$(date +%H%M%S%N) rm -f ${SERVERXML}.new${SUFIX} ${SERVERXML}.old${SUFIX} /usr/bin/java -jar $JAR $XSLT $SERVERXML $DOCBASE $CTXPATH $CONTEXTXML > ${SERVERXML}.new${SUFIX} if [ $? -eq 0 ]; then mv $SERVERXML ${SERVERXML}.old${SUFIX} mv ${SERVERXML}.new${SUFIX} $SERVERXML rm ${SERVERXML}.old${SUFIX} if [ "$CMD" = "add" ]; then echo "Added webapp $CTXPATH from $DOCBASE to $SERVERXML." else echo "Removed webapp $CTXPATH from $SERVERXML." fi else echo "$SERVERXML was not modified." rm ${SERVERXML}.new${SUFIX} exit 2 fi++++++ tomcat.keyring ++++++ ++++ 650 lines (skipped)
participants (1)
-
root