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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30