1 |
commit: 8acb18d5ebcfe55ddfd6f8cd7ee45415da2ef6b6 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 17 14:21:10 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 17 14:21:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8acb18d5 |
7 |
|
8 |
www-servers/tomcat: bump to 10.0.7 |
9 |
|
10 |
Package-Manager: Portage-3.0.20, 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.7.ebuild | 192 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 193 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index b2120418295..a16ae46662a 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST apache-tomcat-10.0.6-src.tar.gz 5987333 BLAKE2B b955d3708555c5530ebccaf9c6e8c344a679666bdd45361980d722d2cb48b618a03dc2514f973c182c2c1eaf96852e5a5eadad89575ee1bf524213211191a6a4 SHA512 229e8767b8f53f6b5c0e28f13a1daffd6fb8307a5239ae28ee1522087d881e4c9e3f1a0d39bfc852d5e54166dbb8a0a1577210a325845815c7281c4babc0b100 |
23 |
+DIST apache-tomcat-10.0.7-src.tar.gz 6001147 BLAKE2B f1aee4748d404d02188369603824dcc97765e907cfc3872f54b1859ae950a9475d72862caa2179ac39e4cbdb8c23424f89c4cbbfff8a2e079a842b0054257009 SHA512 395b0280666c6779f6378cb87e9abdb637a823e7f89452b7324329f4c0a1fe0b315275dca5df2f80a38c6f1ef98541bd1ea762df7af9cb15e4466c3b89e4e7a8 |
24 |
DIST apache-tomcat-7.0.109-src.tar.gz 5314401 BLAKE2B 56583caea6879bf8ca5cc02a886de3d7af413032f88d367653e709dc1c8f590e78620c788317bbff4b6e65dd3e242cc26863164ac8e7c87334a22636f3ed0703 SHA512 ecf9c0bee0e3e1aa24f299fe633705c5a2f6aa264d9e4968cfc96aa5d0a425c2b0ff07765a8b6c67221766733bdfaed6e6c6377a8d0870d889e7063ce90a46ce |
25 |
DIST apache-tomcat-8.5.66-src.tar.gz 5879748 BLAKE2B bfef20872bd19ffa2bb34b98a1da875fdd5f232e681458f0aef093b7eecd63a95c1cd26130f54251f149249e639d0da2577770e43314d2a86b8ee9b48b675f0d SHA512 322fda683197898f873feb375791092d33c90aac08a54889fabab0f59ecbc7b27784f027b37008c6893fdbf8ca7973b73268f42673d7e8df762419b5a536593b |
26 |
DIST apache-tomcat-8.5.68-src.tar.gz 5907026 BLAKE2B 2312edb94f98ee98b594325fbc32521776e9cadc4422a3a46f3651f1fee072a99c5f6874378ac06215396504d34ad750edd6ec3399a3931554068195a8ee15ef SHA512 579a35f944ead756995d288b66ea8a4ab30289a90c32aa01119abcea85a8524f6594ce5cb7ac9df6d352c1e3b54a18c814b5d3a6409dce6a43614e3a89284066 |
27 |
|
28 |
diff --git a/www-servers/tomcat/tomcat-10.0.7.ebuild b/www-servers/tomcat/tomcat-10.0.7.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..d66b5ff3679 |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/tomcat-10.0.7.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.43-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 |
+} |