/[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 1237302 - (show annotations) (download)
Sat Jun 16 22:11:14 2018 UTC (5 years, 10 months ago) by luigiwalser
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 77557 byte(s)
SILENT: disable systemtap for now
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 libawt_xawt[.]so.*|libjawt[.]so.*|libjsoundalsa[.]so.*|libsplashscreen[.]so.*|libjli[.]so.*|libjawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libhprof[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas_unix[.]so.*|libjava[.]so.*|libjava_crw_demo[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjsdt[.]so.*|libjsig[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libnpt[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libverify[.]so.*|libzip[.]so.*|libjsig[.]so.*|libjvm[.]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 0
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-jdk8u172-b11
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}.1
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-jdk8u172-b11--shenandoah-merge-2018-05-15.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: 4c674322d449.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 # 8196516, RH1538767: libfontmanager.so needs to be built with LDFLAGS so as to allow
1033 # linking with unresolved symbols.
1034 Patch530: rhbz_1538767_fix_linking.patch
1035
1036 # Upstreamable debugging patches
1037 # Patches 204 and 205 stop the build adding .gnu_debuglink sections to unstripped files
1038 Patch204: hotspot-remove-debuglink.patch
1039 Patch205: dont-add-unnecessary-debug-links.patch
1040 # Enable debug information for assembly code files
1041 Patch206: hotspot-assembler-debuginfo.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 # AArch64: Fix more cases of missing return statements
1051 Patch104: pr3458-rh1540242-aarch64.patch
1052 # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
1053 Patch105: 8199936-pr3533-workaround.patch
1054 # Zero: Fix more cases of missing return statements
1055 Patch106: pr3458-rh1540242-zero.patch
1056
1057 # Patches which need backporting to 8u
1058 # S8073139, RH1191652; fix name of ppc64le architecture
1059 Patch601: %{name}-rh1191652-root.patch
1060 Patch602: %{name}-rh1191652-jdk.patch
1061 Patch603: %{name}-rh1191652-hotspot-aarch64.patch
1062 # Include all sources in src.zip
1063 Patch7: include-all-srcs.patch
1064 # 8035341: Allow using a system installed libpng
1065 Patch202: system-libpng.patch
1066 # 8042159: Allow using a system-installed lcms2
1067 Patch203: system-lcms.patch
1068 # PR2462: Backport "8074839: Resolve disabled warnings for libunpack and the unpack200 binary"
1069 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1070 Patch502: pr2462.patch
1071 # S8148351, PR2842: Only display resolved symlink for compiler, do not change path
1072 Patch506: pr2842-01.patch
1073 Patch507: pr2842-02.patch
1074 # S8154313: Generated javadoc scattered all over the place
1075 Patch400: 8154313.patch
1076 # S6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate
1077 Patch526: 6260348-pr3066.patch
1078 # 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property"
1079 Patch538: 8061305-pr3335-rh1423421.patch
1080 # 8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present
1081 Patch560: 8188030-pr3459-rh1484079.patch
1082 # 8197429, PR3546, RH153662{2,3}: 32 bit java app started via JNI crashes with larger stack sizes
1083 Patch561: 8197429-pr3546-rh1536622.patch
1084 # PR3539, RH1548475: Pass EXTRA_LDFLAGS to HotSpot build
1085 Patch562: pr3539-rh1548475.patch
1086 # 8171000, PR3542, RH1402819: Robot.createScreenCapture() crashes in wayland mode
1087 Patch563: 8171000-pr3542-rh1402819.patch
1088 # 8197546, PR3542, RH1402819: Fix for 8171000 breaks Solaris + Linux builds
1089 Patch564: 8197546-pr3542-rh1402819.patch
1090 # 8185723, PR3553: Zero: segfaults on Power PC 32-bit
1091 Patch565: 8185723-pr3553.patch
1092 # 8186461, PR3557: Zero's atomic_copy64() should use SPE instructions on linux-powerpcspe
1093 Patch566: 8186461-pr3557.patch
1094 # PR3559: Use ldrexd for atomic reads on ARMv7.
1095 Patch567: pr3559.patch
1096 # 8187577, PR3578: JVM crash during gc doing concurrent marking
1097 Patch568: 8187577-pr3578.patch
1098 # 8201509, PR3579: Zero: S390 31bit atomic_copy64 inline assembler is wrong
1099 Patch569: 8201509-pr3579.patch
1100 # 8165489, PR3589: Missing G1 barrier in Unsafe_GetObjectVolatile
1101 Patch570: 8165489-pr3589.patch
1102 # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
1103 Patch571: pr3591.patch
1104 # 8184309, PR3596: Build warnings from GCC 7.1 on Fedora 26
1105 Patch572: 8184309-pr3596.patch
1106
1107 # Patches ineligible for 8u
1108 # 8043805: Allow using a system-installed libjpeg
1109 Patch201: system-libjpeg.patch
1110 Patch210: suse_linuxfilestore.patch
1111 # custom securities
1112 Patch300: PR3183.patch
1113
1114 # Local fixes
1115 # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
1116 Patch525: pr1834-rh1022017.patch
1117 # Turn on AssumeMP by default on RHEL systems
1118 Patch534: always_assumemp.patch
1119 # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
1120 Patch539: pr2888.patch
1121 # PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
1122 Patch540: pr3575-rh1567204.patch
1123
1124 # Shenandoah fixes
1125
1126 # Non-OpenJDK fixes
1127
1128 BuildRequires: autoconf
1129 BuildRequires: automake
1130 BuildRequires: alsa-lib-devel
1131 BuildRequires: binutils
1132 BuildRequires: cups-devel
1133 BuildRequires: desktop-file-utils
1134 BuildRequires: elfutils
1135 BuildRequires: fontconfig
1136 BuildRequires: freetype-devel
1137 BuildRequires: giflib-devel
1138 BuildRequires: gcc-c++
1139 BuildRequires: gdb
1140 BuildRequires: gtk2-devel
1141 BuildRequires: lcms2-devel
1142 BuildRequires: libjpeg-devel
1143 BuildRequires: libpng-devel
1144 BuildRequires: libxslt-devel
1145 BuildRequires: libx11-devel
1146 BuildRequires: libxi-devel
1147 BuildRequires: libxinerama-devel
1148 BuildRequires: libxt-devel
1149 BuildRequires: libxtst-devel
1150 # Requirements for setting up the nss.cfg
1151 BuildRequires: nss-devel
1152 BuildRequires: pkgconfig
1153 BuildRequires: x11-proto-devel
1154 BuildRequires: zip
1155 BuildRequires: java-1.8.0-openjdk-devel
1156 # Zero-assembler build requirement.
1157 %ifnarch %{jit_arches}
1158 BuildRequires: libffi-devel
1159 %endif
1160 BuildRequires: timezone-java >= 2015d
1161 BuildRequires: patch >= 2.7.5
1162 # Earlier versions have a bug in tree vectorization on PPC
1163 BuildRequires: gcc >= 4.8.3-8
1164
1165 %if %{with_systemtap}
1166 BuildRequires: systemtap
1167 %endif
1168
1169 # this is built always, also during debug-only build
1170 # when it is built in debug-only, then this package is just placeholder
1171 %{java_rpo %{nil}}
1172
1173 %description
1174 The OpenJDK runtime environment.
1175
1176 %if %{include_debug_build}
1177 %package debug
1178 Summary: OpenJDK Runtime Environment %{debug_on}
1179 Group: Development/Java
1180
1181 %{java_rpo -- %{debug_suffix_unquoted}}
1182 %description debug
1183 The OpenJDK runtime environment.
1184 %{debug_warning}
1185 %endif
1186
1187 %if %{include_normal_build}
1188 %package headless
1189 Summary: OpenJDK Runtime Environment
1190 Group: Development/Java
1191
1192 %{java_headless_rpo %{nil}}
1193
1194 %description headless
1195 The OpenJDK runtime environment without audio and video support.
1196 %endif
1197
1198 %if %{include_debug_build}
1199 %package headless-debug
1200 Summary: OpenJDK Runtime Environment %{debug_on}
1201 Group: Development/Java
1202
1203 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1204
1205 %description headless-debug
1206 The OpenJDK runtime environment without audio and video support.
1207 %{debug_warning}
1208 %endif
1209
1210 %if %{include_normal_build}
1211 %package devel
1212 Summary: OpenJDK Development Environment
1213 Group: Development/Java
1214
1215 %{java_devel_rpo %{nil}}
1216
1217 %description devel
1218 The OpenJDK development tools.
1219 %endif
1220
1221 %if %{include_debug_build}
1222 %package devel-debug
1223 Summary: OpenJDK Development Environment %{debug_on}
1224 Group: Development/Tools
1225
1226 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1227
1228 %description devel-debug
1229 The OpenJDK development tools.
1230 %{debug_warning}
1231 %endif
1232
1233 %if %{include_normal_build}
1234 %package demo
1235 Summary: OpenJDK Demos
1236 Group: Development/Java
1237
1238 %{java_demo_rpo %{nil}}
1239
1240 %description demo
1241 The OpenJDK demos.
1242 %endif
1243
1244 %if %{include_debug_build}
1245 %package demo-debug
1246 Summary: OpenJDK Demos %{debug_on}
1247 Group: Development/Java
1248
1249 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1250
1251 %description demo-debug
1252 The OpenJDK demos.
1253 %{debug_warning}
1254 %endif
1255
1256 %if %{include_normal_build}
1257 %package src
1258 Summary: OpenJDK Source Bundle
1259 Group: Development/Java
1260
1261 %{java_src_rpo %{nil}}
1262
1263 %description src
1264 The OpenJDK source bundle.
1265 %endif
1266
1267 %if %{include_debug_build}
1268 %package src-debug
1269 Summary: OpenJDK Source Bundle %{for_debug}
1270 Group: Development/Java
1271
1272 %{java_src_rpo -- %{debug_suffix_unquoted}}
1273
1274 %description src-debug
1275 The OpenJDK source bundle %{for_debug}.
1276 %endif
1277
1278 %if %{include_normal_build}
1279 %package javadoc
1280 Summary: OpenJDK API Documentation
1281 Group: Documentation
1282 Requires: jpackage-utils
1283 BuildArch: noarch
1284
1285 %{java_javadoc_rpo %{nil}}
1286
1287 %description javadoc
1288 The OpenJDK API documentation.
1289 %endif
1290
1291 %if %{include_normal_build}
1292 %package javadoc-zip
1293 Summary: OpenJDK API Documentation compressed in single archive
1294 Group: Documentation
1295 Requires: javapackages-tools
1296 BuildArch: noarch
1297
1298 %{java_javadoc_rpo %{nil}}
1299
1300 %description javadoc-zip
1301 The OpenJDK API documentation compressed in single archive.
1302 %endif
1303
1304 %if %{include_debug_build}
1305 %package javadoc-debug
1306 Summary: OpenJDK API Documentation %{for_debug}
1307 Group: Documentation
1308 Requires: jpackage-utils
1309 BuildArch: noarch
1310
1311 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1312
1313 %description javadoc-debug
1314 The OpenJDK API documentation %{for_debug}.
1315 %endif
1316
1317 %if %{include_debug_build}
1318 %package javadoc-zip-debug
1319 Summary: OpenJDK API Documentation compressed in single archive %{for_debug}
1320 Group: Documentation
1321 Requires: javapackages-tools
1322 BuildArch: noarch
1323
1324 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1325
1326 %description javadoc-zip-debug
1327 The OpenJDK API documentation compressed in single archive %{for_debug}.
1328 %endif
1329
1330
1331 %if %{include_normal_build}
1332 %package accessibility
1333 Summary: OpenJDK accessibility connector
1334
1335 %{java_accessibility_rpo %{nil}}
1336
1337 %description accessibility
1338 Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows
1339 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1340 programs.
1341
1342 Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still
1343 being tuned to be working with accessibility features. There are known issues
1344 with accessibility on, so please do not install this package unless you really
1345 need to.
1346 %endif
1347
1348 %if %{include_debug_build}
1349 %package accessibility-debug
1350 Summary: OpenJDK accessibility connector %{for_debug}
1351
1352 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1353
1354 %description accessibility-debug
1355 See normal java-%{version}-openjdk-accessibility description.
1356 %endif
1357
1358
1359 %if %{with_openjfx_binding}
1360 %package openjfx
1361 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1362 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1363 Requires: openjfx%{?_isa}
1364 Provides: javafx = %{epoch}:%{version}-%{release}
1365 %description openjfx
1366 Set of links from OpenJDK (jre) to OpenJFX
1367
1368 %package openjfx-devel
1369 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1370 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1371 Requires: openjfx-devel%{?_isa}
1372 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1373 %description openjfx-devel
1374 Set of links from OpenJDK (sdk) to OpenJFX
1375
1376 %if %{include_debug_build}
1377 %package openjfx-debug
1378 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-debug
1379 Requires: %{name}-debug%{?_isa} = %{epoch}:%{version}-%{release}
1380 Requires: openjfx%{?_isa}
1381 Provides: javafx-debug = %{epoch}:%{version}-%{release}
1382 %description openjfx-debug
1383 Set of links from OpenJDK-debug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1384
1385 %package openjfx-devel-debug
1386 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-debug
1387 Requires: %{name}-devel-debug%{?_isa} = %{epoch}:%{version}-%{release}
1388 Requires: openjfx-devel%{?_isa}
1389 Provides: javafx-devel-debug = %{epoch}:%{version}-%{release}
1390 %description openjfx-devel-debug
1391 Set of links from OpenJDK-debug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1392 %endif
1393 %endif
1394
1395 %prep
1396 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1397 echo "include_normal_build is %{include_normal_build}"
1398 else
1399 echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
1400 exit 11
1401 fi
1402 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1403 echo "include_debug_build is %{include_debug_build}"
1404 else
1405 echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
1406 exit 12
1407 fi
1408 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
1409 echo "you have disabled both include_debug_build and include_debug_build. no go."
1410 exit 13
1411 fi
1412 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1413 # Add the missing files to be able to build under Mageia
1414 tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
1415 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1416 prioritylength=`expr length %{priority}`
1417 if [ $prioritylength -ne 7 ] ; then
1418 echo "priority must be 7 digits in total, violated"
1419 exit 14
1420 fi
1421 # For old patches
1422 ln -s openjdk jdk8
1423 %if %{use_shenandoah_hotspot}
1424 # On Shenandoah-supported architectures, replace HotSpot with
1425 # the Shenandoah version
1426 pushd openjdk
1427 tar -xf %{SOURCE1}
1428 rm -rf hotspot
1429 mv openjdk/hotspot .
1430 rm -rf openjdk
1431 popd
1432 %endif
1433
1434 cp %{SOURCE2} .
1435
1436 # replace outdated configure guess script
1437 #
1438 # the configure macro will do this too, but it also passes a few flags not
1439 # supported by openjdk configure script
1440 cp %{SOURCE100} openjdk/common/autoconf/build-aux/
1441 cp %{SOURCE101} openjdk/common/autoconf/build-aux/
1442
1443 # OpenJDK patches
1444
1445 # Remove libraries that are linked
1446 sh %{SOURCE12}
1447
1448 # System library fixes
1449 %patch201
1450 %patch202
1451 %patch203
1452
1453 # Debugging fixes
1454 %patch204
1455 %patch205
1456 %patch206
1457 %patch210
1458
1459 %patch300
1460
1461 %patch1
1462 %patch3
1463 %patch5
1464 %patch7
1465
1466 # s390 build fixes
1467 %patch100
1468 %patch102
1469 %patch103
1470
1471 # AArch64 fixes
1472 %if %{use_shenandoah_hotspot}
1473 %else
1474 %patch104
1475 %endif
1476
1477 # x86 fixes
1478 %patch105
1479
1480 # ppc64le fixes
1481 %patch603
1482 %patch601
1483 %patch602
1484
1485 # Zero fixes.
1486 %patch106
1487
1488 # Upstreamable fixes
1489 %patch502
1490 %patch504
1491 %patch506
1492 %patch507
1493 %patch508
1494 %patch509
1495 %patch511
1496 %patch512
1497 #patch513
1498 #patch514
1499 #patch515
1500 #patch516
1501 #patch517
1502 #patch518
1503 #patch519
1504 %patch400
1505 %patch523
1506 %patch526
1507 %patch528
1508 %patch529
1509 %patch538
1510 %patch560
1511 pushd openjdk/jdk
1512 %patch530 -p1
1513 popd
1514 %patch561
1515 %patch562
1516 %patch563
1517 %patch564
1518 %patch565
1519 %patch566
1520 %patch567
1521 %patch569
1522 %patch571
1523 %patch572
1524
1525 # RPM-only fixes
1526 %patch525
1527 %patch539
1528 %patch540
1529
1530 # RHEL-only patches
1531 %if 0%{?rhel}
1532 %patch534
1533 %endif
1534
1535 # Shenandoah-only patches
1536 %if %{use_shenandoah_hotspot}
1537 %else
1538 %patch568
1539 %patch570
1540 %endif
1541
1542 # Extract systemtap tapsets
1543 %if %{with_systemtap}
1544 tar -x -I xz -f %{SOURCE8}
1545 %if %{include_debug_build}
1546 cp -r tapset tapset%{debug_suffix}
1547 %endif
1548
1549
1550 for suffix in %{build_loop} ; do
1551 for file in "tapset"$suffix/*.in; do
1552 OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g`
1553 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
1554 # TODO find out which architectures other than i686 have a client vm
1555 %ifarch %{ix86}
1556 sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
1557 %else
1558 sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
1559 %endif
1560 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g $OUTPUT_FILE
1561 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
1562 sed -i -e s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g $OUTPUT_FILE
1563 done
1564 done
1565 # systemtap tapsets ends
1566 %endif
1567
1568 # Prepare desktop files
1569 for suffix in %{build_loop} ; do
1570 for file in %{SOURCE9} %{SOURCE10} ; do
1571 FILE=`basename $file | sed -e s:\.in$::g`
1572 EXT="${FILE##*.}"
1573 NAME="${FILE%.*}"
1574 OUTPUT_FILE=$NAME$suffix.$EXT
1575 sed -e s:#JAVA_HOME#:%{sdkbindir -- $suffix}:g $file > $OUTPUT_FILE
1576 sed -i -e s:#JRE_HOME#:%{jrebindir -- $suffix}:g $OUTPUT_FILE
1577 sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE
1578 done
1579 done
1580
1581 # Setup nss.cfg
1582 sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg
1583
1584 %build
1585 # How many cpu's do we have?
1586 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1587 export NUM_PROC=${NUM_PROC:-1}
1588 %if 0%{?_smp_ncpus_max}
1589 # Honor %%_smp_ncpus_max
1590 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1591 %endif
1592
1593 # Build IcedTea and OpenJDK.
1594 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1595 export ARCH_DATA_MODEL=64
1596 %endif
1597 %ifarch alpha
1598 export CFLAGS="$CFLAGS -mieee"
1599 %endif
1600
1601 # We use ourcppflags because the OpenJDK build seems to
1602 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1603 # Explicitly set the C++ standard as the default has changed on GCC >= 6
1604 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
1605 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
1606 %ifarch %{power64} ppc
1607 # fix rpmlint warnings
1608 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1609 %endif
1610 export EXTRA_CFLAGS
1611
1612 (cd openjdk/common/autoconf
1613 bash ./autogen.sh
1614 )
1615
1616 for suffix in %{build_loop} ; do
1617 if [ "$suffix" = "%{debug_suffix}" ] ; then
1618 debugbuild=%{debugbuild_parameter}
1619 else
1620 debugbuild=%{normalbuild_parameter}
1621 fi
1622
1623 mkdir -p %{buildoutputdir -- $suffix}
1624 pushd %{buildoutputdir -- $suffix}
1625
1626 bash ../../configure \
1627 %ifnarch %{jit_arches}
1628 --with-jvm-variants=zero \
1629 %endif
1630 --disable-zip-debug-info \
1631 --with-milestone="fcs" \
1632 --with-update-version=%{updatever} \
1633 --with-build-number=%{buildver} \
1634 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
1635 --with-debug-level=$debugbuild \
1636 --enable-unlimited-crypto \
1637 --with-zlib=system \
1638 --with-libjpeg=system \
1639 --with-giflib=system \
1640 --with-libpng=system \
1641 --with-lcms=bundled \
1642 --with-stdc++lib=dynamic \
1643 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1644 --with-extra-cflags="$EXTRA_CFLAGS" \
1645 --with-extra-ldflags="%{ourldflags}" \
1646 --with-num-cores="$NUM_PROC"
1647
1648 cat spec.gmk
1649 cat hotspot-spec.gmk
1650
1651 # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
1652 # disables FDS for all build configs and reverts to pre-FDS make logic.
1653 # STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
1654 # ignore all the other logic about which debug options and just do '-g'.
1655
1656 make \
1657 DEBUG_BINARIES=true \
1658 JAVAC_FLAGS=-g \
1659 STRIP_POLICY=no_strip \
1660 POST_STRIP_CMD="" \
1661 LOG=trace \
1662 SCTP_WERROR= \
1663 %{targets}
1664
1665 make zip-docs
1666
1667 # the build (erroneously) removes read permissions from some jars
1668 # this is a regression in OpenJDK 7 (our compiler):
1669 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1670 find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1671 chmod ugo+r images/%{j2sdkimage}/lib/ct.sym
1672
1673 # remove redundant *diz and *debuginfo files
1674 find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \;
1675 find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \;
1676
1677 popd >& /dev/null
1678
1679 # Install nss.cfg right away as we will be using the JRE above
1680 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1681
1682 # Install nss.cfg right away as we will be using the JRE above
1683 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
1684
1685 # Use system-wide tzdata
1686 rm $JAVA_HOME/jre/lib/tzdb.dat
1687 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
1688
1689 #build cycles
1690 done
1691
1692 %check
1693
1694 # We test debug first as it will give better diagnostics on a crash
1695 for suffix in %{rev_build_loop} ; do
1696
1697 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1698
1699 # Check unlimited policy has been used
1700 $JAVA_HOME/bin/javac -d . %{SOURCE13}
1701 $JAVA_HOME/bin/java TestCryptoLevel
1702
1703 # Check ECC is working
1704 $JAVA_HOME/bin/javac -d . %{SOURCE14}
1705 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
1706
1707 # Check debug symbols are present and can identify code
1708 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
1709 do
1710 if [ -f "$lib" ] ; then
1711 echo "Testing $lib for debug symbols"
1712 # All these tests rely on RPM failing the build if the exit code of any set
1713 # of piped commands is non-zero.
1714
1715 # Test for .debug_* sections in the shared object. This is the main test.
1716 # Stripped objects will not contain these.
1717 eu-readelf -S "$lib" | grep "] .debug_"
1718 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
1719
1720 # Test FILE symbols. These will most likely be removed by anyting that
1721 # manipulates symbol tables because it's generally useless. So a nice test
1722 # that nothing has messed with symbols.
1723 old_IFS="$IFS"
1724 IFS=$'\n'
1725 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
1726 do
1727 # We expect to see .cpp files, except for architectures like aarch64 and
1728 # s390 where we expect .o and .oS files
1729 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
1730 done
1731 IFS="$old_IFS"
1732
1733 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking.
1734 if [ "`basename $lib`" = "libjvm.so" ]; then
1735 eu-readelf -s "$lib" | \
1736 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
1737 fi
1738
1739 # Test that there are no .gnu_debuglink sections pointing to another
1740 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
1741 # no sense either.
1742 eu-readelf -S "$lib" | grep 'gnu'
1743 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
1744 echo "bad .gnu_debuglink section."
1745 eu-readelf -x .gnu_debuglink "$lib"
1746 false
1747 fi
1748 fi
1749 done
1750
1751 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
1752 # javaCalls.cpp:58 should map to:
1753 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
1754 # Using line number 1 might cause build problems. See:
1755 # https://bugzilla.redhat.com/show_bug.cgi?id=1539664
1756 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767
1757 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
1758 handle SIGSEGV pass nostop noprint
1759 handle SIGILL pass nostop noprint
1760 set breakpoint pending on
1761 break javaCalls.cpp:58
1762 commands 1
1763 backtrace
1764 quit
1765 end
1766 run -version
1767 EOF
1768 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
1769
1770 # Check src.zip has all sources. See RHBZ#1130490
1771 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
1772
1773 # Check class files include useful debugging information
1774 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
1775 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
1776 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
1777
1778 # Check generated class files include useful debugging information
1779 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
1780 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
1781 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
1782
1783 #build cycles check
1784 done
1785
1786 %install
1787 STRIP_KEEP_SYMTAB=libjvm*
1788
1789 for suffix in %{build_loop} ; do
1790
1791 pushd %{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1792
1793 #install jsa directories so we can owe them
1794 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1795 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
1796
1797 # Install main files.
1798 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1799 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1800 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1801 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1802
1803 %if %{with_systemtap}
1804 # Install systemtap support files.
1805 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
1806 # note, that uniquesuffix is in BUILD dir in this case
1807 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1808 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1809 tapsetFiles=`ls *.stp`
1810 popd
1811 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1812 pushd $RPM_BUILD_ROOT%{tapsetdir}
1813 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir -- $suffix}/tapset %{tapsetdir})
1814 for name in $tapsetFiles ; do
1815 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
1816 ln -sf $RELATIVE/$name $targetName
1817 done
1818 popd
1819 %endif
1820
1821 # Remove empty cacerts database.
1822 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
1823 # Install cacerts symlink needed by some apps which hardcode the path.
1824 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
1825 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1826 %{_jvmdir}/%{jredir -- $suffix}/lib/security)
1827 ln -sf $RELATIVE/cacerts .
1828 popd
1829
1830 # Install extension symlinks.
1831 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1832 pushd $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1833 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir -- $suffix}/lib %{jvmjardir -- $suffix})
1834 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1835 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1836 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1837 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1838 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1839 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1840 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1841 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1842 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1843 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1844 for jar in *-%{version}.jar
1845 do
1846 if [ x%{version} != x%{javaver} ]
1847 then
1848 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1849 fi
1850 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1851 done
1852 popd
1853
1854 # Install JCE policy symlinks.
1855 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix -- $suffix}/jce/vanilla
1856
1857 # Install versioned symlinks.
1858 pushd $RPM_BUILD_ROOT%{_jvmdir}
1859 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
1860 popd
1861
1862 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1863 ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
1864 popd
1865
1866 # Remove javaws man page
1867 rm -f man/man1/javaws*
1868
1869 # Install man pages.
1870 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1871 for manpage in man/man1/*
1872 do
1873 # Convert man pages to UTF8 encoding.
1874 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1875 mv -f $manpage.tmp $manpage
1876 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1877 $manpage .1)-%{uniquesuffix -- $suffix}.1
1878 done
1879
1880 # Install demos and samples.
1881 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1882 mkdir -p sample/rmi
1883 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
1884 # hack to allow --short-circuit on install
1885 mv bin/java-rmi.cgi sample/rmi
1886 fi
1887 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1888
1889 popd
1890
1891
1892 # Install Javadoc documentation.
1893 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1894 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
1895 cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
1896
1897 # Install icons and menu entries.
1898 for s in 16 24 32 48 ; do
1899 install -D -p -m 644 \
1900 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1901 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1902 done
1903
1904 # Install desktop files.
1905 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1906 for e in jconsole$suffix policytool$suffix ; do
1907 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
1908 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1909 done
1910
1911 # Install /etc/.java/.systemPrefs/ directory
1912 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
1913 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
1914
1915 # FIXME: remove SONAME entries from demo DSOs. See
1916 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1917
1918 # Find non-documentation demo files.
1919 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1920 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1921 -type f -o -type l | sort \
1922 | grep -v README \
1923 | sed 's|'$RPM_BUILD_ROOT'||' \
1924 >> %{name}-demo.files"$suffix"
1925 # Find documentation demo files.
1926 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1927 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1928 -type f -o -type l | sort \
1929 | grep README \
1930 | sed 's|'$RPM_BUILD_ROOT'||' \
1931 | sed 's|^|%doc |' \
1932 >> %{name}-demo.files"$suffix"
1933
1934 # Create links which leads to separately installed java-atk-bridge and allow configuration
1935 # links points to java-atk-wrapper - an dependence
1936 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
1937 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
1938 popd
1939 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
1940 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
1941 popd
1942 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
1943 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
1944 echo "" >> accessibility.properties
1945 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
1946 echo "" >> accessibility.properties
1947 popd
1948
1949 # intentionally after all else, fx links with redirections on its own
1950 %if %{with_openjfx_binding}
1951 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
1952 FXJRE_FILES=%{name}-openjfx.files"$suffix"
1953 echo -n "" > $FXJRE_FILES
1954 echo -n "" > $FXSDK_FILES
1955 for file in %{jfx_jre_libs} ; do
1956 srcfile=%{jfx_jre_libs_dir}/$file
1957 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
1958 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1959 echo $targetfile >> $FXJRE_FILES
1960 done
1961 for file in %{jfx_jre_native} ; do
1962 srcfile=%{jfx_jre_native_dir}/$file
1963 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
1964 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1965 echo $targetfile >> $FXJRE_FILES
1966 done
1967 for file in %{jfx_jre_exts} ; do
1968 srcfile=%{jfx_jre_exts_dir}/$file
1969 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
1970 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1971 echo $targetfile >> $FXJRE_FILES
1972 done
1973 for file in %{jfx_sdk_libs} ; do
1974 srcfile=%{jfx_sdk_libs_dir}/$file
1975 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
1976 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1977 echo $targetfile >> $FXSDK_FILES
1978 done
1979 for file in %{jfx_sdk_bins} ; do
1980 srcfile=%{jfx_sdk_bins_dir}/$file
1981 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
1982 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1983 echo $targetfile >> $FXSDK_FILES
1984 done
1985 %endif
1986
1987 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
1988 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
1989 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
1990
1991 # end, dual install
1992 done
1993
1994 %if %{include_normal_build}
1995 # intentioanlly only for non-debug
1996 %pretrans headless -p <lua>
1997 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
1998 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
1999 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
2000 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
2001 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
2002 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
2003 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
2004 local posix = require "posix"
2005 local debug = false
2006
2007 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2008 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2009
2010 local stat1 = posix.stat(SOURCE1, "type");
2011 local stat2 = posix.stat(SOURCE2, "type");
2012
2013 if (stat1 ~= nil) then
2014 if (debug) then
2015 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2016 end;
2017 package.path = package.path .. ";" .. SOURCE1
2018 else
2019 if (stat2 ~= nil) then
2020 if (debug) then
2021 print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
2022 end;
2023 package.path = package.path .. ";" .. SOURCE2
2024 else
2025 if (debug) then
2026 print(SOURCE1 .." does NOT exists")
2027 print(SOURCE2 .." does NOT exists")
2028 print("No config files will be copied")
2029 end
2030 return
2031 end
2032 end
2033 -- run contetn of included file with fake args
2034 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2035 require "copy_jdk_configs.lua"
2036
2037 %post headless
2038 %{post_headless %{nil}}
2039
2040
2041 %postun headless
2042 %{postun_headless %{nil}}
2043
2044 %post devel
2045 %{post_devel %{nil}}
2046
2047 %postun devel
2048 %{postun_devel %{nil}}
2049
2050 %post javadoc
2051 %{post_javadoc %{nil}}
2052
2053 %postun javadoc
2054 %{postun_javadoc %{nil}}
2055
2056 %post javadoc-zip
2057 %{post_javadoc_zip %{nil}}
2058
2059 %postun javadoc-zip
2060 %{postun_javadoc_zip %{nil}}
2061 %endif
2062
2063 %if %{include_normal_build}
2064 %files
2065 # main package builds always
2066 %{files_jre %{nil}}
2067 %else
2068 %files
2069 # placeholder
2070 %endif
2071
2072
2073 %if %{include_normal_build}
2074 %files headless
2075 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2076 # all config/norepalce files (and more) have to be declared in pretrans. See pretrans
2077 %{files_jre_headless %{nil}}
2078
2079 %files devel
2080 %{files_devel %{nil}}
2081
2082 %files demo -f %{name}-demo.files
2083 %{files_demo %{nil}}
2084
2085 %files src
2086 %{files_src %{nil}}
2087
2088 %files javadoc
2089 %{files_javadoc %{nil}}
2090
2091 %files javadoc-zip
2092 %{files_javadoc_zip %{nil}}
2093
2094 %files accessibility
2095 %{files_accessibility %{nil}}
2096
2097 %if %{with_openjfx_binding}
2098 %files openjfx -f %{name}-openjfx.files
2099
2100 %files openjfx-devel -f %{name}-openjfx-devel.files
2101 %endif
2102 %endif
2103
2104 %if %{include_debug_build}
2105 %files debug
2106 %{files_jre -- %{debug_suffix_unquoted}}
2107
2108 %files headless-debug
2109 %{files_jre_headless -- %{debug_suffix_unquoted}}
2110
2111 %files devel-debug
2112 %{files_devel -- %{debug_suffix_unquoted}}
2113
2114 %files demo-debug -f %{name}-demo.files-debug
2115 %{files_demo -- %{debug_suffix_unquoted}}
2116
2117 %files src-debug
2118 %{files_src -- %{debug_suffix_unquoted}}
2119
2120 %files javadoc-debug
2121 %{files_javadoc -- %{debug_suffix_unquoted}}
2122
2123 %files javadoc-zip-debug
2124 %{files_javadoc_zip -- %{debug_suffix_unquoted}}
2125
2126 %files accessibility-debug
2127 %{files_accessibility -- %{debug_suffix_unquoted}}
2128
2129 %if %{with_openjfx_binding}
2130 %files openjfx-debug -f %{name}-openjfx.files-debug
2131
2132 %files openjfx-devel-debug -f %{name}-openjfx-devel.files-debug
2133 %endif
2134 %endif
2135
2136

  ViewVC Help
Powered by ViewVC 1.1.30