/[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 1255248 - (show annotations) (download)
Tue Aug 28 10:00:08 2018 UTC (5 years, 7 months ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 78167 byte(s)
- SILENT: bump rel

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

  ViewVC Help
Powered by ViewVC 1.1.30