Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/
Date: Wed, 16 Sep 2020 11:26:11
Message-Id: 1600255560.1edf39d4be73e30ae6df14d443776db92f9bc2f3.fordfrog@gentoo
1 commit: 1edf39d4be73e30ae6df14d443776db92f9bc2f3
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 16 11:13:05 2020 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 16 11:26:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1edf39d4
7
8 www-servers/tomcat: bump to 8.5.58
9
10 Package-Manager: Portage-3.0.7, Repoman-3.0.1
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 www-servers/tomcat/Manifest | 1 +
14 www-servers/tomcat/tomcat-8.5.58.ebuild | 163 ++++++++++++++++++++++++++++++++
15 2 files changed, 164 insertions(+)
16
17 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
18 index 78ae5296403..16add69f655 100644
19 --- a/www-servers/tomcat/Manifest
20 +++ b/www-servers/tomcat/Manifest
21 @@ -1,5 +1,6 @@
22 DIST apache-tomcat-7.0.105-src.tar.gz 5312024 BLAKE2B 0eaad66c6dcc3e2f6a2d8e142a7832cbd413724cab8b10f00e87d5535f4f20d5ba4712794e09444a8b3e0cf23f036da7c6923f038a6a11714682b129ed4ac5dd SHA512 249e039775e833d75b631cec26132b42e4aed25491a29f2349fa41b81737688b0a2e453072d8e3c5fc28763a9d1922f59da7529378ce8fd472eca7bbc73a6bd2
23 DIST apache-tomcat-8.5.57-src.tar.gz 5730658 BLAKE2B f9bd2e159abc6af62c8681c38ea4eae8155f95df11f7c244e45018929189ef6b6a37a11e84119c3ddcb134a8ab58773add19cbab7506bb87c43b0039899fde60 SHA512 8bf4334b190c36900b708ee7097097e513f2d4572f119173bee732c76b5b660350fe516e58ac867250c2ef7a1371b55c116d3a1abd18323ceb92337f1dcb0f60
24 +DIST apache-tomcat-8.5.58-src.tar.gz 5773000 BLAKE2B e361cc359f86bb02fa4c39ebd51b52b4552aa78603c4d8fa5c5c8d87bcb89f6ed391408e3713a5011b7b8cc29506ad65f25b6047ec1009267ce8a68d396b3bc6 SHA512 f9e21c0c60b80e1a15049ff4ee6a4914036d19ed171c40bc614fc999c81c59c394c0a6595ac969a5b86662fa6c366676e7ecb2695c28518473b3f6c79e9a0e05
25 DIST apache-tomcat-9.0.37-src.tar.gz 5894559 BLAKE2B 63148418ef96e90f212ce8a00dc6a274a8da2a1aa8a53ad0f6d3960efc8e876dd2812f425c0f21c73ee291752c5fd3bc8025eed46d18d31ae72e8bbe6dc1ba10 SHA512 6e819fe255c467b0081e91c17a53fa383fe84d922492c62d7dd93cabf00e22ab30872ecaa298a9b12977b8c7518f36c8429091b24c9fb5200db64e80e853ce98
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-8.5.58.ebuild b/www-servers/tomcat/tomcat-8.5.58.ebuild
30 new file mode 100644
31 index 00000000000..cb1cc0e1c51
32 --- /dev/null
33 +++ b/www-servers/tomcat/tomcat-8.5.58.ebuild
34 @@ -0,0 +1,163 @@
35 +# Copyright 1999-2020 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 eutils java-pkg-2 java-ant-2 prefix user
43 +
44 +MY_P="apache-${P}-src"
45 +
46 +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
47 +HOMEPAGE="https://tomcat.apache.org/"
48 +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
49 +
50 +LICENSE="Apache-2.0"
51 +SLOT="8.5"
52 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
53 +IUSE="extra-webapps"
54 +
55 +RESTRICT="test" # can we run them on a production system?
56 +
57 +ECJ_SLOT="4.5"
58 +SAPI_SLOT="3.1"
59 +
60 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
61 + ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}"
62 +RDEPEND="${COMMON_DEP}
63 + virtual/jre"
64 +DEPEND="${COMMON_DEP}
65 + app-admin/pwgen
66 + >=dev-java/ant-core-1.9.13
67 + virtual/jdk:1.8
68 + doc? (
69 + dev-java/glassfish-xmlrpc-api:0
70 + dev-java/wsdl4j:0
71 + )
72 + test? (
73 + >=dev-java/ant-junit-1.9:0
74 + dev-java/easymock:3.2
75 + )"
76 +
77 +S=${WORKDIR}/${MY_P}
78 +
79 +pkg_setup() {
80 + java-pkg-2_pkg_setup
81 + enewgroup tomcat 265
82 + enewuser tomcat 265 -1 /dev/null tomcat
83 +}
84 +
85 +src_prepare() {
86 + default
87 +
88 + find -name '*.jar' -type f -delete -print || die
89 +
90 + # Remove bundled servlet-api
91 + rm -rv java/javax/{el,servlet} || die
92 +
93 + eapply "${FILESDIR}/${PN}-8.5.57-build.xml.patch"
94 +
95 + # For use of catalina.sh in netbeans
96 + sed -i -e "/^# ----- Execute The Requested Command/ a\
97 + CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \
98 + bin/catalina.sh || die
99 +
100 + java-pkg-2_src_prepare
101 +}
102 +
103 +JAVA_ANT_REWRITE_CLASSPATH="true"
104 +
105 +EANT_BUILD_TARGET="deploy"
106 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
107 +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
108 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
109 +EANT_NEEDS_TOOLS="true"
110 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false"
111 +
112 +# revisions of the scripts
113 +IM_REV="-r2"
114 +INIT_REV="-r1"
115 +
116 +src_compile() {
117 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
118 + use doc && EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only glassfish-xmlrpc-api glassfish-xmlrpc-api.jar):$(java-pkg_getjar --build-only wsdl4j wsdl4j.jar)"
119 + java-pkg-2_src_compile
120 +}
121 +
122 +src_test() {
123 + java-pkg-2_src_test
124 +}
125 +
126 +src_install() {
127 + local dest="/usr/share/${PN}-${SLOT}"
128 +
129 + java-pkg_jarinto "${dest}"/bin
130 + java-pkg_dojar output/build/bin/*.jar
131 + exeinto "${dest}"/bin
132 + doexe output/build/bin/*.sh
133 +
134 + java-pkg_jarinto "${dest}"/lib
135 + java-pkg_dojar output/build/lib/*.jar
136 +
137 + dodoc RELEASE-NOTES RUNNING.txt
138 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
139 + use source && java-pkg_dosrc java/*
140 +
141 + ### Webapps ###
142 +
143 + # add missing docBase
144 + local apps="host-manager manager"
145 + for app in ${apps}; do
146 + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
147 + output/build/webapps/${app}/META-INF/context.xml || die
148 + done
149 +
150 + insinto "${dest}"/webapps
151 + doins -r output/build/webapps/{host-manager,manager,ROOT}
152 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
153 +
154 + ### Config ###
155 +
156 + # create "logs" directory in $CATALINA_BASE
157 + # and set correct perms, see #458890
158 + dodir "${dest}"/logs
159 + fperms 0750 "${dest}"/logs
160 +
161 + # replace the default pw with a random one, see #92281
162 + local randpw="$(pwgen -s -B 15 1)"
163 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
164 +
165 + # prepend gentoo.classpath to common.loader, see #453212
166 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
167 +
168 + insinto "${dest}"
169 + doins -r output/build/conf
170 +
171 + ### rc ###
172 +
173 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
174 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
175 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
176 +
177 + insinto "${dest}"/gentoo
178 + doins "${T}"/tomcat.conf
179 + exeinto "${dest}"/gentoo
180 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
181 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
182 +}
183 +
184 +pkg_postinst() {
185 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
186 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
187 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
188 +
189 + elog "To manage Tomcat instances, run:"
190 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
191 +
192 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
193 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
194 +
195 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
196 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
197 +}