Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/oracle-jre-bin/
Date: Mon, 23 Jan 2017 22:52:47
Message-Id: 1485211940.77bfe92ae0617fa2fe4a058cf0a4789e419846a8.chewi@gentoo
1 commit: 77bfe92ae0617fa2fe4a058cf0a4789e419846a8
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 23 22:18:40 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 23 22:52:20 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77bfe92a
7
8 dev-java/oracle-jre-bin: Bump to 1.8.0.121 wrt security bug #606118
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 dev-java/oracle-jre-bin/Manifest | 2 +
13 .../oracle-jre-bin/oracle-jre-bin-1.8.0.121.ebuild | 249 +++++++++++++++++++++
14 2 files changed, 251 insertions(+)
15
16 diff --git a/dev-java/oracle-jre-bin/Manifest b/dev-java/oracle-jre-bin/Manifest
17 index df7fb14..ec785f6 100644
18 --- a/dev-java/oracle-jre-bin/Manifest
19 +++ b/dev-java/oracle-jre-bin/Manifest
20 @@ -1,3 +1,5 @@
21 DIST jce_policy-8.zip 8409 SHA256 f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 SHA512 abbaa81a35f904ec61b4cf3c2d1ca8c8d49e53bb248e698185eea906939d68f5063412800585ec74027aab1012ef189aebe1dc99fe8ef4230a0ecb0b527f88e5 WHIRLPOOL 8c9ce1ea4673b75fa6271b74e598880f98361d5d2c9c25439fa0af3d07cfeb871b39682dae4e38160f49770b1fec953162e451b9b2cf44d2c72a226944212bcc
22 DIST jre-8u112-linux-i586.tar.gz 76262744 SHA256 b314d73ddd80e7d0665fb85853d2d69d486bff4a3fd0def090a92be618ba12e9 SHA512 15856f20bf1ad035fa62c615565218780f7f781f77bdb00697e6acdfee946afb34a74dd7a027ab56775c9f82e8f05813fc1bf055e02ab388e2a13c829ac822d9 WHIRLPOOL 1c73896f06e9edf794ff46d18ce2b6aa05016c7d3bcd4dd45c3d4766d4e0a6883f8ce8dc8078c70447df72d20e604af0e32542e7a9a5e38ccc59518f34e0c5b7
23 DIST jre-8u112-linux-x64.tar.gz 73653824 SHA256 94053c6aa4d672b728c7788fb7d2676e5c6d7e7fcdbc1c86beaa796a083b4e5b SHA512 01dc42552b58d1560fc7236aa53f94c785b238573305d563c73068f564203560fb1db93e7f40815ebb2ce2bab3ed47517ea16882d976730342bdd8290cef55a5 WHIRLPOOL 6dd53b97dca5df8d79ba9203671158f161c5d40f0f061a26c38946a878fa1eeb51be5f996d0231ea298828d055644615dbfa79dd4621c5db2afa4955f05f921b
24 +DIST jre-8u121-linux-i586.tar.gz 76293286 SHA256 1b28662780c98b3233e8dacaa07c505a70c53463d3b00720baa59f955ab1e1bb SHA512 375003c2fec68deed36cf10a2e225044d6c85035d1d756110cb07ffa526d63bee7573b2db7568fb84c6dfdee101da82bedd7785548da812241e4e0234e99a5bb WHIRLPOOL 6f4665e448f59a4d1f432bfc974d9d626400b7932ec7f3f8edba29041354386d399306c685240194749d7a6d0364153143704768c4f205fb02ba44de3db92ba7
25 +DIST jre-8u121-linux-x64.tar.gz 73676107 SHA256 30bf5fbac0cfbc9201cac1d6973dbc96e5f55043ab315eda8c7aeb23df4f2644 SHA512 85ed3820b1461bf8c1b83259962f9e7c3f72d694f446d3e5852c416eeeb9905897a9a3b5eaded9a8d617c9c43848635b2ff7b520021b666fd87f39837e4ff54b WHIRLPOOL f2bdfe315dc9a7a15bd4e73dd774fd31c1c02bb3d5a24d2829cc51d9aed3b75993c9429e211ee4d204606cf6105015aac30c0e408e3558b24d6d3f4f229b9b7e
26
27 diff --git a/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.121.ebuild b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.121.ebuild
28 new file mode 100644
29 index 00000000..d980bd7
30 --- /dev/null
31 +++ b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.121.ebuild
32 @@ -0,0 +1,249 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI="5"
38 +
39 +inherit eutils java-vm-2 prefix versionator
40 +
41 +# This URIs need updating when bumping!
42 +JRE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"
43 +JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
44 +
45 +if [[ "$(get_version_component_range 4)" == 0 ]] ; then
46 + S_PV="$(get_version_component_range 1-3)"
47 +else
48 + MY_PV_EXT="u$(get_version_component_range 4)"
49 + S_PV="$(get_version_component_range 1-4)"
50 +fi
51 +
52 +MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
53 +
54 +AT_amd64="jre-${MY_PV}-linux-x64.tar.gz"
55 +AT_x86="jre-${MY_PV}-linux-i586.tar.gz"
56 +
57 +JCE_DIR="UnlimitedJCEPolicyJDK8"
58 +JCE_FILE="jce_policy-8.zip"
59 +
60 +DESCRIPTION="Oracle's Java SE Runtime Environment"
61 +HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
62 +SRC_URI="
63 + amd64? ( ${AT_amd64} )
64 + x86? ( ${AT_x86} )
65 + jce? ( ${JCE_FILE} )"
66 +
67 +LICENSE="Oracle-BCLA-JavaSE"
68 +SLOT="1.8"
69 +KEYWORDS="~amd64 ~x86"
70 +IUSE="alsa cups +fontconfig headless-awt javafx jce nsplugin pax_kernel selinux"
71 +
72 +RESTRICT="fetch preserve-libs strip"
73 +QA_PREBUILT="*"
74 +
75 +# NOTES:
76 +#
77 +# * cups is dlopened.
78 +#
79 +# * libpng is also dlopened but only by libsplashscreen, which isn't
80 +# important, so we can exclude that.
81 +#
82 +# * We still need to work out the exact AWT and JavaFX dependencies
83 +# under MacOS. It doesn't appear to use many, if any, of the
84 +# dependencies below.
85 +#
86 +RDEPEND="!x64-macos? (
87 + !headless-awt? (
88 + x11-libs/libX11
89 + x11-libs/libXext
90 + x11-libs/libXi
91 + x11-libs/libXrender
92 + x11-libs/libXtst
93 + )
94 + javafx? (
95 + dev-libs/glib:2
96 + dev-libs/libxml2:2
97 + dev-libs/libxslt
98 + media-libs/freetype:2
99 + x11-libs/cairo
100 + x11-libs/gtk+:2
101 + x11-libs/libX11
102 + x11-libs/libXtst
103 + x11-libs/libXxf86vm
104 + x11-libs/pango
105 + virtual/opengl
106 + )
107 + )
108 + alsa? ( media-libs/alsa-lib )
109 + cups? ( net-print/cups )
110 + fontconfig? ( media-libs/fontconfig:1.0 )
111 + !prefix? ( sys-libs/glibc:* )
112 + selinux? ( sec-policy/selinux-java )"
113 +
114 +# A PaX header isn't created by scanelf so depend on paxctl to avoid
115 +# fallback marking. See bug #427642.
116 +DEPEND="app-arch/zip
117 + jce? ( app-arch/unzip )
118 + pax_kernel? ( sys-apps/paxctl )"
119 +
120 +S="${WORKDIR}/jre"
121 +
122 +pkg_nofetch() {
123 + local AT_ARCH="AT_${ARCH}"
124 + local AT="${!AT_ARCH}"
125 +
126 + einfo "Please download '${AT}' from:"
127 + einfo "'${JRE_URI}'"
128 + einfo "and move it to '${DISTDIR}'"
129 +
130 + if use jce; then
131 + einfo "Also download '${JCE_FILE}' from:"
132 + einfo "'${JCE_URI}'"
133 + einfo "and move it to '${DISTDIR}'"
134 + fi
135 +
136 + einfo
137 + einfo "If the above mentioned urls do not point to the correct version anymore,"
138 + einfo "please download the files from Oracle's java download archive:"
139 + einfo
140 + einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-${MY_PV}-oth-JPR"
141 + einfo
142 +
143 +}
144 +
145 +src_unpack() {
146 + default
147 +
148 + # Upstream is changing their versioning scheme every release around 1.8.0.*;
149 + # to stop having to change it over and over again, just wildcard match and
150 + # live a happy life instead of trying to get this new jre1.8.0_05 to work.
151 + mv "${WORKDIR}"/jre* "${S}" || die
152 +}
153 +
154 +src_prepare() {
155 + if use jce ; then
156 + mv "${WORKDIR}"/${JCE_DIR} lib/security/ || die
157 + fi
158 +
159 + # Remove the hook that calls Oracle's evil usage tracker. Not just
160 + # because it's evil but because it breaks the sandbox during builds
161 + # and we can't find any other feasible way to disable it or make it
162 + # write somewhere else. See bug #559936 for details.
163 + zip -d lib/rt.jar sun/misc/PostVMInitHook.class || die
164 +}
165 +
166 +src_install() {
167 + local dest="/opt/${P}"
168 + local ddest="${ED}${dest#/}"
169 +
170 + # Create files used as storage for system preferences.
171 + mkdir .systemPrefs || die
172 + touch .systemPrefs/.system.lock || die
173 + touch .systemPrefs/.systemRootModFile || die
174 +
175 + if ! use alsa ; then
176 + rm -vf lib/*/libjsoundalsa.* || die
177 + fi
178 +
179 + if use headless-awt ; then
180 + rm -vf lib/*/lib*{[jx]awt,splashscreen}* \
181 + bin/{javaws,policytool} || die
182 + fi
183 +
184 + if ! use javafx ; then
185 + rm -vf lib/*/lib*{decora,fx,glass,prism}* \
186 + lib/*/libgstreamer-lite.* lib/{,ext/}*fx* || die
187 + fi
188 +
189 + if ! use nsplugin ; then
190 + rm -vf lib/*/libnpjp2.* || die
191 + else
192 + local nsplugin=$(echo lib/*/libnpjp2.*)
193 + fi
194 +
195 + # Even though plugins linked against multiple ffmpeg versions are
196 + # provided, they generally lag behind what Gentoo has available.
197 + rm -vf lib/*/libavplugin* || die
198 +
199 + dodoc COPYRIGHT
200 + dodir "${dest}"
201 + cp -pPR bin lib man "${ddest}" || die
202 +
203 + if use jce ; then
204 + dodir ${dest}/lib/security/strong-jce
205 + mv "${ddest}"/lib/security/US_export_policy.jar \
206 + "${ddest}"/lib/security/strong-jce || die
207 + mv "${ddest}"/lib/security/local_policy.jar \
208 + "${ddest}"/lib/security/strong-jce || die
209 + dosym "${dest}"/lib/security/${JCE_DIR}/US_export_policy.jar \
210 + "${dest}"/lib/security/US_export_policy.jar
211 + dosym "${dest}"/lib/security/${JCE_DIR}/local_policy.jar \
212 + "${dest}"/lib/security/local_policy.jar
213 + fi
214 +
215 + if use nsplugin ; then
216 + local nsplugin_link=${nsplugin##*/}
217 + nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
218 + dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
219 + fi
220 +
221 + # Install desktop file for the Java Control Panel.
222 + # Using ${PN}-${SLOT} to prevent file collision with jre and or other slots.
223 + # make_desktop_entry can't be used as ${P} would end up in filename.
224 + newicon lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
225 + sun-jcontrol-${PN}-${SLOT}.png || die
226 + sed -e "s#Name=.*#Name=Java Control Panel for Oracle JRE ${SLOT}#" \
227 + -e "s#Exec=.*#Exec=/opt/${P}/bin/jcontrol#" \
228 + -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
229 + -e "s#Application;##" \
230 + -e "/Encoding/d" \
231 + lib/desktop/applications/sun_java.desktop > \
232 + "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
233 + domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
234 +
235 + # Prune all fontconfig files so libfontconfig will be used and only install
236 + # a Gentoo specific one if fontconfig is disabled.
237 + # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
238 + rm "${ddest}"/lib/fontconfig.* || die
239 + if ! use fontconfig ; then
240 + cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
241 + eprefixify "${T}"/fontconfig.properties
242 + insinto "${dest}"/lib/
243 + doins "${T}"/fontconfig.properties
244 + fi
245 +
246 + # This needs to be done before CDS - #215225
247 + java-vm_set-pax-markings "${ddest}"
248 +
249 + # see bug #207282
250 + einfo "Creating the Class Data Sharing archives"
251 + case ${ARCH} in
252 + arm|ia64)
253 + ${ddest}/bin/java -client -Xshare:dump || die
254 + ;;
255 + x86)
256 + ${ddest}/bin/java -client -Xshare:dump || die
257 + # limit heap size for large memory on x86 #467518
258 + # this is a workaround and shouldn't be needed.
259 + ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
260 + ;;
261 + *)
262 + ${ddest}/bin/java -server -Xshare:dump || die
263 + ;;
264 + esac
265 +
266 + # Remove empty dirs we might have copied.
267 + find "${D}" -type d -empty -exec rmdir -v {} + || die
268 +
269 + set_java_env
270 + java-vm_revdep-mask
271 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
272 +}
273 +
274 +pkg_postinst() {
275 + java-vm-2_pkg_postinst
276 +
277 + if ! use headless-awt && ! use javafx; then
278 + ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
279 + ewarn "require this and they may fail with a confusing error message."
280 + fi
281 +}