/[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 1606679 - (show annotations) (download)
Fri Jul 17 06:48:48 2020 UTC (3 years, 9 months ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 78126 byte(s)
- sync with fedora as of 2020-07-16, update to u262-b10 (mga#26960)

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

  ViewVC Help
Powered by ViewVC 1.1.30