www-servers/tomcat: dropped tomcat 7 (eol in mid 2021)

Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
Miroslav Šulc
2022-09-18 13:20:28 +02:00
parent 6d061129fa
commit a5516ff908
5 changed files with 0 additions and 547 deletions

View File

@@ -1,5 +1,4 @@
DIST apache-tomcat-10.0.23-src.tar.gz 6136614 BLAKE2B 4eaf963187b9a754ed459d7f85e6f7d329927b949bb4a390a602cdc6651aa037aeec559c511ddb9880b6ec4d7cd97b96d82da341509370e412e1b21b799d8c2e SHA512 19ec026bae75318e9ffbe2e619ad2e12ec116382ea88a1064696275afb3fd13e6f08efe497dde79689bfc828f76e27d114ad3a9284b79c8d956a6a85bdac6360
DIST apache-tomcat-7.0.109-src.tar.gz 5314401 BLAKE2B 56583caea6879bf8ca5cc02a886de3d7af413032f88d367653e709dc1c8f590e78620c788317bbff4b6e65dd3e242cc26863164ac8e7c87334a22636f3ed0703 SHA512 ecf9c0bee0e3e1aa24f299fe633705c5a2f6aa264d9e4968cfc96aa5d0a425c2b0ff07765a8b6c67221766733bdfaed6e6c6377a8d0870d889e7063ce90a46ce
DIST apache-tomcat-8.5.82-src.tar.gz 6011553 BLAKE2B ea34c0485877ace8c84144f0e75f370c0ac461b5b725d97a07e27014b7a14b1ab88fad4230d4fae60190d7bff3836f691615b57b9f085797477acc69560a57ce SHA512 3e0a0a808fb78493930ce8832731eba4ab3cc440387c3b5226ff6e4ac2faf5fd70eff1560d840d34f14a8acfd7e60fc8b7f638f3dbe0c0ed4569dc4271a9c3f2
DIST apache-tomcat-9.0.65-src.tar.gz 6195265 BLAKE2B 13ca956b58e9f1831700f67d1fa8883f6471ab6b700b2af169bf284552658a4e9ad4130451b36976af4dd366cc987e228e0b0f98e688cccf577c626dfc78aae7 SHA512 3ff344370cc36f5bed389ed198054783a4f5bc86476a751cda280618457a06bae38c1e764b0c110c2f68efe2d34243a4e24596e8b90e8fbd171bf584a22fd3bc
DIST biz.aQute.bnd-6.2.0.jar 16669843 BLAKE2B 290aec26cb4e2248488038e6cb0919728ca0cc802b16de3f390d549d135bc1177053b75e500b9f74e47c996d20b231404d57965a3f412662730cc4c938d90a4f SHA512 ad51dc9a04fc117cd01b604559989dd7c7db776761ef6000eccdcfdab825dedc615297af60c778044e46867972a74840d90eebea9b0ff826bdbd10f4d2ec5d6f

View File

@@ -1,163 +0,0 @@
diff --git a/build.xml b/build.xml
index dbad7cb..101bc57 100644
--- a/build.xml
+++ b/build.xml
@@ -715,12 +715,14 @@
</fileset>
</copy>
<!-- Copy JSP Schemas and DTDs to be packed into servlet-api.jar -->
+<!--
<copy todir="${tomcat.classes}/javax/servlet/resources" encoding="ISO-8859-1">
<fileset dir="${tomcat.classes}/javax/servlet/jsp/resources">
<include name="*" />
<exclude name="jspxml*" />
</fileset>
</copy>
+-->
<!-- Convert the message files from UTF-8 to ASCII. This can be removed
after upgrading to Java 9+ as the minimum JRE and specifying the encoding
@@ -776,26 +778,32 @@
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
<!-- Servlet 3.0 Implementation JAR File -->
+<!--
<jarIt jarfile="${servlet-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.servlet-api"
manifest="${tomcat.manifests}/servlet-api.jar.manifest"
notice="${tomcat.manifests}/servlet-api.jar.notice"
license="${tomcat.manifests}/servlet-api.jar.license" />
+-->
<!-- JSP 2.2 Implementation JAR File -->
+<!--
<jarIt jarfile="${jsp-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.jsp-api"
manifest="${tomcat.manifests}/jsp-api.jar.manifest"
notice="${tomcat.manifests}/jsp-api.jar.notice"
license="${tomcat.manifests}/jsp-api.jar.license" />
+-->
<!-- JSP 2.2 EL Implementation JAR File -->
+<!--
<jarIt jarfile="${el-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.el-api"
manifest="${tomcat.manifests}/el-api.jar.manifest" />
+-->
<!-- Bootstrap JAR File -->
<jarIt jarfile="${bootstrap.jar}"
@@ -854,9 +862,9 @@
filesId="files.jasper-el" />
<!-- Re-packaged Apache Commons DBCP 1-->
- <jarIt jarfile="${tomcat-dbcp.jar}"
+<!-- <jarIt jarfile="${tomcat-dbcp.jar}"
filesDir="${tomcat.classes}"
- filesId="files.tomcat-dbcp" />
+ filesId="files.tomcat-dbcp" /> -->
<!-- i18n JARs -->
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-de.jar"
@@ -1087,9 +1095,9 @@
<target name="deploy" depends="package,build-docs,compile-webapp-examples"
description="Default. Builds a working Tomcat instance">
-
+<!--
<copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
-
+-->
<!-- Copy scripts -->
<copy todir="${tomcat.build}/bin">
<fileset dir="bin">
@@ -1149,7 +1157,7 @@
<exclude name="${jdt.jar.filename}"/>
</fileset>
</delete>
- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
+<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> -->
<!-- Add sources for examples -->
<antcall target="examples-sources" />
@@ -1839,7 +1847,7 @@
<target name="extras-webservices-prepare"
depends="extras-prepare"
- description="Prepare to build web services extras package">
+ description="Prepare to build web services extras package" unless="noget">
<antcall target="downloadfile">
<param name="sourcefile" value="${jaxrpc-lib.loc}"/>
@@ -2034,11 +2042,12 @@
</copy>
<!-- Source bundles for native components -->
+<!--
<copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz"
file="${tomcat-native.tar.gz}" />
<copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz"
file="${commons-daemon.native.src.tgz}" />
-
+-->
<!-- platform README files -->
<echo append="false" file="${tomcat.dist}/bin/x64/README">
Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
@@ -2070,6 +2079,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
+<!--
<javadoc packagenames="javax.servlet.*"
excludepackagenames="javax.servlet.jsp.*"
sourcepath="${tomcat.dist}/src/java"
@@ -2137,6 +2147,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<path location="${ant.core.lib}"/>
</classpath>
</javadoc>
+-->
<javadoc packagenames="javax.websocket.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/websocketapi"
@@ -2181,9 +2192,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<path location="${ant.core.lib}"/>
</classpath>
<link href="../annotationapi"/>
+<!--
<link href="../servletapi"/>
<link href="../jspapi"/>
<link href="../elapi"/>
+-->
<link href="../websocketapi"/>
<link href="https://docs.oracle.com/javase/7/docs/api/"/>
<link href="https://docs.oracle.com/javaee/6/api/"/>
@@ -2889,7 +2902,7 @@ skip.installer property in build.properties" />
</target>
<target name="download-compile"
- description="Download components necessary to compile" >
+ description="Download components necessary to compile" unless="noget" >
<!-- Download Commons Daemon -->
<antcall target="downloadgz-2">
@@ -2925,7 +2938,7 @@ skip.installer property in build.properties" />
</target>
<target name="download-test-compile"
- description="Download additional components for the tests" >
+ description="Download additional components for the tests" unless="noget">
<antcall target="downloadfile">
<param name="sourcefile" value="${junit.loc}"/>
@@ -2989,7 +3002,7 @@ skip.installer property in build.properties" />
</target>
<target name="download-dist"
- description="Download additional components for a distribution" >
+ description="Download additional components for a distribution" unless="noget">
<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${tomcat-native.loc.1}"/>

View File

@@ -1,240 +0,0 @@
#!/bin/bash
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author: Ralph Sennhauser <sera@gentoo.org>
die() {
echo "${@}"
exit 1
}
usage() {
cat <<EOL
Usage: ${BASH_SOURCE} <--create|--remove|--help> [--suffix s][--user u][--group g]
Options:
--help:
show this text.
--create:
create a new instance
--remove:
remove an existing instance.
--suffix SUFFIX:
a suffix for this instance. the suffix may not collide with an already
existing instance, defaults to empty.
--user USER:
the user for which to configure this instance for. The user needs to
exist already. defaults to tomcat.
--group GROUP:
the group for which to configure this instance for. The group needs to
exist already. defaults to tomcat.
Examples:
${BASH_SOURCE} --create --suffix testing --user tacmot --group tacmot
${BASH_SOURCE} --remove --suffix testing
EOL
}
parse_argv() {
action="not specified"
instance_name="tomcat-@SLOT@"
instance_user="tomcat"
instance_group="tomcat"
while [[ -n $1 ]]; do
case $1 in
--help)
usage
exit 0;;
--suffix)
instance_name+="-$2"
shift; shift;;
--user)
instance_user="$2"
shift; shift;;
--group)
instance_group="$2"
shift; shift;;
--create)
action=create
shift;;
--remove)
action=remove
shift;;
--backup)
action=backup
shift;;
--restore)
action=restore
shift;;
--update)
action=update
shift;;
*)
echo "Invalid option '$1'"
usage
exit 2;;
esac
done
tomcat_home="/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@"
instance_base="/@GENTOO_PORTAGE_EPREFIX@var/lib/${instance_name}"
instance_conf="/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}"
instance_logs="/@GENTOO_PORTAGE_EPREFIX@var/log/${instance_name}"
instance_temp="/@GENTOO_PORTAGE_EPREFIX@var/tmp/${instance_name}"
all_targets=(
"${instance_base}"
"${instance_logs}"
"${instance_temp}"
"/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}"
"/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}"
"/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}"
)
}
test_can_deploy() {
local no_deploy target
for target in "${all_targets[@]}"; do
if [[ -e "${target}" ]]; then
echo "Error: '${target}' already exists."
no_deploy=yes
fi
done
if [[ -n "${no_deploy}" ]]; then
cat <<-EOL
To protect an existing installation no new instance was deployed. You can use
'${BASH_SOURCE} --remove'
to remove an existing instance first or run
'${BASH_SOURCE} --create --sufix <instance_suffix>'
to deploy an instance under a different name
EOL
usage
exit 1
fi
if ! getent passwd | cut -d: -f1 | grep -Fx "${instance_user}" > /dev/null; then
echo "Error: user '${instance_user}' doesn't exist."
exit 1
fi
if ! getent group | cut -d: -f1 | grep -Fx "${instance_group}" > /dev/null; then
echo "Error: group '${instance_group}' doesn't exist."
exit 1
fi
}
deploy_instance() {
test_can_deploy
mkdir -p "${instance_base}"/{work,webapps} || die
mkdir -p "${instance_logs}" || die
mkdir -p "${instance_temp}" || die
cp -r "${tomcat_home}"/webapps/ROOT "${instance_base}"/webapps || die
chown -R "${instance_user}":"${instance_group}" \
"${instance_base}" "${instance_logs}" "${instance_temp}" || die
find "${instance_base}"/webapps -type d -exec chmod 750 {} + || die
find "${instance_base}"/webapps -type f -exec chmod 640 {} + || die
# initial config #
cp -r "${tomcat_home}"/conf "${instance_conf}" || die
sed -i -e "s|\${catalina.base}/logs|${instance_logs}|" \
"${instance_conf}"/logging.properties || die
sed -i -e "s|directory=\"logs\"|directory=\"${instance_logs}\"|" \
"${instance_conf}"/server.xml || die
mkdir -p "${instance_conf}"/Catalina/localhost || die
cat > "${instance_conf}"/Catalina/localhost/host-manager.xml <<-'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/webapps/host-manager"
antiResourceLocking="false" privileged="true" />
EOF
cat > "${instance_conf}"/Catalina/localhost/manager.xml <<-'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/webapps/manager"
antiResourceLocking="false" privileged="true" />
EOF
if [[ -d "${tomcat_home}"/webapps/docs ]]; then
cat > "${instance_conf}"/Catalina/localhost/docs.xml <<-'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/webapps/docs" />
EOF
fi
if [[ -d "${tomcat_home}"/webapps/examples ]]; then
cat > "${instance_conf}"/Catalina/localhost/examples.xml <<-'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="${catalina.home}/webapps/examples" />
EOF
fi
chown -R "${instance_user}":"${instance_group}" "${instance_conf}" || die
find "${instance_conf}" -type d -exec chmod 750 {} + || die
find "${instance_conf}" -type f -exec chmod 640 {} + || die
# rc script #
cp "${tomcat_home}"/gentoo/tomcat.init \
"/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" || die
sed -e "s|@INSTANCE_NAME@|${instance_name}|g" \
-e "s|@INSTANCE_USER@|${instance_user}|g" \
-e "s|@INSTANCE_GROUP@|${instance_group}|g" \
"${tomcat_home}"/gentoo/tomcat.conf \
> "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" || die
# some symlinks for tomcat and netbeans #
ln -s "${instance_conf}" "${instance_base}"/conf || die
ln -s "${instance_temp}" "${instance_base}"/temp || die
# a note to update the default configuration #
cat <<-EOL
Successfully created instance '${instance_name}'
It's strongly recommended for production systems to go carefully through the
configuration files at '${instance_conf}'.
The generated initial configuration is close to upstreams default which
favours the demo aspect over hardening.
EOL
}
remove_instance() {
echo "The following files will be removed permanently:"
local target; for target in "${all_targets[@]}"; do
find ${target}
done
echo "Type 'yes' to continue"
read
if [[ ${REPLY} == yes ]]; then
rm -rv "${all_targets[@]}"
else
echo "Aborting as requested ..."
fi
}
parse_argv "$@"
if [[ ${action} == create ]]; then
deploy_instance
elif [[ ${action} == remove ]]; then
remove_instance
elif [[ ${action} == "not specified" ]]; then
echo "No action specified!"
usage
exit 1
else
echo "${action} not yet implemented!"
usage
exit 1
fi

View File

@@ -13,6 +13,5 @@
</longdescription>
<use>
<flag name="extra-webapps">Build also the docs and examples webapp</flag>
<flag name="websockets">Builds websockets api and implementation (requires java 7)</flag>
</use>
</pkgmetadata>

View File

@@ -1,142 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
JAVA_PKG_IUSE="doc source test"
inherit java-pkg-2 java-ant-2 prefix
MY_P="apache-${P}-src"
DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container"
HOMEPAGE="https://tomcat.apache.org/"
SRC_URI="https://archive.apache.org/dist/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="7"
KEYWORDS="amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
IUSE="extra-webapps websockets"
RESTRICT="test" # can we run them on a production system?
ECJ_SLOT="4.15"
SAPI_SLOT="3.0"
COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}"
RDEPEND="${COMMON_DEP}
acct-group/tomcat
acct-user/tomcat
virtual/jre"
DEPEND="${COMMON_DEP}
virtual/jdk:1.8
test? ( dev-java/ant-junit:0 )"
S=${WORKDIR}/${MY_P}
src_prepare() {
default
# Remove bundled servlet-api
rm -rv java/javax/{el,servlet} || die
java-pkg_clean
eapply "${FILESDIR}/${PN}-7.0.99-build.xml.patch"
# For use of catalina.sh in netbeans
sed -i -e "/^# ----- Execute The Requested Command/ a\
CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \
bin/catalina.sh || die
java-pkg-2_src_prepare
}
JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_BUILD_TARGET="deploy"
EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
EANT_NEEDS_TOOLS="true"
EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
# revisions of the scripts
IM_REV="-r1"
INIT_REV="-r1"
src_compile() {
use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}"
EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
java-pkg-2_src_compile
}
src_test() {
java-pkg-2_src_test
}
src_install() {
local dest="/usr/share/${PN}-${SLOT}"
java-pkg_jarinto "${dest}"/bin
java-pkg_dojar output/build/bin/*.jar
exeinto "${dest}"/bin
doexe output/build/bin/*.sh
java-pkg_jarinto "${dest}"/lib
java-pkg_dojar output/build/lib/*.jar
dodoc RELEASE-NOTES RUNNING.txt
use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
use source && java-pkg_dosrc java/*
### Webapps ###
insinto "${dest}"/webapps
doins -r output/build/webapps/{host-manager,manager,ROOT}
use extra-webapps && doins -r output/build/webapps/{docs,examples}
### Config ###
# create "logs" directory in $CATALINA_BASE
# and set correct perms, see #458890
dodir "${dest}"/logs
fperms 0750 "${dest}"/logs
# replace the default pw with a random one, see #92281
local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
# prepend gentoo.classpath to common.loader, see #453212
sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
insinto "${dest}"
doins -r output/build/conf
### rc ###
cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
insinto "${dest}"/gentoo
doins "${T}"/tomcat.conf
exeinto "${dest}"/gentoo
newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
}
pkg_postinst() {
elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
elog "To manage Tomcat instances, run:"
elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
}