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: Wed, 27 Jul 2016 22:19:23
Message-Id: 1469657947.6a98874048e9e34d266f81aa08202f227f7a5b2b.chewi@gentoo
1 commit: 6a98874048e9e34d266f81aa08202f227f7a5b2b
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 27 22:17:38 2016 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 27 22:19:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a988740
7
8 dev-java/oracle-jre-bin: Bump to 1.8.0.102 wrt security bug #589208
9
10 Package-Manager: portage-2.3.0
11
12 dev-java/oracle-jre-bin/Manifest | 2 +
13 .../oracle-jre-bin/oracle-jre-bin-1.8.0.102.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 149cd6e..114612e 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-8u102-linux-i586.tar.gz 74086608 SHA256 b0ea9eba7e9a4da0abeefa67634644616b78ffd52884fbb7abdedb1c5c87f8a9 SHA512 bcb24bf99d4a9d92e551e998d456aa93cf956300c9c6be556415dd4d5358b31958d7c5731468b6e5cadd2f4d6ffaabc57cc7e1209577c17618ac2c3f32b4d372 WHIRLPOOL babb6c7fe114fe3af4b132d452ac60253f7941be83ed09ea4d4063758a3ccdfb689663db0f607f565bd876b06f8c442016f5d268b1f17e21ce81829949eb341c
23 +DIST jre-8u102-linux-x64.tar.gz 71885713 SHA256 214ff6b52f5b1bccfc139dca910cea25f6fa19b9b96b4e3c10e699cd3e780dfb SHA512 9e4408aba9c648c7b18f45984575132191f87eef1c6e80d44450dd05b28fc773771c554564f00571c12f38312dc837ca3a9974323ad79acd0287a7193b8d6596 WHIRLPOOL 6b8c4f2d55135e006d5603aadc69f3d5aefe637bd024681d29367f0feaabdbfb522dfeef11ca800b916199fc1fa01536b356713618a5cf8bc2396d4b595258ac
24 DIST jre-8u92-linux-i586.tar.gz 73984536 SHA256 c64e5778e61912118e1b566228e2c532b21d915c2fd98e9b6042b26602deeec6 SHA512 0eb1f03e7b84537501c13e185e2f1dc7f12c162209c98ce51042618cf02bd1691f3eb09c75a6d8db6dc6cfdd3369315cede49c194eae204b07d461a8eae47ff5 WHIRLPOOL a5e82f71ededce477bcb5fb49ad546c9d6a232156884f569b7d763efb44b3901ae0e211df35ae3ccc4295f6045479d36ad005e2e7acc673c7c3310069167ca99
25 DIST jre-8u92-linux-x64.tar.gz 71818563 SHA256 e8469bcf55e388770cd6b6a51b082ce7a5a3149b4039a71b1edeed2796dcefe4 SHA512 2d538c05110de21fc4dfb47e225012fc696e4a644c4d3191da48ccfcb239a6ac5618b75fc3c0eeb47f98e82254c548a0083bfab7ad831adffdcd6706433cf38f WHIRLPOOL 1a5ddd7f410c51452c774350b0a3f64d4c2cdc4b930c9278087b5de02bb95caf3d328509dad8903930744adb0367bcea26b4ed3f429bf9ee6ca219ba1c41b070
26
27 diff --git a/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.102.ebuild b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.102.ebuild
28 new file mode 100644
29 index 0000000..2564356
30 --- /dev/null
31 +++ b/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.102.ebuild
32 @@ -0,0 +1,249 @@
33 +# Copyright 1999-2016 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 +}