/[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 1393151 - (show annotations) (download)
Thu Apr 18 08:24:02 2019 UTC (5 years ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 81348 byte(s)
- SILENT: add missing files

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 libglassgtk2.so libglassgtk3.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-jdk8u212-b02
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/clhsdb
541 %{_jvmdir}/%{jredir -- %{?1}}/bin/hsdb
542 %{_jvmdir}/%{jredir -- %{?1}}/bin/java
543 %{_jvmdir}/%{jredir -- %{?1}}/bin/jjs
544 %{_jvmdir}/%{jredir -- %{?1}}/bin/keytool
545 %{_jvmdir}/%{jredir -- %{?1}}/bin/orbd
546 %{_jvmdir}/%{jredir -- %{?1}}/bin/pack200
547 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmid
548 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmiregistry
549 %{_jvmdir}/%{jredir -- %{?1}}/bin/servertool
550 %{_jvmdir}/%{jredir -- %{?1}}/bin/tnameserv
551 %{_jvmdir}/%{jredir -- %{?1}}/bin/unpack200
552 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/
553 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/
554 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/
555 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
556 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
557 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
558 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/local_policy.jar
559 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.policy
560 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.security
561 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/blacklisted.certs
562 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/logging.properties
563 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties
564 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
565 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
566 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
567 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1*
568 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
569 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
570 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
571 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1*
572 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1*
573 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
574 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
575 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
576 %ifarch %{jit_arches}
577 %ifnarch %{power64}
578 %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/classes.jsa
579 %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/classes.jsa
580 %endif
581 %endif
582 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/
583 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/
584 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}
585 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli
586 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
587 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jvm.cfg
588 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libattach.so
589 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
590 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
591 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
592 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
593 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
594 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
595 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2gss.so
596 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pcsc.so
597 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pkcs11.so
598 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjaas_unix.so
599 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava.so
600 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava_crw_demo.so
601 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjavajpeg.so
602 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjdwp.so
603 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsdt.so
604 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsig.so
605 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsound.so
606 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/liblcms.so
607 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmanagement.so
608 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmlib_image.so
609 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
610 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
611 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
612 %ifarch x86_64 %{ix86} %{aarch64}
613 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
614 %endif
615 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsctp.so
616 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsunec.so
617 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so
618 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so
619 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so
620 %{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar
621 %{_jvmdir}/%{jredir -- %{?1}}/lib/classlist
622 %{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties
623 %{_jvmdir}/%{jredir -- %{?1}}/lib/currency.data
624 %{_jvmdir}/%{jredir -- %{?1}}/lib/flavormap.properties
625 %{_jvmdir}/%{jredir -- %{?1}}/lib/hijrah-config-umalqura.properties
626 %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors/*
627 %{_jvmdir}/%{jredir -- %{?1}}/lib/jce.jar
628 %{_jvmdir}/%{jredir -- %{?1}}/lib/jexec
629 %{_jvmdir}/%{jredir -- %{?1}}/lib/jsse.jar
630 %{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt
631 %{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index
632 %{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties
633 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja
634 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties
635 %{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar
636 %{_jvmdir}/%{jredir -- %{?1}}/lib/rt.jar
637 %{_jvmdir}/%{jredir -- %{?1}}/lib/sound.properties
638 %{_jvmdir}/%{jredir -- %{?1}}/lib/tzdb.dat
639 %{_jvmdir}/%{jredir -- %{?1}}/lib/management-agent.jar
640 %{_jvmdir}/%{jredir -- %{?1}}/lib/management/*
641 %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm/*
642 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/cldrdata.jar
643 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/dnsns.jar
644 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/jaccess.jar
645 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/localedata.jar
646 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/meta-index
647 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/nashorn.jar
648 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunec.jar
649 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar
650 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar
651 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar
652
653 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images
654 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors
655 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/management
656 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm
657 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/ext
658 }
659
660 %define files_devel() %{expand:
661 %defattr(-,root,root,-)
662 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/ASSEMBLY_EXCEPTION
663 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/LICENSE
664 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/THIRD_PARTY_README
665 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
666 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/include
667 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
668 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
669 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/clhsdb
670 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/extcheck
671 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/hsdb
672 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
673 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
674 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
675 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
676 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
677 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
678 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah
679 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
680 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi
681 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
682 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
683 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
684 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
685 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhat
686 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
687 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
688 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
689 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
690 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
691 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jsadebugd
692 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
693 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
694 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
695 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
696 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/native2ascii
697 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/orbd
698 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
699 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/policytool
700 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
701 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
702 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
703 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/schemagen
704 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
705 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/servertool
706 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
707 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
708 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsgen
709 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
710 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
711 %{_jvmdir}/%{sdkdir -- %{?1}}/include/*
712 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
713 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
714 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ir.idl
715 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jconsole.jar
716 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/orb.idl
717 %ifarch x86_64 %{ix86} aarch64
718 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/sa-jdi.jar
719 %endif
720 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/dt.jar
721 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
722 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/tools.jar
723 %{_jvmjardir}/%{sdkdir -- %{?1}}
724 %{_datadir}/applications/*jconsole%{?1}.desktop
725 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1*
726 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1*
727 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1*
728 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
729 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
730 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
731 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
732 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1*
733 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
734 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
735 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
736 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
737 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
738 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1*
739 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
740 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
741 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
742 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
743 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1*
744 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
745 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
746 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
747 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1*
748 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
749 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1*
750 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
751 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1*
752 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1*
753 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1*
754 %if %{with_systemtap}
755 %dir %{tapsetroot}
756 %dir %{tapsetdir}
757 %{tapsetdir}/*%{version}-%{release}.%{_arch}%{?1}.stp
758 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/tapset
759 %{_jvmdir}/%{sdkdir -- %{?1}}/tapset/*.stp
760 %endif
761 }
762
763 %define files_demo() %{expand:
764 %defattr(-,root,root,-)
765 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
766 }
767
768 %define files_src() %{expand:
769 %defattr(-,root,root,-)
770 %doc README.src
771 %{_jvmdir}/%{sdkdir -- %{?1}}/src.zip
772 }
773
774 %define files_javadoc() %{expand:
775 %defattr(-,root,root,-)
776 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
777 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
778 }
779
780 %define files_javadoc_zip() %{expand:
781 %defattr(-,root,root,-)
782 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
783 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
784 }
785
786 %define files_accessibility() %{expand:
787 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libatk-wrapper.so
788 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/java-atk-wrapper.jar
789 %{_jvmdir}/%{jredir -- %{?1}}/lib/accessibility.properties
790 }
791
792 # not-duplicated requires/provides/obsolate for normal/debug packages
793 %define java_rpo() %{expand:
794 Requires: fontconfig
795 Requires: x11-font-type1
796
797 # Requires rest of java
798 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
799 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
800
801
802 # Standard JPackage base provides.
803 Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
804 Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
805 Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
806 Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
807 Provides: jre = %{javaver}%{?1}
808 Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
809 Provides: java%{?1} = %{epoch}:%{javaver}
810 # Standard JPackage extensions provides.
811 Provides: java-fonts%{?1} = %{epoch}:%{version}
812
813 Obsoletes: java-1.7.0-openjdk%{?1}
814 }
815
816 %define java_headless_rpo() %{expand:
817 # Require /etc/pki/java/cacerts.
818 #Requires: ca-certificates
819 Requires: rootcerts-java
820 # Require jpackage-utils for ownership of /usr/lib/jvm/
821 Requires: jpackage-utils
822 # Require zoneinfo data provided by tzdata-java subpackage.
823 Requires: timezone-java >= 2015d
824 # libsctp.so.1 is being `dlopen`ed on demand
825 Requires: lksctp-tools
826 # 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
827 Requires: copy-jdk-configs >= 3.3
828 #OrderWithRequires: copy-jdk-configs
829 # Post requires alternatives to install tool alternatives.
830 Requires(post): update-alternatives
831 # in version 1.7 and higher for --family switch
832 Requires(post): chkconfig >= 1.7-3
833 # Postun requires alternatives to uninstall tool alternatives.
834 Requires(postun): update-alternatives
835 # in version 1.7 and higher for --family switch
836 Requires(postun): chkconfig >= 1.7-3
837
838 # Standard JPackage base provides.
839 Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
840 Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
841 Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
842 Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
843 Provides: jre-headless%{?1} = %{epoch}:%{javaver}
844 Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
845 Provides: java-headless%{?1} = %{epoch}:%{javaver}
846 # Standard JPackage extensions provides.
847 Provides: jndi%{?1} = %{epoch}:%{version}
848 Provides: jndi-ldap%{?1} = %{epoch}:%{version}
849 Provides: jndi-cos%{?1} = %{epoch}:%{version}
850 Provides: jndi-rmi%{?1} = %{epoch}:%{version}
851 Provides: jndi-dns%{?1} = %{epoch}:%{version}
852 Provides: jaas%{?1} = %{epoch}:%{version}
853 Provides: jsse%{?1} = %{epoch}:%{version}
854 Provides: jce%{?1} = %{epoch}:%{version}
855 Provides: jdbc-stdext%{?1} = 4.1
856 Provides: java-sasl%{?1} = %{epoch}:%{version}
857
858 Obsoletes: java-1.7.0-openjdk-headless%{?1}
859 }
860
861 %define java_devel_rpo() %{expand:
862 # Require base package.
863 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
864 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
865 # Post requires alternatives to install tool alternatives.
866 Requires(post): update-alternatives
867 # in version 1.7 and higher for --family switch
868 Requires(post): chkconfig >= 1.7-3
869 # Postun requires alternatives to uninstall tool alternatives.
870 Requires(postun): update-alternatives
871 # in version 1.7 and higher for --family switch
872 Requires(postun): chkconfig >= 1.7-3
873
874 # Standard JPackage devel provides.
875 Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}
876 Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}
877 Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}
878 Provides: java-sdk%{?1} = %{epoch}:%{javaver}
879 Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}
880 Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}
881 Provides: java-devel%{?1} = %{epoch}:%{javaver}
882
883 Obsoletes: java-1.7.0-openjdk-devel%{?1}
884 }
885
886
887 %define java_demo_rpo() %{expand:
888 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
889 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
890
891 Provides: java-%{javaver}-%{origin}-demo = %{epoch}:%{version}-%{release}
892
893 Obsoletes: java-1.7.0-openjdk-demo%{?1}
894 }
895
896 %define java_javadoc_rpo() %{expand:
897 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
898 # Post requires alternatives to install javadoc alternative.
899 Requires(post): update-alternatives
900 # in version 1.7 and higher for --family switch
901 Requires(post): chkconfig >= 1.7-3
902 # Postun requires alternatives to uninstall javadoc alternative.
903 Requires(postun): update-alternatives
904 # in version 1.7 and higher for --family switch
905 Requires(postun): chkconfig >= 1.7-3
906
907 # Standard JPackage javadoc provides.
908 Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
909 Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
910 Provides: java-%{javaver}-%{origin}-javadoc = %{epoch}:%{version}-%{release}
911
912 Obsoletes: java-1.7.0-openjdk-javadoc%{?1}
913
914 }
915
916 %define java_src_rpo() %{expand:
917 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
918
919 # Standard JPackage javadoc provides.
920 Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
921 Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
922 Provides: java-%{javaver}-%{origin}-src = %{epoch}:%{version}-%{release}
923 Obsoletes: java-1.7.0-openjdk-src%{?1}
924 }
925
926 %define java_accessibility_rpo() %{expand:
927 Requires: java-atk-wrapper
928 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
929 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
930
931 Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{release}
932
933 Obsoletes: java-1.7.0-openjdk-accessibility%{?1}
934 }
935
936 # Prevent brp-java-repack-jars from being run.
937 %global __jar_repack 0
938
939 Name: java-%{javaver}-%{origin}
940 Version: %{javaver}.%{updatever}
941 Release: %mkrel 1.%{buildver}.1
942 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
943 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
944 # also included the epoch in their virtual provides. This created a
945 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
946 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
947 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
948 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
949 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
950 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
951 Epoch: 1
952 Summary: OpenJDK Runtime Environment
953 Group: Development/Java
954
955 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
956 URL: http://openjdk.java.net/
957
958 # aarch64-port now contains integration forest of both aarch64 and normal jdk
959 # Source from upstream OpenJDK8 project. To regenerate, use
960 # VERSION=%%{revision} FILE_NAME_ROOT=%%{project}-%%{repo}-${VERSION}
961 # REPO_ROOT=<path to checked-out repository> generate_source_tarball.sh
962 # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
963 Source0: %{project}-%{repo}-%{revision}.tar.xz
964
965 # Custom README for -src subpackage
966 Source2: README.src
967
968 # Script to generate Source4 (requires mercurial)
969 Source3: mga-add-missing-files.sh
970
971 # Additional source needed to build under Mageia
972 Source4: 4e0ade06a22f.tar.bz2
973
974 # Use 'generate_tarballs.sh' to generate the following tarballs
975 # They are based on code contained in the IcedTea project (3.x).
976
977 # Systemtap tapsets. Zipped up to keep it small.
978 Source8: systemtap-tapset-3.6.0pre02.tar.xz
979
980 # Desktop files. Adapated from IcedTea.
981 Source9: jconsole.desktop.in
982 Source10: policytool.desktop.in
983
984 # nss configuration file
985 Source11: nss.cfg.in
986
987 # Removed libraries that we link instead
988 Source12: %{name}-remove-intree-libraries.sh
989
990 # Ensure we aren't using the limited crypto policy
991 Source13: TestCryptoLevel.java
992
993 # Ensure ECDSA is working
994 Source14: TestECDSA.java
995
996 # Verify system crypto (policy) can be disabled via a property
997 Source15: TestSecurityProperties.java
998
999 Source20: repackReproduciblePolycies.sh
1000
1001 # New versions of config files with aarch64 support. This is not upstream yet.
1002 Source100: config.guess
1003 Source101: config.sub
1004
1005 ############################################
1006 #
1007 # RPM/distribution specific patches
1008 #
1009 # This section includes patches specific to
1010 # Fedora/RHEL which can not be upstreamed
1011 # either in their current form or at all.
1012 ############################################
1013
1014 # Accessibility patches
1015 # Ignore AWTError when assistive technologies are loaded
1016 Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
1017 # Restrict access to java-atk-wrapper classes
1018 Patch3: rh1648644-java_access_bridge_privileged_security.patch
1019 # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
1020 # Not currently suitable to go upstream as it disables curves
1021 # for all providers unconditionally
1022 Patch525: pr1834-rh1022017-reduce_ellipticcurvesextension_to_provide_only_three_nss_supported_nist_curves_23_24_25.patch
1023 # Turn on AssumeMP by default on RHEL systems
1024 Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch
1025
1026 #############################################
1027 #
1028 # Upstreamable patches
1029 #
1030 # This section includes patches which need to
1031 # be reviewed & pushed to the current development
1032 # tree of OpenJDK.
1033 #############################################
1034 # PR2737: Allow multiple initialization of PKCS11 libraries
1035 Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch
1036 # PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
1037 Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch
1038 # Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
1039 Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
1040 # RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
1041 Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
1042 # PR3083, RH1346460: Regression in SSL debug output without an ECC provider
1043 Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
1044 # RH1566890: CVE-2018-3639
1045 Patch529: rh1566890_speculative_store_bypass_so_added_more_per_task_speculation_control_CVE_2018_3639.patch
1046 # PR3601: Fix additional -Wreturn-type issues introduced by 8061651
1047 Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch
1048 # Support for building the SunEC provider with the system NSS installation
1049 # PR1983: Support using the system installation of NSS with the SunEC provider
1050 # PR2127: SunEC provider crashes when built using system NSS
1051 # PR2815: Race condition in SunEC provider with system NSS
1052 # PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed
1053 # PR2934: SunEC provider throwing KeyException with current NSS
1054 # PR3479, RH1486025: ECC and NSS JVM crash
1055 Patch513: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk8.patch
1056 Patch514: pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_root8.patch
1057 Patch515: pr2127-sunec_provider_crashes_when_built_using_system_nss_thus_use_of_nss_memory_management_functions.patch
1058 Patch516: pr2815-race_condition_in_sunec_provider_with_system_nss_fix.patch
1059 Patch517: pr2899-dont_use_withseed_versions_of_nss_functions_as_they_dont_fully_process_the_seed.patch
1060 Patch518: pr2934-sunec_provider_throwing_keyexception_withine.separator_current_nss_thus_initialise_the_random_number_generator_and_feed_the_seed_to_it.patch
1061 Patch519: pr3479-rh1486025-sunec_provider_can_have_multiple_instances_leading_to_premature_nss_shutdown.patch
1062 # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
1063 Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch
1064 # PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
1065 Patch540: pr3575-rh1567204-system_cacerts_database_handling_no_longer_affect_jssecacerts.patch
1066 # PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy
1067 Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
1068 # PR3655: Allow use of system crypto policy to be disabled by the user
1069 Patch301: pr3655-toggle_system_crypto_policy.patch
1070 # JDK-8219772: EXTRA_CFLAGS not being picked up for assembler files
1071 Patch110: jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch
1072
1073 #############################################
1074 #
1075 # Arch-specific upstreamable patches
1076 #
1077 # This section includes patches which need to
1078 # be reviewed & pushed upstream and are specific
1079 # to certain architectures. This usually means the
1080 # current OpenJDK development branch, but may also
1081 # include other trees e.g. for the AArch64 port for
1082 # OpenJDK 8u.
1083 #############################################
1084 # s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
1085 Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
1086 # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
1087 Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
1088 # AArch64: PR3519: Fix further functions with a missing return value (AArch64)
1089 Patch106: pr3519-fix_further_functions_with_a_missing_return_value.patch
1090 # S390 ambiguous log2_intptr calls
1091 Patch107: s390-8214206_fix.patch
1092
1093 #############################################
1094 #
1095 # Patches which need backporting to 8u
1096 #
1097 # This section includes patches which have
1098 # been pushed upstream to the latest OpenJDK
1099 # development tree, but need to be backported
1100 # to OpenJDK 8u.
1101 #############################################
1102 # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
1103 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1104 Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
1105 # S8154313: Generated javadoc scattered all over the place
1106 Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch
1107 # 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
1108 Patch563: jdk8171000-pr3542-rh1402819-robot_createScreenCapture_crashes_in_wayland_mode.patch
1109 # 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds
1110 Patch564: jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch
1111 # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
1112 Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
1113 # 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
1114 Patch573: jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch
1115 # 8143245, PR3548: Zero build requires disabled warnings
1116 Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
1117 # 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
1118 Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch
1119 # 8064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning
1120 Patch576: jdk8064786-pr3599-fix_debug_build_after_8062808_Turn_on_the_wreturn_type_warning.patch
1121 # 8062808, PR3548: Turn on the -Wreturn-type warning
1122 Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch
1123 # s390: JDK-8203030, Type fixing for s390
1124 Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
1125 # 8035341: Allow using a system installed libpng
1126 Patch202: jdk8035341-allow_using_system_installed_libpng.patch
1127 # 8042159: Allow using a system-installed lcms2
1128 Patch203: jdk8042159-allow_using_system_installed_lcms2.patch
1129 # 8210761: libjsig is being compiled without optimization
1130 Patch620: jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
1131 # 8210416: [linux] Poor StrictMath performance due to non-optimized compilation
1132 Patch622: jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch
1133 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1134 # Upstream 8u part.
1135 Patch623: jdk8210425-rh1632174-01-compile_with_o2_and_ffp_contract_off_as_for_fdlibm.patch
1136 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1137 # Aarch64-port 8u local part
1138 Patch624: jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch
1139 # 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
1140 # Zero part of the fix for (arm/s390 arches)
1141 Patch625: jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch
1142
1143 #############################################
1144 #
1145 # Patches appearing in 8u222
1146 #
1147 # This section includes patches which are present
1148 # in the listed OpenJDK 8u release and should be
1149 # able to be removed once that release is out
1150 # and used by this RPM.
1151 #############################################
1152
1153 #############################################
1154 #
1155 # Patches ineligible for 8u
1156 #
1157 # This section includes patches which are present
1158 # upstream, but ineligible for upstream 8u backport.
1159 #############################################
1160 # 8043805: Allow using a system-installed libjpeg
1161 Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
1162
1163 #############################################
1164 #
1165 # Shenandoah fixes
1166 #
1167 # This section includes patches which are
1168 # specific to the Shenandoah garbage collector
1169 # and should be upstreamed to the appropriate
1170 # trees.
1171 #############################################
1172 # PR3634: Shenandoah still broken on s390 with aarch64-shenandoah-jdk8u181-b16
1173 Patch582: pr3634-fix_shenandoah_for_size_t_on_s390.patch
1174
1175 #############################################
1176 #
1177 # Non-OpenJDK fixes
1178 #
1179 # This section includes patches to code other
1180 # that from OpenJDK.
1181 #############################################
1182 Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
1183
1184 #############################################
1185 #
1186 # Dependencies
1187 #
1188 #############################################
1189 BuildRequires: autoconf
1190 BuildRequires: automake
1191 BuildRequires: alsa-lib-devel
1192 BuildRequires: binutils
1193 BuildRequires: cups-devel
1194 BuildRequires: desktop-file-utils
1195 # elfutils only are OK for build without AOT
1196 BuildRequires: elfutils-devel
1197 BuildRequires: fontconfig
1198 BuildRequires: freetype-devel
1199 BuildRequires: giflib-devel
1200 BuildRequires: gcc-c++
1201 BuildRequires: gdb
1202 BuildRequires: gtk2-devel
1203 BuildRequires: lcms2-devel
1204 BuildRequires: libjpeg-devel
1205 BuildRequires: libpng-devel
1206 BuildRequires: libxslt-devel
1207 BuildRequires: libx11-devel
1208 BuildRequires: libxi-devel
1209 BuildRequires: libxinerama-devel
1210 BuildRequires: libxt-devel
1211 BuildRequires: libxtst-devel
1212 # Requirements for setting up the nss.cfg
1213 BuildRequires: nss-devel
1214 BuildRequires: pkgconfig
1215 BuildRequires: x11-proto-devel
1216 BuildRequires: zip
1217 BuildRequires: unzip
1218 BuildRequires: java-1.8.0-openjdk-devel
1219 # Zero-assembler build requirement.
1220 %ifnarch %{jit_arches}
1221 BuildRequires: libffi-devel
1222 %endif
1223 BuildRequires: timezone-java >= 2015d
1224 BuildRequires: patch >= 2.7.5
1225 # Earlier versions have a bug in tree vectorization on PPC
1226 BuildRequires: gcc >= 4.8.3-8
1227
1228 %if %{with_systemtap}
1229 BuildRequires: systemtap
1230 %endif
1231
1232 # this is built always, also during debug-only build
1233 # when it is built in debug-only, then this package is just placeholder
1234 %{java_rpo %{nil}}
1235
1236 %description
1237 The OpenJDK runtime environment.
1238
1239 %if %{include_debug_build}
1240 %package debug
1241 Summary: OpenJDK Runtime Environment %{debug_on}
1242 Group: Development/Java
1243
1244 %{java_rpo -- %{debug_suffix_unquoted}}
1245 %description debug
1246 The OpenJDK runtime environment.
1247 %{debug_warning}
1248 %endif
1249
1250 %if %{include_normal_build}
1251 %package headless
1252 Summary: OpenJDK Runtime Environment
1253 Group: Development/Java
1254
1255 %{java_headless_rpo %{nil}}
1256
1257 %description headless
1258 The OpenJDK runtime environment without audio and video support.
1259 %endif
1260
1261 %if %{include_debug_build}
1262 %package headless-debug
1263 Summary: OpenJDK Runtime Environment %{debug_on}
1264 Group: Development/Java
1265
1266 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1267
1268 %description headless-debug
1269 The OpenJDK runtime environment without audio and video support.
1270 %{debug_warning}
1271 %endif
1272
1273 %if %{include_normal_build}
1274 %package devel
1275 Summary: OpenJDK Development Environment
1276 Group: Development/Java
1277
1278 %{java_devel_rpo %{nil}}
1279
1280 %description devel
1281 The OpenJDK development tools.
1282 %endif
1283
1284 %if %{include_debug_build}
1285 %package devel-debug
1286 Summary: OpenJDK Development Environment %{debug_on}
1287 Group: Development/Tools
1288
1289 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1290
1291 %description devel-debug
1292 The OpenJDK development tools.
1293 %{debug_warning}
1294 %endif
1295
1296 %if %{include_normal_build}
1297 %package demo
1298 Summary: OpenJDK Demos
1299 Group: Development/Java
1300
1301 %{java_demo_rpo %{nil}}
1302
1303 %description demo
1304 The OpenJDK demos.
1305 %endif
1306
1307 %if %{include_debug_build}
1308 %package demo-debug
1309 Summary: OpenJDK Demos %{debug_on}
1310 Group: Development/Java
1311
1312 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1313
1314 %description demo-debug
1315 The OpenJDK demos.
1316 %{debug_warning}
1317 %endif
1318
1319 %if %{include_normal_build}
1320 %package src
1321 Summary: OpenJDK Source Bundle
1322 Group: Development/Java
1323
1324 %{java_src_rpo %{nil}}
1325
1326 %description src
1327 The OpenJDK source bundle.
1328 %endif
1329
1330 %if %{include_debug_build}
1331 %package src-debug
1332 Summary: OpenJDK Source Bundle %{for_debug}
1333 Group: Development/Java
1334
1335 %{java_src_rpo -- %{debug_suffix_unquoted}}
1336
1337 %description src-debug
1338 The OpenJDK source bundle %{for_debug}.
1339 %endif
1340
1341 %if %{include_normal_build}
1342 %package javadoc
1343 Summary: OpenJDK API Documentation
1344 Group: Documentation
1345 Requires: jpackage-utils
1346 BuildArch: noarch
1347
1348 %{java_javadoc_rpo %{nil}}
1349
1350 %description javadoc
1351 The OpenJDK API documentation.
1352 %endif
1353
1354 %if %{include_normal_build}
1355 %package javadoc-zip
1356 Summary: OpenJDK API Documentation compressed in single archive
1357 Group: Documentation
1358 Requires: javapackages-tools
1359 BuildArch: noarch
1360
1361 %{java_javadoc_rpo %{nil}}
1362
1363 %description javadoc-zip
1364 The OpenJDK API documentation compressed in single archive.
1365 %endif
1366
1367 %if %{include_debug_build}
1368 %package javadoc-debug
1369 Summary: OpenJDK API Documentation %{for_debug}
1370 Group: Documentation
1371 Requires: jpackage-utils
1372 BuildArch: noarch
1373
1374 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1375
1376 %description javadoc-debug
1377 The OpenJDK API documentation %{for_debug}.
1378 %endif
1379
1380 %if %{include_debug_build}
1381 %package javadoc-zip-debug
1382 Summary: OpenJDK API Documentation compressed in single archive %{for_debug}
1383 Group: Documentation
1384 Requires: javapackages-tools
1385 BuildArch: noarch
1386
1387 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1388
1389 %description javadoc-zip-debug
1390 The OpenJDK API documentation compressed in single archive %{for_debug}.
1391 %endif
1392
1393
1394 %if %{include_normal_build}
1395 %package accessibility
1396 Summary: OpenJDK accessibility connector
1397
1398 %{java_accessibility_rpo %{nil}}
1399
1400 %description accessibility
1401 Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows
1402 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1403 programs.
1404
1405 Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still
1406 being tuned to be working with accessibility features. There are known issues
1407 with accessibility on, so please do not install this package unless you really
1408 need to.
1409 %endif
1410
1411 %if %{include_debug_build}
1412 %package accessibility-debug
1413 Summary: OpenJDK accessibility connector %{for_debug}
1414
1415 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1416
1417 %description accessibility-debug
1418 See normal java-%{version}-openjdk-accessibility description.
1419 %endif
1420
1421
1422 %if %{with_openjfx_binding}
1423 %package openjfx
1424 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1425 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1426 Requires: openjfx%{?_isa}
1427 Provides: javafx = %{epoch}:%{version}-%{release}
1428 %description openjfx
1429 Set of links from OpenJDK (jre) to OpenJFX
1430
1431 %package openjfx-devel
1432 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1433 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1434 Requires: openjfx-devel%{?_isa}
1435 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1436 %description openjfx-devel
1437 Set of links from OpenJDK (sdk) to OpenJFX
1438
1439 %if %{include_debug_build}
1440 %package openjfx-debug
1441 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-debug
1442 Requires: %{name}-debug%{?_isa} = %{epoch}:%{version}-%{release}
1443 Requires: openjfx%{?_isa}
1444 Provides: javafx-debug = %{epoch}:%{version}-%{release}
1445 %description openjfx-debug
1446 Set of links from OpenJDK-debug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1447
1448 %package openjfx-devel-debug
1449 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-debug
1450 Requires: %{name}-devel-debug%{?_isa} = %{epoch}:%{version}-%{release}
1451 Requires: openjfx-devel%{?_isa}
1452 Provides: javafx-devel-debug = %{epoch}:%{version}-%{release}
1453 %description openjfx-devel-debug
1454 Set of links from OpenJDK-debug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1455 %endif
1456 %endif
1457
1458 %prep
1459 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1460 echo "include_normal_build is %{include_normal_build}"
1461 else
1462 echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
1463 exit 11
1464 fi
1465 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1466 echo "include_debug_build is %{include_debug_build}"
1467 else
1468 echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
1469 exit 12
1470 fi
1471 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
1472 echo "you have disabled both include_debug_build and include_debug_build. no go."
1473 exit 13
1474 fi
1475 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1476 # Add the missing files to be able to build under Mageia
1477 tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
1478 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1479 prioritylength=`expr length %{priority}`
1480 if [ $prioritylength -ne 7 ] ; then
1481 echo "priority must be 7 digits in total, violated"
1482 exit 14
1483 fi
1484 # For old patches
1485 ln -s openjdk jdk8
1486
1487 cp %{SOURCE2} .
1488
1489 # replace outdated configure guess script
1490 #
1491 # the configure macro will do this too, but it also passes a few flags not
1492 # supported by openjdk configure script
1493 cp %{SOURCE100} openjdk/common/autoconf/build-aux/
1494 cp %{SOURCE101} openjdk/common/autoconf/build-aux/
1495
1496 # OpenJDK patches
1497
1498 # Remove libraries that are linked
1499 sh %{SOURCE12}
1500
1501 # System library fixes
1502 %patch201
1503 %patch202
1504 %patch203
1505
1506 # System security policy fixes
1507 %patch300
1508 %patch301
1509
1510 %patch1
1511 %patch3
1512 %patch5
1513
1514 # s390 build fixes
1515 %patch102
1516 %patch103
1517
1518 # AArch64 fixes
1519 %patch106
1520
1521 # x86 fixes
1522 %patch105
1523
1524 # Upstreamable fixes
1525 %patch502
1526 %patch504
1527 %patch512
1528 #patch513
1529 #patch514
1530 #patch515
1531 #patch516
1532 #patch517
1533 #patch518
1534 #patch519
1535 %patch400
1536 %patch523
1537 %patch528
1538 %patch529
1539 %patch530
1540 %patch563
1541 %patch564
1542 %patch571
1543 %patch573
1544 %patch574
1545 %patch575
1546 %patch576
1547 %patch577
1548 %patch620
1549 %patch622
1550 %patch623
1551 %patch624
1552 %patch625
1553 %patch110
1554
1555 # RPM-only fixes
1556 %patch525
1557 %patch539
1558 %patch540
1559
1560 # RHEL-only patches
1561 %if 0%{?rhel}
1562 %patch534
1563 %endif
1564
1565 # Shenandoah patches
1566 %patch582
1567
1568 %patch1000
1569
1570 # Extract systemtap tapsets
1571 %if %{with_systemtap}
1572 tar -x -I xz -f %{SOURCE8}
1573 %if %{include_debug_build}
1574 cp -r tapset tapset%{debug_suffix}
1575 %endif
1576
1577
1578 for suffix in %{build_loop} ; do
1579 for file in "tapset"$suffix/*.in; do
1580 OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g`
1581 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
1582 # TODO find out which architectures other than i686 have a client vm
1583 %ifarch %{ix86}
1584 sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
1585 %else
1586 sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
1587 %endif
1588 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g $OUTPUT_FILE
1589 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
1590 sed -i -e s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g $OUTPUT_FILE
1591 done
1592 done
1593 # systemtap tapsets ends
1594 %endif
1595
1596 # Prepare desktop files
1597 for suffix in %{build_loop} ; do
1598 for file in %{SOURCE9} %{SOURCE10} ; do
1599 FILE=`basename $file | sed -e s:\.in$::g`
1600 EXT="${FILE##*.}"
1601 NAME="${FILE%.*}"
1602 OUTPUT_FILE=$NAME$suffix.$EXT
1603 sed -e s:#JAVA_HOME#:%{sdkbindir -- $suffix}:g $file > $OUTPUT_FILE
1604 sed -i -e s:#JRE_HOME#:%{jrebindir -- $suffix}:g $OUTPUT_FILE
1605 sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE
1606 done
1607 done
1608
1609 # Setup nss.cfg
1610 sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg
1611
1612 %build
1613 # How many cpu's do we have?
1614 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1615 export NUM_PROC=${NUM_PROC:-1}
1616 %if 0%{?_smp_ncpus_max}
1617 # Honor %%_smp_ncpus_max
1618 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1619 %endif
1620
1621 # Build IcedTea and OpenJDK.
1622 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1623 export ARCH_DATA_MODEL=64
1624 %endif
1625 %ifarch alpha
1626 export CFLAGS="$CFLAGS -mieee"
1627 %endif
1628
1629 # We use ourcppflags because the OpenJDK build seems to
1630 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1631 # Explicitly set the C++ standard as the default has changed on GCC >= 6
1632 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
1633 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
1634 %ifarch %{power64} ppc
1635 # fix rpmlint warnings
1636 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1637 %endif
1638 export EXTRA_CFLAGS
1639
1640 (cd openjdk/common/autoconf
1641 bash ./autogen.sh
1642 )
1643
1644 for suffix in %{build_loop} ; do
1645 if [ "$suffix" = "%{debug_suffix}" ] ; then
1646 debugbuild=%{debugbuild_parameter}
1647 else
1648 debugbuild=%{normalbuild_parameter}
1649 fi
1650
1651 mkdir -p %{buildoutputdir -- $suffix}
1652 pushd %{buildoutputdir -- $suffix}
1653
1654 bash ../../configure \
1655 %ifnarch %{jit_arches}
1656 --with-jvm-variants=zero \
1657 %endif
1658 --disable-zip-debug-info \
1659 --with-milestone="fcs" \
1660 --with-update-version=%{updatever} \
1661 --with-build-number=%{buildver} \
1662 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
1663 --with-debug-level=$debugbuild \
1664 --enable-unlimited-crypto \
1665 --with-zlib=system \
1666 --with-libjpeg=system \
1667 --with-giflib=system \
1668 --with-libpng=system \
1669 --with-lcms=bundled \
1670 --with-stdc++lib=dynamic \
1671 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1672 --with-extra-cflags="$EXTRA_CFLAGS" \
1673 --with-extra-ldflags="%{ourldflags}" \
1674 --with-num-cores="$NUM_PROC"
1675
1676 cat spec.gmk
1677 cat hotspot-spec.gmk
1678
1679 # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
1680 # disables FDS for all build configs and reverts to pre-FDS make logic.
1681 # STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
1682 # ignore all the other logic about which debug options and just do '-g'.
1683
1684 make \
1685 DEBUG_BINARIES=true \
1686 JAVAC_FLAGS=-g \
1687 STRIP_POLICY=no_strip \
1688 POST_STRIP_CMD="" \
1689 LOG=trace \
1690 SCTP_WERROR= \
1691 %{targets}
1692
1693 make zip-docs
1694
1695 # the build (erroneously) removes read permissions from some jars
1696 # this is a regression in OpenJDK 7 (our compiler):
1697 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1698 find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1699 chmod ugo+r images/%{j2sdkimage}/lib/ct.sym
1700
1701 # remove redundant *diz and *debuginfo files
1702 find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \;
1703 find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \;
1704
1705 popd >& /dev/null
1706
1707 # Install nss.cfg right away as we will be using the JRE above
1708 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1709
1710 # Install nss.cfg right away as we will be using the JRE above
1711 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
1712
1713 # Use system-wide tzdata
1714 rm $JAVA_HOME/jre/lib/tzdb.dat
1715 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
1716
1717 #build cycles
1718 done
1719
1720 %check
1721
1722 # We test debug first as it will give better diagnostics on a crash
1723 for suffix in %{rev_build_loop} ; do
1724
1725 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1726
1727 # Check unlimited policy has been used
1728 $JAVA_HOME/bin/javac -d . %{SOURCE13}
1729 $JAVA_HOME/bin/java TestCryptoLevel
1730
1731 # Check ECC is working
1732 $JAVA_HOME/bin/javac -d . %{SOURCE14}
1733 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
1734
1735 # Verify system crypto (policy) can be disabled
1736 $JAVA_HOME/bin/javac -d . %{SOURCE15}
1737 $JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
1738
1739 # Check debug symbols are present and can identify code
1740 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
1741 do
1742 if [ -f "$lib" ] ; then
1743 echo "Testing $lib for debug symbols"
1744 # All these tests rely on RPM failing the build if the exit code of any set
1745 # of piped commands is non-zero.
1746
1747 # Test for .debug_* sections in the shared object. This is the main test.
1748 # Stripped objects will not contain these.
1749 eu-readelf -S "$lib" | grep "] .debug_"
1750 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
1751
1752 # Test FILE symbols. These will most likely be removed by anyting that
1753 # manipulates symbol tables because it's generally useless. So a nice test
1754 # that nothing has messed with symbols.
1755 old_IFS="$IFS"
1756 IFS=$'\n'
1757 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
1758 do
1759 # We expect to see .cpp files, except for architectures like aarch64 and
1760 # s390 where we expect .o and .oS files
1761 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
1762 done
1763 IFS="$old_IFS"
1764
1765 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking.
1766 if [ "`basename $lib`" = "libjvm.so" ]; then
1767 eu-readelf -s "$lib" | \
1768 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
1769 fi
1770
1771 # Test that there are no .gnu_debuglink sections pointing to another
1772 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
1773 # no sense either.
1774 eu-readelf -S "$lib" | grep 'gnu'
1775 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
1776 echo "bad .gnu_debuglink section."
1777 eu-readelf -x .gnu_debuglink "$lib"
1778 false
1779 fi
1780 fi
1781 done
1782
1783 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
1784 # javaCalls.cpp:58 should map to:
1785 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
1786 # Using line number 1 might cause build problems. See:
1787 # https://bugzilla.redhat.com/show_bug.cgi?id=1539664
1788 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767
1789 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
1790 handle SIGSEGV pass nostop noprint
1791 handle SIGILL pass nostop noprint
1792 set breakpoint pending on
1793 break javaCalls.cpp:58
1794 commands 1
1795 backtrace
1796 quit
1797 end
1798 run -version
1799 EOF
1800 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
1801
1802 # Check src.zip has all sources. See RHBZ#1130490
1803 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
1804
1805 # Check class files include useful debugging information
1806 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
1807 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
1808 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
1809
1810 # Check generated class files include useful debugging information
1811 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
1812 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
1813 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
1814
1815 #build cycles check
1816 done
1817
1818 %install
1819 STRIP_KEEP_SYMTAB=libjvm*
1820
1821 for suffix in %{build_loop} ; do
1822
1823 pushd %{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1824
1825 #install jsa directories so we can owe them
1826 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1827 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
1828
1829 # Install main files.
1830 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1831 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1832 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1833 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1834
1835 %if %{with_systemtap}
1836 # Install systemtap support files.
1837 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
1838 # note, that uniquesuffix is in BUILD dir in this case
1839 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1840 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1841 tapsetFiles=`ls *.stp`
1842 popd
1843 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1844 pushd $RPM_BUILD_ROOT%{tapsetdir}
1845 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir -- $suffix}/tapset %{tapsetdir})
1846 for name in $tapsetFiles ; do
1847 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
1848 ln -sf $RELATIVE/$name $targetName
1849 done
1850 popd
1851 %endif
1852
1853 # Remove empty cacerts database.
1854 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
1855 # Install cacerts symlink needed by some apps which hardcode the path.
1856 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
1857 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1858 %{_jvmdir}/%{jredir -- $suffix}/lib/security)
1859 ln -sf $RELATIVE/cacerts .
1860 popd
1861
1862 # Install extension symlinks.
1863 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1864 pushd $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1865 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir -- $suffix}/lib %{jvmjardir -- $suffix})
1866 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1867 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1868 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1869 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1870 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1871 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1872 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1873 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1874 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1875 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1876 for jar in *-%{version}.jar
1877 do
1878 if [ x%{version} != x%{javaver} ]
1879 then
1880 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1881 fi
1882 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1883 done
1884 popd
1885
1886 # Install JCE policy symlinks.
1887 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix -- $suffix}/jce/vanilla
1888
1889 # Install versioned symlinks.
1890 pushd $RPM_BUILD_ROOT%{_jvmdir}
1891 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
1892 popd
1893
1894 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1895 ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
1896 popd
1897
1898 # Remove javaws man page
1899 rm -f man/man1/javaws*
1900
1901 # Install man pages.
1902 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1903 for manpage in man/man1/*
1904 do
1905 # Convert man pages to UTF8 encoding.
1906 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1907 mv -f $manpage.tmp $manpage
1908 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1909 $manpage .1)-%{uniquesuffix -- $suffix}.1
1910 done
1911
1912 # Install demos and samples.
1913 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1914 mkdir -p sample/rmi
1915 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
1916 # hack to allow --short-circuit on install
1917 mv bin/java-rmi.cgi sample/rmi
1918 fi
1919 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1920
1921 popd
1922
1923
1924 # Install Javadoc documentation.
1925 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1926 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
1927 cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
1928
1929 # Install icons and menu entries.
1930 for s in 16 24 32 48 ; do
1931 install -D -p -m 644 \
1932 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1933 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1934 done
1935
1936 # Install desktop files.
1937 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1938 for e in jconsole$suffix policytool$suffix ; do
1939 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
1940 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1941 done
1942
1943 # Install /etc/.java/.systemPrefs/ directory
1944 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
1945 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
1946
1947 # FIXME: remove SONAME entries from demo DSOs. See
1948 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1949
1950 # Find non-documentation demo files.
1951 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1952 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1953 -type f -o -type l | sort \
1954 | grep -v README \
1955 | sed 's|'$RPM_BUILD_ROOT'||' \
1956 >> %{name}-demo.files"$suffix"
1957 # Find documentation demo files.
1958 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1959 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1960 -type f -o -type l | sort \
1961 | grep README \
1962 | sed 's|'$RPM_BUILD_ROOT'||' \
1963 | sed 's|^|%doc |' \
1964 >> %{name}-demo.files"$suffix"
1965
1966 # Create links which leads to separately installed java-atk-bridge and allow configuration
1967 # links points to java-atk-wrapper - an dependence
1968 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
1969 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
1970 popd
1971 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
1972 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
1973 popd
1974 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
1975 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
1976 echo "" >> accessibility.properties
1977 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
1978 echo "" >> accessibility.properties
1979 popd
1980
1981 # intentionally after all else, fx links with redirections on its own
1982 %if %{with_openjfx_binding}
1983 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
1984 FXJRE_FILES=%{name}-openjfx.files"$suffix"
1985 echo -n "" > $FXJRE_FILES
1986 echo -n "" > $FXSDK_FILES
1987 for file in %{jfx_jre_libs} ; do
1988 srcfile=%{jfx_jre_libs_dir}/$file
1989 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
1990 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1991 echo $targetfile >> $FXJRE_FILES
1992 done
1993 for file in %{jfx_jre_native} ; do
1994 srcfile=%{jfx_jre_native_dir}/$file
1995 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
1996 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1997 echo $targetfile >> $FXJRE_FILES
1998 done
1999 for file in %{jfx_jre_exts} ; do
2000 srcfile=%{jfx_jre_exts_dir}/$file
2001 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
2002 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2003 echo $targetfile >> $FXJRE_FILES
2004 done
2005 for file in %{jfx_sdk_libs} ; do
2006 srcfile=%{jfx_sdk_libs_dir}/$file
2007 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
2008 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2009 echo $targetfile >> $FXSDK_FILES
2010 done
2011 for file in %{jfx_sdk_bins} ; do
2012 srcfile=%{jfx_sdk_bins_dir}/$file
2013 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
2014 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2015 echo $targetfile >> $FXSDK_FILES
2016 done
2017 %endif
2018
2019 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
2020 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
2021 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
2022
2023 # end, dual install
2024 done
2025
2026 %if %{include_normal_build}
2027 # intentioanlly only for non-debug
2028 %pretrans headless -p <lua>
2029 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2030 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
2031 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
2032 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
2033 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
2034 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
2035 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
2036 local posix = require "posix"
2037 local debug = false
2038
2039 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2040 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2041
2042 local stat1 = posix.stat(SOURCE1, "type");
2043 local stat2 = posix.stat(SOURCE2, "type");
2044
2045 if (stat1 ~= nil) then
2046 if (debug) then
2047 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2048 end;
2049 package.path = package.path .. ";" .. SOURCE1
2050 else
2051 if (stat2 ~= nil) then
2052 if (debug) then
2053 print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
2054 end;
2055 package.path = package.path .. ";" .. SOURCE2
2056 else
2057 if (debug) then
2058 print(SOURCE1 .." does NOT exists")
2059 print(SOURCE2 .." does NOT exists")
2060 print("No config files will be copied")
2061 end
2062 return
2063 end
2064 end
2065 -- run contetn of included file with fake args
2066 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2067 require "copy_jdk_configs.lua"
2068
2069 %post headless
2070 %{post_headless %{nil}}
2071
2072
2073 %postun headless
2074 %{postun_headless %{nil}}
2075
2076 %post devel
2077 %{post_devel %{nil}}
2078
2079 %postun devel
2080 %{postun_devel %{nil}}
2081
2082 %post javadoc
2083 %{post_javadoc %{nil}}
2084
2085 %postun javadoc
2086 %{postun_javadoc %{nil}}
2087
2088 %post javadoc-zip
2089 %{post_javadoc_zip %{nil}}
2090
2091 %postun javadoc-zip
2092 %{postun_javadoc_zip %{nil}}
2093 %endif
2094
2095 %if %{include_normal_build}
2096 %files
2097 # main package builds always
2098 %{files_jre %{nil}}
2099 %else
2100 %files
2101 # placeholder
2102 %endif
2103
2104
2105 %if %{include_normal_build}
2106 %files headless
2107 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2108 # all config/norepalce files (and more) have to be declared in pretrans. See pretrans
2109 %{files_jre_headless %{nil}}
2110
2111 %files devel
2112 %{files_devel %{nil}}
2113
2114 %files demo -f %{name}-demo.files
2115 %{files_demo %{nil}}
2116
2117 %files src
2118 %{files_src %{nil}}
2119
2120 %files javadoc
2121 %{files_javadoc %{nil}}
2122
2123 %files javadoc-zip
2124 %{files_javadoc_zip %{nil}}
2125
2126 %files accessibility
2127 %{files_accessibility %{nil}}
2128
2129 %if %{with_openjfx_binding}
2130 %files openjfx -f %{name}-openjfx.files
2131
2132 %files openjfx-devel -f %{name}-openjfx-devel.files
2133 %endif
2134 %endif
2135
2136 %if %{include_debug_build}
2137 %files debug
2138 %{files_jre -- %{debug_suffix_unquoted}}
2139
2140 %files headless-debug
2141 %{files_jre_headless -- %{debug_suffix_unquoted}}
2142
2143 %files devel-debug
2144 %{files_devel -- %{debug_suffix_unquoted}}
2145
2146 %files demo-debug -f %{name}-demo.files-debug
2147 %{files_demo -- %{debug_suffix_unquoted}}
2148
2149 %files src-debug
2150 %{files_src -- %{debug_suffix_unquoted}}
2151
2152 %files javadoc-debug
2153 %{files_javadoc -- %{debug_suffix_unquoted}}
2154
2155 %files javadoc-zip-debug
2156 %{files_javadoc_zip -- %{debug_suffix_unquoted}}
2157
2158 %files accessibility-debug
2159 %{files_accessibility -- %{debug_suffix_unquoted}}
2160
2161 %if %{with_openjfx_binding}
2162 %files openjfx-debug -f %{name}-openjfx.files-debug
2163
2164 %files openjfx-devel-debug -f %{name}-openjfx-devel.files-debug
2165 %endif
2166 %endif
2167
2168

  ViewVC Help
Powered by ViewVC 1.1.30