1 |
commit: 206b7c5a6762c4bd044c83c5e0a98633fe247407 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 21 11:28:09 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 21 11:28:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=206b7c5a |
7 |
|
8 |
www-servers/tomcat: bump to 10.0.11 |
9 |
|
10 |
Package-Manager: Portage-3.0.23, Repoman-3.0.3 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
www-servers/tomcat/Manifest | 1 + |
14 |
www-servers/tomcat/tomcat-10.0.11.ebuild | 192 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 193 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index e60fe95d06c..dd8b8f8dbd6 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST apache-tomcat-10.0.10-src.tar.gz 6032784 BLAKE2B f73d2b0d549d773a13a8adcc76a87713f0f146d80bca2d2ba633ce3145d69505fb7172eac0f04bb6d10fd9f9abb0cbbca7fb6d5b4608e2f6f07df88e5e661d70 SHA512 6241a62d01dcbf37e4745803c77dfbc4307d43c884e8e4c78c33b10d45a9b42e0103ef94acaff19790fa4876bdb369e9aca4974a4dae2622cedfa56b3fbe0658 |
23 |
+DIST apache-tomcat-10.0.11-src.tar.gz 6065513 BLAKE2B e734a3f5086d94dd49886a1fc7e1fddc1b500240837ccba945dc0d10ad5aaaf580d1b9e2c78aca8af474c4312d723bc4095ec8e90a14f0bd7f292b9333bc554f SHA512 c06f4069c1664483f176231dd9fe132c89e7c66f845d82b41d6c962ea2d2ba2d3c6004b6a875388925ba295761f533ced416fc91261ecb97d11219a87940db2b |
24 |
DIST apache-tomcat-10.0.8-src.tar.gz 6010420 BLAKE2B 86390f04147d3082fbc9f15704121cbd6aa8ba756b4bc03e64a49aae3dca96c6b503949da0096f8ddf143bdeb1320b7601008683ce94bdad9ef235e1f73ad948 SHA512 c264be4cb29d87c95918d2723ab20bc7e2cb5149cb366cca348c6cd311b0f38ac500ed6b4756b20245a446ead50e7208f77093d6081563ed76d6691abfcbe14c |
25 |
DIST apache-tomcat-7.0.109-src.tar.gz 5314401 BLAKE2B 56583caea6879bf8ca5cc02a886de3d7af413032f88d367653e709dc1c8f590e78620c788317bbff4b6e65dd3e242cc26863164ac8e7c87334a22636f3ed0703 SHA512 ecf9c0bee0e3e1aa24f299fe633705c5a2f6aa264d9e4968cfc96aa5d0a425c2b0ff07765a8b6c67221766733bdfaed6e6c6377a8d0870d889e7063ce90a46ce |
26 |
DIST apache-tomcat-8.5.69-src.tar.gz 5916996 BLAKE2B 4a3ef958b6bb0089149877c25baaa2c1a0bcee473c0942b419c5c1d7071dcae4f8a6e6f1805efdee1201042feedc64e213fffbcdb35cf2b7f9a67217b8dcad48 SHA512 467dd38bd77d8b5ac6fa2acf9f6ee71d04467a3182647757fa47f5d1d9576c96e5061db61ba08b04318f1db9ee4f2bcac7b45f1f9f4f81cd1807a57483dd7bbb |
27 |
|
28 |
diff --git a/www-servers/tomcat/tomcat-10.0.11.ebuild b/www-servers/tomcat/tomcat-10.0.11.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..0b16b403fb0 |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/tomcat-10.0.11.ebuild |
33 |
@@ -0,0 +1,192 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+JAVA_PKG_IUSE="doc source test" |
40 |
+ |
41 |
+inherit java-pkg-2 java-ant-2 prefix |
42 |
+ |
43 |
+MY_P="apache-${PN}-${PV}-src" |
44 |
+ |
45 |
+# Currently we bundle binary versions of bnd.jar and bndlib.jar |
46 |
+# See bugs #203080 and #676116 |
47 |
+BND_VERSION="5.1.1" |
48 |
+BND="biz.aQute.bnd-${BND_VERSION}.jar" |
49 |
+BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" |
50 |
+ |
51 |
+DESCRIPTION="Tomcat Servlet-5.0/JSP-3.0/EL-4.0/WebSocket-2.0/JASIC-2.0 Container" |
52 |
+HOMEPAGE="https://tomcat.apache.org/" |
53 |
+SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz |
54 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} |
55 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" |
56 |
+ |
57 |
+LICENSE="Apache-2.0" |
58 |
+SLOT="10" |
59 |
+KEYWORDS="~amd64 ~amd64-linux" |
60 |
+IUSE="extra-webapps" |
61 |
+ |
62 |
+RESTRICT="test" # can we run them on a production system? |
63 |
+ |
64 |
+ECJ_SLOT="4.15" |
65 |
+SAPI_SLOT="5.0" |
66 |
+ |
67 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
68 |
+ dev-java/glassfish-xmlrpc-api:0 |
69 |
+ dev-java/jakartaee-migration:0 |
70 |
+ ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} |
71 |
+ dev-java/wsdl4j:0" |
72 |
+RDEPEND="${COMMON_DEP} |
73 |
+ acct-group/tomcat |
74 |
+ acct-user/tomcat |
75 |
+ virtual/jre" |
76 |
+DEPEND="${COMMON_DEP} |
77 |
+ app-admin/pwgen |
78 |
+ dev-java/ant-core |
79 |
+ virtual/jdk:1.8 |
80 |
+ test? ( |
81 |
+ dev-java/ant-junit:0 |
82 |
+ dev-java/easymock:3.2 |
83 |
+ )" |
84 |
+ |
85 |
+S=${WORKDIR}/${MY_P} |
86 |
+ |
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/${PN}-9.0.50-insufficient-ecj.patch" |
89 |
+) |
90 |
+ |
91 |
+BND_HOME="${S}/tomcat-build-libs/bnd" |
92 |
+BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" |
93 |
+BND_JAR="${BND_HOME}/${BND}" |
94 |
+BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" |
95 |
+ |
96 |
+src_unpack() { |
97 |
+ unpack ${MY_P}.tar.gz |
98 |
+ |
99 |
+ mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" |
100 |
+ ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" |
101 |
+ ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" |
102 |
+} |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ default |
106 |
+ |
107 |
+ find -name '*.jar' -type f -delete -print || die |
108 |
+ |
109 |
+ # Remove bundled servlet-api |
110 |
+ rm -rv java/jakarta/{el,servlet} || die |
111 |
+ |
112 |
+ eapply "${FILESDIR}/${PN}-10.0.4-build.xml.patch" |
113 |
+ |
114 |
+ # For use of catalina.sh in netbeans |
115 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
116 |
+ CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ |
117 |
+ bin/catalina.sh || die |
118 |
+ |
119 |
+ java-pkg-2_src_prepare |
120 |
+} |
121 |
+ |
122 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
123 |
+ |
124 |
+EANT_BUILD_TARGET="deploy" |
125 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},jakartaee-migration,tomcat-servlet-api-${SAPI_SLOT},wsdl4j" |
126 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
127 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
128 |
+EANT_NEEDS_TOOLS="true" |
129 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" |
130 |
+ |
131 |
+# revisions of the scripts |
132 |
+IM_REV="-r2" |
133 |
+INIT_REV="-r1" |
134 |
+ |
135 |
+src_configure() { |
136 |
+ java-ant-2_src_configure |
137 |
+ |
138 |
+ eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch" |
139 |
+} |
140 |
+ |
141 |
+src_compile() { |
142 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only glassfish-xmlrpc-api)" |
143 |
+ LC_ALL=C java-pkg-2_src_compile |
144 |
+} |
145 |
+ |
146 |
+src_test() { |
147 |
+ java-pkg-2_src_test |
148 |
+} |
149 |
+ |
150 |
+src_install() { |
151 |
+ local dest="/usr/share/${PN}-${SLOT}" |
152 |
+ |
153 |
+ java-pkg_jarinto "${dest}"/bin |
154 |
+ java-pkg_dojar output/build/bin/*.jar |
155 |
+ exeinto "${dest}"/bin |
156 |
+ doexe output/build/bin/*.sh |
157 |
+ |
158 |
+ java-pkg_jarinto "${dest}"/lib |
159 |
+ java-pkg_dojar output/build/lib/*.jar |
160 |
+ |
161 |
+ dodoc RELEASE-NOTES RUNNING.txt |
162 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
163 |
+ use source && java-pkg_dosrc java/* |
164 |
+ |
165 |
+ ### Webapps ### |
166 |
+ |
167 |
+ # add missing docBase |
168 |
+ local apps="host-manager manager" |
169 |
+ for app in ${apps}; do |
170 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
171 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
172 |
+ done |
173 |
+ |
174 |
+ insinto "${dest}"/webapps |
175 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
176 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
177 |
+ |
178 |
+ ### Config ### |
179 |
+ |
180 |
+ # create "logs" directory in $CATALINA_BASE |
181 |
+ # and set correct perms, see #458890 |
182 |
+ dodir "${dest}"/logs |
183 |
+ fperms 0750 "${dest}"/logs |
184 |
+ |
185 |
+ # replace the default pw with a random one, see #92281 |
186 |
+ local randpw="$(pwgen -s -B 15 1)" |
187 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
188 |
+ |
189 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
190 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
191 |
+ |
192 |
+ insinto "${dest}" |
193 |
+ doins -r output/build/conf |
194 |
+ |
195 |
+ ### rc ### |
196 |
+ |
197 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
198 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
199 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
200 |
+ |
201 |
+ insinto "${dest}"/gentoo |
202 |
+ doins "${T}"/tomcat.conf |
203 |
+ exeinto "${dest}"/gentoo |
204 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
205 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
206 |
+} |
207 |
+ |
208 |
+pkg_postinst() { |
209 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
210 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
211 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
212 |
+ |
213 |
+ elog "To manage Tomcat instances, run:" |
214 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
215 |
+ |
216 |
+ ewarn "Please note that since version 10 the primary package for all implemented APIs" |
217 |
+ ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code" |
218 |
+ ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later." |
219 |
+ |
220 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
221 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
222 |
+ |
223 |
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
224 |
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
225 |
+} |