/[packages]/updates/8/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
ViewVC logotype

Contents of /updates/8/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1363922 - (show annotations) (download)
Thu Feb 7 10:51:58 2019 UTC (5 years, 2 months ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 83637 byte(s)
- sync with fedora as of 2019-02-06, update to u201b09 (mga#24293)

1 # note, parametrised macros are order-senisitve (unlike not-parametrized) even with normal macros
2 # also necessary when passing it as parameter other macros. If not macro, then it is considered as switch
3 %global debug_suffix_unquoted -debug
4 # quoted one for shell operations
5 %global debug_suffix "%{debug_suffix_unquoted}"
6 %global normal_suffix ""
7
8 #if you wont only debug build, but providing java, build only normal build, but set normalbuild_parameter
9 %global debugbuild_parameter slowdebug
10 %global normalbuild_parameter release
11 %global debug_warning This package have full debug on. Install only in need, and remove asap.
12 %global debug_on with full debug on
13 %global for_debug for packages with debug on
14
15 # by default we build normal build always.
16 %global include_normal_build 1
17 %if %{include_normal_build}
18 %global build_loop1 %{normal_suffix}
19 %else
20 %global build_loop1 %{nil}
21 %endif
22
23 %global aarch64 aarch64 arm64 armv8
24 # sometimes we need to distinguish big and little endian PPC64
25 %global ppc64le ppc64le
26 %global ppc64be ppc64 ppc64p7
27 %global multilib_arches %{power64} sparc64 x86_64
28 %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
29
30 # By default, we build a debug build during main build on JIT architectures
31 %ifarch %{jit_arches}
32 %global include_debug_build 0
33 %else
34 %global include_debug_build 0
35 %endif
36
37 # On x86_64 and AArch64, we use the Shenandoah HotSpot
38 %ifarch x86_64 %{aarch64}
39 %global use_shenandoah_hotspot 1
40 %else
41 %global use_shenandoah_hotspot 0
42 %endif
43
44 %if %{include_debug_build}
45 %global build_loop2 %{debug_suffix}
46 %else
47 %global build_loop2 %{nil}
48 %endif
49
50 # if you disable both builds, then build fails
51 %global build_loop %{build_loop1} %{build_loop2}
52 # note, that order normal_suffix debug_suffix, in case of both enabled,
53 # is expected in one single case at the end of build
54 %global rev_build_loop %{build_loop2} %{build_loop1}
55
56 %ifarch %{jit_arches}
57 %global bootstrap_build 1
58 %else
59 %global bootstrap_build 1
60 %endif
61
62 %if %{bootstrap_build}
63 %global targets bootcycle-images docs
64 %else
65 %global targets all
66 %endif
67
68 # Filter out flags from the optflags macro that cause problems with the OpenJDK build
69 # We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2
70 # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
71 # We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
72 # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
73 %global ourflags %(echo %optflags | sed -e 's|-Wformat|-Wformat -Wno-cpp|')
74 %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
75 %global ourldflags %(echo %{ldflags} | sed -e 's|-Wl,--no-undefined||')
76
77 # With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path
78 # the initialisation must be here. LAter the pkg-connfig have bugy behaviour
79 #looks liekopenjdk RPM specific bug
80 # Always set this so the nss.cfg file is not broken
81 %global NSS_LIBDIR %(pkg-config --variable=libdir nss)
82
83 # fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
84 %global _privatelibs libmawt[.]so.*
85 %global __provides_exclude ^(%{_privatelibs})$
86 %global __requires_exclude ^(%{_privatelibs})$
87
88 # In some cases, the arch used by the JDK does
89 # not match _arch.
90 # Also, in some cases, the machine name used by SystemTap
91 # does not match that given by _build_cpu
92 %ifarch x86_64
93 %global archinstall amd64
94 %global stapinstall x86_64
95 %endif
96 %ifarch ppc
97 %global archinstall ppc
98 %global stapinstall powerpc
99 %endif
100 %ifarch %{ppc64be}
101 %global archinstall ppc64
102 %global stapinstall powerpc
103 %endif
104 %ifarch %{ppc64le}
105 %global archinstall ppc64le
106 %global stapinstall powerpc
107 %endif
108 %ifarch %{ix86}
109 %global archinstall i386
110 %global stapinstall i386
111 %endif
112 %ifarch ia64
113 %global archinstall ia64
114 %global stapinstall ia64
115 %endif
116 %ifarch s390
117 %global archinstall s390
118 %global stapinstall s390
119 %endif
120 %ifarch s390x
121 %global archinstall s390x
122 %global stapinstall s390
123 %endif
124 %ifarch %{arm}
125 %global archinstall arm
126 %global stapinstall arm
127 %endif
128 %ifarch %{aarch64}
129 %global archinstall aarch64
130 %global stapinstall arm64
131 %endif
132 # 32 bit sparc, optimized for v9
133 %ifarch sparcv9
134 %global archinstall sparc
135 %global stapinstall %{_build_cpu}
136 %endif
137 # 64 bit sparc
138 %ifarch sparc64
139 %global archinstall sparcv9
140 %global stapinstall %{_build_cpu}
141 %endif
142 %ifnarch %{jit_arches}
143 %global archinstall %{_arch}
144 %endif
145
146 %ifarch %{jit_arches}
147 %global with_systemtap 1
148 %else
149 %global with_systemtap 0
150 %endif
151
152 %ifarch %{ix86} x86_64 %{arm} aarch64
153 %global with_openjfx_binding 1
154 %global openjfx_path %{_jvmdir}/openjfx
155 # links src directories
156 %global jfx_jre_libs_dir %{openjfx_path}/rt/lib
157 %global jfx_jre_native_dir %{jfx_jre_libs_dir}/%{archinstall}
158 %global jfx_sdk_libs_dir %{openjfx_path}/lib
159 %global jfx_sdk_bins_dir %{openjfx_path}/bin
160 %global jfx_jre_exts_dir %{jfx_jre_libs_dir}/ext
161 # links src files
162 # maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful
163 %global jfx_jre_libs jfxswt.jar javafx.properties
164 %global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so libavplugin.so libfxplugins.so libglib-lite.so libgstreamer-lite.so libjfxmedia.so libjfxwebkit.so
165 %global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar
166 %global jfx_sdk_bins javafxpackager javapackager
167 %global jfx_jre_exts jfxrt.jar
168 %else
169 %global with_openjfx_binding 0
170 %endif
171
172 # Convert an absolute path to a relative path. Each symbolic link is
173 # specified relative to the directory in which it is installed so that
174 # it will resolve properly within chrooted installations.
175 %global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])'
176 %global abs2rel %{__perl} -e %{script}
177
178
179 # Standard JPackage naming and versioning defines.
180 %global origin openjdk
181 # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there.
182 %global project aarch64-port
183 %global repo jdk8u-shenandoah
184 %global revision aarch64-shenandoah-jdk8u201-b09
185 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%)
186 %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*})
187 # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60
188 %global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
189 # eg jdk8u60-b27 -> b27
190 %global buildver %(VERSION=%{revision}; echo ${VERSION##*-})
191 # priority must be 7 digits in total. The expression is workarounding tip
192 %global priority %(TIP=1800%{updatever}; echo ${TIP/tip/999})
193
194 %global javaver 1.8.0
195
196 # parametrized macros are order-sensitive
197 %global fullversion %{name}-%{version}-%{release}
198 #images stub
199 %global j2sdkimage j2sdk-image
200 # output dir stub
201 %define buildoutputdir() %{expand:openjdk/build/jdk8.build%{?1}}
202 #we can copy the javadoc to not arched dir, or made it not noarch
203 %define uniquejavadocdir() %{expand:%{fullversion}%{?1}}
204 #main id and dir of this jdk
205 %define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
206
207 # Standard JPackage directories and symbolic links.
208 %define sdkdir() %{expand:%{uniquesuffix -- %{?1}}}
209 %define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
210
211 %define jredir() %{expand:%{sdkdir -- %{?1}}/jre}
212 %define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
213 %define jrebindir() %{expand:%{_jvmdir}/%{jredir -- %{?1}}/bin}
214
215 # The macro _jvmjardir was removed from /usr/lib/rpm/macros.d/macros.jpackage
216 %define _jvmjardir %{_prefix}/lib/jvm-exports
217 %define jvmjardir() %{expand:%{_jvmjardir}/%{uniquesuffix -- %{?1}}}
218
219 %global rpm_state_dir %{_localstatedir}/lib/rpm-state/
220
221 %if %{with_systemtap}
222 # Where to install systemtap tapset (links)
223 # We would like these to be in a package specific subdir,
224 # but currently systemtap doesn't support that, so we have to
225 # use the root tapset dir for now. To distinquish between 64
226 # and 32 bit architectures we place the tapsets under the arch
227 # specific dir (note that systemtap will only pickup the tapset
228 # for the primary arch for now). Systemtap uses the machine name
229 # aka build_cpu as architecture specific directory name.
230 %global tapsetroot /usr/share/systemtap
231 %global tapsetdir %{tapsetroot}/tapset/%{stapinstall}
232 %endif
233
234 # not-duplicated scriplets for normal/debug packages
235 %global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
236
237
238 %define post_script() %{expand:
239 update-desktop-database %{_datadir}/applications &> /dev/null || :
240 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
241 exit 0
242 }
243
244
245 %define post_headless() %{expand:
246 %ifarch %{jit_arches}
247 # MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
248 %ifnarch %{power64}
249 #see https://bugzilla.redhat.com/show_bug.cgi?id=513605
250 %{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
251 %endif
252 %endif
253
254 PRIORITY=%{priority}
255 if [ "%{?1}" == %{debug_suffix} ]; then
256 let PRIORITY=PRIORITY-1
257 fi
258
259 ext=%{_extension}
260 alternatives \\
261 --install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\
262 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir -- %{?1}} \\
263 --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk -- %{?1}} \\
264 --slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\
265 --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
266 --slave %{_bindir}/orbd orbd %{jrebindir -- %{?1}}/orbd \\
267 --slave %{_bindir}/pack200 pack200 %{jrebindir -- %{?1}}/pack200 \\
268 --slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\
269 --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
270 --slave %{_bindir}/servertool servertool %{jrebindir -- %{?1}}/servertool \\
271 --slave %{_bindir}/tnameserv tnameserv %{jrebindir -- %{?1}}/tnameserv \\
272 --slave %{_bindir}/policytool policytool %{jrebindir -- %{?1}}/policytool \\
273 --slave %{_bindir}/unpack200 unpack200 %{jrebindir -- %{?1}}/unpack200 \\
274 --slave %{_mandir}/man1/java.1$ext java.1$ext \\
275 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
276 --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
277 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\
278 --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
279 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
280 --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\
281 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1$ext \\
282 --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
283 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1$ext \\
284 --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
285 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\
286 --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
287 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext \\
288 --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \\
289 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1$ext \\
290 --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\
291 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1$ext \\
292 --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\
293 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1$ext \\
294 --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
295 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1$ext
296
297 for X in %{origin} %{javaver} ; do
298 alternatives \\
299 --install %{_jvmdir}/jre-"$X" \\
300 jre_"$X" %{_jvmdir}/%{jredir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
301 --slave %{_jvmjardir}/jre-"$X" \\
302 jre_"$X"_exports %{_jvmdir}/%{jredir -- %{?1}}
303 done
304
305 update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
306 --slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir -- %{?1}}
307
308 update-desktop-database %{_datadir}/applications &> /dev/null || :
309 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
310
311 # see pretrans where this file is declared
312 # also see that pretrans is only for nondebug
313 if [ ! "%{?1}" == %{debug_suffix} ]; then
314 if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
315 sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}}
316 fi
317 fi
318
319 exit 0
320 }
321
322 %define postun_script() %{expand:
323 update-desktop-database %{_datadir}/applications &> /dev/null || :
324 if [ $1 -eq 0 ] ; then
325 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
326 %{update_desktop_icons}
327 fi
328 exit 0
329 }
330
331
332 %define postun_headless() %{expand:
333 alternatives --remove java %{jrebindir -- %{?1}}/java
334 alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir -- %{?1}}
335 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir -- %{?1}}
336 alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}}
337 }
338
339 %define posttrans_script() %{expand:
340 %{update_desktop_icons}
341 }
342
343 %define post_devel() %{expand:
344
345 PRIORITY=%{priority}
346 if [ "%{?1}" == %{debug_suffix} ]; then
347 let PRIORITY=PRIORITY-1
348 fi
349
350 ext=%{_extension}
351 alternatives \\
352 --install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\
353 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
354 --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir -- %{?1}} \\
355 --slave %{_bindir}/appletviewer appletviewer %{sdkbindir -- %{?1}}/appletviewer \\
356 --slave %{_bindir}/extcheck extcheck %{sdkbindir -- %{?1}}/extcheck \\
357 --slave %{_bindir}/idlj idlj %{sdkbindir -- %{?1}}/idlj \\
358 --slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
359 --slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
360 --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
361 --slave %{_bindir}/javah javah %{sdkbindir -- %{?1}}/javah \\
362 --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
363 --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
364 --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
365 --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
366 --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
367 --slave %{_bindir}/jhat jhat %{sdkbindir -- %{?1}}/jhat \\
368 --slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
369 --slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
370 --slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
371 --slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
372 --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir -- %{?1}}/jsadebugd \\
373 --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
374 --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
375 --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
376 --slave %{_bindir}/native2ascii native2ascii %{sdkbindir -- %{?1}}/native2ascii \\
377 --slave %{_bindir}/rmic rmic %{sdkbindir -- %{?1}}/rmic \\
378 --slave %{_bindir}/schemagen schemagen %{sdkbindir -- %{?1}}/schemagen \\
379 --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
380 --slave %{_bindir}/wsgen wsgen %{sdkbindir -- %{?1}}/wsgen \\
381 --slave %{_bindir}/wsimport wsimport %{sdkbindir -- %{?1}}/wsimport \\
382 --slave %{_bindir}/xjc xjc %{sdkbindir -- %{?1}}/xjc \\
383 --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \\
384 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1$ext \\
385 --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \\
386 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1$ext \\
387 --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \\
388 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1$ext \\
389 --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
390 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
391 --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
392 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
393 --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
394 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
395 --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
396 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
397 --slave %{_mandir}/man1/javah.1$ext javah.1$ext \\
398 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1$ext \\
399 --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
400 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
401 --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
402 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
403 --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
404 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
405 --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
406 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
407 --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
408 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
409 --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \\
410 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1$ext \\
411 --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
412 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
413 --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
414 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
415 --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
416 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
417 --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
418 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
419 --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \\
420 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1$ext \\
421 --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
422 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
423 --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
424 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
425 --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
426 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
427 --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\
428 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1$ext \\
429 --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
430 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1$ext \\
431 --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\
432 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1$ext \\
433 --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
434 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext \\
435 --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \\
436 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1$ext \\
437 --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \\
438 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1$ext \\
439 --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \\
440 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1$ext
441
442 for X in %{origin} %{javaver} ; do
443 alternatives \\
444 --install %{_jvmdir}/java-"$X" \\
445 java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
446 --slave %{_jvmjardir}/java-"$X" \\
447 java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir -- %{?1}}
448 done
449
450 update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
451 --slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir -- %{?1}}
452
453 update-desktop-database %{_datadir}/applications &> /dev/null || :
454 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
455
456 exit 0
457 }
458
459 %define postun_devel() %{expand:
460 alternatives --remove javac %{sdkbindir -- %{?1}}/javac
461 alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
462 alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
463 alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
464
465 update-desktop-database %{_datadir}/applications &> /dev/null || :
466
467 if [ $1 -eq 0 ] ; then
468 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
469 %{update_desktop_icons}
470 fi
471 exit 0
472 }
473
474 %define posttrans_devel() %{expand:
475 %{update_desktop_icons}
476 }
477
478 %define post_javadoc() %{expand:
479
480 PRIORITY=%{priority}
481 if [ "%{?1}" == %{debug_suffix} ]; then
482 let PRIORITY=PRIORITY-1
483 fi
484
485 alternatives \\
486 --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
487 $PRIORITY --family %{name}
488 exit 0
489 }
490
491 %define postun_javadoc() %{expand:
492 alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api
493 exit 0
494 }
495
496 %define post_javadoc_zip() %{expand:
497
498 PRIORITY=%{priority}
499 if [ "%{?1}" == %{debug_suffix} ]; then
500 let PRIORITY=PRIORITY-1
501 fi
502
503 alternatives \\
504 --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
505 $PRIORITY --family %{name}
506 exit 0
507 }
508
509 %define postun_javadoc_zip() %{expand:
510 alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
511 exit 0
512 }
513
514 %define files_jre() %{expand:
515 %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png
516 %{_datadir}/applications/*policytool%{?1}.desktop
517 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjsoundalsa.so
518 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libsplashscreen.so
519 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libawt_xawt.so
520 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjawt.so
521 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/bin/policytool
522 }
523
524
525 %define files_jre_headless() %{expand:
526 %defattr(-,root,root,-)
527 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/ASSEMBLY_EXCEPTION
528 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
529 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/THIRD_PARTY_README
530 %dir %{_jvmdir}/%{sdkdir -- %{?1}}
531 %{_jvmdir}/%{jrelnk -- %{?1}}
532 %{_jvmjardir}/%{jrelnk -- %{?1}}
533 %{jvmjardir -- %{?1}}
534 %{_jvmprivdir}/*
535 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security
536 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/cacerts
537 %dir %{_jvmdir}/%{jredir -- %{?1}}
538 %dir %{_jvmdir}/%{jredir -- %{?1}}/bin
539 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib
540 %{_jvmdir}/%{jredir -- %{?1}}/bin/java
541 %{_jvmdir}/%{jredir -- %{?1}}/bin/jjs
542 %{_jvmdir}/%{jredir -- %{?1}}/bin/keytool
543 %{_jvmdir}/%{jredir -- %{?1}}/bin/orbd
544 %{_jvmdir}/%{jredir -- %{?1}}/bin/pack200
545 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmid
546 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmiregistry
547 %{_jvmdir}/%{jredir -- %{?1}}/bin/servertool
548 %{_jvmdir}/%{jredir -- %{?1}}/bin/tnameserv
549 %{_jvmdir}/%{jredir -- %{?1}}/bin/unpack200
550 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/
551 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/
552 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/
553 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
554 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
555 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
556 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/local_policy.jar
557 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.policy
558 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.security
559 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/blacklisted.certs
560 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/logging.properties
561 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties
562 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
563 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
564 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
565 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1*
566 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
567 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
568 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
569 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1*
570 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1*
571 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
572 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
573 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
574 %ifarch %{jit_arches}
575 %ifnarch %{power64}
576 %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/classes.jsa
577 %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/classes.jsa
578 %endif
579 %endif
580 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/
581 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/
582 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}
583 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli
584 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
585 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jvm.cfg
586 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libattach.so
587 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
588 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
589 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
590 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
591 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
592 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
593 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2gss.so
594 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pcsc.so
595 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pkcs11.so
596 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjaas_unix.so
597 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava.so
598 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava_crw_demo.so
599 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjavajpeg.so
600 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjdwp.so
601 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsdt.so
602 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsig.so
603 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsound.so
604 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/liblcms.so
605 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmanagement.so
606 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmlib_image.so
607 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
608 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
609 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
610 %ifarch x86_64 %{ix86} %{aarch64}
611 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
612 %endif
613 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsctp.so
614 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsunec.so
615 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so
616 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so
617 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so
618 %{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar
619 %{_jvmdir}/%{jredir -- %{?1}}/lib/classlist
620 %{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties
621 %{_jvmdir}/%{jredir -- %{?1}}/lib/currency.data
622 %{_jvmdir}/%{jredir -- %{?1}}/lib/flavormap.properties
623 %{_jvmdir}/%{jredir -- %{?1}}/lib/hijrah-config-umalqura.properties
624 %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors/*
625 %{_jvmdir}/%{jredir -- %{?1}}/lib/jce.jar
626 %{_jvmdir}/%{jredir -- %{?1}}/lib/jexec
627 %{_jvmdir}/%{jredir -- %{?1}}/lib/jsse.jar
628 %{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt
629 %{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index
630 %{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties
631 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja
632 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties
633 %{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar
634 %{_jvmdir}/%{jredir -- %{?1}}/lib/rt.jar
635 %{_jvmdir}/%{jredir -- %{?1}}/lib/sound.properties
636 %{_jvmdir}/%{jredir -- %{?1}}/lib/tzdb.dat
637 %{_jvmdir}/%{jredir -- %{?1}}/lib/management-agent.jar
638 %{_jvmdir}/%{jredir -- %{?1}}/lib/management/*
639 %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm/*
640 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/cldrdata.jar
641 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/dnsns.jar
642 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/jaccess.jar
643 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/localedata.jar
644 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/meta-index
645 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/nashorn.jar
646 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunec.jar
647 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar
648 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar
649 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar
650
651 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images
652 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors
653 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/management
654 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm
655 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/ext
656 }
657
658 %define files_devel() %{expand:
659 %defattr(-,root,root,-)
660 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/ASSEMBLY_EXCEPTION
661 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/LICENSE
662 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/THIRD_PARTY_README
663 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
664 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/include
665 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
666 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
667 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/extcheck
668 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
669 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
670 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
671 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
672 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
673 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
674 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah
675 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
676 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi
677 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
678 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
679 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
680 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
681 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhat
682 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
683 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
684 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
685 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
686 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
687 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jsadebugd
688 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
689 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
690 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
691 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
692 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/native2ascii
693 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/orbd
694 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
695 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/policytool
696 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
697 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
698 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
699 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/schemagen
700 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
701 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/servertool
702 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
703 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
704 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsgen
705 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
706 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
707 %{_jvmdir}/%{sdkdir -- %{?1}}/include/*
708 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
709 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
710 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ir.idl
711 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jconsole.jar
712 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/orb.idl
713 %ifarch x86_64 %{ix86}
714 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/sa-jdi.jar
715 %endif
716 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/dt.jar
717 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
718 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/tools.jar
719 %{_jvmjardir}/%{sdkdir -- %{?1}}
720 %{_datadir}/applications/*jconsole%{?1}.desktop
721 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1*
722 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1*
723 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1*
724 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
725 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
726 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
727 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
728 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1*
729 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
730 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
731 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
732 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
733 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
734 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1*
735 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
736 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
737 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
738 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
739 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1*
740 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
741 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
742 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
743 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1*
744 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
745 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1*
746 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
747 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1*
748 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1*
749 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1*
750 %if %{with_systemtap}
751 %dir %{tapsetroot}
752 %dir %{tapsetdir}
753 %{tapsetdir}/*%{version}-%{release}.%{_arch}%{?1}.stp
754 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/tapset
755 %{_jvmdir}/%{sdkdir -- %{?1}}/tapset/*.stp
756 %endif
757 }
758
759 %define files_demo() %{expand:
760 %defattr(-,root,root,-)
761 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
762 }
763
764 %define files_src() %{expand:
765 %defattr(-,root,root,-)
766 %doc README.src
767 %{_jvmdir}/%{sdkdir -- %{?1}}/src.zip
768 }
769
770 %define files_javadoc() %{expand:
771 %defattr(-,root,root,-)
772 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
773 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
774 }
775
776 %define files_javadoc_zip() %{expand:
777 %defattr(-,root,root,-)
778 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
779 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
780 }
781
782 %define files_accessibility() %{expand:
783 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libatk-wrapper.so
784 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/java-atk-wrapper.jar
785 %{_jvmdir}/%{jredir -- %{?1}}/lib/accessibility.properties
786 }
787
788 # not-duplicated requires/provides/obsolate for normal/debug packages
789 %define java_rpo() %{expand:
790 Requires: fontconfig
791 Requires: x11-font-type1
792
793 # Requires rest of java
794 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
795 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
796
797
798 # Standard JPackage base provides.
799 Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
800 Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
801 Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
802 Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
803 Provides: jre = %{javaver}%{?1}
804 Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
805 Provides: java%{?1} = %{epoch}:%{javaver}
806 # Standard JPackage extensions provides.
807 Provides: java-fonts%{?1} = %{epoch}:%{version}
808
809 Obsoletes: java-1.7.0-openjdk%{?1}
810 }
811
812 %define java_headless_rpo() %{expand:
813 # Require /etc/pki/java/cacerts.
814 #Requires: ca-certificates
815 Requires: rootcerts-java
816 # Require jpackage-utils for ownership of /usr/lib/jvm/
817 Requires: jpackage-utils
818 # Require zoneinfo data provided by tzdata-java subpackage.
819 Requires: timezone-java >= 2015d
820 # libsctp.so.1 is being `dlopen`ed on demand
821 Requires: lksctp-tools
822 # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum eforce it, not rpm transaction and so no configs are persisted when pure rpm -u is run. I t may be consiedered as regression
823 Requires: copy-jdk-configs >= 3.3
824 #OrderWithRequires: copy-jdk-configs
825 # Post requires alternatives to install tool alternatives.
826 Requires(post): update-alternatives
827 # in version 1.7 and higher for --family switch
828 Requires(post): chkconfig >= 1.7-3
829 # Postun requires alternatives to uninstall tool alternatives.
830 Requires(postun): update-alternatives
831 # in version 1.7 and higher for --family switch
832 Requires(postun): chkconfig >= 1.7-3
833
834 # Standard JPackage base provides.
835 Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
836 Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
837 Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
838 Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
839 Provides: jre-headless%{?1} = %{epoch}:%{javaver}
840 Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
841 Provides: java-headless%{?1} = %{epoch}:%{javaver}
842 # Standard JPackage extensions provides.
843 Provides: jndi%{?1} = %{epoch}:%{version}
844 Provides: jndi-ldap%{?1} = %{epoch}:%{version}
845 Provides: jndi-cos%{?1} = %{epoch}:%{version}
846 Provides: jndi-rmi%{?1} = %{epoch}:%{version}
847 Provides: jndi-dns%{?1} = %{epoch}:%{version}
848 Provides: jaas%{?1} = %{epoch}:%{version}
849 Provides: jsse%{?1} = %{epoch}:%{version}
850 Provides: jce%{?1} = %{epoch}:%{version}
851 Provides: jdbc-stdext%{?1} = 4.1
852 Provides: java-sasl%{?1} = %{epoch}:%{version}
853
854 Obsoletes: java-1.7.0-openjdk-headless%{?1}
855 }
856
857 %define java_devel_rpo() %{expand:
858 # Require base package.
859 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
860 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
861 # Post requires alternatives to install tool alternatives.
862 Requires(post): update-alternatives
863 # in version 1.7 and higher for --family switch
864 Requires(post): chkconfig >= 1.7-3
865 # Postun requires alternatives to uninstall tool alternatives.
866 Requires(postun): update-alternatives
867 # in version 1.7 and higher for --family switch
868 Requires(postun): chkconfig >= 1.7-3
869
870 # Standard JPackage devel provides.
871 Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}
872 Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}
873 Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}
874 Provides: java-sdk%{?1} = %{epoch}:%{javaver}
875 Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}
876 Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}
877 Provides: java-devel%{?1} = %{epoch}:%{javaver}
878
879 Obsoletes: java-1.7.0-openjdk-devel%{?1}
880 }
881
882
883 %define java_demo_rpo() %{expand:
884 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
885 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
886
887 Provides: java-%{javaver}-%{origin}-demo = %{epoch}:%{version}-%{release}
888
889 Obsoletes: java-1.7.0-openjdk-demo%{?1}
890 }
891
892 %define java_javadoc_rpo() %{expand:
893 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
894 # Post requires alternatives to install javadoc alternative.
895 Requires(post): update-alternatives
896 # in version 1.7 and higher for --family switch
897 Requires(post): chkconfig >= 1.7-3
898 # Postun requires alternatives to uninstall javadoc alternative.
899 Requires(postun): update-alternatives
900 # in version 1.7 and higher for --family switch
901 Requires(postun): chkconfig >= 1.7-3
902
903 # Standard JPackage javadoc provides.
904 Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
905 Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
906 Provides: java-%{javaver}-%{origin}-javadoc = %{epoch}:%{version}-%{release}
907
908 Obsoletes: java-1.7.0-openjdk-javadoc%{?1}
909
910 }
911
912 %define java_src_rpo() %{expand:
913 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
914
915 # Standard JPackage javadoc provides.
916 Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
917 Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
918 Provides: java-%{javaver}-%{origin}-src = %{epoch}:%{version}-%{release}
919 Obsoletes: java-1.7.0-openjdk-src%{?1}
920 }
921
922 %define java_accessibility_rpo() %{expand:
923 Requires: java-atk-wrapper
924 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
925 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
926
927 Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{release}
928
929 Obsoletes: java-1.7.0-openjdk-accessibility%{?1}
930 }
931
932 # Prevent brp-java-repack-jars from being run.
933 %global __jar_repack 0
934
935 Name: java-%{javaver}-%{origin}
936 Version: %{javaver}.%{updatever}
937 Release: %mkrel 1.%{buildver}.2
938 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
939 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
940 # also included the epoch in their virtual provides. This created a
941 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
942 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
943 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
944 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
945 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
946 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
947 Epoch: 1
948 Summary: OpenJDK Runtime Environment
949 Group: Development/Java
950
951 License: ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C
952 URL: http://openjdk.java.net/
953
954 # aarch64-port now contains integration forest of both aarch64 and normal jdk
955 # Source from upstream OpenJDK8 project. To regenerate, use
956 # VERSION=%%{revision} FILE_NAME_ROOT=%%{project}-%%{repo}-${VERSION}
957 # REPO_ROOT=<path to checked-out repository> generate_source_tarball.sh
958 # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
959 Source0: %{project}-%{repo}-%{revision}.tar.xz
960
961 # Custom README for -src subpackage
962 Source2: README.src
963
964 # Script to generate Source4 (requires mercurial)
965 Source3: mga-add-missing-files.sh
966
967 # Additional source needed to build under Mageia
968 Source4: 7e146bd521b7.tar.bz2
969
970 # Use 'generate_tarballs.sh' to generate the following tarballs
971 # They are based on code contained in the IcedTea project (3.x).
972
973 # Systemtap tapsets. Zipped up to keep it small.
974 Source8: systemtap-tapset-3.6.0pre02.tar.xz
975
976 # Desktop files. Adapated from IcedTea.
977 Source9: jconsole.desktop.in
978 Source10: policytool.desktop.in
979
980 # nss configuration file
981 Source11: nss.cfg.in
982
983 # Removed libraries that we link instead
984 Source12: %{name}-remove-intree-libraries.sh
985
986 # Ensure we aren't using the limited crypto policy
987 Source13: TestCryptoLevel.java
988
989 # Ensure ECDSA is working
990 Source14: TestECDSA.java
991
992 Source20: repackReproduciblePolycies.sh
993
994 # New versions of config files with aarch64 support. This is not upstream yet.
995 Source100: config.guess
996 Source101: config.sub
997
998 ############################################
999 #
1000 # RPM/distribution specific patches
1001 #
1002 # This section includes patches specific to
1003 # Fedora/RHEL which can not be upstreamed
1004 # either in their current form or at all.
1005 ############################################
1006
1007 # Accessibility patches
1008 # Ignore AWTError when assistive technologies are loaded
1009 Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
1010 # Restrict access to java-atk-wrapper classes
1011 Patch3: rh1648644-java_access_bridge_privileged_security.patch
1012 # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
1013 # Not currently suitable to go upstream as it disables curves
1014 # for all providers unconditionally
1015 Patch525: pr1834-rh1022017-reduce_ellipticcurvesextension_to_provide_only_three_nss_supported_nist_curves_23_24_25.patch
1016 # Turn on AssumeMP by default on RHEL systems
1017 Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch
1018
1019 #############################################
1020 #
1021 # Upstreamable patches
1022 #
1023 # This section includes patches which need to
1024 # be reviewed & pushed to the current development
1025 # tree of OpenJDK.
1026 #############################################
1027 # PR2737: Allow multiple initialization of PKCS11 libraries
1028 Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch
1029 # PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
1030 Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch
1031 # Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
1032 Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
1033 # RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
1034 Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
1035 # PR3083, RH1346460: Regression in SSL debug output without an ECC provider
1036 Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
1037 # RH1566890: CVE-2018-3639
1038 Patch529: rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch
1039 # PR3601: Fix additional -Wreturn-type issues introduced by 8061651
1040 Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch
1041 # Support for building the SunEC provider with the system NSS installation
1042 # PR1983: Support using the system installation of NSS with the SunEC provider
1043 # PR2127: SunEC provider crashes when built using system NSS
1044 # PR2815: Race condition in SunEC provider with system NSS
1045 # PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed
1046 # PR2934: SunEC provider throwing KeyException with current NSS
1047 # PR3479, RH1486025: ECC and NSS JVM crash
1048 Patch513: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch
1049 Patch514: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch
1050 Patch515: pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch
1051 Patch516: pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch
1052 Patch517: pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch
1053 Patch518: pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch
1054 Patch519: pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch
1055 # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
1056 Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch
1057 # PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
1058 Patch540: pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch
1059 # PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy
1060 Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
1061
1062 #############################################
1063 #
1064 # Arch-specific upstreamable patches
1065 #
1066 # This section includes patches which need to
1067 # be reviewed & pushed upstream and are specific
1068 # to certain architectures. This usually means the
1069 # current OpenJDK development branch, but may also
1070 # include other trees e.g. for the AArch64 port for
1071 # OpenJDK 8u.
1072 #############################################
1073 # s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
1074 Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
1075 # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
1076 Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
1077 # AArch64: PR3519: Fix further functions with a missing return value (AArch64)
1078 Patch106: pr3519-fix_further_functions_with_a_missing_return_value.patch
1079 # AArch64: JDK-8160748: [AArch64] Inconsistent types for ideal_reg
1080 Patch107: jdk8160748-aarch64_ideal_reg.patch
1081 # AArch64: JDK-8189170: [AArch64] Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
1082 Patch108: jdk8189170-aarch64_primordial_thread.patch
1083
1084 #############################################
1085 #
1086 # Patches which need backporting to 8u
1087 #
1088 # This section includes patches which have
1089 # been pushed upstream to the latest OpenJDK
1090 # development tree, but need to be backported
1091 # to OpenJDK 8u.
1092 #############################################
1093 # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
1094 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1095 Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
1096 # S8154313: Generated javadoc scattered all over the place
1097 Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch
1098 # 8197429, PR3546, RH153662{2,3}: 32 bit java app started via JNI crashes with larger stack sizes
1099 Patch561: jdk8197429-pr3546-rh1536622-increased_stack_guard_causes_segfaults_on_x86_32.patch
1100 # 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
1101 Patch563: jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch
1102 # 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds
1103 Patch564: jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch
1104 # PR3559: Use ldrexd for atomic reads on ARMv7.
1105 Patch567: pr3559-use_ldrexd_for_atomic_reads_on_armv7_zero.patch
1106 # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
1107 Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
1108 # 8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
1109 Patch572: jdk8184309-pr3596-build_warnings_from_gcc_7_1_on_fedora_26.patch
1110 # 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
1111 Patch573: jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch
1112 # 8143245, PR3548: Zero build requires disabled warnings
1113 Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
1114 # 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
1115 Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch
1116 # 8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning
1117 Patch576: jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch
1118 # 8062808, PR3548: Turn on the -Wreturn-type warning
1119 Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch
1120 # s390: JDK-8203030, Type fixing for s390
1121 Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
1122 # 8035341: Allow using a system installed libpng
1123 Patch202: jdk8035341-allow_using_system_installed_libpng.patch
1124 # 8042159: Allow using a system-installed lcms2
1125 Patch203: jdk8042159-allow_using_system_installed_lcms2.patch
1126 # 8210761: libjsig is being compiled without optimization
1127 Patch620: jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
1128 # 8210647: libsaproc is being compiled without optimization
1129 Patch621: jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch
1130 # 8210416: [linux] Poor StrictMath performance due to non-optimized compilation
1131 Patch622: jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch
1132 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1133 # Upstream 8u part.
1134 Patch623: jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch
1135 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1136 # Aarch64-port 8u local part
1137 Patch624: jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch
1138 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1139 # Zero part of the fix for (arm/s390 arches)
1140 Patch625: jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch
1141
1142 #############################################
1143 #
1144 # Patches appearing in 8u202
1145 #
1146 # This section includes patches which are present
1147 # in the listed OpenJDK 8u release and should be
1148 # able to be removed once that release is out
1149 # and used by this RPM.
1150 #############################################
1151 # 8207057, PR3613: Enable debug information for assembly code files
1152 Patch206: jdk8207057-pr3613-no_debug_info_for_assembler_files_hotspot.patch
1153 Patch207: jdk8207057-pr3613-no_debug_info_for_assembler_files_root.patch
1154 # 8165852, PR3468: (fs) Mount point not found for a file which is present in overlayfs
1155 Patch210: jdk8165852-pr3468-mount_point_not_found_for_a_file_which_is_present_in_overlayfs.patch
1156 # S8073139, RH1191652; fix name of ppc64le architecture
1157 Patch601: jdk8073139-pr1758-rh1191652-ppc64_le_says_its_arch_is_ppc64_not_ppc64le_root.patch
1158 Patch602: jdk8073139-pr1758-rh1191652-ppc64_le_says_its_arch_is_ppc64_not_ppc64le_jdk.patch
1159 Patch603: jdk8073139-pr2236-rh1191652--use_ppc64le_as_the_arch_directory_on_that_platform_and_report_it_in_os_arch_aarch64_forest.patch
1160 # 8044235: src.zip should include all sources
1161 Patch7: jdk8044235-src_zip_should_include_all_sources.patch
1162 # JDK-8172850, RH1640127: Anti-dependency on membar causes crash in register allocator due to invalid instruction scheduling
1163 Patch583: jdk8172850-rh1640127-01-register_allocator_crash.patch
1164 # JDK-8209639, RH1640127: assert failure in coalesce.cpp: attempted to spill a non-spillable item
1165 Patch584: jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
1166 # JDK-8131048, PR3574, RH1498936: ppc implement CRC32 intrinsic
1167 Patch586: jdk8131048-pr3574-rh1498936-ppc_crc32.patch
1168 # JDK-8164920, PR3574, RH1498936: ppc: enhancement of CRC32 intrinsic
1169 Patch587: jdk8164920-pr3574-rh1498936-ppc_crc32_enhancement.patch
1170
1171 #############################################
1172 #
1173 # Patches appearing in 8u211
1174 #
1175 # This section includes patches which are present
1176 # in the listed OpenJDK 8u release and should be
1177 # able to be removed once that release is out
1178 # and used by this RPM.
1179 #############################################
1180 # JDK-8029661, PR3642, RH1477159: Support TLS v1.2 algorithm in SunPKCS11 provider
1181 Patch585: jdk8029661-pr3642-rh1477159-add_tlsv1_2_support_to_pkcs11_provider.patch
1182 # JDK-8145096, PR3693: Undefined behaviour in HotSpot
1183 Patch588: jdk8145096-pr3693-undefined_behaviour.patch
1184
1185 #############################################
1186 #
1187 # Patches ineligible for 8u
1188 #
1189 # This section includes patches which are present
1190 # upstream, but ineligible for upstream 8u backport.
1191 #############################################
1192 # 8043805: Allow using a system-installed libjpeg
1193 Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
1194
1195 #############################################
1196 #
1197 # Shenandoah fixes
1198 #
1199 # This section includes patches which are
1200 # specific to the Shenandoah garbage collector
1201 # and should be upstreamed to the appropriate
1202 # trees.
1203 #############################################
1204 # PR3634: Shenandoah still broken on s390 with aarch64-shenandoah-jdk8u181-b16
1205 Patch582: pr3634-fix_shenandoah_for_size_t_on_s390.patch
1206
1207 #############################################
1208 #
1209 # Non-OpenJDK fixes
1210 #
1211 # This section includes patches to code other
1212 # that from OpenJDK.
1213 #############################################
1214 Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
1215
1216 #############################################
1217 #
1218 # Dependencies
1219 #
1220 #############################################
1221 BuildRequires: autoconf
1222 BuildRequires: automake
1223 BuildRequires: alsa-lib-devel
1224 BuildRequires: binutils
1225 BuildRequires: cups-devel
1226 BuildRequires: desktop-file-utils
1227 # elfutils only are OK for build without AOT
1228 BuildRequires: elfutils-devel
1229 BuildRequires: fontconfig
1230 BuildRequires: freetype-devel
1231 BuildRequires: giflib-devel
1232 BuildRequires: gcc-c++
1233 BuildRequires: gdb
1234 BuildRequires: gtk2-devel
1235 BuildRequires: lcms2-devel
1236 BuildRequires: libjpeg-devel
1237 BuildRequires: libpng-devel
1238 BuildRequires: libxslt-devel
1239 BuildRequires: libx11-devel
1240 BuildRequires: libxi-devel
1241 BuildRequires: libxinerama-devel
1242 BuildRequires: libxt-devel
1243 BuildRequires: libxtst-devel
1244 # Requirements for setting up the nss.cfg
1245 BuildRequires: nss-devel
1246 BuildRequires: pkgconfig
1247 BuildRequires: x11-proto-devel
1248 BuildRequires: zip
1249 BuildRequires: unzip
1250 BuildRequires: java-1.8.0-openjdk-devel
1251 # Zero-assembler build requirement.
1252 %ifnarch %{jit_arches}
1253 BuildRequires: libffi-devel
1254 %endif
1255 BuildRequires: timezone-java >= 2015d
1256 BuildRequires: patch >= 2.7.5
1257 # Earlier versions have a bug in tree vectorization on PPC
1258 BuildRequires: gcc >= 4.8.3-8
1259
1260 %if %{with_systemtap}
1261 BuildRequires: systemtap
1262 %endif
1263
1264 # this is built always, also during debug-only build
1265 # when it is built in debug-only, then this package is just placeholder
1266 %{java_rpo %{nil}}
1267
1268 %description
1269 The OpenJDK runtime environment.
1270
1271 %if %{include_debug_build}
1272 %package debug
1273 Summary: OpenJDK Runtime Environment %{debug_on}
1274 Group: Development/Java
1275
1276 %{java_rpo -- %{debug_suffix_unquoted}}
1277 %description debug
1278 The OpenJDK runtime environment.
1279 %{debug_warning}
1280 %endif
1281
1282 %if %{include_normal_build}
1283 %package headless
1284 Summary: OpenJDK Runtime Environment
1285 Group: Development/Java
1286
1287 %{java_headless_rpo %{nil}}
1288
1289 %description headless
1290 The OpenJDK runtime environment without audio and video support.
1291 %endif
1292
1293 %if %{include_debug_build}
1294 %package headless-debug
1295 Summary: OpenJDK Runtime Environment %{debug_on}
1296 Group: Development/Java
1297
1298 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1299
1300 %description headless-debug
1301 The OpenJDK runtime environment without audio and video support.
1302 %{debug_warning}
1303 %endif
1304
1305 %if %{include_normal_build}
1306 %package devel
1307 Summary: OpenJDK Development Environment
1308 Group: Development/Java
1309
1310 %{java_devel_rpo %{nil}}
1311
1312 %description devel
1313 The OpenJDK development tools.
1314 %endif
1315
1316 %if %{include_debug_build}
1317 %package devel-debug
1318 Summary: OpenJDK Development Environment %{debug_on}
1319 Group: Development/Tools
1320
1321 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1322
1323 %description devel-debug
1324 The OpenJDK development tools.
1325 %{debug_warning}
1326 %endif
1327
1328 %if %{include_normal_build}
1329 %package demo
1330 Summary: OpenJDK Demos
1331 Group: Development/Java
1332
1333 %{java_demo_rpo %{nil}}
1334
1335 %description demo
1336 The OpenJDK demos.
1337 %endif
1338
1339 %if %{include_debug_build}
1340 %package demo-debug
1341 Summary: OpenJDK Demos %{debug_on}
1342 Group: Development/Java
1343
1344 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1345
1346 %description demo-debug
1347 The OpenJDK demos.
1348 %{debug_warning}
1349 %endif
1350
1351 %if %{include_normal_build}
1352 %package src
1353 Summary: OpenJDK Source Bundle
1354 Group: Development/Java
1355
1356 %{java_src_rpo %{nil}}
1357
1358 %description src
1359 The OpenJDK source bundle.
1360 %endif
1361
1362 %if %{include_debug_build}
1363 %package src-debug
1364 Summary: OpenJDK Source Bundle %{for_debug}
1365 Group: Development/Java
1366
1367 %{java_src_rpo -- %{debug_suffix_unquoted}}
1368
1369 %description src-debug
1370 The OpenJDK source bundle %{for_debug}.
1371 %endif
1372
1373 %if %{include_normal_build}
1374 %package javadoc
1375 Summary: OpenJDK API Documentation
1376 Group: Documentation
1377 Requires: jpackage-utils
1378 BuildArch: noarch
1379
1380 %{java_javadoc_rpo %{nil}}
1381
1382 %description javadoc
1383 The OpenJDK API documentation.
1384 %endif
1385
1386 %if %{include_normal_build}
1387 %package javadoc-zip
1388 Summary: OpenJDK API Documentation compressed in single archive
1389 Group: Documentation
1390 Requires: javapackages-tools
1391 BuildArch: noarch
1392
1393 %{java_javadoc_rpo %{nil}}
1394
1395 %description javadoc-zip
1396 The OpenJDK API documentation compressed in single archive.
1397 %endif
1398
1399 %if %{include_debug_build}
1400 %package javadoc-debug
1401 Summary: OpenJDK API Documentation %{for_debug}
1402 Group: Documentation
1403 Requires: jpackage-utils
1404 BuildArch: noarch
1405
1406 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1407
1408 %description javadoc-debug
1409 The OpenJDK API documentation %{for_debug}.
1410 %endif
1411
1412 %if %{include_debug_build}
1413 %package javadoc-zip-debug
1414 Summary: OpenJDK API Documentation compressed in single archive %{for_debug}
1415 Group: Documentation
1416 Requires: javapackages-tools
1417 BuildArch: noarch
1418
1419 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1420
1421 %description javadoc-zip-debug
1422 The OpenJDK API documentation compressed in single archive %{for_debug}.
1423 %endif
1424
1425
1426 %if %{include_normal_build}
1427 %package accessibility
1428 Summary: OpenJDK accessibility connector
1429
1430 %{java_accessibility_rpo %{nil}}
1431
1432 %description accessibility
1433 Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows
1434 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1435 programs.
1436
1437 Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still
1438 being tuned to be working with accessibility features. There are known issues
1439 with accessibility on, so please do not install this package unless you really
1440 need to.
1441 %endif
1442
1443 %if %{include_debug_build}
1444 %package accessibility-debug
1445 Summary: OpenJDK accessibility connector %{for_debug}
1446
1447 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1448
1449 %description accessibility-debug
1450 See normal java-%{version}-openjdk-accessibility description.
1451 %endif
1452
1453
1454 %if %{with_openjfx_binding}
1455 %package openjfx
1456 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1457 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1458 Requires: openjfx%{?_isa}
1459 Provides: javafx = %{epoch}:%{version}-%{release}
1460 %description openjfx
1461 Set of links from OpenJDK (jre) to OpenJFX
1462
1463 %package openjfx-devel
1464 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1465 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1466 Requires: openjfx-devel%{?_isa}
1467 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1468 %description openjfx-devel
1469 Set of links from OpenJDK (sdk) to OpenJFX
1470
1471 %if %{include_debug_build}
1472 %package openjfx-debug
1473 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-debug
1474 Requires: %{name}-debug%{?_isa} = %{epoch}:%{version}-%{release}
1475 Requires: openjfx%{?_isa}
1476 Provides: javafx-debug = %{epoch}:%{version}-%{release}
1477 %description openjfx-debug
1478 Set of links from OpenJDK-debug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1479
1480 %package openjfx-devel-debug
1481 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-debug
1482 Requires: %{name}-devel-debug%{?_isa} = %{epoch}:%{version}-%{release}
1483 Requires: openjfx-devel%{?_isa}
1484 Provides: javafx-devel-debug = %{epoch}:%{version}-%{release}
1485 %description openjfx-devel-debug
1486 Set of links from OpenJDK-debug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1487 %endif
1488 %endif
1489
1490 %prep
1491 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1492 echo "include_normal_build is %{include_normal_build}"
1493 else
1494 echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
1495 exit 11
1496 fi
1497 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1498 echo "include_debug_build is %{include_debug_build}"
1499 else
1500 echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
1501 exit 12
1502 fi
1503 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
1504 echo "you have disabled both include_debug_build and include_debug_build. no go."
1505 exit 13
1506 fi
1507 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1508 # Add the missing files to be able to build under Mageia
1509 tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
1510 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1511 prioritylength=`expr length %{priority}`
1512 if [ $prioritylength -ne 7 ] ; then
1513 echo "priority must be 7 digits in total, violated"
1514 exit 14
1515 fi
1516 # For old patches
1517 ln -s openjdk jdk8
1518
1519 cp %{SOURCE2} .
1520
1521 # replace outdated configure guess script
1522 #
1523 # the configure macro will do this too, but it also passes a few flags not
1524 # supported by openjdk configure script
1525 cp %{SOURCE100} openjdk/common/autoconf/build-aux/
1526 cp %{SOURCE101} openjdk/common/autoconf/build-aux/
1527
1528 # OpenJDK patches
1529
1530 # Remove libraries that are linked
1531 sh %{SOURCE12}
1532
1533 # System library fixes
1534 %patch201
1535 %patch202
1536 %patch203
1537
1538 # Debugging fixes
1539 %patch206
1540 %patch207
1541 %patch210
1542
1543 %patch300
1544
1545 %patch1
1546 %patch3
1547 %patch5
1548 %patch7
1549
1550 # s390 build fixes
1551 %patch102
1552 %patch103
1553
1554 # AArch64 fixes
1555 %patch106
1556 %patch107
1557 %patch108
1558
1559 # x86 fixes
1560 %patch105
1561
1562 # ppc64le fixes
1563 %patch603
1564 %patch601
1565 %patch602
1566
1567 # Upstreamable fixes
1568 %patch502
1569 %patch504
1570 %patch512
1571 #patch513
1572 #patch514
1573 #patch515
1574 #patch516
1575 #patch517
1576 #patch518
1577 #patch519
1578 %patch400
1579 %patch523
1580 %patch528
1581 %patch529
1582 %patch530
1583 %patch561
1584 %patch563
1585 %patch564
1586 %patch567
1587 %patch571
1588 %patch572
1589 %patch573
1590 %patch574
1591 %patch575
1592 %patch576
1593 %patch577
1594 %patch620
1595 %patch621
1596 %patch622
1597 %patch623
1598 %patch624
1599 %patch625
1600 %patch583
1601 %patch584
1602 %patch585
1603 %patch586
1604 %patch587
1605 %patch588
1606
1607 # RPM-only fixes
1608 %patch525
1609 %patch539
1610 %patch540
1611
1612 # RHEL-only patches
1613 %if 0%{?rhel}
1614 %patch534
1615 %endif
1616
1617 # Shenandoah patches
1618 %patch582
1619
1620 %patch1000
1621
1622 # Extract systemtap tapsets
1623 %if %{with_systemtap}
1624 tar -x -I xz -f %{SOURCE8}
1625 %if %{include_debug_build}
1626 cp -r tapset tapset%{debug_suffix}
1627 %endif
1628
1629
1630 for suffix in %{build_loop} ; do
1631 for file in "tapset"$suffix/*.in; do
1632 OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g`
1633 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
1634 # TODO find out which architectures other than i686 have a client vm
1635 %ifarch %{ix86}
1636 sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
1637 %else
1638 sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
1639 %endif
1640 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g $OUTPUT_FILE
1641 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
1642 sed -i -e s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g $OUTPUT_FILE
1643 done
1644 done
1645 # systemtap tapsets ends
1646 %endif
1647
1648 # Prepare desktop files
1649 for suffix in %{build_loop} ; do
1650 for file in %{SOURCE9} %{SOURCE10} ; do
1651 FILE=`basename $file | sed -e s:\.in$::g`
1652 EXT="${FILE##*.}"
1653 NAME="${FILE%.*}"
1654 OUTPUT_FILE=$NAME$suffix.$EXT
1655 sed -e s:#JAVA_HOME#:%{sdkbindir -- $suffix}:g $file > $OUTPUT_FILE
1656 sed -i -e s:#JRE_HOME#:%{jrebindir -- $suffix}:g $OUTPUT_FILE
1657 sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE
1658 done
1659 done
1660
1661 # Setup nss.cfg
1662 sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg
1663
1664 %build
1665 # How many cpu's do we have?
1666 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1667 export NUM_PROC=${NUM_PROC:-1}
1668 %if 0%{?_smp_ncpus_max}
1669 # Honor %%_smp_ncpus_max
1670 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1671 %endif
1672
1673 # Build IcedTea and OpenJDK.
1674 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1675 export ARCH_DATA_MODEL=64
1676 %endif
1677 %ifarch alpha
1678 export CFLAGS="$CFLAGS -mieee"
1679 %endif
1680
1681 # We use ourcppflags because the OpenJDK build seems to
1682 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1683 # Explicitly set the C++ standard as the default has changed on GCC >= 6
1684 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
1685 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
1686 %ifarch %{power64} ppc
1687 # fix rpmlint warnings
1688 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1689 %endif
1690 export EXTRA_CFLAGS
1691
1692 (cd openjdk/common/autoconf
1693 bash ./autogen.sh
1694 )
1695
1696 for suffix in %{build_loop} ; do
1697 if [ "$suffix" = "%{debug_suffix}" ] ; then
1698 debugbuild=%{debugbuild_parameter}
1699 else
1700 debugbuild=%{normalbuild_parameter}
1701 fi
1702
1703 mkdir -p %{buildoutputdir -- $suffix}
1704 pushd %{buildoutputdir -- $suffix}
1705
1706 bash ../../configure \
1707 %ifnarch %{jit_arches}
1708 --with-jvm-variants=zero \
1709 %endif
1710 --disable-zip-debug-info \
1711 --with-milestone="fcs" \
1712 --with-update-version=%{updatever} \
1713 --with-build-number=%{buildver} \
1714 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
1715 --with-debug-level=$debugbuild \
1716 --enable-unlimited-crypto \
1717 --with-zlib=system \
1718 --with-libjpeg=system \
1719 --with-giflib=system \
1720 --with-libpng=system \
1721 --with-lcms=bundled \
1722 --with-stdc++lib=dynamic \
1723 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1724 --with-extra-cflags="$EXTRA_CFLAGS" \
1725 --with-extra-ldflags="%{ourldflags}" \
1726 --with-num-cores="$NUM_PROC"
1727
1728 cat spec.gmk
1729 cat hotspot-spec.gmk
1730
1731 # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
1732 # disables FDS for all build configs and reverts to pre-FDS make logic.
1733 # STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
1734 # ignore all the other logic about which debug options and just do '-g'.
1735
1736 make \
1737 DEBUG_BINARIES=true \
1738 JAVAC_FLAGS=-g \
1739 STRIP_POLICY=no_strip \
1740 POST_STRIP_CMD="" \
1741 LOG=trace \
1742 SCTP_WERROR= \
1743 %{targets}
1744
1745 make zip-docs
1746
1747 # the build (erroneously) removes read permissions from some jars
1748 # this is a regression in OpenJDK 7 (our compiler):
1749 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1750 find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1751 chmod ugo+r images/%{j2sdkimage}/lib/ct.sym
1752
1753 # remove redundant *diz and *debuginfo files
1754 find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \;
1755 find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \;
1756
1757 popd >& /dev/null
1758
1759 # Install nss.cfg right away as we will be using the JRE above
1760 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1761
1762 # Install nss.cfg right away as we will be using the JRE above
1763 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
1764
1765 # Use system-wide tzdata
1766 rm $JAVA_HOME/jre/lib/tzdb.dat
1767 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
1768
1769 #build cycles
1770 done
1771
1772 %check
1773
1774 # We test debug first as it will give better diagnostics on a crash
1775 for suffix in %{rev_build_loop} ; do
1776
1777 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1778
1779 # Check unlimited policy has been used
1780 $JAVA_HOME/bin/javac -d . %{SOURCE13}
1781 $JAVA_HOME/bin/java TestCryptoLevel
1782
1783 # Check ECC is working
1784 $JAVA_HOME/bin/javac -d . %{SOURCE14}
1785 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
1786
1787 # Check debug symbols are present and can identify code
1788 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
1789 do
1790 if [ -f "$lib" ] ; then
1791 echo "Testing $lib for debug symbols"
1792 # All these tests rely on RPM failing the build if the exit code of any set
1793 # of piped commands is non-zero.
1794
1795 # Test for .debug_* sections in the shared object. This is the main test.
1796 # Stripped objects will not contain these.
1797 eu-readelf -S "$lib" | grep "] .debug_"
1798 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
1799
1800 # Test FILE symbols. These will most likely be removed by anyting that
1801 # manipulates symbol tables because it's generally useless. So a nice test
1802 # that nothing has messed with symbols.
1803 old_IFS="$IFS"
1804 IFS=$'\n'
1805 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
1806 do
1807 # We expect to see .cpp files, except for architectures like aarch64 and
1808 # s390 where we expect .o and .oS files
1809 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
1810 done
1811 IFS="$old_IFS"
1812
1813 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking.
1814 if [ "`basename $lib`" = "libjvm.so" ]; then
1815 eu-readelf -s "$lib" | \
1816 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
1817 fi
1818
1819 # Test that there are no .gnu_debuglink sections pointing to another
1820 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
1821 # no sense either.
1822 eu-readelf -S "$lib" | grep 'gnu'
1823 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
1824 echo "bad .gnu_debuglink section."
1825 eu-readelf -x .gnu_debuglink "$lib"
1826 false
1827 fi
1828 fi
1829 done
1830
1831 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
1832 # javaCalls.cpp:58 should map to:
1833 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
1834 # Using line number 1 might cause build problems. See:
1835 # https://bugzilla.redhat.com/show_bug.cgi?id=1539664
1836 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767
1837 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
1838 handle SIGSEGV pass nostop noprint
1839 handle SIGILL pass nostop noprint
1840 set breakpoint pending on
1841 break javaCalls.cpp:58
1842 commands 1
1843 backtrace
1844 quit
1845 end
1846 run -version
1847 EOF
1848 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
1849
1850 # Check src.zip has all sources. See RHBZ#1130490
1851 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
1852
1853 # Check class files include useful debugging information
1854 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
1855 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
1856 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
1857
1858 # Check generated class files include useful debugging information
1859 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
1860 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
1861 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
1862
1863 #build cycles check
1864 done
1865
1866 %install
1867 STRIP_KEEP_SYMTAB=libjvm*
1868
1869 for suffix in %{build_loop} ; do
1870
1871 pushd %{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1872
1873 #install jsa directories so we can owe them
1874 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1875 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
1876
1877 # Install main files.
1878 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1879 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1880 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1881 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1882
1883 %if %{with_systemtap}
1884 # Install systemtap support files.
1885 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
1886 # note, that uniquesuffix is in BUILD dir in this case
1887 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1888 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1889 tapsetFiles=`ls *.stp`
1890 popd
1891 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1892 pushd $RPM_BUILD_ROOT%{tapsetdir}
1893 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir -- $suffix}/tapset %{tapsetdir})
1894 for name in $tapsetFiles ; do
1895 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
1896 ln -sf $RELATIVE/$name $targetName
1897 done
1898 popd
1899 %endif
1900
1901 # Remove empty cacerts database.
1902 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
1903 # Install cacerts symlink needed by some apps which hardcode the path.
1904 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
1905 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1906 %{_jvmdir}/%{jredir -- $suffix}/lib/security)
1907 ln -sf $RELATIVE/cacerts .
1908 popd
1909
1910 # Install extension symlinks.
1911 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1912 pushd $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1913 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir -- $suffix}/lib %{jvmjardir -- $suffix})
1914 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1915 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1916 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1917 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1918 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1919 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1920 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1921 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1922 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1923 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1924 for jar in *-%{version}.jar
1925 do
1926 if [ x%{version} != x%{javaver} ]
1927 then
1928 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1929 fi
1930 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1931 done
1932 popd
1933
1934 # Install JCE policy symlinks.
1935 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix -- $suffix}/jce/vanilla
1936
1937 # Install versioned symlinks.
1938 pushd $RPM_BUILD_ROOT%{_jvmdir}
1939 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
1940 popd
1941
1942 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1943 ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
1944 popd
1945
1946 # Remove javaws man page
1947 rm -f man/man1/javaws*
1948
1949 # Install man pages.
1950 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1951 for manpage in man/man1/*
1952 do
1953 # Convert man pages to UTF8 encoding.
1954 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1955 mv -f $manpage.tmp $manpage
1956 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1957 $manpage .1)-%{uniquesuffix -- $suffix}.1
1958 done
1959
1960 # Install demos and samples.
1961 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1962 mkdir -p sample/rmi
1963 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
1964 # hack to allow --short-circuit on install
1965 mv bin/java-rmi.cgi sample/rmi
1966 fi
1967 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1968
1969 popd
1970
1971
1972 # Install Javadoc documentation.
1973 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1974 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
1975 cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
1976
1977 # Install icons and menu entries.
1978 for s in 16 24 32 48 ; do
1979 install -D -p -m 644 \
1980 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1981 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1982 done
1983
1984 # Install desktop files.
1985 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1986 for e in jconsole$suffix policytool$suffix ; do
1987 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
1988 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1989 done
1990
1991 # Install /etc/.java/.systemPrefs/ directory
1992 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
1993 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
1994
1995 # FIXME: remove SONAME entries from demo DSOs. See
1996 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1997
1998 # Find non-documentation demo files.
1999 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
2000 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
2001 -type f -o -type l | sort \
2002 | grep -v README \
2003 | sed 's|'$RPM_BUILD_ROOT'||' \
2004 >> %{name}-demo.files"$suffix"
2005 # Find documentation demo files.
2006 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
2007 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
2008 -type f -o -type l | sort \
2009 | grep README \
2010 | sed 's|'$RPM_BUILD_ROOT'||' \
2011 | sed 's|^|%doc |' \
2012 >> %{name}-demo.files"$suffix"
2013
2014 # Create links which leads to separately installed java-atk-bridge and allow configuration
2015 # links points to java-atk-wrapper - an dependence
2016 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
2017 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
2018 popd
2019 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
2020 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
2021 popd
2022 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
2023 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
2024 echo "" >> accessibility.properties
2025 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
2026 echo "" >> accessibility.properties
2027 popd
2028
2029 # intentionally after all else, fx links with redirections on its own
2030 %if %{with_openjfx_binding}
2031 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
2032 FXJRE_FILES=%{name}-openjfx.files"$suffix"
2033 echo -n "" > $FXJRE_FILES
2034 echo -n "" > $FXSDK_FILES
2035 for file in %{jfx_jre_libs} ; do
2036 srcfile=%{jfx_jre_libs_dir}/$file
2037 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
2038 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2039 echo $targetfile >> $FXJRE_FILES
2040 done
2041 for file in %{jfx_jre_native} ; do
2042 srcfile=%{jfx_jre_native_dir}/$file
2043 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
2044 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2045 echo $targetfile >> $FXJRE_FILES
2046 done
2047 for file in %{jfx_jre_exts} ; do
2048 srcfile=%{jfx_jre_exts_dir}/$file
2049 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
2050 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2051 echo $targetfile >> $FXJRE_FILES
2052 done
2053 for file in %{jfx_sdk_libs} ; do
2054 srcfile=%{jfx_sdk_libs_dir}/$file
2055 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
2056 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2057 echo $targetfile >> $FXSDK_FILES
2058 done
2059 for file in %{jfx_sdk_bins} ; do
2060 srcfile=%{jfx_sdk_bins_dir}/$file
2061 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
2062 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2063 echo $targetfile >> $FXSDK_FILES
2064 done
2065 %endif
2066
2067 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
2068 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
2069 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
2070
2071 # end, dual install
2072 done
2073
2074 %if %{include_normal_build}
2075 # intentioanlly only for non-debug
2076 %pretrans headless -p <lua>
2077 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2078 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
2079 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
2080 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
2081 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
2082 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
2083 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
2084 local posix = require "posix"
2085 local debug = false
2086
2087 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2088 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2089
2090 local stat1 = posix.stat(SOURCE1, "type");
2091 local stat2 = posix.stat(SOURCE2, "type");
2092
2093 if (stat1 ~= nil) then
2094 if (debug) then
2095 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2096 end;
2097 package.path = package.path .. ";" .. SOURCE1
2098 else
2099 if (stat2 ~= nil) then
2100 if (debug) then
2101 print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
2102 end;
2103 package.path = package.path .. ";" .. SOURCE2
2104 else
2105 if (debug) then
2106 print(SOURCE1 .." does NOT exists")
2107 print(SOURCE2 .." does NOT exists")
2108 print("No config files will be copied")
2109 end
2110 return
2111 end
2112 end
2113 -- run contetn of included file with fake args
2114 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2115 require "copy_jdk_configs.lua"
2116
2117 %post headless
2118 %{post_headless %{nil}}
2119
2120
2121 %postun headless
2122 %{postun_headless %{nil}}
2123
2124 %post devel
2125 %{post_devel %{nil}}
2126
2127 %postun devel
2128 %{postun_devel %{nil}}
2129
2130 %post javadoc
2131 %{post_javadoc %{nil}}
2132
2133 %postun javadoc
2134 %{postun_javadoc %{nil}}
2135
2136 %post javadoc-zip
2137 %{post_javadoc_zip %{nil}}
2138
2139 %postun javadoc-zip
2140 %{postun_javadoc_zip %{nil}}
2141 %endif
2142
2143 %if %{include_normal_build}
2144 %files
2145 # main package builds always
2146 %{files_jre %{nil}}
2147 %else
2148 %files
2149 # placeholder
2150 %endif
2151
2152
2153 %if %{include_normal_build}
2154 %files headless
2155 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2156 # all config/norepalce files (and more) have to be declared in pretrans. See pretrans
2157 %{files_jre_headless %{nil}}
2158
2159 %files devel
2160 %{files_devel %{nil}}
2161
2162 %files demo -f %{name}-demo.files
2163 %{files_demo %{nil}}
2164
2165 %files src
2166 %{files_src %{nil}}
2167
2168 %files javadoc
2169 %{files_javadoc %{nil}}
2170
2171 %files javadoc-zip
2172 %{files_javadoc_zip %{nil}}
2173
2174 %files accessibility
2175 %{files_accessibility %{nil}}
2176
2177 %if %{with_openjfx_binding}
2178 %files openjfx -f %{name}-openjfx.files
2179
2180 %files openjfx-devel -f %{name}-openjfx-devel.files
2181 %endif
2182 %endif
2183
2184 %if %{include_debug_build}
2185 %files debug
2186 %{files_jre -- %{debug_suffix_unquoted}}
2187
2188 %files headless-debug
2189 %{files_jre_headless -- %{debug_suffix_unquoted}}
2190
2191 %files devel-debug
2192 %{files_devel -- %{debug_suffix_unquoted}}
2193
2194 %files demo-debug -f %{name}-demo.files-debug
2195 %{files_demo -- %{debug_suffix_unquoted}}
2196
2197 %files src-debug
2198 %{files_src -- %{debug_suffix_unquoted}}
2199
2200 %files javadoc-debug
2201 %{files_javadoc -- %{debug_suffix_unquoted}}
2202
2203 %files javadoc-zip-debug
2204 %{files_javadoc_zip -- %{debug_suffix_unquoted}}
2205
2206 %files accessibility-debug
2207 %{files_accessibility -- %{debug_suffix_unquoted}}
2208
2209 %if %{with_openjfx_binding}
2210 %files openjfx-debug -f %{name}-openjfx.files-debug
2211
2212 %files openjfx-devel-debug -f %{name}-openjfx-devel.files-debug
2213 %endif
2214 %endif
2215
2216

  ViewVC Help
Powered by ViewVC 1.1.30