Gentoo Archives: gentoo-commits

From: "James Le Cuirot (chewi)" <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/oracle-jre-bin: oracle-jre-bin-1.8.0.51.ebuild metadata.xml ChangeLog
Date: Wed, 29 Jul 2015 12:42:16
Message-Id: 20150729124208.C8C85110@oystercatcher.gentoo.org
1 chewi 15/07/29 12:42:08
2
3 Modified: metadata.xml ChangeLog
4 Added: oracle-jre-bin-1.8.0.51.ebuild
5 Log:
6 Version bump, address security bug #554886. Also addresses bugs #475550, #543658, #553960.
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 9C6D7DE4)
9
10 Revision Changes Path
11 1.3 dev-java/oracle-jre-bin/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/metadata.xml?rev=1.3&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/metadata.xml?rev=1.3&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/metadata.xml?r1=1.2&r2=1.3
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/oracle-jre-bin/metadata.xml,v
20 retrieving revision 1.2
21 retrieving revision 1.3
22 diff -u -r1.2 -r1.3
23 --- metadata.xml 23 Jul 2012 17:28:56 -0000 1.2
24 +++ metadata.xml 29 Jul 2015 12:42:08 -0000 1.3
25 @@ -4,7 +4,9 @@
26 <herd>java</herd>
27 <longdescription>Oracle Java SE Runtime Environment, Official Binary Distribution</longdescription>
28 <use>
29 - <flag name="jce">Enable Java Cryptographic Extension Unlimited Strength Policy files</flag>
30 - <flag name="pax_kernel">Use paxctl to mark the JVM binaries.</flag>
31 + <flag name="awt">Install non-headless AWT libraries, needed by some GUIs (used to be X flag)</flag>
32 + <flag name="javafx">Install JavaFX libraries</flag>
33 + <flag name="jce">Install Java Cryptographic Extension Unlimited Strength Jurisdiction Policy Files</flag>
34 + <flag name="pax_kernel">Use paxctl to mark the JVM binaries</flag>
35 </use>
36 </pkgmetadata>
37
38
39
40 1.86 dev-java/oracle-jre-bin/ChangeLog
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog?rev=1.86&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog?rev=1.86&content-type=text/plain
44 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog?r1=1.85&r2=1.86
45
46 Index: ChangeLog
47 ===================================================================
48 RCS file: /var/cvsroot/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog,v
49 retrieving revision 1.85
50 retrieving revision 1.86
51 diff -u -r1.85 -r1.86
52 --- ChangeLog 19 Apr 2015 12:09:52 -0000 1.85
53 +++ ChangeLog 29 Jul 2015 12:42:08 -0000 1.86
54 @@ -1,6 +1,13 @@
55 # ChangeLog for dev-java/oracle-jre-bin
56 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
57 -# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog,v 1.85 2015/04/19 12:09:52 chewi Exp $
58 +# $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jre-bin/ChangeLog,v 1.86 2015/07/29 12:42:08 chewi Exp $
59 +
60 +*oracle-jre-bin-1.8.0.51 (29 Jul 2015)
61 +
62 + 29 Jul 2015; James Le Cuirot <chewi@g.o>
63 + +oracle-jre-bin-1.8.0.51.ebuild, metadata.xml:
64 + Version bump, address security bug #554886. Also addresses bugs #475550,
65 + #543658, #553960.
66
67 19 Apr 2015; James Le Cuirot <chewi@g.o>
68 -oracle-jre-bin-1.7.0.76.ebuild, -oracle-jre-bin-1.8.0.40.ebuild:
69
70
71
72 1.1 dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.51.ebuild
73
74 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.51.ebuild?rev=1.1&view=markup
75 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.51.ebuild?rev=1.1&content-type=text/plain
76
77 Index: oracle-jre-bin-1.8.0.51.ebuild
78 ===================================================================
79 # Copyright 1999-2015 Gentoo Foundation
80 # Distributed under the terms of the GNU General Public License v2
81 # $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jre-bin/oracle-jre-bin-1.8.0.51.ebuild,v 1.1 2015/07/29 12:42:08 chewi Exp $
82
83 EAPI="5"
84
85 inherit eutils java-vm-2 prefix versionator
86
87 # This URIs need updating when bumping!
88 JRE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html"
89 JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html"
90
91 if [[ "$(get_version_component_range 4)" == 0 ]] ; then
92 S_PV="$(get_version_component_range 1-3)"
93 else
94 MY_PV_EXT="u$(get_version_component_range 4)"
95 S_PV="$(get_version_component_range 1-4)"
96 fi
97
98 MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"
99
100 AT_amd64="jre-${MY_PV}-linux-x64.tar.gz"
101 AT_x86="jre-${MY_PV}-linux-i586.tar.gz"
102
103 JCE_DIR="UnlimitedJCEPolicyJDK8"
104 JCE_FILE="jce_policy-8.zip"
105
106 DESCRIPTION="Oracle's Java SE Runtime Environment"
107 HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
108 SRC_URI="
109 amd64? ( ${AT_amd64} )
110 x86? ( ${AT_x86} )
111 jce? ( ${JCE_FILE} )"
112
113 LICENSE="Oracle-BCLA-JavaSE"
114 SLOT="1.8"
115 KEYWORDS="~amd64 ~x86"
116 IUSE="alsa +awt cups +fontconfig javafx jce nsplugin pax_kernel selinux"
117
118 RESTRICT="fetch preserve-libs strip"
119 QA_PREBUILT="*"
120
121 # NOTES:
122 #
123 # * cups is dlopened.
124 #
125 # * libpng is also dlopened but only by libsplashscreen, which isn't
126 # important, so we can exclude that.
127 #
128 # * We still need to work out the exact AWT and JavaFX dependencies
129 # under MacOS. It doesn't appear to use many, if any, of the
130 # dependencies below.
131 #
132 RDEPEND="!x64-macos? (
133 awt? (
134 x11-libs/libX11
135 x11-libs/libXext
136 x11-libs/libXi
137 x11-libs/libXrender
138 )
139 javafx? (
140 dev-libs/glib:2
141 dev-libs/libxml2:2
142 dev-libs/libxslt
143 media-libs/freetype:2
144 x11-libs/cairo
145 x11-libs/gtk+:2
146 x11-libs/libX11
147 x11-libs/libXtst
148 x11-libs/libXxf86vm
149 x11-libs/pango
150 virtual/opengl
151 )
152 )
153 alsa? ( media-libs/alsa-lib )
154 cups? ( net-print/cups )
155 fontconfig? ( media-libs/fontconfig:1.0 )
156 !prefix? ( sys-libs/glibc:* )
157 selinux? ( sec-policy/selinux-java )"
158
159 # A PaX header isn't created by scanelf so depend on paxctl to avoid
160 # fallback marking. See bug #427642.
161 DEPEND="jce? ( app-arch/unzip )
162 pax_kernel? ( sys-apps/paxctl )"
163
164 S="${WORKDIR}/jre"
165
166 pkg_nofetch() {
167 local AT_ARCH="AT_${ARCH}"
168 local AT="${!AT_ARCH}"
169
170 einfo "Please download '${AT}' from:"
171 einfo "'${JRE_URI}'"
172 einfo "and move it to '${DISTDIR}'"
173
174 if use jce; then
175 einfo "Also download '${JCE_FILE}' from:"
176 einfo "'${JCE_URI}'"
177 einfo "and move it to '${DISTDIR}'"
178 fi
179
180 einfo
181 einfo "If the above mentioned urls do not point to the correct version anymore,"
182 einfo "please download the files from Oracle's java download archive:"
183 einfo
184 einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-${MY_PV}-oth-JPR"
185 einfo
186
187 }
188
189 src_unpack() {
190 default
191
192 # Upstream is changing their versioning scheme every release around 1.8.0.*;
193 # to stop having to change it over and over again, just wildcard match and
194 # live a happy life instead of trying to get this new jre1.8.0_05 to work.
195 mv "${WORKDIR}"/jre* "${S}" || die
196 }
197
198 src_prepare() {
199 if use jce ; then
200 mv "${WORKDIR}"/${JCE_DIR} lib/security/ || die
201 fi
202 }
203
204 src_install() {
205 local dest="/opt/${P}"
206 local ddest="${ED}${dest#/}"
207
208 # Create files used as storage for system preferences.
209 mkdir .systemPrefs || die
210 touch .systemPrefs/.system.lock || die
211 touch .systemPrefs/.systemRootModFile || die
212
213 if ! use alsa ; then
214 rm -vf lib/*/libjsoundalsa.* || die
215 fi
216
217 if ! use awt ; then
218 rm -vf lib/*/lib*{[jx]awt,splashscreen}* \
219 bin/{javaws,policytool} || die
220 fi
221
222 if ! use javafx ; then
223 rm -vf lib/*/lib*{decora,fx,glass,prism}* \
224 lib/*/libgstreamer-lite.* lib/{,ext/}*fx* || die
225 fi
226
227 if ! use nsplugin ; then
228 rm -vf lib/*/libnpjp2.* || die
229 else
230 local nsplugin=$(echo lib/*/libnpjp2.*)
231 fi
232
233 # Even though plugins linked against multiple ffmpeg versions are
234 # provided, they generally lag behind what Gentoo has available.
235 rm -vf lib/*/libavplugin* || die
236
237 dodoc COPYRIGHT
238 dodir "${dest}"
239 cp -pPR bin lib man "${ddest}" || die
240
241 if use jce ; then
242 dodir ${dest}/lib/security/strong-jce
243 mv "${ddest}"/lib/security/US_export_policy.jar \
244 "${ddest}"/lib/security/strong-jce || die
245 mv "${ddest}"/lib/security/local_policy.jar \
246 "${ddest}"/lib/security/strong-jce || die
247 dosym "${dest}"/lib/security/${JCE_DIR}/US_export_policy.jar \
248 "${dest}"/lib/security/US_export_policy.jar
249 dosym "${dest}"/lib/security/${JCE_DIR}/local_policy.jar \
250 "${dest}"/lib/security/local_policy.jar
251 fi
252
253 if use nsplugin ; then
254 install_mozilla_plugin "${dest}/${nsplugin}"
255 fi
256
257 # Install desktop file for the Java Control Panel.
258 # Using ${PN}-${SLOT} to prevent file collision with jre and or other slots.
259 # make_desktop_entry can't be used as ${P} would end up in filename.
260 newicon lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
261 sun-jcontrol-${PN}-${SLOT}.png || die
262 sed -e "s#Name=.*#Name=Java Control Panel for Oracle JRE ${SLOT}#" \
263 -e "s#Exec=.*#Exec=/opt/${P}/bin/jcontrol#" \
264 -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
265 -e "s#Application;##" \
266 -e "/Encoding/d" \
267 lib/desktop/applications/sun_java.desktop > \
268 "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
269 domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
270
271 # Prune all fontconfig files so libfontconfig will be used and only install
272 # a Gentoo specific one if fontconfig is disabled.
273 # http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
274 rm "${ddest}"/lib/fontconfig.* || die
275 if ! use fontconfig ; then
276 cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
277 eprefixify "${T}"/fontconfig.properties
278 insinto "${dest}"/lib/
279 doins "${T}"/fontconfig.properties
280 fi
281
282 # This needs to be done before CDS - #215225
283 java-vm_set-pax-markings "${ddest}"
284
285 # see bug #207282
286 einfo "Creating the Class Data Sharing archives"
287 case ${ARCH} in
288 arm|ia64)
289 ${ddest}/bin/java -client -Xshare:dump || die
290 ;;
291 x86)
292 ${ddest}/bin/java -client -Xshare:dump || die
293 # limit heap size for large memory on x86 #467518
294 # this is a workaround and shouldn't be needed.
295 ${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
296 ;;
297 *)
298 ${ddest}/bin/java -server -Xshare:dump || die
299 ;;
300 esac
301
302 # Remove empty dirs we might have copied.
303 find "${D}" -type d -empty -exec rmdir -v {} + || die
304
305 set_java_env
306 java-vm_revdep-mask
307 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
308 }