/[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 1432358 - (show annotations) (download)
Mon Aug 26 08:50:28 2019 UTC (4 years, 7 months ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 78705 byte(s)
- sync with fedora as of 2019-08-15, update to u222-b10 (mga#25172)

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-jdk8u222-b10
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 # not needed for 8u212
973 #Source4: 4e0ade06a22f.tar.bz2
974
975 # Use 'generate_tarballs.sh' to generate the following tarballs
976 # They are based on code contained in the IcedTea project (3.x).
977
978 # Systemtap tapsets. Zipped up to keep it small.
979 Source8: systemtap-tapset-3.6.0pre02.tar.xz
980
981 # Desktop files. Adapated from IcedTea.
982 Source9: jconsole.desktop.in
983 Source10: policytool.desktop.in
984
985 # nss configuration file
986 Source11: nss.cfg.in
987
988 # Removed libraries that we link instead
989 Source12: %{name}-remove-intree-libraries.sh
990
991 # Ensure we aren't using the limited crypto policy
992 Source13: TestCryptoLevel.java
993
994 # Ensure ECDSA is working
995 Source14: TestECDSA.java
996
997 # Verify system crypto (policy) can be disabled via a property
998 Source15: TestSecurityProperties.java
999
1000 Source20: repackReproduciblePolycies.sh
1001
1002 # New versions of config files with aarch64 support. This is not upstream yet.
1003 Source100: config.guess
1004 Source101: config.sub
1005
1006 ############################################
1007 #
1008 # RPM/distribution specific patches
1009 #
1010 # This section includes patches specific to
1011 # Fedora/RHEL which can not be upstreamed
1012 # either in their current form or at all.
1013 ############################################
1014
1015 # Accessibility patches
1016 # Ignore AWTError when assistive technologies are loaded
1017 Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
1018 # Restrict access to java-atk-wrapper classes
1019 Patch3: rh1648644-java_access_bridge_privileged_security.patch
1020 # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
1021 # Not currently suitable to go upstream as it disables curves
1022 # for all providers unconditionally
1023 Patch525: pr1834-rh1022017-reduce_ellipticcurvesextension_to_provide_only_three_nss_supported_nist_curves_23_24_25.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 Patch300: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
1055 # PR3655: Allow use of system crypto policy to be disabled by the user
1056 Patch301: pr3655-toggle_system_crypto_policy.patch
1057 # JDK-8219772: EXTRA_CFLAGS not being picked up for assembler files
1058 Patch110: jdk8219772-extra_c_cxx_flags_not_picked_for_assembler_source.patch
1059
1060 #############################################
1061 #
1062 # Arch-specific upstreamable patches
1063 #
1064 # This section includes patches which need to
1065 # be reviewed & pushed upstream and are specific
1066 # to certain architectures. This usually means the
1067 # current OpenJDK development branch, but may also
1068 # include other trees e.g. for the AArch64 port for
1069 # OpenJDK 8u.
1070 #############################################
1071 # s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
1072 Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
1073 # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
1074 Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
1075 # AArch64: PR3519: Fix further functions with a missing return value (AArch64)
1076 Patch106: pr3519-fix_further_functions_with_a_missing_return_value.patch
1077 # S390 ambiguous log2_intptr calls
1078 Patch107: s390-8214206_fix.patch
1079
1080 #############################################
1081 #
1082 # Patches which need backporting to 8u
1083 #
1084 # This section includes patches which have
1085 # been pushed upstream to the latest OpenJDK
1086 # development tree, but need to be backported
1087 # to OpenJDK 8u.
1088 #############################################
1089 # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
1090 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1091 Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
1092 # S8154313: Generated javadoc scattered all over the place
1093 Patch400: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch
1094 # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
1095 Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
1096 # 8141570, PR3548: Fix Zero interpreter build for --disable-precompiled-headers
1097 Patch573: jdk8141570-pr3548-fix_zero_interpreter_build_for_disable_precompiled_headers.patch
1098 # 8143245, PR3548: Zero build requires disabled warnings
1099 Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
1100 # 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
1101 Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch
1102 # 8062808, PR3548: Turn on the -Wreturn-type warning
1103 Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch
1104 # s390: JDK-8203030, Type fixing for s390
1105 Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
1106 # 8035341: Allow using a system installed libpng
1107 Patch202: jdk8035341-allow_using_system_installed_libpng.patch
1108 # 8042159: Allow using a system-installed lcms2
1109 Patch203: jdk8042159-allow_using_system_installed_lcms2.patch
1110 # 8210761: libjsig is being compiled without optimization
1111 Patch620: jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
1112 # JDK-8223219: Backport of JDK-8199552 to OpenJDK 8 leads to duplicate -fstack-protector flags,
1113 # overriding --with-extra-cflags
1114 Patch626: jdk8223219-fstack-protector-root.patch
1115 Patch627: jdk8223219-fstack-protector-hotspot.patch
1116
1117 #############################################
1118 #
1119 # Patches appearing in 8u222
1120 #
1121 # This section includes patches which are present
1122 # in the listed OpenJDK 8u release and should be
1123 # able to be removed once that release is out
1124 # and used by this RPM.
1125 #############################################
1126
1127 #############################################
1128 #
1129 # Patches ineligible for 8u
1130 #
1131 # This section includes patches which are present
1132 # upstream, but ineligible for upstream 8u backport.
1133 #############################################
1134 # 8043805: Allow using a system-installed libjpeg
1135 Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
1136
1137 #############################################
1138 #
1139 # Shenandoah fixes
1140 #
1141 # This section includes patches which are
1142 # specific to the Shenandoah garbage collector
1143 # and should be upstreamed to the appropriate
1144 # trees.
1145 #############################################
1146
1147 #############################################
1148 #
1149 # Non-OpenJDK fixes
1150 #
1151 # This section includes patches to code other
1152 # that from OpenJDK.
1153 #############################################
1154 Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
1155
1156 #############################################
1157 #
1158 # Dependencies
1159 #
1160 #############################################
1161 BuildRequires: autoconf
1162 BuildRequires: automake
1163 BuildRequires: alsa-lib-devel
1164 BuildRequires: binutils
1165 BuildRequires: cups-devel
1166 BuildRequires: desktop-file-utils
1167 # elfutils only are OK for build without AOT
1168 BuildRequires: elfutils-devel
1169 BuildRequires: fontconfig
1170 BuildRequires: freetype-devel
1171 BuildRequires: giflib-devel
1172 BuildRequires: gcc-c++
1173 BuildRequires: gdb
1174 BuildRequires: gtk2-devel
1175 BuildRequires: lcms2-devel
1176 BuildRequires: libjpeg-devel
1177 BuildRequires: libpng-devel
1178 BuildRequires: libxslt-devel
1179 BuildRequires: libx11-devel
1180 BuildRequires: libxi-devel
1181 BuildRequires: libxinerama-devel
1182 BuildRequires: libxt-devel
1183 BuildRequires: libxtst-devel
1184 # Requirements for setting up the nss.cfg
1185 BuildRequires: nss-devel
1186 BuildRequires: pkgconfig
1187 BuildRequires: x11-proto-devel
1188 BuildRequires: zip
1189 BuildRequires: unzip
1190 BuildRequires: java-1.8.0-openjdk-devel
1191 # Zero-assembler build requirement.
1192 %ifnarch %{jit_arches}
1193 BuildRequires: libffi-devel
1194 %endif
1195 BuildRequires: timezone-java >= 2015d
1196 BuildRequires: patch >= 2.7.5
1197 # Earlier versions have a bug in tree vectorization on PPC
1198 BuildRequires: gcc >= 4.8.3-8
1199
1200 %if %{with_systemtap}
1201 BuildRequires: systemtap
1202 %endif
1203
1204 # this is built always, also during debug-only build
1205 # when it is built in debug-only, then this package is just placeholder
1206 %{java_rpo %{nil}}
1207
1208 %description
1209 The OpenJDK runtime environment.
1210
1211 %if %{include_debug_build}
1212 %package debug
1213 Summary: OpenJDK Runtime Environment %{debug_on}
1214 Group: Development/Java
1215
1216 %{java_rpo -- %{debug_suffix_unquoted}}
1217 %description debug
1218 The OpenJDK runtime environment.
1219 %{debug_warning}
1220 %endif
1221
1222 %if %{include_normal_build}
1223 %package headless
1224 Summary: OpenJDK Runtime Environment
1225 Group: Development/Java
1226
1227 %{java_headless_rpo %{nil}}
1228
1229 %description headless
1230 The OpenJDK runtime environment without audio and video support.
1231 %endif
1232
1233 %if %{include_debug_build}
1234 %package headless-debug
1235 Summary: OpenJDK Runtime Environment %{debug_on}
1236 Group: Development/Java
1237
1238 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1239
1240 %description headless-debug
1241 The OpenJDK runtime environment without audio and video support.
1242 %{debug_warning}
1243 %endif
1244
1245 %if %{include_normal_build}
1246 %package devel
1247 Summary: OpenJDK Development Environment
1248 Group: Development/Java
1249
1250 %{java_devel_rpo %{nil}}
1251
1252 %description devel
1253 The OpenJDK development tools.
1254 %endif
1255
1256 %if %{include_debug_build}
1257 %package devel-debug
1258 Summary: OpenJDK Development Environment %{debug_on}
1259 Group: Development/Tools
1260
1261 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1262
1263 %description devel-debug
1264 The OpenJDK development tools.
1265 %{debug_warning}
1266 %endif
1267
1268 %if %{include_normal_build}
1269 %package demo
1270 Summary: OpenJDK Demos
1271 Group: Development/Java
1272
1273 %{java_demo_rpo %{nil}}
1274
1275 %description demo
1276 The OpenJDK demos.
1277 %endif
1278
1279 %if %{include_debug_build}
1280 %package demo-debug
1281 Summary: OpenJDK Demos %{debug_on}
1282 Group: Development/Java
1283
1284 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1285
1286 %description demo-debug
1287 The OpenJDK demos.
1288 %{debug_warning}
1289 %endif
1290
1291 %if %{include_normal_build}
1292 %package src
1293 Summary: OpenJDK Source Bundle
1294 Group: Development/Java
1295
1296 %{java_src_rpo %{nil}}
1297
1298 %description src
1299 The OpenJDK source bundle.
1300 %endif
1301
1302 %if %{include_debug_build}
1303 %package src-debug
1304 Summary: OpenJDK Source Bundle %{for_debug}
1305 Group: Development/Java
1306
1307 %{java_src_rpo -- %{debug_suffix_unquoted}}
1308
1309 %description src-debug
1310 The OpenJDK source bundle %{for_debug}.
1311 %endif
1312
1313 %if %{include_normal_build}
1314 %package javadoc
1315 Summary: OpenJDK API Documentation
1316 Group: Documentation
1317 Requires: jpackage-utils
1318 BuildArch: noarch
1319
1320 %{java_javadoc_rpo %{nil}}
1321
1322 %description javadoc
1323 The OpenJDK API documentation.
1324 %endif
1325
1326 %if %{include_normal_build}
1327 %package javadoc-zip
1328 Summary: OpenJDK API Documentation compressed in single archive
1329 Group: Documentation
1330 Requires: javapackages-tools
1331 BuildArch: noarch
1332
1333 %{java_javadoc_rpo %{nil}}
1334
1335 %description javadoc-zip
1336 The OpenJDK API documentation compressed in single archive.
1337 %endif
1338
1339 %if %{include_debug_build}
1340 %package javadoc-debug
1341 Summary: OpenJDK API Documentation %{for_debug}
1342 Group: Documentation
1343 Requires: jpackage-utils
1344 BuildArch: noarch
1345
1346 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1347
1348 %description javadoc-debug
1349 The OpenJDK API documentation %{for_debug}.
1350 %endif
1351
1352 %if %{include_debug_build}
1353 %package javadoc-zip-debug
1354 Summary: OpenJDK API Documentation compressed in single archive %{for_debug}
1355 Group: Documentation
1356 Requires: javapackages-tools
1357 BuildArch: noarch
1358
1359 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1360
1361 %description javadoc-zip-debug
1362 The OpenJDK API documentation compressed in single archive %{for_debug}.
1363 %endif
1364
1365
1366 %if %{include_normal_build}
1367 %package accessibility
1368 Summary: OpenJDK accessibility connector
1369
1370 %{java_accessibility_rpo %{nil}}
1371
1372 %description accessibility
1373 Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows
1374 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1375 programs.
1376
1377 Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still
1378 being tuned to be working with accessibility features. There are known issues
1379 with accessibility on, so please do not install this package unless you really
1380 need to.
1381 %endif
1382
1383 %if %{include_debug_build}
1384 %package accessibility-debug
1385 Summary: OpenJDK accessibility connector %{for_debug}
1386
1387 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1388
1389 %description accessibility-debug
1390 See normal java-%{version}-openjdk-accessibility description.
1391 %endif
1392
1393
1394 %if %{with_openjfx_binding}
1395 %package openjfx
1396 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1397 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1398 Requires: openjfx%{?_isa}
1399 Provides: javafx = %{epoch}:%{version}-%{release}
1400 %description openjfx
1401 Set of links from OpenJDK (jre) to OpenJFX
1402
1403 %package openjfx-devel
1404 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1405 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1406 Requires: openjfx-devel%{?_isa}
1407 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1408 %description openjfx-devel
1409 Set of links from OpenJDK (sdk) to OpenJFX
1410
1411 %if %{include_debug_build}
1412 %package openjfx-debug
1413 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-debug
1414 Requires: %{name}-debug%{?_isa} = %{epoch}:%{version}-%{release}
1415 Requires: openjfx%{?_isa}
1416 Provides: javafx-debug = %{epoch}:%{version}-%{release}
1417 %description openjfx-debug
1418 Set of links from OpenJDK-debug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1419
1420 %package openjfx-devel-debug
1421 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-debug
1422 Requires: %{name}-devel-debug%{?_isa} = %{epoch}:%{version}-%{release}
1423 Requires: openjfx-devel%{?_isa}
1424 Provides: javafx-devel-debug = %{epoch}:%{version}-%{release}
1425 %description openjfx-devel-debug
1426 Set of links from OpenJDK-debug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1427 %endif
1428 %endif
1429
1430 %prep
1431 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1432 echo "include_normal_build is %{include_normal_build}"
1433 else
1434 echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
1435 exit 11
1436 fi
1437 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1438 echo "include_debug_build is %{include_debug_build}"
1439 else
1440 echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
1441 exit 12
1442 fi
1443 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
1444 echo "you have disabled both include_debug_build and include_debug_build. no go."
1445 exit 13
1446 fi
1447 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1448 # Add the missing files to be able to build under Mageia
1449 # not needed for 8u212
1450 #tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
1451 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1452 prioritylength=`expr length %{priority}`
1453 if [ $prioritylength -ne 7 ] ; then
1454 echo "priority must be 7 digits in total, violated"
1455 exit 14
1456 fi
1457 # For old patches
1458 ln -s openjdk jdk8
1459
1460 cp %{SOURCE2} .
1461
1462 # replace outdated configure guess script
1463 #
1464 # the configure macro will do this too, but it also passes a few flags not
1465 # supported by openjdk configure script
1466 cp %{SOURCE100} openjdk/common/autoconf/build-aux/
1467 cp %{SOURCE101} openjdk/common/autoconf/build-aux/
1468
1469 # OpenJDK patches
1470
1471 # Remove libraries that are linked
1472 sh %{SOURCE12}
1473
1474 # System library fixes
1475 %patch201
1476 %patch202
1477 %patch203
1478
1479 # System security policy fixes
1480 %patch300
1481 %patch301
1482
1483 %patch1
1484 %patch3
1485 %patch5
1486
1487 # s390 build fixes
1488 %patch102
1489 %patch103
1490 %patch107
1491
1492 # AArch64 fixes
1493 %patch106
1494
1495 # x86 fixes
1496 %patch105
1497
1498 # Upstreamable fixes
1499 %patch502
1500 %patch504
1501 %patch512
1502 %patch400
1503 %patch523
1504 %patch528
1505 %patch529
1506 %patch531
1507 %patch530
1508 %patch571
1509 %patch573
1510 %patch574
1511 %patch575
1512 %patch577
1513 %patch620
1514 %patch626
1515 %patch627
1516 %patch110
1517
1518 # RPM-only fixes
1519 %patch525
1520 %patch539
1521 %patch1000
1522
1523 # RHEL-only patches
1524 %if 0%{?rhel}
1525 %patch534
1526 %endif
1527
1528 # Shenandoah patches
1529
1530 # Extract systemtap tapsets
1531 %if %{with_systemtap}
1532 tar -x -I xz -f %{SOURCE8}
1533 %if %{include_debug_build}
1534 cp -r tapset tapset%{debug_suffix}
1535 %endif
1536
1537
1538 for suffix in %{build_loop} ; do
1539 for file in "tapset"$suffix/*.in; do
1540 OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g`
1541 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
1542 # TODO find out which architectures other than i686 have a client vm
1543 %ifarch %{ix86}
1544 sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
1545 %else
1546 sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
1547 %endif
1548 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g $OUTPUT_FILE
1549 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
1550 sed -i -e s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g $OUTPUT_FILE
1551 done
1552 done
1553 # systemtap tapsets ends
1554 %endif
1555
1556 # Prepare desktop files
1557 for suffix in %{build_loop} ; do
1558 for file in %{SOURCE9} %{SOURCE10} ; do
1559 FILE=`basename $file | sed -e s:\.in$::g`
1560 EXT="${FILE##*.}"
1561 NAME="${FILE%.*}"
1562 OUTPUT_FILE=$NAME$suffix.$EXT
1563 sed -e s:#JAVA_HOME#:%{sdkbindir -- $suffix}:g $file > $OUTPUT_FILE
1564 sed -i -e s:#JRE_HOME#:%{jrebindir -- $suffix}:g $OUTPUT_FILE
1565 sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE
1566 done
1567 done
1568
1569 # Setup nss.cfg
1570 sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg
1571
1572 %build
1573 # How many cpu's do we have?
1574 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1575 export NUM_PROC=${NUM_PROC:-1}
1576 %if 0%{?_smp_ncpus_max}
1577 # Honor %%_smp_ncpus_max
1578 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1579 %endif
1580
1581 # Build IcedTea and OpenJDK.
1582 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1583 export ARCH_DATA_MODEL=64
1584 %endif
1585 %ifarch alpha
1586 export CFLAGS="$CFLAGS -mieee"
1587 %endif
1588
1589 # We use ourcppflags because the OpenJDK build seems to
1590 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1591 # Explicitly set the C++ standard as the default has changed on GCC >= 6
1592 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
1593 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
1594 %ifarch %{power64} ppc
1595 # fix rpmlint warnings
1596 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1597 %endif
1598 export EXTRA_CFLAGS
1599
1600 (cd openjdk/common/autoconf
1601 bash ./autogen.sh
1602 )
1603
1604 for suffix in %{build_loop} ; do
1605 if [ "$suffix" = "%{debug_suffix}" ] ; then
1606 debugbuild=%{debugbuild_parameter}
1607 else
1608 debugbuild=%{normalbuild_parameter}
1609 fi
1610
1611 mkdir -p %{buildoutputdir -- $suffix}
1612 pushd %{buildoutputdir -- $suffix}
1613
1614 bash ../../configure \
1615 %ifnarch %{jit_arches}
1616 --with-jvm-variants=zero \
1617 %endif
1618 --disable-zip-debug-info \
1619 --with-milestone="fcs" \
1620 --with-update-version=%{updatever} \
1621 --with-build-number=%{buildver} \
1622 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
1623 --with-debug-level=$debugbuild \
1624 --enable-unlimited-crypto \
1625 --with-zlib=system \
1626 --with-libjpeg=system \
1627 --with-giflib=system \
1628 --with-libpng=system \
1629 --with-lcms=system \
1630 --with-stdc++lib=dynamic \
1631 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1632 --with-extra-cflags="$EXTRA_CFLAGS" \
1633 --with-extra-ldflags="%{ourldflags}" \
1634 --with-num-cores="$NUM_PROC"
1635
1636 cat spec.gmk
1637 cat hotspot-spec.gmk
1638
1639 # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
1640 # disables FDS for all build configs and reverts to pre-FDS make logic.
1641 # STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
1642 # ignore all the other logic about which debug options and just do '-g'.
1643
1644 make \
1645 DEBUG_BINARIES=true \
1646 JAVAC_FLAGS=-g \
1647 STRIP_POLICY=no_strip \
1648 POST_STRIP_CMD="" \
1649 LOG=trace \
1650 SCTP_WERROR= \
1651 %{targets}
1652
1653 make zip-docs
1654
1655 # the build (erroneously) removes read permissions from some jars
1656 # this is a regression in OpenJDK 7 (our compiler):
1657 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1658 find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1659 chmod ugo+r images/%{j2sdkimage}/lib/ct.sym
1660
1661 # remove redundant *diz and *debuginfo files
1662 find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \;
1663 find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \;
1664
1665 popd >& /dev/null
1666
1667 # Install nss.cfg right away as we will be using the JRE above
1668 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1669
1670 # Install nss.cfg right away as we will be using the JRE above
1671 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
1672
1673 # Use system-wide tzdata
1674 rm $JAVA_HOME/jre/lib/tzdb.dat
1675 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
1676
1677 #build cycles
1678 done
1679
1680 %check
1681
1682 # We test debug first as it will give better diagnostics on a crash
1683 for suffix in %{rev_build_loop} ; do
1684
1685 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1686
1687 # Check unlimited policy has been used
1688 $JAVA_HOME/bin/javac -d . %{SOURCE13}
1689 $JAVA_HOME/bin/java TestCryptoLevel
1690
1691 # Check ECC is working
1692 $JAVA_HOME/bin/javac -d . %{SOURCE14}
1693 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
1694
1695 # Verify system crypto (policy) can be disabled
1696 $JAVA_HOME/bin/javac -d . %{SOURCE15}
1697 $JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
1698
1699 # Check debug symbols are present and can identify code
1700 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
1701 do
1702 if [ -f "$lib" ] ; then
1703 echo "Testing $lib for debug symbols"
1704 # All these tests rely on RPM failing the build if the exit code of any set
1705 # of piped commands is non-zero.
1706
1707 # Test for .debug_* sections in the shared object. This is the main test.
1708 # Stripped objects will not contain these.
1709 eu-readelf -S "$lib" | grep "] .debug_"
1710 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
1711
1712 # Test FILE symbols. These will most likely be removed by anyting that
1713 # manipulates symbol tables because it's generally useless. So a nice test
1714 # that nothing has messed with symbols.
1715 old_IFS="$IFS"
1716 IFS=$'\n'
1717 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
1718 do
1719 # We expect to see .cpp files, except for architectures like aarch64 and
1720 # s390 where we expect .o and .oS files
1721 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
1722 done
1723 IFS="$old_IFS"
1724
1725 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking.
1726 if [ "`basename $lib`" = "libjvm.so" ]; then
1727 eu-readelf -s "$lib" | \
1728 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
1729 fi
1730
1731 # Test that there are no .gnu_debuglink sections pointing to another
1732 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
1733 # no sense either.
1734 eu-readelf -S "$lib" | grep 'gnu'
1735 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
1736 echo "bad .gnu_debuglink section."
1737 eu-readelf -x .gnu_debuglink "$lib"
1738 false
1739 fi
1740 fi
1741 done
1742
1743 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
1744 # javaCalls.cpp:58 should map to:
1745 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
1746 # Using line number 1 might cause build problems. See:
1747 # https://bugzilla.redhat.com/show_bug.cgi?id=1539664
1748 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767
1749 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
1750 handle SIGSEGV pass nostop noprint
1751 handle SIGILL pass nostop noprint
1752 set breakpoint pending on
1753 break javaCalls.cpp:58
1754 commands 1
1755 backtrace
1756 quit
1757 end
1758 run -version
1759 EOF
1760 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
1761
1762 # Check src.zip has all sources. See RHBZ#1130490
1763 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
1764
1765 # Check class files include useful debugging information
1766 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
1767 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
1768 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
1769
1770 # Check generated class files include useful debugging information
1771 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
1772 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
1773 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
1774
1775 #build cycles check
1776 done
1777
1778 %install
1779 STRIP_KEEP_SYMTAB=libjvm*
1780
1781 for suffix in %{build_loop} ; do
1782
1783 pushd %{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1784
1785 #install jsa directories so we can owe them
1786 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1787 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
1788
1789 # Install main files.
1790 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1791 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1792 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1793 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1794
1795 %if %{with_systemtap}
1796 # Install systemtap support files.
1797 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
1798 # note, that uniquesuffix is in BUILD dir in this case
1799 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1800 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1801 tapsetFiles=`ls *.stp`
1802 popd
1803 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1804 pushd $RPM_BUILD_ROOT%{tapsetdir}
1805 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir -- $suffix}/tapset %{tapsetdir})
1806 for name in $tapsetFiles ; do
1807 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
1808 ln -sf $RELATIVE/$name $targetName
1809 done
1810 popd
1811 %endif
1812
1813 # Remove empty cacerts database.
1814 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
1815 # Install cacerts symlink needed by some apps which hardcode the path.
1816 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
1817 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1818 %{_jvmdir}/%{jredir -- $suffix}/lib/security)
1819 ln -sf $RELATIVE/cacerts .
1820 popd
1821
1822 # Install extension symlinks.
1823 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1824 pushd $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1825 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir -- $suffix}/lib %{jvmjardir -- $suffix})
1826 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1827 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1828 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1829 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1830 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1831 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1832 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1833 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1834 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1835 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1836 for jar in *-%{version}.jar
1837 do
1838 if [ x%{version} != x%{javaver} ]
1839 then
1840 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1841 fi
1842 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1843 done
1844 popd
1845
1846 # Install JCE policy symlinks.
1847 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix -- $suffix}/jce/vanilla
1848
1849 # Install versioned symlinks.
1850 pushd $RPM_BUILD_ROOT%{_jvmdir}
1851 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
1852 popd
1853
1854 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1855 ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
1856 popd
1857
1858 # Remove javaws man page
1859 rm -f man/man1/javaws*
1860
1861 # Install man pages.
1862 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1863 for manpage in man/man1/*
1864 do
1865 # Convert man pages to UTF8 encoding.
1866 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1867 mv -f $manpage.tmp $manpage
1868 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1869 $manpage .1)-%{uniquesuffix -- $suffix}.1
1870 done
1871
1872 # Install demos and samples.
1873 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1874 mkdir -p sample/rmi
1875 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
1876 # hack to allow --short-circuit on install
1877 mv bin/java-rmi.cgi sample/rmi
1878 fi
1879 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1880
1881 popd
1882
1883
1884 # Install Javadoc documentation.
1885 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1886 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
1887 cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
1888
1889 # Install icons and menu entries.
1890 for s in 16 24 32 48 ; do
1891 install -D -p -m 644 \
1892 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1893 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1894 done
1895
1896 # Install desktop files.
1897 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1898 for e in jconsole$suffix policytool$suffix ; do
1899 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
1900 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1901 done
1902
1903 # Install /etc/.java/.systemPrefs/ directory
1904 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
1905 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
1906
1907 # FIXME: remove SONAME entries from demo DSOs. See
1908 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1909
1910 # Find non-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 -v README \
1915 | sed 's|'$RPM_BUILD_ROOT'||' \
1916 >> %{name}-demo.files"$suffix"
1917 # Find documentation demo files.
1918 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1919 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1920 -type f -o -type l | sort \
1921 | grep README \
1922 | sed 's|'$RPM_BUILD_ROOT'||' \
1923 | sed 's|^|%doc |' \
1924 >> %{name}-demo.files"$suffix"
1925
1926 # Create links which leads to separately installed java-atk-bridge and allow configuration
1927 # links points to java-atk-wrapper - an dependence
1928 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
1929 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
1930 popd
1931 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
1932 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
1933 popd
1934 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
1935 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
1936 echo "" >> accessibility.properties
1937 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
1938 echo "" >> accessibility.properties
1939 popd
1940
1941 # intentionally after all else, fx links with redirections on its own
1942 %if %{with_openjfx_binding}
1943 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
1944 FXJRE_FILES=%{name}-openjfx.files"$suffix"
1945 echo -n "" > $FXJRE_FILES
1946 echo -n "" > $FXSDK_FILES
1947 for file in %{jfx_jre_libs} ; do
1948 srcfile=%{jfx_jre_libs_dir}/$file
1949 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
1950 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1951 echo $targetfile >> $FXJRE_FILES
1952 done
1953 for file in %{jfx_jre_native} ; do
1954 srcfile=%{jfx_jre_native_dir}/$file
1955 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
1956 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1957 echo $targetfile >> $FXJRE_FILES
1958 done
1959 for file in %{jfx_jre_exts} ; do
1960 srcfile=%{jfx_jre_exts_dir}/$file
1961 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
1962 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1963 echo $targetfile >> $FXJRE_FILES
1964 done
1965 for file in %{jfx_sdk_libs} ; do
1966 srcfile=%{jfx_sdk_libs_dir}/$file
1967 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
1968 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1969 echo $targetfile >> $FXSDK_FILES
1970 done
1971 for file in %{jfx_sdk_bins} ; do
1972 srcfile=%{jfx_sdk_bins_dir}/$file
1973 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
1974 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1975 echo $targetfile >> $FXSDK_FILES
1976 done
1977 %endif
1978
1979 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
1980 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
1981 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
1982
1983 # end, dual install
1984 done
1985
1986 %if %{include_normal_build}
1987 # intentioanlly only for non-debug
1988 %pretrans headless -p <lua>
1989 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
1990 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
1991 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
1992 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
1993 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
1994 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
1995 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
1996 local posix = require "posix"
1997 local debug = false
1998
1999 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2000 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2001
2002 local stat1 = posix.stat(SOURCE1, "type");
2003 local stat2 = posix.stat(SOURCE2, "type");
2004
2005 if (stat1 ~= nil) then
2006 if (debug) then
2007 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2008 end;
2009 package.path = package.path .. ";" .. SOURCE1
2010 else
2011 if (stat2 ~= nil) then
2012 if (debug) then
2013 print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
2014 end;
2015 package.path = package.path .. ";" .. SOURCE2
2016 else
2017 if (debug) then
2018 print(SOURCE1 .." does NOT exists")
2019 print(SOURCE2 .." does NOT exists")
2020 print("No config files will be copied")
2021 end
2022 return
2023 end
2024 end
2025 -- run contetn of included file with fake args
2026 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2027 require "copy_jdk_configs.lua"
2028
2029 %post headless
2030 %{post_headless %{nil}}
2031
2032
2033 %postun headless
2034 %{postun_headless %{nil}}
2035
2036 %post devel
2037 %{post_devel %{nil}}
2038
2039 %postun devel
2040 %{postun_devel %{nil}}
2041
2042 %post javadoc
2043 %{post_javadoc %{nil}}
2044
2045 %postun javadoc
2046 %{postun_javadoc %{nil}}
2047
2048 %post javadoc-zip
2049 %{post_javadoc_zip %{nil}}
2050
2051 %postun javadoc-zip
2052 %{postun_javadoc_zip %{nil}}
2053 %endif
2054
2055 %if %{include_normal_build}
2056 %files
2057 # main package builds always
2058 %{files_jre %{nil}}
2059 %else
2060 %files
2061 # placeholder
2062 %endif
2063
2064
2065 %if %{include_normal_build}
2066 %files headless
2067 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2068 # all config/norepalce files (and more) have to be declared in pretrans. See pretrans
2069 %{files_jre_headless %{nil}}
2070
2071 %files devel
2072 %{files_devel %{nil}}
2073
2074 %files demo -f %{name}-demo.files
2075 %{files_demo %{nil}}
2076
2077 %files src
2078 %{files_src %{nil}}
2079
2080 %files javadoc
2081 %{files_javadoc %{nil}}
2082
2083 %files javadoc-zip
2084 %{files_javadoc_zip %{nil}}
2085
2086 %files accessibility
2087 %{files_accessibility %{nil}}
2088
2089 %if %{with_openjfx_binding}
2090 %files openjfx -f %{name}-openjfx.files
2091
2092 %files openjfx-devel -f %{name}-openjfx-devel.files
2093 %endif
2094 %endif
2095
2096 %if %{include_debug_build}
2097 %files debug
2098 %{files_jre -- %{debug_suffix_unquoted}}
2099
2100 %files headless-debug
2101 %{files_jre_headless -- %{debug_suffix_unquoted}}
2102
2103 %files devel-debug
2104 %{files_devel -- %{debug_suffix_unquoted}}
2105
2106 %files demo-debug -f %{name}-demo.files-debug
2107 %{files_demo -- %{debug_suffix_unquoted}}
2108
2109 %files src-debug
2110 %{files_src -- %{debug_suffix_unquoted}}
2111
2112 %files javadoc-debug
2113 %{files_javadoc -- %{debug_suffix_unquoted}}
2114
2115 %files javadoc-zip-debug
2116 %{files_javadoc_zip -- %{debug_suffix_unquoted}}
2117
2118 %files accessibility-debug
2119 %{files_accessibility -- %{debug_suffix_unquoted}}
2120
2121 %if %{with_openjfx_binding}
2122 %files openjfx-debug -f %{name}-openjfx.files-debug
2123
2124 %files openjfx-devel-debug -f %{name}-openjfx-devel.files-debug
2125 %endif
2126 %endif
2127
2128

  ViewVC Help
Powered by ViewVC 1.1.30