From 18bf6672cbde96e8498ce4bfc974af9bb4f95613 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 4 Apr 2024 14:14:41 +0100 Subject: gentoo auto-resync : 04:04:2024 - 14:14:41 --- www-servers/Manifest.gz | Bin 4702 -> 4701 bytes www-servers/tomcat/Manifest | 8 + .../tomcat/files/tomcat-10.1.20-do-not-copy.patch | 29 ++++ .../tomcat/files/tomcat-10.1.20-offline.patch | 12 ++ .../tomcat/files/tomcat-9.0.87-build.xml.patch | 30 ++++ .../tomcat/files/tomcat-9.0.87-gentoo-bnd.patch | 35 ++++ www-servers/tomcat/tomcat-10.1.20.ebuild | 176 +++++++++++++++++++++ www-servers/tomcat/tomcat-9.0.87-r2.ebuild | 169 ++++++++++++++++++++ 8 files changed, 459 insertions(+) create mode 100644 www-servers/tomcat/files/tomcat-10.1.20-do-not-copy.patch create mode 100644 www-servers/tomcat/files/tomcat-10.1.20-offline.patch create mode 100644 www-servers/tomcat/files/tomcat-9.0.87-build.xml.patch create mode 100644 www-servers/tomcat/files/tomcat-9.0.87-gentoo-bnd.patch create mode 100644 www-servers/tomcat/tomcat-10.1.20.ebuild create mode 100644 www-servers/tomcat/tomcat-9.0.87-r2.ebuild (limited to 'www-servers') diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz index d00bdde4ddf9..d9cea8964907 100644 Binary files a/www-servers/Manifest.gz and b/www-servers/Manifest.gz differ diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index da5d09377052..1723d0627d3e 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,14 +1,20 @@ +AUX tomcat-10.1.20-do-not-copy.patch 1164 BLAKE2B 4df0dc611ab7694d784adfaf132502c8e11b60f91a8dbb5e1385ed44e965f175660e9d5ed29d0e32d1b77a614d1bb41499bcc987e109d41bc1acd5876ace3c0c SHA512 e7a1f058566a44b6b88f3c968cddb7effe9301aadc199d127bf8269c847ecc6a2c4ad8d09b3d489dba49eff79e69e033e3acb729fd7337ec8bb378aa65c0bdfa +AUX tomcat-10.1.20-offline.patch 562 BLAKE2B 338f3fe3604004ab2920d67c39facb41d506a3a56c5fe7d1c11f4fa11b8391aac7b0088b46be3b4ef5ffef7590b525f09a53985abc8d753999a548ea9a2f31c5 SHA512 0f814adf5a837985b14aca22fd1e41f36eff74c6065577a5fb46df19c67cfd85aac86edbdd12f009014c9a96342baa8db74130d0020c0390e74bdfa5cd7a56e6 AUX tomcat-10.1.6-build.xml.patch 4856 BLAKE2B ed44d53877c96f06cab6354b034f88ba3382c34eaf504f10c9fcaaaf2b0c812901f3bfca8114f2aab4faa2604800f81f18932ac12065d09846f879edc1eaad96 SHA512 005d0b3fe6e14dca303bc3d5c4ab1fbf35a309be9a8ffcebd24e739301f33f202616e17973dd954bd1bd1ae89978c3147593d42ee2508c56026579d37722470b AUX tomcat-8.5.86-build.xml.patch 4164 BLAKE2B 27aba54a5a8e570a9e73ff1133dcdc43ac9536bb2cb8b2542fe3eb12c2c92145066c8d742ff35a6b320515cb91ce9a17a1b0e7954623a68326677b42547f1027 SHA512 7f924be4b979178fc92d7a3b63224c87860ae1795b2cc10e734ff8518d6ab3b15138718ed392b1fb747457d4abf5acf9b5fac13f321cd7e8dd7fe832c0e82577 AUX tomcat-8.5.95-min.java.patch 1435 BLAKE2B 016eff198e0da7a9659a96e31fd50a0da51841a44920f39eadfb87c634485db843e45ca5fca581c2fe19ac20e2b206099fa6c6820bb3502d3d5011417fe2a83e SHA512 8fa4ec05f2dcfd919abf3b0ef5b33351d22bb882bf11df43742c28ead7c8f868bfc9792f77f3b17dbd38baa5c68c60d1e4e7f4a8c2472f889592975cf45295e2 AUX tomcat-9.0.37-fix-build-rewrite.patch 448 BLAKE2B 323a726c80b04a225e47b04506969116bccda3fdddca6e00bab85a8a758b58b5461792b8419d56e3f55742218a9dd36ab11e14d7af49ba1be4c8543f1a6c1fb3 SHA512 58413426f3997af610819f55a63c161b5ae2953337fdaddd854b3f4fb239f198434731598d23858cf5911d7506387907a14c0f1cca0df5801767c1f868bf9a07 AUX tomcat-9.0.50-insufficient-ecj.patch 2747 BLAKE2B d229acd5e0e90323e75eb44e575c893759884df526a8aebb92b648ad3c15b29312153d701472d86406e4be6d7fa646b7b4c2952a01fd42a52dcc8980c6540cfe SHA512 2327b26213a507c91e9bad5a224c2a3925b97cb41a54ddd58bd901266dcb72b355f4378f5ec9911cd3ca1ba5456a98012adfb185cb7d501c4865d414b51355dc AUX tomcat-9.0.72-build.xml.patch 3794 BLAKE2B 886bf69f4c78f385249e02e1f91ed91065cd242a4b17db0b852ea6ef5561bf3c5de18a9590ef78c40296075975c92b8620a36224b8e7902dd8f61acba016e197 SHA512 ffa15a7c8ae2a11aab89f4070bf4d2d1eec636fceebedc62a7191449e8e3c5e0e2e969e600b2771762452156c479750af63fe705d20b888159fe59bf59f88b74 +AUX tomcat-9.0.87-build.xml.patch 1240 BLAKE2B 26fbfd5ba353fd3f5a02a1feb984eee7b6e5b9ed1f711e969e135e87761f0b6be5503abf93a53ecdfa7de35e00765f1c3a7e057702fe14d62bfb58cc93356b84 SHA512 b62fc4d3a0d2d1134587fe284956a4961b353c730a4084e50f4cbf1ec096a2261c8c77a58940c808e47e5c0a8cdbffdbbb74de45de0251bddff9e461a5fe450c +AUX tomcat-9.0.87-gentoo-bnd.patch 1432 BLAKE2B 07964d271be70afe13116c9ce27c956a6812f5da0237b19a1bc915ac3a0abd1e3e1ad89d59049152c1f3f24b84a45a076375f7dc6784c87ebac440b15ec5557d SHA512 210754982a5ac789aecedd9916d45190c8ca92661b9f492d40b6c4f0758c69a2d5b961150cc83573c9b7890a73fc4e8bd130a2837d6de9164fc8a18bee0e7676 AUX tomcat-instance-manager-r2.bash 6999 BLAKE2B f1c771678bd8b894ecf242d5a8fb22f5b2f0f33445a1ff158c242b5154edc4483a5707ce33a5dcee53a3106e631ad8218243d8b72a32a10cd99e9646fa54085d SHA512 c30c156cbf2b53cf8498288bacaedd48872dce52f461ff32071310b438bdb5015c1cd1d512a2905c4db01e2b22342590e1b8aeadbd44f29062606fabbb2f2fed AUX tomcat-r1.init 3200 BLAKE2B eb913d32bb8c1883e58551a25ff9516337d947c6fd2c7b449601a89a4518286d61dbca76417265289782a7a08540d8e78a3ea1cd1427d43d87e24813261c0fee SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab AUX tomcat.conf 1811 BLAKE2B a92606e113172c6f0f73e18ab8ad8796f38bd8c741bb2fd1f6c43d7682728729d0198d4150e42282c7e732750231b7cdbfb51de9b24f2ba780a22700965113c5 SHA512 0747dd2fdad6c68123425adce39f625d34924ae3e7c9d5a00361565a593047d7a4d01dee64c1ef831e5ad79b51750babaf642b0588d4b5948bbed441d53d654d DIST apache-tomcat-10.1.19-src.tar.gz 6175254 BLAKE2B 8ec0f461de2fed4642fcb20e38f637c5516d4543bebb66a7a8c9ad0d7acbd0221677d98c03021c2a766057158f9effa3dc5dda96eeed2b1cf662168f545d6223 SHA512 ee9bd20979a53f2151ac10dd8be4d4c0b82cabb60c10f33572460094a199832434b4f55aed4ab0334a2daf2795dbbfa345a55144132dbfecc7b3ab2d74999e77 DIST apache-tomcat-10.1.19-src.tar.gz.asc 833 BLAKE2B 12b92d5f42219b0fccbc3eeb004fe38c762090790da93d51423ffec07c34f3203fbbb45c670f1cf8bf992ab061d0ed8f52f622eb51163511d29567bc241f6e26 SHA512 edbeea8873b8d1b48b8a298e57ef9715dd6b912d9edf6447bfcf85945ab79db08a21b0d134926d814676f2df823e1b78184792118926220fe4ea070919a5e71c +DIST apache-tomcat-10.1.20-src.tar.gz 6187831 BLAKE2B bc664346e93270c2f89ef36ed21968698aaf99be7aafce64a19b8666d663bab17ff8a9c401fd115e20686012c268ef29f259df8d5f95e57076dfdab6047376af SHA512 b3d00a8b46e75329477aab0c710fc3ad219a13347f23ff287a034228bee9fda8f0faefe6a7cc3f58462f9d00b275cb82101d3576b4225fe768a504576a44032a +DIST apache-tomcat-10.1.20-src.tar.gz.asc 833 BLAKE2B 4084c5100da15cc1103202318ccc485304a262c4ac3f9b0f2823c6119c5c741a51936903c04078870e5fa524d2d284bb0df8001639eafda86a8eccf5e9ae62c7 SHA512 89946ad7a36e1cb77dff6309b99dbd2cfa8f2a7ff54183adeae7d052edb4fa649a5e04e98a86fe42d5813ef1bf026e8120948b6f4b13dc072de0d6992d8dea2e DIST apache-tomcat-8.5.100-src.tar.gz 6172727 BLAKE2B c56a0c02fcac8b70186edfcf9132370bdc4d57d6997821717c8c480dbee2ebdef05d87eb2fd0d25ea2a86001aae1ddf47b2bed7d2f15bd331c6aadea298e2556 SHA512 ae03d6b99ba4d7b7718c0c9040db7cdd5db3e047efa3dc8ff145b3005733285b134462e0d47ef10730aba6d5ef9f7aa9d4fbd46f1dafe0ac622ac8fc2201aea2 DIST apache-tomcat-8.5.100-src.tar.gz.asc 833 BLAKE2B 1c763b792d0259fad7d26aef6ee70ceb840fd9491e2d0492d9db5edcc20ea08b0ad38f878ccf49d662a6891f0e3a6cfd772dd6e5b9073a142093a4eab9e97ece SHA512 39d9a361e03574ea1a6f28df7148e4db8dae33a8978ee3f883169b789e37c8d91b41cbe159a26dc03013f53b5914915d5c2adafd9225f8d085c083eca1e47c1d DIST apache-tomcat-8.5.99-src.tar.gz 6162573 BLAKE2B 4443dc4865a16e60e9b9224fcd9947b36f316c4d2a81207fbb1204a1b12952275e995028eb5280a962d3488c1c43fc81bace6bb0fdf252cfb1e9025ef85da8b0 SHA512 a8aabf6d12ef89d2b908f0739392e595b3d481ceca124580323e3f3d3c26f4a39c960dcc3686efb5219bf10a7b5b55fc8c9f742a87eb975e04ed40415cab2e51 @@ -19,8 +25,10 @@ DIST apache-tomcat-9.0.87-src.tar.gz 6332438 BLAKE2B 8f4a89d3f5770abe6f60ba0dcac DIST apache-tomcat-9.0.87-src.tar.gz.asc 833 BLAKE2B 31c0266c0819a2daf6192f7feebfaf534bcdbfda72de169f8c63b017c2a686d191765ec0dd1cb1a63293d03e519747aa85281fd8041482aaf53f80f43db45875 SHA512 e765abdf4442c94422f752578d96d75b1242859bf5d19b8b08d2487f3531ef652eb4b2a4bd70eab5e5c5e83f07fb335b44dda1eec4ea9dacffbb9dfca5d145da DIST biz.aQute.bnd-7.0.0.jar 16567341 BLAKE2B 329b3b750e917ad513a1f767f63b96b1d0b10177a0f3c079bbf07e02aff77607e1f869bae09d09709d8cfef27cd802585e7f332e2a3e3f0ee1c31a4890e53fce SHA512 42b2e43f3e437c7b06f0d168eaf5ee499a4c517b1a01bec67fd6df92d01d037dd9088e0d5b013dfa1839f9dee35bf74903c1af7204712bf4aa72412e071ac503 EBUILD tomcat-10.1.19-r1.ebuild 5442 BLAKE2B 0f5cbc25167222f86fe5c8af93d5a9a04986d58f29a2c054f12d95d9f731bf7fe404851967aa54eb08c2fbe0becee1831dfd0801dd2b8950f67bdaf4e565ac97 SHA512 79d4196d097315ef04cbd31d9f1152171fb7315f8c6d9a9cb4d3b20aa148a9612416cd501e517e65d9fb94625cd909149be9895d80218ed3750c20986faabe84 +EBUILD tomcat-10.1.20.ebuild 5585 BLAKE2B bc28153393a6bbe0d09f5a407f57f284a9b245b9f51b6384850573469d972e80a50cc906f44445ef107ea339ebf29c290ef2080e4f2970040135df4e24f8d60d SHA512 8b6fb05d97e1823b5e9b602850695d4442a022f40ab863c36ae3e8192d2f530f0ce1d22c8a18a61b46687c70fe7de359b094cffce0b51a40b9d59ca295c99130 EBUILD tomcat-8.5.100.ebuild 4684 BLAKE2B f0d08a35d90ae9043022eb03375a5fc6b76a63835806287832f1393c4e173a6a8888bbd35e7acfae83d31b1ffa5f0250bd1960608f3221d94cc5ed2ec4b273a9 SHA512 ece6ea745ebc5c0231f3a4f8ed5cdd349a622fd627a98c7e5a34d98e872841b965f85d73e512d9dc863acf3bca61bb847773b0fc4bae72960e63bbc9726f72e4 EBUILD tomcat-8.5.99-r1.ebuild 4683 BLAKE2B 901e81fe850c4de79952df2625f28a778daa39c7881e361094b96962eec729ba20e9bafe7ba0f44f5f1750a1321a9f2431949da8f2d31495a547be5bba18d521 SHA512 202cf2951bcbcfa31025006b93f09e611e5c1f0693db5268d2b1eea3d3ac4ef2f25629d43fb40fa9752d1bba2d0773c85418365b38d84d8451cc2e64333ecc49 EBUILD tomcat-9.0.86-r1.ebuild 5292 BLAKE2B 995366efd1c1da549e10f80bcd231daa152c8bd75a6558e603154657964b7c0cd384bbe988b325df510a2c5978927119664b14479843369997b9c4c3f090e392 SHA512 ab71f681c9d62736a72a38443561dffd06e26eb89e1720fe6cf6da39926c476f57e23c843714d5c2341a3fd5ddb9c87c6496a88077c1350566bb3a1f739bbc68 EBUILD tomcat-9.0.87-r1.ebuild 5293 BLAKE2B ae7e9c849f14983b68da99c3f5f259b84b30bee685a89316230b46964a2359d0e03572bc19da3bd60f1778dd01d9be6bab5e4577266130a670afc988983ad323 SHA512 d983d899a0b1221bf8b5310d68598fcca2154b1dd488183df8970f4933e454efe923bf515caabb89a82abcc4fcf65e8b9c5410a58ca29267db71dae3115d161f +EBUILD tomcat-9.0.87-r2.ebuild 5131 BLAKE2B 217f177c6f573140e6e277cfe0c0ed5936700bfbfb168de6b11fe5abc0a8e38b40625879c220be2b7b34c56deaa38a3887530e33b4eb2780bb82f0c2ed2a104e SHA512 4cdfee0bcd71a9eae60dc7ce07e38f5913b8db9b354bd6560f365753d428bf4772b5ce118da4fb6ff63faddaa0806aeabc48c80bb1b95499b906e350119fcc0d MISC metadata.xml 699 BLAKE2B 66aff1137e5d4ad92749176a5375c1c27c1e6cde936e05ce904d965eb71a985c421235917742d4065765e1ebf9f9e3faa51c3de109a9e5a169000b4263c3cd97 SHA512 b50874d1e741835bf8cb839517241465018254eba1ddb0e691f2b5b188eca97dd27394c29d2082654049d9ee0898c1e5e4e625666cf8abe029b8e6085122d9a0 diff --git a/www-servers/tomcat/files/tomcat-10.1.20-do-not-copy.patch b/www-servers/tomcat/files/tomcat-10.1.20-do-not-copy.patch new file mode 100644 index 000000000000..ade8527d11f1 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-10.1.20-do-not-copy.patch @@ -0,0 +1,29 @@ +--- a/build.xml ++++ b/build.xml +# + +# + +# + + +@@ -1512,7 +1511,6 @@ + + + +- + + + +@@ -2358,8 +2356,6 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. + + + +- +- + + + diff --git a/www-servers/tomcat/files/tomcat-9.0.87-gentoo-bnd.patch b/www-servers/tomcat/files/tomcat-9.0.87-gentoo-bnd.patch new file mode 100644 index 000000000000..1d9ef0b0d0e8 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-9.0.87-gentoo-bnd.patch @@ -0,0 +1,35 @@ +Gentoo's dev-java/bnd is unbundled. We're adding the parts here: +--- a/build.xml ++++ b/build.xml +@@ -225,7 +225,16 @@ + + + ++ + ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -3924,6 +3933,14 @@ Read the Building page on the Apache Tomcat documentation site for details on ho + + + ++ ++ ++ ++ ++ ++ ++ ++ + + + diff --git a/www-servers/tomcat/tomcat-10.1.20.ebuild b/www-servers/tomcat/tomcat-10.1.20.ebuild new file mode 100644 index 000000000000..e3d7f6a4aa61 --- /dev/null +++ b/www-servers/tomcat/tomcat-10.1.20.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2024 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 verify-sig + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-6.0/JSP-3.1/EL-5.0/WebSocket-2.1/JASPIC-3.0 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-10/v${PV}/src/${MY_P}.tar.gz + verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz.asc )" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="10.1" +KEYWORDS="~amd64 ~arm ~arm64 ~amd64-linux" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.27" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + >=dev-java/jakartaee-migration-1.0.7-r2:0 + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-11:*" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-1.10.14-r3:0 + dev-java/bnd-annotation:0 + dev-java/bnd-ant:0 + dev-java/bnd-util:0 + dev-java/bndlib:0 + dev-java/libg:0 + dev-java/osgi-cmpn:8 + dev-java/osgi-core:0 + dev-java/slf4j-api:0 + >=virtual/jdk-17:* + test? ( + >=dev-java/ant-1.10.14-r3:0[junit] + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +PATCHES=( + "${FILESDIR}/tomcat-10.1.20-do-not-copy.patch" + "${FILESDIR}/tomcat-10.1.20-offline.patch" + "${FILESDIR}/tomcat-9.0.87-gentoo-bnd.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + find -name '*.jar' -type f -delete -print || die + + cat > build.properties <<-EOF || die + execute.download=false + exist=true # skip target="downloadfile-2" + ant.jar=$(java-pkg_getjar --build-only ant ant.jar) + bnd-annotation.jar=$(java-pkg_getjars --build-only bnd-annotation) + bnd-ant.jar=$(java-pkg_getjars --build-only bnd-ant) + bnd-util.jar=$(java-pkg_getjars --build-only bnd-util) + bnd.jar=$(java-pkg_getjars --build-only bnd) + bndlib.jar=$(java-pkg_getjars --build-only bndlib) + jaxrpc-lib.jar=$(java-pkg_getjars --build-only jax-rpc-api) + jdt.jar=$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT}) + libg.jar=$(java-pkg_getjars --build-only libg) + migration-lib.jar=$(java-pkg_getjars jakartaee-migration) + osgi-cmpn.jar=$(java-pkg_getjars --build-only osgi-cmpn-8) + osgi-core.jar=$(java-pkg_getjars --build-only osgi-core) + slf4j-api.jar=$(java-pkg_getjars --build-only slf4j-api) + wsdl4j-lib.jar=$(java-pkg_getjars wsdl4j) + EOF + + # 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 +} + +EANT_BUILD_TARGET="deploy" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + LC_ALL=C 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 ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + 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="$(pwgen -s -B 15 1)" + 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() { + einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:" + einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "Please note that since version 10 the primary package for all implemented APIs" + ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code" + ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later." + + 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." +} diff --git a/www-servers/tomcat/tomcat-9.0.87-r2.ebuild b/www-servers/tomcat/tomcat-9.0.87-r2.ebuild new file mode 100644 index 000000000000..6a5810add4af --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.87-r2.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2024 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 verify-sig + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz + verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz.asc )" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="9" +KEYWORDS="~amd64 ~arm ~arm64 ~amd64-linux ~x86-linux" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.20" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-1.8:*" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-1.10.14-r3:0 + dev-java/bnd-annotation:0 + dev-java/bnd-ant:0 + dev-java/bnd-util:0 + dev-java/bndlib:0 + dev-java/libg:0 + dev-java/osgi-cmpn:8 + dev-java/osgi-core:0 + dev-java/slf4j-api:0 + >=virtual/jdk-17:* + test? ( + >=dev-java/ant-1.10.14-r3:0[junit] + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +PATCHES=( + "${FILESDIR}/tomcat-9.0.87-build.xml.patch" + "${FILESDIR}/tomcat-9.0.87-gentoo-bnd.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean + + cat > build.properties <<-EOF || die + execute.download=false + exist=true # skip target="downloadfile-2" + ant.jar=$(java-pkg_getjar --build-only ant ant.jar) + bnd-annotation.jar=$(java-pkg_getjars --build-only bnd-annotation) + bnd-ant.jar=$(java-pkg_getjars --build-only bnd-ant) + bnd-util.jar=$(java-pkg_getjars --build-only bnd-util) + bnd.jar=$(java-pkg_getjars --build-only bnd) + bndlib.jar=$(java-pkg_getjars --build-only bndlib) + jaxrpc-lib.jar=$(java-pkg_getjars --build-only jax-rpc-api) + jdt.jar=$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT}) + libg.jar=$(java-pkg_getjars --build-only libg) + osgi-cmpn.jar=$(java-pkg_getjars --build-only osgi-cmpn-8) + osgi-core.jar=$(java-pkg_getjars --build-only osgi-core) + slf4j-api.jar=$(java-pkg_getjars --build-only slf4j-api) + wsdl4j-lib.jar=$(java-pkg_getjars wsdl4j) + EOF + + # 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 +} + +EANT_BUILD_TARGET="deploy" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + LC_ALL=C 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 ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + 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="$(pwgen -s -B 15 1)" + 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() { + einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:" + einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + 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." +} -- cgit v1.2.3