jetty package is retired on c9s for CS-686

This commit is contained in:
Troy Dawson 2022-04-14 12:39:35 -07:00
parent 8be8d38e58
commit e1649f2ab0
10 changed files with 1 additions and 2106 deletions

70
.gitignore vendored
View File

@ -1,70 +0,0 @@
/jetty-8.1.0.RC4.tar.bz2
/jetty-8.1.0.RC5.tar.bz2
/jetty-8.1.0.v20120127.tar.bz2
/jetty-8.1.2.v20120308.tar.bz2
/jetty-8.1.4.v20120524.tar.bz2
/jetty-9.0.0.RC2.tar.gz
/jetty-9.0.0.RC3.tar.gz
/jetty-9.0.0.v20130308.tar.gz
/jetty-9.0.2.v20130417.tar.gz
/jetty-9.0.3.v20130506.tar.gz
/jetty-9.0.4.v20130625.tar.gz
/jetty-9.0.5.v20130815.tar.gz
/jetty-9.0.6.v20130930.tar.gz
/jetty-9.1.0.v20131115.tar.gz
/jetty-9.1.1.v20140108.tar.gz
/jetty-9.1.2.v20140210.tar.gz
/jetty-9.1.3.v20140225.tar.gz
/jetty-9.1.4.v20140401.tar.gz
/jetty-9.1.5.v20140505.tar.gz
/jetty-9.2.0.v20140526.tar.gz
/jetty-9.2.1.v20140609.tar.gz
/jetty-9.2.2.v20140723.tar.gz
/jetty-9.2.3.v20140905.tar.gz
/jetty-9.2.6.v20141205.tar.gz
/jetty-9.2.7.v20150116.tar.gz
/jetty-9.2.9.v20150224.tar.gz
/jetty-9.3.0.M2.tar.gz
/jetty-9.3.0.v20150612.tar.gz
/jetty-9.3.1.v20150714.tar.gz
/jetty-9.3.2.v20150730.tar.gz
/jetty-9.3.3.v20150827.tar.gz
/jetty-9.3.4.v20151007.tar.gz
/jetty-9.3.6.v20151106.tar.gz
/jetty-9.3.7.RC0.tar.gz
/jetty-9.3.7.RC1.tar.gz
/jetty-9.3.7.v20160115.tar.gz
/jetty-9.3.8.RC0.tar.gz
/jetty-9.3.8.v20160314.tar.gz
/jetty-9.3.9.M0.tar.gz
/jetty-9.3.10.M0.tar.gz
/jetty-9.4.0.M0.tar.gz
/jetty-9.4.0.RC0.tar.gz
/jetty-9.4.0.RC2.tar.gz
/jetty-9.4.0.v20161208.tar.gz
/jetty-9.4.1.v20170120.tar.gz
/jetty-9.4.2.v20170220.tar.gz
/jetty-9.4.3.v20170317.tar.gz
/jetty-9.4.4.v20170414.tar.gz
/jetty-9.4.5.v20170502.tar.gz
/jetty-9.4.6.v20170531.tar.gz
/jetty-9.4.7.RC0.tar.gz
/jetty-9.4.7.v20170914.tar.gz
/jetty-9.4.8.v20171121.tar.gz
/jetty-9.4.9.v20180320.tar.gz
/jetty-9.4.10.RC1.tar.gz
/jetty-9.4.10.v20180503.tar.gz
/jetty-9.4.11.v20180605.tar.gz
/jetty-9.4.14.v20181114.tar.gz
/jetty-9.4.15.v20190215.tar.gz
/jetty-9.4.17.v20190418.tar.gz
/jetty-9.4.18.v20190429.tar.gz
/jetty-9.4.19.v20190610.tar.gz
/jetty-9.4.20.v20190813.tar.gz
/jetty-9.4.24.v20191120.tar.gz
/jetty-9.4.27.v20200227.tar.gz
/jetty-9.4.30.v20200611.tar.gz
/jetty-9.4.31.v20200723.tar.gz
/jetty-9.4.33.v20201020.tar.gz
/jetty-9.4.36.v20210114.tar.gz
/jetty-9.4.38.v20210224.tar.gz

View File

@ -1,25 +0,0 @@
From 29d160bf916b4ab358a01496029f9aaa5fba66b3 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 9 Sep 2019 12:42:10 +0100
Subject: [PATCH 1/2] Distro jetty.home
---
.../org/eclipse/jetty/start/config/CommandLineConfigSource.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
index 30440c4..cb0ed3d 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/config/CommandLineConfigSource.java
@@ -120,6 +120,8 @@ public class CommandLineConfigSource implements ConfigSource
try
{
Path home = new File(new URI(m.group(1))).getParentFile().toPath();
+ if (home.endsWith("/usr/share/java/jetty"))
+ home = new File(home.toString().replaceAll("java/jetty$", "jetty")).toPath();
setProperty(BaseHome.JETTY_HOME, home.toString(), ORIGIN_INTERNAL_FALLBACK);
return home;
}
--
2.26.2

View File

@ -1,76 +0,0 @@
From 65b5de2ef9ffc5eacb23c6c4834cc1c513f0eafa Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Wed, 19 Aug 2020 13:14:37 +0100
Subject: [PATCH 2/2] Port to servlet-api 4/5
---
.../jetty/server/handler/ContextHandler.java | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
index 7960b0f..4981755 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
@@ -2760,6 +2760,13 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
return null;
}
+ public ServletRegistration.Dynamic addJspFile(String servletName, String jspFile)
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "addJspFile(String, String)");
+ return null;
+ }
+
@Override
public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass)
{
@@ -2930,6 +2937,45 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu
{
return null;
}
+
+ public int getSessionTimeout()
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "getSessionTimeout()");
+ return 0;
+ }
+
+ public void setSessionTimeout(int sessionTimeout)
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "setSessionTimeout(int)");
+ }
+
+ public String getRequestCharacterEncoding()
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "getRequestCharacterEncoding()");
+ return null;
+ }
+
+ public void setRequestCharacterEncoding(String encoding)
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "setRequestCharacterEncoding(String)");
+ }
+
+ public String getResponseCharacterEncoding()
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "getResponseCharacterEncoding()");
+ return null;
+ }
+
+ public void setResponseCharacterEncoding(String encoding)
+ {
+ // TODO new in 4.0
+ LOG.warn(UNIMPLEMENTED_USE_SERVLET_CONTEXT_HANDLER, "setResponseCharacterEncoding(String)");
+ }
}
/**
--
2.26.2

View File

@ -1,10 +0,0 @@
Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1
dead.package Normal file
View File

@ -0,0 +1 @@
jetty package is retired on c9s for CS-686

View File

@ -1,7 +0,0 @@
/var/log/jetty/jetty-console.log {
copytruncate
weekly
rotate 52
compress
missingok
}

View File

@ -1,18 +0,0 @@
# Systemd unit file for jetty
#
# Multiple copies of this service (i.e. multiple concurrently running
# jetty servers) are not supported right now. Expect this to come with
# future updates
[Unit]
Description=Jetty Web Application Server
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/share/jetty/bin/jetty.sh
User=jetty
Group=jetty
[Install]
WantedBy=multi-user.target

135
jetty.sh
View File

@ -1,135 +0,0 @@
#!/usr/bin/env bash
# Configuration files
#
# /etc/default/jetty
# If it exists, this is read at the start of script. It may perform any
# sequence of shell commands, like setting relevant environment variables.
#
# /etc/jetty.conf
# If found, and no configurations were given on the command line,
# the file will be used as this script's configuration.
# Each line in the file may contain:
# - A comment denoted by the pound (#) sign as first non-blank character.
# - The path to a regular file, which will be passed to jetty as a
# config.xml file.
# - The path to a directory. Each *.xml file in the directory will be
# passed to jetty as a config.xml file.
# - All other lines will be passed, as-is to the start.jar
#
# The files will be checked for existence before being passed to jetty.
#
# Configuration variables
#
# JAVA
# Command to invoke Java. If not set, java (from the PATH) will be used.
#
# JAVA_OPTIONS
# Extra options to pass to the JVM
#
# JETTY_HOME
# Where Jetty is installed. If not set, the script will try go
# guess it by first looking at the invocation path for the script,
# and then by looking in standard locations as $HOME/opt/jetty
# and /opt/jetty. The java system property "jetty.home" will be
# set to this value for use by configure.xml files, f.e.:
#
# <Arg><Property name="jetty.home" default="."/>/webapps/jetty.war</Arg>
#
# JETTY_BASE
# Where your Jetty base directory is. If not set, the value from
# $JETTY_HOME will be used.
#
# JETTY_ARGS
# The default arguments to pass to jetty.
# For example
# JETTY_ARGS=jetty.port=8080 jetty.spdy.port=8443 jetty.secure.port=443
#
set -e -C
readConfig()
{
echo "Reading $1.."
source "$1"
}
CONFIGS=()
if [ -f /etc/default/jetty ]; then
readConfig /etc/default/jetty
fi
if [ -z "$JETTY_HOME" ]; then
JETTY_HOME=/usr/share/jetty
fi
if [ -z "$JETTY_BASE" ]; then
JETTY_BASE="$JETTY_HOME"
fi
cd "$JETTY_BASE"
JETTY_BASE="$PWD"
if [ -z "$JETTY_CONF" ]
then
JETTY_CONF=/etc/jetty.conf
fi
if [ -f "$JETTY_CONF" ] && [ -r "$JETTY_CONF" ]
then
while read -r CONF
do
if expr "$CONF" : '#' >/dev/null ; then
continue
fi
if [ -d "$CONF" ]
then
# assume it's a directory with configure.xml files
# for example: /etc/jetty.d/
# sort the files before adding them to the list of JETTY_ARGS
for XMLFILE in "$CONF/"*.xml
do
if [ -r "$XMLFILE" ] && [ -f "$XMLFILE" ]
then
JETTY_ARGS+=("$XMLFILE")
else
echo "** WARNING: Cannot read '$XMLFILE' specified in '$JETTY_CONF'"
fi
done
else
# assume it's a command line parameter (let start.jar deal with its validity)
JETTY_ARGS+=("$CONF")
fi
done < "$JETTY_CONF"
fi
if [ -z "$JAVA" ]
then
. /usr/share/java-utils/java-functions
set_jvm
set_javacmd
JAVA="$JAVACMD"
fi
if [ -z "$JETTY_LOGS" ] && [ -d $JETTY_BASE/logs ]
then
JETTY_LOGS=/var/log/jetty/logs
fi
JAVA_OPTIONS+=("-Djetty.logs=$JETTY_LOGS")
JAVA_OPTIONS+=("-Djetty.home=$JETTY_HOME" "-Djetty.base=$JETTY_BASE")
JETTY_START="$JETTY_HOME/start.jar"
START_INI="$JETTY_BASE/start.ini"
if [ ! -f "$START_INI" ]
then
echo "Cannot find a start.ini in your JETTY_BASE directory: $JETTY_BASE" 2>&2
exit 1
fi
RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$JETTY_START" ${JETTY_ARGS[*]})
RUN_CMD=("$JAVA" ${RUN_ARGS[@]})
echo -n "Starting Jetty: "
${RUN_CMD[*]}

1764
jetty.spec

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
SHA512 (jetty-9.4.38.v20210224.tar.gz) = c713941703312f3ae34663ed8d1fcecb4ee2dc8d17927a787f38fd49d9bc7eb21de70106b52f6ed23f466adc29c85b938a7e58939c2014046adbb5e31df4963b