commit cc875debfbd02a47e2a82e0e0b94bf02f8cebd1b5e8a8452d5723f2d9845ccb8 Author: Fridrich Strba Date: Tue Nov 14 15:18:29 2023 +0000 Accepting request 1126078 from home:mbussolotto:branches:Java:packages:bump - Initial packaging of Tomcat 10.1.14 OBS-URL: https://build.opensuse.org/request/show/1126078 OBS-URL: https://build.opensuse.org/package/show/Java:packages/tomcat10?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..290ed62 --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 2048 + + + diff --git a/apache-tomcat-10.1.14-src.tar.gz b/apache-tomcat-10.1.14-src.tar.gz new file mode 100644 index 0000000..00309b4 --- /dev/null +++ b/apache-tomcat-10.1.14-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:029ef4076e5175a5ec2ce7dda191f2e2d6add0dd6c1366078e6ed7292dace80e +size 6131823 diff --git a/apache-tomcat-10.1.14-src.tar.gz.asc b/apache-tomcat-10.1.14-src.tar.gz.asc new file mode 100644 index 0000000..f122786 --- /dev/null +++ b/apache-tomcat-10.1.14-src.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAmUkebcACgkQHPApP6U8 +pFjGnBAAmA3QdkA/45KMJAHT5QADESvPXomHvHvG+iHJHfcgJJ//iBfY9f7FxLxw +yrcRZcU8BUhw032DkL+R2UMVxnE+4z4MAFXYS+2X1WP6neGdAYl9Qx+3Q45h78Sj +6/LYmYGiqFkkt7XM2Zh1Clw0EH93iSi+GAoXnuTtyPdJ4f7iBqG21kMErUu+iRKt +591imA8NWiYL5q1+PiOMpElWsj142oefjCgM0xttWwLZoAQ5jcyyFYJ5B/kEuDbP +trQpHUCTBA/0ltImYMaaHvLh//tiEj31EzLvU/+ofH8WoAEuV30kfHTSISLs5PEM +h5wZel7KMBaOXPeEkHySHTC0hQ0+GbqV1utwkht6kLE2+LaPe/8G9McoEQr9sFFD +8adgJH9DeDCJUjispTMF4UoJLCsHPL6UgEjcXFll9pEXADndWiX0cvt8t///Ej1+ +qwOzfCz0DJpfd5XAfLx+t8y66nf3EDvFMPuwXBtgaSzonW6TOHFcQu/P1Fzr95s8 +spWomzmETLJ9xos8g7gZYH5OA9zqrdrBhauBibWmdARAND26sQAYJvwbPXnEyre/ +rbtcWcPgvFeuHfjzo0CX02rhBbMKqmk62Nd9hK0O5/pFM9lOJoRwrgImmyIRAJUQ +hohDjWTlPhtjc9bIlyLjCXEkIpno6YXMtzDoVam1rDsKS2Ggm5s= +=/3mT +-----END PGP SIGNATURE----- diff --git a/tomcat-bootstrap-MANIFEST.MF.patch b/tomcat-bootstrap-MANIFEST.MF.patch new file mode 100644 index 0000000..fa3c90f --- /dev/null +++ b/tomcat-bootstrap-MANIFEST.MF.patch @@ -0,0 +1,9 @@ +--- 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 diff --git a/tomcat-digest.script b/tomcat-digest.script new file mode 100644 index 0000000..fae10b3 --- /dev/null +++ b/tomcat-digest.script @@ -0,0 +1,45 @@ +#!/bin/sh +# +# tomcat-digest script +# JPackage Project + +# 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 "$@" diff --git a/tomcat-fix_catalina.patch b/tomcat-fix_catalina.patch new file mode 100644 index 0000000..e011406 --- /dev/null +++ b/tomcat-fix_catalina.patch @@ -0,0 +1,11 @@ +Index: apache-tomcat-9.0.43-src/conf/logging.properties +=================================================================== +--- apache-tomcat-9.0.43-src.orig/conf/logging.properties ++++ apache-tomcat-9.0.43-src/conf/logging.properties +@@ -77,3 +77,6 @@ org.apache.catalina.core.ContainerBase.[ + + # To see debug messages for WebSocket handling, uncomment the following line: + #org.apache.tomcat.websocket.level = FINE ++ ++1catalina.org.apache.juli.AsyncFileHandler.suffix = out ++1catalina.org.apache.juli.AsyncFileHandler.rotatable = false diff --git a/tomcat-functions b/tomcat-functions new file mode 100644 index 0000000..721021c --- /dev/null +++ b/tomcat-functions @@ -0,0 +1,42 @@ +#!/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 +} + diff --git a/tomcat-javadoc.patch b/tomcat-javadoc.patch new file mode 100644 index 0000000..27e630d --- /dev/null +++ b/tomcat-javadoc.patch @@ -0,0 +1,13 @@ +Index: apache-tomcat-10.1.5-src/build.xml +=================================================================== +--- apache-tomcat-10.1.5-src.orig/build.xml ++++ apache-tomcat-10.1.5-src/build.xml +@@ -2346,8 +2346,6 @@ Apache Tomcat ${version} native binaries + + + +- +- + + + diff --git a/tomcat-jdt.patch b/tomcat-jdt.patch new file mode 100644 index 0000000..ea95382 --- /dev/null +++ b/tomcat-jdt.patch @@ -0,0 +1,48 @@ +Index: apache-tomcat-10.1.14-src/java/org/apache/jasper/compiler/JDTCompiler.java +=================================================================== +--- apache-tomcat-10.1.14-src.orig/java/org/apache/jasper/compiler/JDTCompiler.java ++++ apache-tomcat-10.1.14-src/java/org/apache/jasper/compiler/JDTCompiler.java +@@ -310,13 +310,13 @@ public class JDTCompiler extends org.apa + } else if(opt.equals("15")) { + settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15); + } else if(opt.equals("16")) { +- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16); ++ settings.put(CompilerOptions.OPTION_Source, "16"); + } else if(opt.equals("17")) { +- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17); ++ settings.put(CompilerOptions.OPTION_Source, "17"); + } else if(opt.equals("18")) { +- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_18); ++ settings.put(CompilerOptions.OPTION_Source, "18"); + } else if (opt.equals("19")) { +- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19); ++ settings.put(CompilerOptions.OPTION_Source, "19"); + } else if (opt.equals("20")) { + // Constant not available in latest ECJ version shipped with + // Tomcat. May be supported in a snapshot build. +@@ -383,17 +383,17 @@ public class JDTCompiler extends org.apa + settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15); + settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15); + } else if(opt.equals("16")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16); +- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16); ++ settings.put(CompilerOptions.OPTION_TargetPlatform, "16"); ++ settings.put(CompilerOptions.OPTION_Compliance, "16"); + } else if(opt.equals("17")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17); +- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17); ++ settings.put(CompilerOptions.OPTION_TargetPlatform, "17"); ++ settings.put(CompilerOptions.OPTION_Compliance, "17"); + } else if(opt.equals("18")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_18); +- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_18); ++ settings.put(CompilerOptions.OPTION_TargetPlatform, "18"); ++ settings.put(CompilerOptions.OPTION_Compliance, "18"); + } else if (opt.equals("19")) { +- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_19); +- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_19); ++ settings.put(CompilerOptions.OPTION_TargetPlatform, "19"); ++ settings.put(CompilerOptions.OPTION_Compliance, "19"); + } else if (opt.equals("20")) { + // Constant not available in latest ECJ version shipped with + // Tomcat. May be supported in a snapshot build. diff --git a/tomcat-jsvc.service b/tomcat-jsvc.service new file mode 100644 index 0000000..34f8a26 --- /dev/null +++ b/tomcat-jsvc.service @@ -0,0 +1,21 @@ +# 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=@LIBEXECDIR@/tomcat/server start +ExecStop=@LIBEXECDIR@/tomcat/server stop + +[Install] +WantedBy=multi-user.target diff --git a/tomcat-logrotate_everything.patch b/tomcat-logrotate_everything.patch new file mode 100644 index 0000000..d030579 --- /dev/null +++ b/tomcat-logrotate_everything.patch @@ -0,0 +1,12 @@ +Index: apache-tomcat-9.0.43-src/conf/logging.properties +=================================================================== +--- apache-tomcat-9.0.43-src.orig/conf/logging.properties ++++ apache-tomcat-9.0.43-src/conf/logging.properties +@@ -80,3 +80,7 @@ org.apache.catalina.core.ContainerBase.[ + + 1catalina.org.apache.juli.AsyncFileHandler.suffix = out + 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false ++ ++2localhost.org.apache.juli.AsyncFileHandler.rotatable = false ++3manager.org.apache.juli.AsyncFileHandler.rotatable = false ++4host-manager.org.apache.juli.AsyncFileHandler.rotatable = false diff --git a/tomcat-named.service b/tomcat-named.service new file mode 100644 index 0000000..2d742a7 --- /dev/null +++ b/tomcat-named.service @@ -0,0 +1,26 @@ +# 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=@LIBEXECDIR@/tomcat/server start +ExecStop=@LIBEXECDIR@/tomcat/server stop +SuccessExitStatus=143 +User=tomcat +Group=tomcat + +[Install] +WantedBy=multi-user.target + diff --git a/tomcat-osgi-build.patch b/tomcat-osgi-build.patch new file mode 100644 index 0000000..2465218 --- /dev/null +++ b/tomcat-osgi-build.patch @@ -0,0 +1,31 @@ +Index: apache-tomcat-10.1.5-src/build.xml +=================================================================== +--- apache-tomcat-10.1.5-src.orig/build.xml ++++ apache-tomcat-10.1.5-src/build.xml +@@ -217,11 +217,11 @@ + + + +- + + + + ++ + + + +@@ -3884,6 +3884,13 @@ Read the Building page on the Apache Tom + + + ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/tomcat-preamble b/tomcat-preamble new file mode 100644 index 0000000..23c40dd --- /dev/null +++ b/tomcat-preamble @@ -0,0 +1,61 @@ +#!/bin/bash + +. @LIBEXECDIR@/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 diff --git a/tomcat-rpmlintrc b/tomcat-rpmlintrc new file mode 100644 index 0000000..20bc763 --- /dev/null +++ b/tomcat-rpmlintrc @@ -0,0 +1,2 @@ +#fix of bnc#520532 +addFilter(".*non-etc-or-var-file-marked-as-conffile /usr/share/tomcat/tomcat-webapps/ROOT.*") diff --git a/tomcat-secretRequired-default.patch b/tomcat-secretRequired-default.patch new file mode 100644 index 0000000..d5e2e06 --- /dev/null +++ b/tomcat-secretRequired-default.patch @@ -0,0 +1,13 @@ +Index: apache-tomcat-10.1.14-src/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +=================================================================== +--- apache-tomcat-10.1.14-src.orig/java/org/apache/coyote/ajp/AbstractAjpProtocol.java ++++ apache-tomcat-10.1.14-src/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +@@ -177,7 +177,7 @@ public abstract class AbstractAjpProtoco + } + + +- private boolean secretRequired = true; ++ private boolean secretRequired = false; + + public void setSecretRequired(boolean secretRequired) { + this.secretRequired = secretRequired; diff --git a/tomcat-server b/tomcat-server new file mode 100644 index 0000000..18eb831 --- /dev/null +++ b/tomcat-server @@ -0,0 +1,25 @@ +#!/bin/bash + +. @LIBEXECDIR@/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 diff --git a/tomcat-serverxml-tool.sh.in b/tomcat-serverxml-tool.sh.in new file mode 100644 index 0000000..3333cdf --- /dev/null +++ b/tomcat-serverxml-tool.sh.in @@ -0,0 +1,36 @@ +#!/bin/bash + +JAR=@LIBEXECDIR@/tomcat/serverxmltool.jar +SERVERXML=/etc/tomcat/server.xml + +function usage { + echo "Usage: