1 |
commit: 4a2afb58608b21b78c3f61243f9f1c3ded79ca0b |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 5 17:54:06 2021 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 5 17:54:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a2afb58 |
7 |
|
8 |
www-servers/tomcat: bump to 9.0.54 |
9 |
|
10 |
Package-Manager: Portage-3.0.26, 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-9.0.54.ebuild | 187 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 188 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index 63ce20dd376..b05a0354ab7 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -6,5 +6,6 @@ DIST apache-tomcat-8.5.70-src.tar.gz 5939095 BLAKE2B 9a2bf14c9b9f551af15ebf2b95f |
22 |
DIST apache-tomcat-8.5.71-src.tar.gz 5945776 BLAKE2B b7a5b344dbe09ef88ee046dcce701ea65d8587f1d8c2f980c67fff5466979d15dea019a9abae6d48a45797a989ebddb4dbdbc5196c8740cde9ebc45041b857ef SHA512 df99749d7ef387e29c1d2976c584dc219fc8764f618a004a646564315ab3f00a71ca94408d1fbaff20c3bab3911c82af4f7cf2ec02f0408d9e829c27f8aabdba |
23 |
DIST apache-tomcat-9.0.52-src.tar.gz 6110883 BLAKE2B 8d2d4e3640fdc43a3b20d9722a73a8756de7ad71b2f05e8b2090bc712811cfcf6f8e79eeded039291b9306d1c49aec46fe8c7e347aab10384ca293894984ab27 SHA512 8b1817c171fa49e5568fb24a72b6b7533c5eb3ddd6d232b78e67186574f70bb311bbef9a58af047caa14bdae57c27c6a3df721c4583072740fec0a3863bb068d |
24 |
DIST apache-tomcat-9.0.53-src.tar.gz 6142608 BLAKE2B 71f45e04ac01221cbfc6e730066e1aa7f5d65d31a497a775a3147180591f23799f0b47db3a1dd4a86936c40f624795cf4fd1d3dd44d4d39633aeb0733f4f9f26 SHA512 f72b9abff6af24d486a1e3dd3cd8b6cb44feab811efb74a3469502676e661bdb4cfed0fe44f38b7f5a6f74a6776ae1c0c732504d26609b88280e0b0da6710b27 |
25 |
+DIST apache-tomcat-9.0.54-src.tar.gz 6132613 BLAKE2B 5d37359ac9cac2a1387675a095aa0bea3e2bc74740d761a13fb2313aaca8ddb14f10922a8edc0932c9139c04b4df7f5735b067a71ac75ebbfe16ff6066311993 SHA512 e9d532a966aa8e7c2fcf28e4ecb0a618a8be4dacf8dc579a407483de86ef969383e3662fba07be629bfb8fbd85c041a5a2f1dd8875cc309b69a147b37c58974b |
26 |
DIST biz.aQute.bnd-5.1.1.jar 16088761 BLAKE2B 59906cc39ea27ef20cbf82de1ba78096f34dc417da6dc5c28e21f6e92c0625efecf14cec6c5faf0ab17551c31a6c87a24614c2ac75ac902cfea30199ecc0d39f SHA512 8092b083e7b86e75bf27233964763b88bee74d8ae141c85e387c1cc8bd0cbf3a54be27afea29931fb3ae950700a515fd4a28cfe8e7f26cbaaec506aa06357a37 |
27 |
DIST biz.aQute.bndlib-5.1.1.jar 3652944 BLAKE2B dad9f9835fb407a36e0eae4b65fa2fda147e06ab3f3211a2ed2f1631aeccd6d14d198c325793cb1ce9a57b719a836db230d0452715744ba5a4a6c2983c17916b SHA512 d7da056ba541ae0862159bf5e38e1a5351b2ab5388c88733b46601c2d7dab8970f16af00df186a6cb67fbe81ef53f2c8402db9d28a8c6819dadf60a1df40879b |
28 |
|
29 |
diff --git a/www-servers/tomcat/tomcat-9.0.54.ebuild b/www-servers/tomcat/tomcat-9.0.54.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..8905e0fad24 |
32 |
--- /dev/null |
33 |
+++ b/www-servers/tomcat/tomcat-9.0.54.ebuild |
34 |
@@ -0,0 +1,187 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+JAVA_PKG_IUSE="doc source test" |
41 |
+ |
42 |
+inherit java-pkg-2 java-ant-2 prefix |
43 |
+ |
44 |
+MY_P="apache-${PN}-${PV}-src" |
45 |
+ |
46 |
+# Currently we bundle binary versions of bnd.jar and bndlib.jar |
47 |
+# See bugs #203080 and #676116 |
48 |
+BND_VERSION="5.1.1" |
49 |
+BND="biz.aQute.bnd-${BND_VERSION}.jar" |
50 |
+BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" |
51 |
+ |
52 |
+DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
53 |
+HOMEPAGE="https://tomcat.apache.org/" |
54 |
+SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz |
55 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} |
56 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" |
57 |
+ |
58 |
+LICENSE="Apache-2.0" |
59 |
+SLOT="9" |
60 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" |
61 |
+IUSE="extra-webapps" |
62 |
+ |
63 |
+RESTRICT="test" # can we run them on a production system? |
64 |
+ |
65 |
+ECJ_SLOT="4.15" |
66 |
+SAPI_SLOT="4.0" |
67 |
+ |
68 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
69 |
+ dev-java/glassfish-xmlrpc-api: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-1.9.13 |
79 |
+ virtual/jdk:1.8 |
80 |
+ test? ( |
81 |
+ >=dev-java/ant-junit-1.9: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/javax/{el,servlet} || die |
111 |
+ |
112 |
+ eapply "${FILESDIR}/${PN}-9.0.46-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},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 "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
217 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
218 |
+ |
219 |
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
220 |
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
221 |
+} |