/[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 1669573 - (show annotations) (download)
Thu Jan 7 16:36:06 2021 UTC (3 years, 2 months ago) by neoclust
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 96814 byte(s)
SILENT: Fix macro
1 # Sync up to db53a2c1ca8ed8e38749bfc28beccff1c0385014
2 %define _disable_ld_no_undefined 1
3
4 # RPM conditionals so as to be able to dynamically produce
5 # slowdebug/release builds. See:
6 # http://rpm.org/user_doc/conditional_builds.html
7 #
8 # Examples:
9 #
10 # Produce release, fastdebug *and* slowdebug builds on x86_64 (default):
11 # $ rpmbuild -ba java-1.8.0-openjdk.spec
12 #
13 # Produce only release builds (no slowdebug builds) on x86_64:
14 # $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug --without fastdebug
15 #
16 # Only produce a release build on x86_64:
17 # $ fedpkg mockbuild --without slowdebug --without fastdebug
18 #
19 # Only produce a debug build on x86_64:
20 # $ fedpkg local --without release
21 #
22 # Enable fastdebug builds by default on relevant arches.
23 %bcond_without fastdebug
24 # Enable slowdebug builds by default on relevant arches.
25 %bcond_without slowdebug
26 # Enable release builds by default on relevant arches.
27 %bcond_without release
28
29 # The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
30 # This fixes detailed NMT and other tools which need minimal debug info.
31 # See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
32 %global _find_debuginfo_opts -g
33
34 # note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
35 # also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
36 # see the difference between global and define:
37 # See https://github.com/rpm-software-management/rpm/issues/127 to comments at "pmatilai commented on Aug 18, 2017"
38 # (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
39 %global debug_suffix_unquoted -slowdebug
40 %global fastdebug_suffix_unquoted -fastdebug
41 # quoted one for shell operations
42 %global debug_suffix "%{debug_suffix_unquoted}"
43 %global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
44 %global normal_suffix ""
45
46 %global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
47 %global debug_on with full debug on
48 %global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP.
49 %global for_fastdebug with minimal debug on
50 %global for_debug for packages with debug on
51
52 %if %{with release}
53 %global include_normal_build 1
54 %else
55 %global include_normal_build 0
56 %endif
57
58 %if %{include_normal_build}
59 %global normal_build %{normal_suffix}
60 %else
61 %global normal_build %{nil}
62 %endif
63
64 # We have hardcoded list of files, which is appearing in alternatives, and in files
65 # in alternatives those are slaves and master, very often triplicated by man pages
66 # in files all masters and slaves are ghosted
67 # the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
68 # you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_
69 # TODO - fix those hardcoded lists via single list
70 # Those files must *NOT* be ghosted for *slowdebug* packages
71 # FIXME - if you are moving jshell or jlink or similar, always modify all three sections
72 # you can check via headless and devels:
73 # rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
74 # == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm | grep bin
75 # != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
76 # similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip}
77 %define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi )
78
79 # while JDK is a techpreview(is_system_jdk=0), some provides are turned off. Once jdk stops to be an techpreview, move it to 1
80 # as sytem JDK, we mean any JDK which can run whole system java stack without issues (like bytecode issues, module issues, dependencies...)
81 %global is_system_jdk 0
82
83 %global aarch64 aarch64 arm64 armv8
84 # we need to distinguish between big and little endian PPC64
85 %global ppc64le ppc64le
86 %global ppc64be ppc64 ppc64p7
87 # Set of architectures which support multiple ABIs
88 %global multilib_arches %{power64} sparc64 x86_64
89 # Set of architectures for which we build debug builds
90 %global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
91 # Set of architectures with a Just-In-Time (JIT) compiler
92 %global jit_arches %{debug_arches}
93 # Set of architectures which support SystemTap tapsets
94 %global systemtap_arches %{jit_arches}
95 %global fastdebug_arches x86_64 ppc64le aarch64
96 # Set of architectures which support the serviceability agent
97 %global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
98 # Set of architectures which support class data sharing
99 # See https://bugzilla.redhat.com/show_bug.cgi?id=513605
100 # MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT
101 %global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
102 %global jfr_arches %{jit_arches}
103
104 # Set of architectures for which alt-java has SSB mitigation
105 %global ssbd_arches x86_64
106
107 # By default, we build a debug build during main build on JIT architectures
108 %if %{with slowdebug}
109 %ifarch %{debug_arches}
110 %global include_debug_build 1
111 %else
112 %global include_debug_build 0
113 %endif
114 %else
115 %global include_debug_build 0
116 %endif
117
118 # By default, we build a fastdebug build during main build only on fastdebug architectures
119 %if %{with fastdebug}
120 %ifarch %{fastdebug_arches}
121 %global include_fastdebug_build 1
122 %else
123 %global include_fastdebug_build 0
124 %endif
125 %else
126 %global include_fastdebug_build 0
127 %endif
128
129 %if %{include_debug_build}
130 %global slowdebug_build %{debug_suffix}
131 %else
132 %global slowdebug_build %{nil}
133 %endif
134
135 %if %{include_fastdebug_build}
136 %global fastdebug_build %{fastdebug_suffix}
137 %else
138 %global fastdebug_build %{nil}
139 %endif
140 %global bootstrap_build 1
141
142 # If you disable both builds, then the build fails
143 # Note that the debug build requires the normal build for docs
144 %global build_loop %{normal_build} %{fastdebug_build} %{slowdebug_build}
145 # Test slowdebug first as it provides the best diagnostics
146 %global rev_build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
147
148 %global bootstrap_targets images
149 %global release_targets images docs-zip
150 %global debug_targets images
151
152 # Disable LTO as this causes build failures at the moment.
153 # See RHBZ#1861401
154 %define _lto_cflags %{nil}
155
156 # Filter out flags from the optflags macro that cause problems with the OpenJDK build
157 # We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
158 # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
159 # We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
160 # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
161 %global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
162 %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
163 %global ourldflags %{__global_ldflags}
164
165 # With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
166 # the initialization must be here. Later the pkg-config have buggy behavior
167 # looks like openjdk RPM specific bug
168 # Always set this so the nss.cfg file is not broken
169 %global NSS_LIBDIR %(pkg-config --variable=libdir nss)
170 %global NSS_LIBS %(pkg-config --libs nss)
171 %global NSS_CFLAGS %(pkg-config --cflags nss)
172
173 # In some cases, the arch used by the JDK does
174 # not match _arch.
175 # Also, in some cases, the machine name used by SystemTap
176 # does not match that given by _target_cpu
177 %ifarch x86_64
178 %global archinstall amd64
179 %global stapinstall x86_64
180 %endif
181 %ifarch ppc
182 %global archinstall ppc
183 %global stapinstall powerpc
184 %endif
185 %ifarch %{ppc64be}
186 %global archinstall ppc64
187 %global stapinstall powerpc
188 %endif
189 %ifarch %{ppc64le}
190 %global archinstall ppc64le
191 %global stapinstall powerpc
192 %endif
193 %ifarch %{ix86}
194 %global archinstall i386
195 %global stapinstall i386
196 %endif
197 %ifarch ia64
198 %global archinstall ia64
199 %global stapinstall ia64
200 %endif
201 %ifarch s390
202 %global archinstall s390
203 %global stapinstall s390
204 %endif
205 %ifarch s390x
206 %global archinstall s390x
207 %global stapinstall s390
208 %endif
209 %ifarch %{arm}
210 %global archinstall arm
211 %global stapinstall arm
212 %endif
213 %ifarch %{aarch64}
214 %global archinstall aarch64
215 %global stapinstall arm64
216 %endif
217 # 32 bit sparc, optimized for v9
218 %ifarch sparcv9
219 %global archinstall sparc
220 %global stapinstall %{_target_cpu}
221 %endif
222 # 64 bit sparc
223 %ifarch sparc64
224 %global archinstall sparcv9
225 %global stapinstall %{_target_cpu}
226 %endif
227 # Need to support noarch for srpm build
228 %ifarch noarch
229 %global archinstall %{nil}
230 %global stapinstall %{nil}
231 %endif
232
233
234
235 %ifarch %{systemtap_arches}
236 %global with_systemtap 1
237 %else
238 %global with_systemtap 0
239 %endif
240
241 # New Version-String scheme-style defines
242 %global majorver 8
243
244 %ifarch %{ix86} x86_64
245 %global with_openjfx_binding 1
246 %global openjfx_path %{_jvmdir}/openjfx8
247 # links src directories
248 %global jfx_jre_libs_dir %{openjfx_path}/rt/lib
249 %global jfx_jre_native_dir %{jfx_jre_libs_dir}/%{archinstall}
250 %global jfx_sdk_libs_dir %{openjfx_path}/lib
251 %global jfx_sdk_bins_dir %{openjfx_path}/bin
252 %global jfx_jre_exts_dir %{jfx_jre_libs_dir}/ext
253 # links src files
254 # maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful
255 %global jfx_jre_libs jfxswt.jar javafx.properties
256 %global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so libglassgtk2.so libglassgtk3.so
257 %global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar
258 %global jfx_sdk_bins javafxpackager javapackager
259 %global jfx_jre_exts jfxrt.jar
260 %else
261 %global with_openjfx_binding 0
262 %endif
263
264 # Define IcedTea version used for SystemTap tapsets and desktop file
265 %global icedteaver 3.15.0
266
267 # Standard JPackage naming and versioning defines
268 %global origin openjdk
269 %global origin_nice OpenJDK
270 %global top_level_dir_name %{origin}
271 # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there.
272 %global shenandoah_project aarch64-port
273 %global shenandoah_repo jdk8u-shenandoah
274 %global shenandoah_revision aarch64-shenandoah-jdk8u282-b02
275 # Define old aarch64/jdk8u tree variables for compatibility
276 %global project %{shenandoah_project}
277 %global repo %{shenandoah_repo}
278 %global revision %{shenandoah_revision}
279
280
281 # e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 -> aarch64-shenandoah-jdk8u212-b04
282 %global version_tag %(VERSION=%{revision}; echo ${VERSION%%-shenandoah-merge*})
283 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%)
284 %global whole_update %(VERSION=%{version_tag}; echo ${VERSION%%-*})
285 # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60
286 %global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
287 # eg jdk8u60-b27 -> b27
288 %global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
289 %global rpmrelease 1
290 # Define milestone (EA for pre-releases, GA ("fcs") for releases)
291 # Release will be (where N is usually a number starting at 1):
292 # - 0.N%%{?extraver}%%{?dist} for EA releases,
293 # - N%%{?extraver}{?dist} for GA releases
294 %global is_ga 0
295 %if %{is_ga}
296 %global milestone fcs
297 %global milestone_version %{nil}
298 %global extraver %{nil}
299 %global eaprefix %{nil}
300 %else
301 %global milestone ea
302 %global milestone_version "-ea"
303 %global extraver .%{milestone}
304 %global eaprefix 0.
305 %endif
306 # priority must be 7 digits in total; up to openjdk 1.8
307 %if %is_system_jdk
308 %global priority 1800%{updatever}
309 %else
310 # for techpreview, using 1, so slowdebugs can have 0
311 %global priority 0000001
312 %endif
313
314 %global javaver 1.%{majorver}.0
315
316 # Define what url should JVM offer in case of a crash report
317 # order may be important, epel may have rhel declared
318 %global bugs https://bugs.mageia.org/enter_bug.cgi
319
320 # parametrized macros are order-sensitive
321 %global compatiblename %{name}
322 %global fullversion %{compatiblename}-%{version}-%{release}
323 # images directories from upstream build
324 %global jdkimage j2sdk-image
325 # output dir stub
326 %define buildoutputdir() %{expand:build/jdk8.build%{?1}}
327 # we can copy the javadoc to not arched dir, or make it not noarch
328 %define uniquejavadocdir() %{expand:%{fullversion}%{?1}}
329 # main id and dir of this jdk
330 %define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
331
332 #################################################################
333 # fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
334 # https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
335 # https://bugzilla.redhat.com/show_bug.cgi?id=1655938
336 %global _privatelibs libatk-wrapper[.]so.*|libattach[.]so.*|libawt_headless[.]so.*|libawt[.]so.*|libawt_xawt[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libhprof[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas_unix[.]so.*|libjava_crw_demo[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjli[.]so.*|libjsdt[.]so.*|libjsoundalsa[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libnpt[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsplashscreen[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libzip[.]so.*|lib[.]so\\(SUNWprivate_.*
337 %global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
338 %if %is_system_jdk
339 %global __provides_exclude ^(%{_privatelibs})$
340 %global __requires_exclude ^(%{_privatelibs})$
341 # Never generate lib-style provides/requires for slowdebug packages
342 %global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
343 %global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
344 %global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
345 %global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
346 %else
347 # Don't generate provides/requires for JDK provided shared libraries at all.
348 %global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$
349 %global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
350 %endif
351
352
353 %global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin}
354 %define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
355 # Standard JPackage directories and symbolic links.
356 %define sdkdir() %{expand:%{uniquesuffix -- %{?1}}}
357 %define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
358
359 %define jredir() %{expand:%{sdkdir -- %{?1}}/jre}
360 %define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
361 %define jrebindir() %{expand:%{_jvmdir}/%{jredir -- %{?1}}/bin}
362 %global alt_java_name alt-java
363
364 %global rpm_state_dir %{_localstatedir}/lib/rpm-state/
365
366 %if %{with_systemtap}
367 # Where to install systemtap tapset (links)
368 # We would like these to be in a package specific sub-dir,
369 # but currently systemtap doesn't support that, so we have to
370 # use the root tapset dir for now. To distinguish between 64
371 # and 32 bit architectures we place the tapsets under the arch
372 # specific dir (note that systemtap will only pickup the tapset
373 # for the primary arch for now). Systemtap uses the machine name
374 # aka target_cpu as architecture specific directory name.
375 %global tapsetroot /usr/share/systemtap
376 %global tapsetdirttapset %{tapsetroot}/tapset/
377 %global tapsetdir %{tapsetdirttapset}/%{stapinstall}
378 %endif
379
380 # not-duplicated scriptlets for normal/debug packages
381 %global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
382
383
384 %define post_script() %{expand:
385 update-desktop-database %{_datadir}/applications &> /dev/null || :
386 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
387 exit 0
388 }
389
390
391 %define post_headless() %{expand:
392 %ifarch %{share_arches}
393 %{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
394 %endif
395
396 PRIORITY=%{priority}
397 if [ "%{?1}" == %{debug_suffix} ]; then
398 let PRIORITY=PRIORITY-1
399 fi
400
401 ext=.xz
402 alternatives \\
403 --install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\
404 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir -- %{?1}} \\
405 --slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
406 --slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\
407 --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
408 --slave %{_bindir}/orbd orbd %{jrebindir -- %{?1}}/orbd \\
409 --slave %{_bindir}/pack200 pack200 %{jrebindir -- %{?1}}/pack200 \\
410 --slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\
411 --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
412 --slave %{_bindir}/servertool servertool %{jrebindir -- %{?1}}/servertool \\
413 --slave %{_bindir}/tnameserv tnameserv %{jrebindir -- %{?1}}/tnameserv \\
414 --slave %{_bindir}/policytool policytool %{jrebindir -- %{?1}}/policytool \\
415 --slave %{_bindir}/unpack200 unpack200 %{jrebindir -- %{?1}}/unpack200 \\
416 --slave %{_mandir}/man1/java.1$ext java.1$ext \\
417 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
418 --slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\
419 %{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\
420 --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
421 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\
422 --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
423 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
424 --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\
425 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1$ext \\
426 --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
427 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1$ext \\
428 --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
429 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\
430 --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
431 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext \\
432 --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \\
433 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1$ext \\
434 --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\
435 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1$ext \\
436 --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\
437 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1$ext \\
438 --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
439 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1$ext
440
441 for X in %{origin} %{javaver} ; do
442 alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{jredir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
443 done
444
445 update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch}
446
447
448 update-desktop-database %{_datadir}/applications &> /dev/null || :
449 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
450
451 # see pretrans where this file is declared
452 # also see that pretrans is only for non-debug
453 if [ ! "%{?1}" == %{debug_suffix} ]; then
454 if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
455 sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}}
456 fi
457 fi
458
459 exit 0
460 }
461
462 %define postun_script() %{expand:
463 update-desktop-database %{_datadir}/applications &> /dev/null || :
464 if [ $1 -eq 0 ] ; then
465 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
466 %{update_desktop_icons}
467 fi
468 exit 0
469 }
470
471
472 %define postun_headless() %{expand:
473 alternatives --remove java %{jrebindir -- %{?1}}/java
474 alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir -- %{?1}}
475 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir -- %{?1}}
476 alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}}
477 }
478
479 %define posttrans_script() %{expand:
480 %{update_desktop_icons}
481 }
482
483 %define post_devel() %{expand:
484
485 PRIORITY=%{priority}
486 if [ "%{?1}" == %{debug_suffix} ]; then
487 let PRIORITY=PRIORITY-1
488 fi
489
490 ext=.xz
491 alternatives \\
492 --install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\
493 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
494 --slave %{_bindir}/appletviewer appletviewer %{sdkbindir -- %{?1}}/appletviewer \\
495 --slave %{_bindir}/clhsdb clhsdb %{sdkbindir -- %{?1}}/clhsdb \\
496 --slave %{_bindir}/extcheck extcheck %{sdkbindir -- %{?1}}/extcheck \\
497 --slave %{_bindir}/hsdb hsdb %{sdkbindir -- %{?1}}/hsdb \\
498 --slave %{_bindir}/idlj idlj %{sdkbindir -- %{?1}}/idlj \\
499 --slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
500 --slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
501 --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
502 --slave %{_bindir}/javah javah %{sdkbindir -- %{?1}}/javah \\
503 --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
504 --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
505 --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
506 --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
507 --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
508 %ifarch %{jfr_arches}
509 --slave %{_bindir}/jfr jfr %{sdkbindir -- %{?1}}/jfr \\
510 %endif
511 --slave %{_bindir}/jhat jhat %{sdkbindir -- %{?1}}/jhat \\
512 --slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
513 --slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
514 --slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
515 --slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
516 --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir -- %{?1}}/jsadebugd \\
517 --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
518 --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
519 --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
520 --slave %{_bindir}/native2ascii native2ascii %{sdkbindir -- %{?1}}/native2ascii \\
521 --slave %{_bindir}/rmic rmic %{sdkbindir -- %{?1}}/rmic \\
522 --slave %{_bindir}/schemagen schemagen %{sdkbindir -- %{?1}}/schemagen \\
523 --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
524 --slave %{_bindir}/wsgen wsgen %{sdkbindir -- %{?1}}/wsgen \\
525 --slave %{_bindir}/wsimport wsimport %{sdkbindir -- %{?1}}/wsimport \\
526 --slave %{_bindir}/xjc xjc %{sdkbindir -- %{?1}}/xjc \\
527 --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \\
528 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1$ext \\
529 --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \\
530 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1$ext \\
531 --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \\
532 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1$ext \\
533 --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
534 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
535 --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
536 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
537 --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
538 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
539 --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
540 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
541 --slave %{_mandir}/man1/javah.1$ext javah.1$ext \\
542 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1$ext \\
543 --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
544 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
545 --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
546 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
547 --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
548 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
549 --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
550 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
551 --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
552 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
553 --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \\
554 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1$ext \\
555 --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
556 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
557 --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
558 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
559 --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
560 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
561 --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
562 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
563 --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \\
564 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1$ext \\
565 --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
566 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
567 --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
568 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
569 --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
570 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
571 --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\
572 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1$ext \\
573 --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
574 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1$ext \\
575 --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\
576 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1$ext \\
577 --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
578 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext \\
579 --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \\
580 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1$ext \\
581 --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \\
582 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1$ext \\
583 --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \\
584 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1$ext
585
586 for X in %{origin} %{javaver} ; do
587 alternatives \\
588 --install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
589 done
590
591 update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
592
593 update-desktop-database %{_datadir}/applications &> /dev/null || :
594 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
595
596 exit 0
597 }
598
599 %define postun_devel() %{expand:
600 alternatives --remove javac %{sdkbindir -- %{?1}}/javac
601 alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
602 alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
603 alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
604
605 update-desktop-database %{_datadir}/applications &> /dev/null || :
606
607 if [ $1 -eq 0 ] ; then
608 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
609 %{update_desktop_icons}
610 fi
611 exit 0
612 }
613
614 %define posttrans_devel() %{expand:
615 %{update_desktop_icons}
616 }
617
618 %define post_javadoc() %{expand:
619
620 PRIORITY=%{priority}
621 if [ "%{?1}" == %{debug_suffix} ]; then
622 let PRIORITY=PRIORITY-1
623 fi
624
625 alternatives \\
626 --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
627 $PRIORITY --family %{name}
628 exit 0
629 }
630
631 %define postun_javadoc() %{expand:
632 alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api
633 exit 0
634 }
635
636 %define post_javadoc_zip() %{expand:
637
638 PRIORITY=%{priority}
639 if [ "%{?1}" == %{debug_suffix} ]; then
640 let PRIORITY=PRIORITY-1
641 fi
642
643 alternatives \\
644 --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
645 $PRIORITY --family %{name}
646 exit 0
647 }
648
649 %define postun_javadoc_zip() %{expand:
650 alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
651 exit 0
652 }
653
654 %define files_jre() %{expand:
655 %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png
656 %{_datadir}/applications/*policytool%{?1}.desktop
657 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjsoundalsa.so
658 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libsplashscreen.so
659 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libawt_xawt.so
660 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjawt.so
661 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/bin/policytool
662 %if %is_system_jdk
663 %if %{is_release_build -- %{?1}}
664 %ghost %{_bindir}/policytool
665 %endif
666 %endif
667 }
668
669
670 %define files_jre_headless() %{expand:
671 %defattr(-,root,root,-)
672 %dir %{_sysconfdir}/.java/.systemPrefs
673 %dir %{_sysconfdir}/.java
674 %license %{_jvmdir}/%{jredir -- %{?1}}/ASSEMBLY_EXCEPTION
675 %license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
676 %license %{_jvmdir}/%{jredir -- %{?1}}/THIRD_PARTY_README
677 %doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS
678 %dir %{_jvmdir}/%{sdkdir -- %{?1}}
679 %{_jvmdir}/%{jrelnk -- %{?1}}
680 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security
681 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/cacerts
682 %dir %{_jvmdir}/%{jredir -- %{?1}}
683 %dir %{_jvmdir}/%{jredir -- %{?1}}/bin
684 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib
685 %{_jvmdir}/%{jredir -- %{?1}}/bin/java
686 %{_jvmdir}/%{jredir -- %{?1}}/bin/%{alt_java_name}
687 %{_jvmdir}/%{jredir -- %{?1}}/bin/jjs
688 %{_jvmdir}/%{jredir -- %{?1}}/bin/keytool
689 %{_jvmdir}/%{jredir -- %{?1}}/bin/orbd
690 %{_jvmdir}/%{jredir -- %{?1}}/bin/pack200
691 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmid
692 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmiregistry
693 %{_jvmdir}/%{jredir -- %{?1}}/bin/servertool
694 %{_jvmdir}/%{jredir -- %{?1}}/bin/tnameserv
695 %{_jvmdir}/%{jredir -- %{?1}}/bin/unpack200
696 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/
697 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/
698 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/
699 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
700 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
701 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
702 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/limited/local_policy.jar
703 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/java.policy
704 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/java.security
705 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/blacklisted.certs
706 %config(noreplace) %{etcjavadir -- %{?1}}/lib/logging.properties
707 %config(noreplace) %{etcjavadir -- %{?1}}/lib/calendars.properties
708 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
709 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
710 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
711 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/local_policy.jar
712 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.policy
713 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.security
714 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/blacklisted.certs
715 %{_jvmdir}/%{jredir -- %{?1}}/lib/logging.properties
716 %{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties
717 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
718 %{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
719 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
720 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
721 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1*
722 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
723 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
724 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
725 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1*
726 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1*
727 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
728 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
729 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
730 %config(noreplace) %{etcjavadir -- %{?1}}/lib/security/nss.cfg
731 %ifarch %{share_arches}
732 %attr(444, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/classes.jsa
733 %attr(444, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/classes.jsa
734 %endif
735 %dir %{etcjavasubdir}
736 %dir %{etcjavadir -- %{?1}}
737 %dir %{etcjavadir -- %{?1}}/lib
738 %dir %{etcjavadir -- %{?1}}/lib/security
739 %{etcjavadir -- %{?1}}/lib/security/cacerts
740 %dir %{etcjavadir -- %{?1}}/lib/security/policy
741 %dir %{etcjavadir -- %{?1}}/lib/security/policy/limited
742 %dir %{etcjavadir -- %{?1}}/lib/security/policy/unlimited
743 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/
744 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/
745 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}
746 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli
747 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
748 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jvm.cfg
749 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libattach.so
750 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
751 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
752 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
753 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
754 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
755 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
756 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2gss.so
757 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pcsc.so
758 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pkcs11.so
759 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjaas_unix.so
760 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava.so
761 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava_crw_demo.so
762 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjavajpeg.so
763 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjdwp.so
764 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsdt.so
765 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsig.so
766 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsound.so
767 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/liblcms.so
768 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmanagement.so
769 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmlib_image.so
770 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
771 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
772 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
773 %ifarch %{sa_arches}
774 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
775 %endif
776 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsctp.so
777 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsunec.so
778 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so
779 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so
780 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so
781 %{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar
782 %{_jvmdir}/%{jredir -- %{?1}}/lib/classlist
783 %{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties
784 %{_jvmdir}/%{jredir -- %{?1}}/lib/currency.data
785 %{_jvmdir}/%{jredir -- %{?1}}/lib/flavormap.properties
786 %{_jvmdir}/%{jredir -- %{?1}}/lib/hijrah-config-umalqura.properties
787 %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors/*
788 %{_jvmdir}/%{jredir -- %{?1}}/lib/jce.jar
789 %{_jvmdir}/%{jredir -- %{?1}}/lib/jexec
790 %{_jvmdir}/%{jredir -- %{?1}}/lib/jsse.jar
791 %{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt
792 %{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index
793 %{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties
794 %config(noreplace) %{etcjavadir -- %{?1}}/lib/net.properties
795 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja
796 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties
797 %{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar
798 %{_jvmdir}/%{jredir -- %{?1}}/lib/rt.jar
799 %{_jvmdir}/%{jredir -- %{?1}}/lib/sound.properties
800 %{_jvmdir}/%{jredir -- %{?1}}/lib/tzdb.dat
801 %{_jvmdir}/%{jredir -- %{?1}}/lib/management-agent.jar
802 %{_jvmdir}/%{jredir -- %{?1}}/lib/management/*
803 %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm/*
804 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/cldrdata.jar
805 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/dnsns.jar
806 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/jaccess.jar
807 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/localedata.jar
808 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/meta-index
809 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/nashorn.jar
810 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunec.jar
811 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar
812 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar
813 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar
814 %ifarch %{jfr_arches}
815 %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr.jar
816 %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr/default.jfc
817 %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr/profile.jfc
818 %endif
819
820 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images
821 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors
822 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/management
823 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm
824 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/ext
825 %ifarch %{jfr_arches}
826 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr
827 %endif
828 %if %is_system_jdk
829 %if %{is_release_build -- %{?1}}
830 %ghost %{_bindir}/java
831 %ghost %{_jvmdir}/jre
832 # https://bugzilla.redhat.com/show_bug.cgi?id=1312019
833 %ghost %{_bindir}/jjs
834 %ghost %{_bindir}/keytool
835 %ghost %{_bindir}/orbd
836 %ghost %{_bindir}/pack200
837 %ghost %{_bindir}/rmid
838 %ghost %{_bindir}/rmiregistry
839 %ghost %{_bindir}/servertool
840 %ghost %{_bindir}/tnameserv
841 %ghost %{_bindir}/unpack200
842 %endif
843 %endif
844 }
845
846 %define files_devel() %{expand:
847 %defattr(-,root,root,-)
848 %license %{_jvmdir}/%{sdkdir -- %{?1}}/ASSEMBLY_EXCEPTION
849 %license %{_jvmdir}/%{sdkdir -- %{?1}}/LICENSE
850 %license %{_jvmdir}/%{sdkdir -- %{?1}}/THIRD_PARTY_README
851 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
852 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/include
853 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
854 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
855 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/clhsdb
856 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/extcheck
857 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/hsdb
858 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
859 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
860 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
861 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
862 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name}
863 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
864 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
865 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah
866 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
867 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi
868 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
869 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
870 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
871 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
872 %ifarch %{jfr_arches}
873 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jfr
874 %endif
875 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhat
876 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
877 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
878 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
879 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
880 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
881 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jsadebugd
882 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
883 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
884 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
885 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
886 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/native2ascii
887 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/orbd
888 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
889 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/policytool
890 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
891 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
892 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
893 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/schemagen
894 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
895 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/servertool
896 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
897 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
898 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsgen
899 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
900 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
901 %{_jvmdir}/%{sdkdir -- %{?1}}/include/*
902 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
903 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
904 %if %{with_systemtap}
905 %{_jvmdir}/%{sdkdir -- %{?1}}/tapset
906 %endif
907 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ir.idl
908 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jconsole.jar
909 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/orb.idl
910 %ifarch %{sa_arches}
911 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/sa-jdi.jar
912 %endif
913 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/dt.jar
914 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
915 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/tools.jar
916 %{_datadir}/applications/*jconsole%{?1}.desktop
917 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1*
918 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1*
919 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1*
920 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
921 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
922 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
923 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
924 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1*
925 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
926 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
927 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
928 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
929 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
930 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1*
931 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
932 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
933 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
934 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
935 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1*
936 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
937 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
938 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
939 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1*
940 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
941 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1*
942 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
943 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1*
944 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1*
945 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1*
946 %if %{with_systemtap}
947 %dir %{tapsetroot}
948 %dir %{tapsetdirttapset}
949 %dir %{tapsetdir}
950 %{tapsetdir}/*%{_arch}%{?1}.stp
951 %endif
952 %if %is_system_jdk
953 %if %{is_release_build -- %{?1}}
954 %ghost %{_jvmdir}/java
955 %ghost %{_bindir}/appletviewer
956 %ghost %{_bindir}/clhsdb
957 %ghost %{_bindir}/extcheck
958 %ghost %{_bindir}/hsdb
959 %ghost %{_bindir}/idlj
960 %ghost %{_bindir}/jar
961 %ghost %{_bindir}/jarsigner
962 %ghost %{_bindir}/java
963 %ghost %{_bindir}/java-rmi.cgi
964 %ghost %{_bindir}/javac
965 %ghost %{_bindir}/javadoc
966 %ghost %{_bindir}/javah
967 %ghost %{_bindir}/javap
968 %ghost %{_bindir}/jcmd
969 %ghost %{_bindir}/jconsole
970 %ghost %{_bindir}/jdb
971 %ghost %{_bindir}/jdeps
972 %ghost %{_bindir}/jhat
973 %ghost %{_bindir}/jinfo
974 %ghost %{_bindir}/jjs
975 %ghost %{_bindir}/jmap
976 %ghost %{_bindir}/jps
977 %ghost %{_bindir}/jrunscript
978 %ghost %{_bindir}/jsadebugd
979 %ghost %{_bindir}/jstack
980 %ghost %{_bindir}/jstat
981 %ghost %{_bindir}/jstatd
982 %ghost %{_bindir}/keytool
983 %ghost %{_bindir}/native2ascii
984 %ghost %{_bindir}/orbd
985 %ghost %{_bindir}/pack200
986 %ghost %{_bindir}/policytool
987 %ghost %{_bindir}/rmic
988 %ghost %{_bindir}/rmid
989 %ghost %{_bindir}/rmiregistry
990 %ghost %{_bindir}/schemagen
991 %ghost %{_bindir}/serialver
992 %ghost %{_bindir}/servertool
993 %ghost %{_bindir}/tnameserv
994 %ghost %{_bindir}/unpack200
995 %ghost %{_bindir}/wsgen
996 %ghost %{_bindir}/wsimport
997 %ghost %{_bindir}/xjc
998 %endif
999 %endif
1000 }
1001
1002
1003 %define files_demo() %{expand:
1004 %defattr(-,root,root,-)
1005 %license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
1006 }
1007
1008 %define files_src() %{expand:
1009 %defattr(-,root,root,-)
1010 %doc README.md
1011 %{_jvmdir}/%{sdkdir -- %{?1}}/src.zip
1012 }
1013
1014 %define files_javadoc() %{expand:
1015 %defattr(-,root,root,-)
1016 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
1017 #javadoc is in jdk8 noarch, so also licnese file must be treated like it
1018 %license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
1019 %if %is_system_jdk
1020 %if %{is_release_build -- %{?1}}
1021 %ghost %{_javadocdir}/java
1022 %endif
1023 %endif
1024 }
1025
1026 %define files_javadoc_zip() %{expand:
1027 %defattr(-,root,root,-)
1028 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
1029 #javadoc is in jdk8 noarch, so also licnese file must be treated like it
1030 %license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
1031 %if %is_system_jdk
1032 %if %{is_release_build -- %{?1}}
1033 %ghost %{_javadocdir}/java-zip
1034 %endif
1035 %endif
1036 }
1037
1038 %define files_accessibility() %{expand:
1039 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libatk-wrapper.so
1040 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/java-atk-wrapper.jar
1041 %{_jvmdir}/%{jredir -- %{?1}}/lib/accessibility.properties
1042 }
1043
1044 # not-duplicated requires/provides/obsoletes for normal/debug packages
1045 %define java_rpo() %{expand:
1046 Requires: fontconfig%{?_isa}
1047 Requires: xorg-x11-fonts-Type1
1048 # Require libXcomposite explicitly since it's only dynamically loaded
1049 # at runtime. Fixes screenshot issues. See JDK-8150954.
1050 Requires: libXcomposite%{?_isa}
1051 # Requires rest of java
1052 Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1053 #OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1054 # for java-X-openjdk package's desktop binding
1055 %if 0%{?fedora} || 0%{?rhel} >= 8
1056 Recommends: gtk2%{?_isa}
1057 %endif
1058
1059 Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1060
1061 # Standard JPackage base provides
1062 Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
1063 Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1064 Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
1065 %if %is_system_jdk
1066 Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1067 Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1068 Provides: java%{?1} = %{epoch}:%{version}-%{release}
1069 Provides: jre%{?1} = %{epoch}:%{version}-%{release}
1070 %endif
1071 }
1072
1073 %define java_headless_rpo() %{expand:
1074 # Require /etc/pki/java/cacerts
1075 Requires: ca-certificates
1076 # Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
1077 Requires: javapackages-filesystem
1078 # Require zoneinfo data provided by tzdata-java subpackage.
1079 # 2020b required as of JDK-8254177 in October CPU
1080 Requires: tzdata-java >= 2020b
1081 # for support of kernel stream control
1082 # libsctp.so.1 is being `dlopen`ed on demand
1083 Requires: lksctp-tools%{?_isa}
1084 # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
1085 # not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
1086 # considered as regression
1087 Requires: copy-jdk-configs >= 3.3
1088 #OrderWithRequires: copy-jdk-configs
1089 # for printing support
1090 # FIXME: Add good deps for mageia
1091 #Requires: cups-libs
1092 Requires(post): update-alternatives
1093 Requires(postun): update-alternatives
1094 # for optional support of kernel stream control, card reader and printing bindings
1095 Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}
1096
1097 # Standard JPackage base provides
1098 Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
1099 Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
1100 Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
1101 Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
1102 %if %is_system_jdk
1103 Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
1104 Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
1105 Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release}
1106 Provides: java-headless%{?1} = %{epoch}:%{version}-%{release}
1107 %endif
1108 }
1109
1110 %define java_devel_rpo() %{expand:
1111 # Requires base package
1112 Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1113 #OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1114 Requires(post): update-alternatives
1115 Requires(postun): update-alternatives
1116
1117 # Standard JPackage devel provides
1118 Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1119 Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
1120 Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release}
1121 Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
1122 %if %is_system_jdk
1123 Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release}
1124 Provides: java-devel%{?1} = %{epoch}:%{version}-%{release}
1125 Provides: java-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
1126 Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release}
1127 %endif
1128 }
1129
1130 %define java_demo_rpo() %{expand:
1131 Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1132 #OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1133
1134 Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release}
1135 Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
1136 %if %is_system_jdk
1137 Provides: java-demo%{?1} = %{epoch}:%{version}-%{release}
1138 Provides: java-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
1139 %endif
1140 }
1141
1142 %define java_javadoc_rpo() %{expand:
1143 #OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1144 Requires(post): update-alternatives
1145 Requires(postun): update-alternatives
1146
1147 # Standard JPackage javadoc provides
1148 Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
1149 Provides: java-%{javaver}-%{origin}-javadoc%{?1} = %{epoch}:%{version}-%{release}
1150 %if %is_system_jdk
1151 Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
1152 %endif
1153 }
1154
1155 %define java_src_rpo() %{expand:
1156 Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1157
1158 # Standard JPackage sources provides
1159 Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
1160 Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
1161 %if %is_system_jdk
1162 Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
1163 Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
1164 %endif
1165 }
1166
1167 %define java_accessibility_rpo() %{expand:
1168 Requires: java-atk-wrapper%{?_isa}
1169 Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1170 #OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1171
1172 Provides: java-accessibility%{?1} = %{epoch}:%{version}-%{release}
1173 Provides: java-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{release}
1174 Provides: java-%{javaver}-accessibility%{?1} = %{epoch}:%{version}-%{release}
1175 Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{release}
1176
1177 }
1178
1179 # Prevent brp-java-repack-jars from being run
1180 %global __jar_repack 0
1181
1182 Name: java-%{javaver}-%{origin}
1183 Version: %{javaver}.%{updatever}.%{buildver}
1184 Release: %mkrel %{?eaprefix}%{rpmrelease}%{?extraver}.1
1185 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
1186 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
1187 # also included the epoch in their virtual provides. This created a
1188 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
1189 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
1190 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
1191 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
1192 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
1193 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
1194
1195 Epoch: 1
1196 Summary: %{origin_nice} Runtime Environment %{majorver}
1197 Group: Development/Java
1198 # HotSpot code is licensed under GPLv2
1199 # JDK library code is licensed under GPLv2 with the Classpath exception
1200 # The Apache license is used in code taken from Apache projects (primarily JAXP & JAXWS)
1201 # DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
1202 # The JSR166 concurrency code is in the public domain
1203 # The BSD and MIT licenses are used for a number of third-party libraries (see THIRD_PARTY_README)
1204 # The OpenJDK source tree includes the JPEG library (IJG), zlib & libpng (zlib), giflib and LCMS (MIT)
1205 # The test code includes copies of NSS under the Mozilla Public License v2.0
1206 # The PCSClite headers are under a BSD with advertising license
1207 # The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
1208 License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib
1209 URL: http://openjdk.java.net/
1210
1211 # Shenandoah HotSpot
1212 # aarch64-port/jdk8u-shenandoah contains an integration forest of
1213 # OpenJDK 8u, the aarch64 port and Shenandoah
1214 # To regenerate, use:
1215 # VERSION=%%{shenandoah_revision}
1216 # FILE_NAME_ROOT=%%{shenandoah_project}-%%{shenandoah_repo}-${VERSION}
1217 # REPO_ROOT=<path to checked-out repository> generate_source_tarball.sh
1218 # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
1219 Source0: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}-4curve.tar.xz
1220
1221 # Custom README for -src subpackage
1222 Source2: README.md
1223
1224 # Release notes
1225 Source7: NEWS
1226
1227 # Use 'icedtea_sync.sh' to update the following
1228 # They are based on code contained in the IcedTea project (3.x).
1229 # Systemtap tapsets. Zipped up to keep it small.
1230 Source8: tapsets-icedtea-%{icedteaver}.tar.xz
1231
1232 # Desktop files. Adapted from IcedTea
1233 Source9: jconsole.desktop.in
1234 Source10: policytool.desktop.in
1235
1236 # nss configuration file
1237 Source11: nss.cfg.in
1238
1239 # Removed libraries that we link instead
1240 Source12: %{name}-remove-intree-libraries.sh
1241
1242 # Ensure we aren't using the limited crypto policy
1243 Source13: TestCryptoLevel.java
1244
1245 # Ensure ECDSA is working
1246 Source14: TestECDSA.java
1247
1248 # Verify system crypto (policy) can be disabled via a property
1249 Source15: TestSecurityProperties.java
1250
1251 Source20: repackReproduciblePolycies.sh
1252
1253 # New versions of config files with aarch64 support. This is not upstream yet.
1254 Source100: config.guess
1255 Source101: config.sub
1256
1257 ############################################
1258 #
1259 # RPM/distribution specific patches
1260 #
1261 # This section includes patches specific to
1262 # Fedora/RHEL which can not be upstreamed
1263 # either in their current form or at all.
1264 ############################################
1265
1266 # Accessibility patches
1267 # Ignore AWTError when assistive technologies are loaded
1268 Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
1269 # Restrict access to java-atk-wrapper classes
1270 Patch3: rh1648644-java_access_bridge_privileged_security.patch
1271 # Turn on AssumeMP by default on RHEL systems
1272 Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch
1273
1274 #############################################
1275 #
1276 # Upstreamable patches
1277 #
1278 # This section includes patches which need to
1279 # be reviewed & pushed to the current development
1280 # tree of OpenJDK.
1281 #############################################
1282 # PR2737: Allow multiple initialization of PKCS11 libraries
1283 Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch
1284 # PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
1285 Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch
1286 # Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
1287 Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
1288 # RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
1289 Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
1290 # PR3083, RH1346460: Regression in SSL debug output without an ECC provider
1291 Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
1292 # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
1293 # PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
1294 Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch
1295 # PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy
1296 Patch400: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
1297 # PR3655: Allow use of system crypto policy to be disabled by the user
1298 Patch401: pr3655-toggle_system_crypto_policy.patch
1299 # enable build of speculative store bypass hardened alt-java
1300 Patch600: rh1750419-redhat_alt_java.patch
1301 # JDK-8218811: replace open by os::open in hotspot coding
1302 # This fixes a GCC 10 build issue
1303 Patch111: jdk8218811-perfMemory_linux.patch
1304 # Similar for GCC 11
1305 Patch112: %{name}-gcc11.patch
1306
1307 #############################################
1308 #
1309 # Arch-specific upstreamable patches
1310 #
1311 # This section includes patches which need to
1312 # be reviewed & pushed upstream and are specific
1313 # to certain architectures. This usually means the
1314 # current OpenJDK development branch, but may also
1315 # include other trees e.g. for the AArch64 port for
1316 # OpenJDK 8u.
1317 #############################################
1318 # s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
1319 Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
1320 # x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
1321 Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
1322 # AArch64: PR3519: Fix further functions with a missing return value (AArch64)
1323 Patch106: pr3519-fix_further_functions_with_a_missing_return_value.patch
1324 # S390 ambiguous log2_intptr calls
1325 Patch107: s390-8214206_fix.patch
1326
1327 #############################################
1328 #
1329 # Patches which need backporting to 8u
1330 #
1331 # This section includes patches which have
1332 # been pushed upstream to the latest OpenJDK
1333 # development tree, but need to be backported
1334 # to OpenJDK 8u.
1335 #############################################
1336 # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
1337 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1338 Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
1339 # PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
1340 Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
1341 # 8143245, PR3548: Zero build requires disabled warnings
1342 Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
1343 # s390: JDK-8203030, Type fixing for s390
1344 Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
1345 # 8035341: Allow using a system installed libpng
1346 Patch202: jdk8035341-allow_using_system_installed_libpng.patch
1347 # 8042159: Allow using a system-installed lcms2
1348 Patch203: jdk8042159-allow_using_system_installed_lcms2-root.patch
1349 Patch204: jdk8042159-allow_using_system_installed_lcms2-jdk.patch
1350
1351 #############################################
1352 #
1353 # Patches appearing in 8u282
1354 #
1355 # This section includes patches which are present
1356 # in the listed OpenJDK 8u release and should be
1357 # able to be removed once that release is out
1358 # and used by this RPM.
1359 #############################################
1360
1361 #############################################
1362 #
1363 # Patches ineligible for 8u
1364 #
1365 # This section includes patches which are present
1366 # upstream, but ineligible for upstream 8u backport.
1367 #############################################
1368 # 8043805: Allow using a system-installed libjpeg
1369 Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
1370
1371 #############################################
1372 #
1373 # Shenandoah fixes
1374 #
1375 # This section includes patches which are
1376 # specific to the Shenandoah garbage collector
1377 # and should be upstreamed to the appropriate
1378 # trees.
1379 #############################################
1380
1381 #############################################
1382 #
1383 # Non-OpenJDK fixes
1384 #
1385 # This section includes patches to code other
1386 # that from OpenJDK.
1387 #############################################
1388 Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
1389
1390 #############################################
1391 #
1392 # Dependencies
1393 #
1394 #############################################
1395 BuildRequires: autoconf
1396 BuildRequires: automake
1397 BuildRequires: alsa-lib-devel
1398 BuildRequires: binutils
1399 BuildRequires: cups-devel
1400 BuildRequires: desktop-file-utils
1401 # elfutils only are OK for build without AOT
1402 BuildRequires: elfutils-devel
1403 BuildRequires: fontconfig-devel
1404 BuildRequires: freetype-devel
1405 BuildRequires: giflib-devel
1406 BuildRequires: gcc-c++
1407 BuildRequires: gdb
1408 BuildRequires: gtk2-devel
1409 BuildRequires: lcms2-devel
1410 BuildRequires: libjpeg-devel
1411 BuildRequires: libpng-devel
1412 BuildRequires: libxslt
1413 BuildRequires: libx11-devel
1414 BuildRequires: libxext-devel
1415 BuildRequires: libxi-devel
1416 BuildRequires: libxinerama-devel
1417 BuildRequires: libxrender-devel
1418 BuildRequires: libxt-devel
1419 BuildRequires: libxtst-devel
1420 # Requirements for setting up the nss.cfg
1421 BuildRequires: nss-devel
1422 BuildRequires: pkgconfig
1423 BuildRequires: x11-proto-devel
1424 BuildRequires: zip
1425 BuildRequires: unzip
1426 BuildRequires: java-1.8.0-openjdk-devel
1427 # Zero-assembler build requirement
1428 %ifnarch %{jit_arches}
1429 BuildRequires: libffi-devel
1430 %endif
1431 # 2020b required as of JDK-8254177 in October CPU
1432 BuildRequires: tzdata-java >= 2020b
1433 # Earlier versions have a bug in tree vectorization on PPC
1434 BuildRequires: gcc >= 4.8.3-8
1435
1436 %if %{with_systemtap}
1437 BuildRequires: systemtap-sdt-devel
1438 %endif
1439
1440 # this is always built, also during debug-only build
1441 # when it is built in debug-only this package is just placeholder
1442 %{java_rpo %{nil}}
1443
1444 %description
1445 The %{origin_nice} runtime environment %{majorver}.
1446
1447 %if %{include_debug_build}
1448 %package slowdebug
1449 Summary: %{origin_nice} Runtime Environment %{majorver} %{debug_on}
1450 Group: Development/Java
1451
1452 %{java_rpo -- %{debug_suffix_unquoted}}
1453 %description slowdebug
1454 The %{origin_nice} runtime environment %{majorver}.
1455 %{debug_warning}
1456 %endif
1457
1458 %if %{include_fastdebug_build}
1459 %package fastdebug
1460 Summary: %{origin_nice} Runtime Environment %{majorver} %{for_fastdebug}
1461 Group: Development/Java
1462
1463 %{java_rpo -- %{fastdebug_suffix_unquoted}}
1464 %description fastdebug
1465 The %{origin_nice} runtime environment.
1466 %{fastdebug_warning}
1467 %endif
1468
1469 %if %{include_normal_build}
1470 %package headless
1471 Summary: %{origin_nice} Headless Runtime Environment %{majorver}
1472 Group: Development/Java
1473
1474 %{java_headless_rpo %{nil}}
1475
1476 %description headless
1477 The %{origin_nice} runtime environment %{majorver} without audio and video support.
1478 %endif
1479
1480 %if %{include_debug_build}
1481 %package headless-slowdebug
1482 Summary: %{origin_nice} Runtime Environment %{majorver} %{debug_on}
1483
1484 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1485
1486 %description headless-slowdebug
1487 The %{origin_nice} runtime environment %{majorver} without audio and video support.
1488 %{debug_warning}
1489 %endif
1490
1491 %if %{include_fastdebug_build}
1492 %package headless-fastdebug
1493 Summary: %{origin_nice} Runtime Environment %{for_fastdebug}
1494 Group: Development/Java
1495
1496 %{java_headless_rpo -- %{fastdebug_suffix_unquoted}}
1497
1498 %description headless-fastdebug
1499 The %{origin_nice} runtime environment %{majorver} without audio and video support.
1500 %{fastdebug_warning}
1501 %endif
1502
1503 %if %{include_normal_build}
1504 %package devel
1505 Summary: %{origin_nice} Development Environment %{majorver}
1506 Group: Development/Java
1507
1508 %{java_devel_rpo %{nil}}
1509
1510 %description devel
1511 The %{origin_nice} development tools %{majorver}.
1512 %endif
1513
1514 %if %{include_debug_build}
1515 %package devel-slowdebug
1516 Summary: %{origin_nice} Development Environment %{majorver} %{debug_on}
1517 Group: Development/Java
1518
1519 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1520
1521 %description devel-slowdebug
1522 The %{origin_nice} development tools %{majorver}.
1523 %{debug_warning}
1524 %endif
1525
1526 %if %{include_fastdebug_build}
1527 %package devel-fastdebug
1528 Summary: %{origin_nice} Development Environment %{majorver} %{for_fastdebug}
1529 Group: Development/Tools
1530
1531 %{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
1532
1533 %description devel-fastdebug
1534 The %{origin_nice} development tools %{majorver}.
1535 %{fastdebug_warning}
1536 %endif
1537
1538 %if %{include_normal_build}
1539 %package demo
1540 Summary: %{origin_nice} Demos %{majorver}
1541 Group: Development/Java
1542
1543 %{java_demo_rpo %{nil}}
1544
1545 %description demo
1546 The %{origin_nice} demos %{majorver}.
1547 %endif
1548
1549 %if %{include_debug_build}
1550 %package demo-slowdebug
1551 Summary: %{origin_nice} Demos %{majorver} %{debug_on}
1552 Group: Development/Java
1553
1554 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1555
1556 %description demo-slowdebug
1557 The %{origin_nice} demos %{majorver}.
1558 %{debug_warning}
1559 %endif
1560
1561 %if %{include_fastdebug_build}
1562 %package demo-fastdebug
1563 Summary: %{origin_nice} Demos %{majorver} %{for_fastdebug}
1564 Group: Development/Java
1565
1566 %{java_demo_rpo -- %{fastdebug_suffix_unquoted}}
1567
1568 %description demo-fastdebug
1569 The %{origin_nice} demos %{majorver}.
1570 %{fastdebug_warning}
1571 %endif
1572
1573 %if %{include_normal_build}
1574 %package src
1575 Summary: %{origin_nice} Source Bundle %{majorver}
1576 Group: Development/Java
1577
1578 %{java_src_rpo %{nil}}
1579
1580 %description src
1581 The java-%{origin}-src sub-package contains the complete %{origin_nice} %{majorver}
1582 class library source code for use by IDE indexers and debuggers.
1583 %endif
1584
1585 %if %{include_debug_build}
1586 %package src-slowdebug
1587 Summary: %{origin_nice} Source Bundle %{majorver} %{for_debug}
1588 Group: Development/Java
1589
1590 %{java_src_rpo -- %{debug_suffix_unquoted}}
1591
1592 %description src-slowdebug
1593 The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice} %{majorver}
1594 class library source code for use by IDE indexers and debuggers. Debugging %{for_debug}.
1595 %endif
1596
1597 %if %{include_fastdebug_build}
1598 %package src-fastdebug
1599 Summary: %{origin_nice} Source Bundle %{majorver} %{for_fastdebug}
1600 Group: Development/Java
1601
1602 %{java_src_rpo -- %{fastdebug_suffix_unquoted}}
1603
1604 %description src-fastdebug
1605 The java-%{origin}-src-fastdebug sub-package contains the complete %{origin_nice} %{majorver}
1606 class library source code for use by IDE indexers and debuggers. Debugging %{for_fastdebug}.
1607 %endif
1608
1609
1610 %if %{include_normal_build}
1611 %package javadoc
1612 Summary: %{origin_nice} %{majorver} API documentation
1613 Group: Development/Java
1614 Requires: javapackages-filesystem
1615 Obsoletes: javadoc-slowdebug < 1:1.8.0.222.b10-1
1616 BuildArch: noarch
1617
1618 %{java_javadoc_rpo %{nil}}
1619
1620 %description javadoc
1621 The %{origin_nice} %{majorver} API documentation.
1622 %endif
1623
1624 %if %{include_normal_build}
1625 %package javadoc-zip
1626 Summary: %{origin_nice} %{majorver} API documentation compressed in a single archive
1627 Group: Development/Java
1628 Requires: javapackages-filesystem
1629 Obsoletes: javadoc-zip-slowdebug < 1:1.8.0.222.b10-1
1630 BuildArch: noarch
1631
1632 %{java_javadoc_rpo %{nil}}
1633
1634 %description javadoc-zip
1635 The %{origin_nice} %{majorver} API documentation compressed in a single archive.
1636 %endif
1637
1638 %if %{include_normal_build}
1639 %package accessibility
1640 Summary: %{origin_nice} %{majorver} accessibility connector
1641 Group: Development/Java
1642
1643 %{java_accessibility_rpo %{nil}}
1644
1645 %description accessibility
1646 Enables accessibility support in %{origin_nice} %{majorver} by using java-atk-wrapper. This allows
1647 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1648 programs.
1649
1650 Please note, the java-atk-wrapper is still in beta, and %{origin_nice} %{majorver} itself is still
1651 being tuned to be working with accessibility features. There are known issues
1652 with accessibility on, so please do not install this package unless you really
1653 need to.
1654 %endif
1655
1656 %if %{include_debug_build}
1657 %package accessibility-slowdebug
1658 Summary: %{origin_nice} %{majorver} accessibility connector %{for_debug}
1659 Group: Development/Java
1660
1661 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1662
1663 %description accessibility-slowdebug
1664 See normal java-%{version}-openjdk-accessibility description.
1665 %endif
1666
1667 %if %{include_fastdebug_build}
1668 %package accessibility-fastdebug
1669 Summary: %{origin_nice} %{majorver} accessibility connector %{for_fastdebug}
1670 Group: Development/Java
1671
1672 %{java_accessibility_rpo -- %{fastdebug_suffix_unquoted}}
1673
1674 %description accessibility-fastdebug
1675 See normal java-%{version}-openjdk-accessibility description.
1676 %endif
1677
1678
1679 %if %{with_openjfx_binding}
1680 %package openjfx
1681 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1682 Group: Development/Java
1683 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1684 Requires: openjfx8%{?_isa}
1685 Provides: javafx = %{epoch}:%{version}-%{release}
1686 %description openjfx
1687 Set of links from OpenJDK (jre) to OpenJFX
1688
1689 %package openjfx-devel
1690 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1691 Group: Development/Java
1692 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1693 Requires: openjfx8-devel%{?_isa}
1694 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1695 %description openjfx-devel
1696 Set of links from OpenJDK (sdk) to OpenJFX
1697
1698 %if %{include_debug_build}
1699 %package openjfx-slowdebug
1700 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-slowdebug
1701 Group: Development/Java
1702 Requires: %{name}-slowdebug%{?_isa} = %{epoch}:%{version}-%{release}
1703 Requires: openjfx8%{?_isa}
1704 Provides: javafx-slowdebug = %{epoch}:%{version}-%{release}
1705 %description openjfx-slowdebug
1706 Set of links from OpenJDK-slowdebug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1707
1708 %package openjfx-devel-slowdebug
1709 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-slowdebug
1710 Group: Development/Java
1711 Requires: %{name}-devel-slowdebug%{?_isa} = %{epoch}:%{version}-%{release}
1712 Requires: openjfx8-devel%{?_isa}
1713 Provides: javafx-devel-slowdebug = %{epoch}:%{version}-%{release}
1714 %description openjfx-devel-slowdebug
1715 Set of links from OpenJDK-slowdebug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1716 %endif
1717
1718 %if %{include_fastdebug_build}
1719 %package openjfx-fastdebug
1720 Summary: OpenJDK x OpenJFX connector %{for_fastdebug}. his package adds symliks finishing Java FX integration to %{name}-fastdebug
1721 Group: Development/Java
1722 Requires: %{name}-fastdebug%{?_isa} = %{epoch}:%{version}-%{release}
1723 Requires: openjfx8%{?_isa}
1724 Provides: javafx-fastdebug = %{epoch}:%{version}-%{release}
1725 %description openjfx-fastdebug
1726 Set of links from OpenJDK-fastdebug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1727
1728 %package openjfx-devel-fastdebug
1729 Summary: OpenJDK x OpenJFX connector for FX developers %{for_fastdebug}. This package adds symliks finishing Java FX integration to %{name}-devel-slowdebug
1730 Group: Development/Java
1731 Requires: %{name}-devel-fastdebug%{?_isa} = %{epoch}:%{version}-%{release}
1732 Requires: openjfx8-devel%{?_isa}
1733 Provides: javafx-devel-fastdebug = %{epoch}:%{version}-%{release}
1734 %description openjfx-devel-fastdebug
1735 Set of links from OpenJDK-fastdebug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1736 %endif
1737 %endif
1738
1739 %prep
1740
1741 # Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
1742 %if 0%{?stapinstall:1}
1743 echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
1744 %else
1745 %{error:Unrecognised architecture %{_target_cpu}}
1746 %endif
1747
1748 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1749 echo "include_normal_build is %{include_normal_build}"
1750 else
1751 echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for yes or 0 for no"
1752 exit 11
1753 fi
1754 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1755 echo "include_debug_build is %{include_debug_build}"
1756 else
1757 echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for yes or 0 for no"
1758 exit 12
1759 fi
1760 if [ %{include_fastdebug_build} -eq 0 -o %{include_fastdebug_build} -eq 1 ] ; then
1761 echo "include_fastdebug_build is %{include_fastdebug_build}"
1762 else
1763 echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no"
1764 exit 13
1765 fi
1766 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{include_fastdebug_build} -eq 0 ] ; then
1767 echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
1768 exit 14
1769 fi
1770
1771 echo "Update version: %{updatever}"
1772 echo "Build number: %{buildver}"
1773 echo "Milestone: %{milestone}"
1774 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1775 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1776 prioritylength=`expr length %{priority}`
1777 if [ $prioritylength -ne 7 ] ; then
1778 echo "priority must be 7 digits in total, violated"
1779 exit 14
1780 fi
1781 # For old patches
1782 ln -s %{top_level_dir_name} jdk8
1783
1784 cp %{SOURCE2} .
1785
1786 # replace outdated configure guess script
1787 #
1788 # the configure macro will do this too, but it also passes a few flags not
1789 # supported by openjdk configure script
1790 cp %{SOURCE100} %{top_level_dir_name}/common/autoconf/build-aux/
1791 cp %{SOURCE101} %{top_level_dir_name}/common/autoconf/build-aux/
1792
1793 # OpenJDK patches
1794
1795 # Remove libraries that are linked
1796 sh %{SOURCE12}
1797
1798 # System library fixes
1799 %patch201
1800 %patch202
1801 %patch203
1802 %patch204
1803
1804 # System security policy fixes
1805 %patch400
1806 %patch401
1807
1808 %patch1
1809 %patch3
1810 %patch5
1811
1812 # s390 build fixes
1813 %patch102
1814 %patch103
1815 %patch107
1816
1817 # AArch64 fixes
1818 %patch106
1819
1820 # x86 fixes
1821 %patch105
1822
1823 # Upstreamable fixes
1824 %patch502
1825 %patch504
1826 %patch512
1827 %patch523
1828 %patch528
1829 %patch571
1830 %patch574
1831 %patch111
1832 %patch112
1833
1834 # RPM-only fixes
1835 %patch539
1836 %patch600
1837 %patch1000
1838
1839 # RHEL-only patches
1840 %if ! 0%{?fedora} && 0%{?rhel} <= 7
1841 %patch534
1842 %endif
1843
1844 # Shenandoah patches
1845
1846 # Extract systemtap tapsets
1847 %if %{with_systemtap}
1848 tar --strip-components=1 -x -I xz -f %{SOURCE8}
1849 %if %{include_debug_build}
1850 cp -r tapset tapset%{debug_suffix}
1851 %endif
1852 %if %{include_fastdebug_build}
1853 cp -r tapset tapset%{fastdebug_suffix}
1854 %endif
1855
1856
1857 for suffix in %{build_loop} ; do
1858 for file in "tapset"$suffix/*.in; do
1859 OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
1860 sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g" $file > $file.1
1861 # TODO find out which architectures other than i686 have a client vm
1862 %ifarch %{ix86}
1863 sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g" $file.1 > $OUTPUT_FILE
1864 %else
1865 sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.1 > $OUTPUT_FILE
1866 %endif
1867 sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
1868 sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
1869 sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
1870 done
1871 done
1872 # systemtap tapsets ends
1873 %endif
1874
1875 # Prepare desktop files
1876 # The _X_ syntax indicates variables that are replaced by make upstream
1877 # The @X@ syntax indicates variables that are replaced by configure upstream
1878 for suffix in %{build_loop} ; do
1879 for file in %{SOURCE9} %{SOURCE10} ; do
1880 FILE=`basename $file | sed -e s:\.in$::g`
1881 EXT="${FILE##*.}"
1882 NAME="${FILE%.*}"
1883 OUTPUT_FILE=$NAME$suffix.$EXT
1884 sed -e "s:_SDKBINDIR_:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE
1885 sed -i -e "s:_JREBINDIR_:%{jrebindir -- $suffix}:g" $OUTPUT_FILE
1886 sed -i -e "s:@target_cpu@:%{_arch}:g" $OUTPUT_FILE
1887 sed -i -e "s:@OPENJDK_VER@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE
1888 sed -i -e "s:@JAVA_VER@:%{javaver}:g" $OUTPUT_FILE
1889 sed -i -e "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE
1890 done
1891 done
1892
1893 # Setup nss.cfg
1894 sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
1895
1896
1897 %build
1898 # How many CPU's do we have?
1899 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1900 export NUM_PROC=${NUM_PROC:-1}
1901 %if 0%{?_smp_ncpus_max}
1902 # Honor %%_smp_ncpus_max
1903 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1904 %endif
1905
1906 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1907 export ARCH_DATA_MODEL=64
1908 %endif
1909 %ifarch alpha
1910 export CFLAGS="$CFLAGS -mieee"
1911 %endif
1912
1913 # We use ourcppflags because the OpenJDK build seems to
1914 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1915 EXTRA_CFLAGS="%ourcppflags -Wno-error -fcommon"
1916 EXTRA_CPP_FLAGS="%ourcppflags"
1917
1918 %ifarch %{power64} ppc
1919 # fix rpmlint warnings
1920 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1921 %endif
1922
1923 EXTRA_ASFLAGS="${EXTRA_CFLAGS} -Wa,--generate-missing-build-notes=yes"
1924 export EXTRA_CFLAGS EXTRA_ASFLAGS
1925
1926 (cd %{top_level_dir_name}/common/autoconf
1927 bash ./autogen.sh
1928 )
1929
1930 function buildjdk() {
1931 local outputdir=${1}
1932 local buildjdk=${2}
1933 local maketargets=${3}
1934 local debuglevel=${4}
1935
1936 local top_srcdir_abs_path=$(pwd)/%{top_level_dir_name}
1937 # Variable used in hs_err hook on build failures
1938 local top_builddir_abs_path=$(pwd)/${outputdir}
1939
1940 export CC=%__cc
1941 echo "Checking build JDK ${buildjdk} is operational..."
1942 ${buildjdk}/bin/java -version
1943 echo "Building 8u%{updatever}-%{buildver}, milestone %{milestone}"
1944
1945 mkdir -p ${outputdir}
1946 pushd ${outputdir}
1947
1948 bash ${top_srcdir_abs_path}/configure \
1949 %ifarch %{jfr_arches}
1950 --enable-jfr \
1951 %else
1952 --disable-jfr \
1953 %endif
1954 %ifnarch %{jit_arches}
1955 --with-jvm-variants=zero \
1956 %endif
1957 --with-native-debug-symbols=internal \
1958 --with-milestone=%{milestone} \
1959 --with-update-version=%{updatever} \
1960 --with-build-number=%{buildver} \
1961 --with-vendor-name="Mageia" \
1962 --with-vendor-url="https://www.mageia.org/" \
1963 --with-vendor-bug-url="%{bugs}" \
1964 --with-vendor-vm-bug-url="%{bugs}" \
1965 --with-boot-jdk=${buildjdk} \
1966 --with-debug-level=${debuglevel} \
1967 --enable-unlimited-crypto \
1968 --with-zlib=system \
1969 --with-libjpeg=system \
1970 --with-giflib=system \
1971 --with-libpng=system \
1972 --with-lcms=system \
1973 --with-stdc++lib=dynamic \
1974 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1975 --with-extra-cflags="$EXTRA_CFLAGS" \
1976 --with-extra-asflags="$EXTRA_ASFLAGS" \
1977 --with-extra-ldflags="%{ourldflags}" \
1978 --with-num-cores="$NUM_PROC"
1979
1980 cat spec.gmk
1981 cat hotspot-spec.gmk
1982
1983 make \
1984 JAVAC_FLAGS=-g \
1985 LOG=trace \
1986 SCTP_WERROR= \
1987 ${maketargets} || ( pwd; find ${top_srcdir_abs_path} ${top_builddir_abs_path} -name "hs_err_pid*.log" | xargs cat && false )
1988
1989 # the build (erroneously) removes read permissions from some jars
1990 # this is a regression in OpenJDK 7 (our compiler):
1991 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1992 find images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1993 chmod ugo+r images/%{jdkimage}/lib/ct.sym
1994
1995 # remove redundant *diz and *debuginfo files
1996 find images/%{jdkimage} -iname '*.diz' -exec rm -v {} \;
1997 find images/%{jdkimage} -iname '*.debuginfo' -exec rm -v {} \;
1998
1999 # Build screws up permissions on binaries
2000 # https://bugs.openjdk.java.net/browse/JDK-8173610
2001 find images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
2002 find images/%{jdkimage}/bin/ -exec chmod +x {} \;
2003
2004 popd >& /dev/null
2005 }
2006
2007 for suffix in %{build_loop} ; do
2008 if [ "x$suffix" = "x" ] ; then
2009 debugbuild=release
2010 else
2011 # change --something to something
2012 debugbuild=`echo $suffix | sed "s/-//g"`
2013 fi
2014
2015 systemjdk=/usr/lib/jvm/java-openjdk
2016 builddir=%{buildoutputdir -- $suffix}
2017 bootbuilddir=boot${builddir}
2018
2019 # Debug builds don't need same targets as release for
2020 # build speed-up
2021 maketargets="%{release_targets}"
2022 if echo $debugbuild | grep -q "debug" ; then
2023 maketargets="%{debug_targets}"
2024 fi
2025
2026 %if %{bootstrap_build}
2027 buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild}
2028 buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild}
2029 rm -rf ${bootbuilddir}
2030 %else
2031 buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild}
2032 %endif
2033
2034 # Install nss.cfg right away as we will be using the JRE above
2035 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
2036
2037 # Install nss.cfg right away as we will be using the JRE above
2038 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
2039
2040 # Use system-wide tzdata
2041 rm $JAVA_HOME/jre/lib/tzdb.dat
2042 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
2043
2044 # add alt-java man page
2045 pushd ${JAVA_HOME}
2046 echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
2047 cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
2048 popd
2049
2050 # build cycles
2051 done
2052
2053 %check
2054
2055 # We test debug first as it will give better diagnostics on a crash
2056 for suffix in %{rev_build_loop} ; do
2057
2058 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
2059
2060 # Check unlimited policy has been used
2061 $JAVA_HOME/bin/javac -d . %{SOURCE13}
2062 $JAVA_HOME/bin/java TestCryptoLevel
2063
2064 # Check ECC is working
2065 $JAVA_HOME/bin/javac -d . %{SOURCE14}
2066 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
2067
2068 # Check system crypto (policy) can be disabled
2069 $JAVA_HOME/bin/javac -d . %{SOURCE15}
2070 $JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
2071
2072 # Check java launcher has no SSB mitigation
2073 if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
2074
2075 # Check alt-java launcher has SSB mitigation on supported architectures
2076 %ifarch %{ssbd_arches}
2077 nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
2078 %else
2079 if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi
2080 %endif
2081
2082
2083 # Check debug symbols are present and can identify code
2084 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
2085 do
2086 if [ -f "$lib" ] ; then
2087 echo "Testing $lib for debug symbols"
2088 # All these tests rely on RPM failing the build if the exit code of any set
2089 # of piped commands is non-zero.
2090
2091 # Test for .debug_* sections in the shared object. This is the main test
2092 # Stripped objects will not contain these
2093 eu-readelf -S "$lib" | grep "] .debug_"
2094 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
2095
2096 # Test FILE symbols. These will most likely be removed by anything that
2097 # manipulates symbol tables because it's generally useless. So a nice test
2098 # that nothing has messed with symbols
2099 old_IFS="$IFS"
2100 IFS=$'\n'
2101 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
2102 do
2103 # We expect to see .cpp files, except for architectures like aarch64 and
2104 # s390 where we expect .o and .oS files
2105 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
2106 done
2107 IFS="$old_IFS"
2108
2109 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
2110 if [ "`basename $lib`" = "libjvm.so" ]; then
2111 eu-readelf -s "$lib" | \
2112 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
2113 fi
2114
2115 # Test that there are no .gnu_debuglink sections pointing to another
2116 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
2117 # no sense either
2118 eu-readelf -S "$lib" | grep 'gnu'
2119 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
2120 echo "bad .gnu_debuglink section."
2121 eu-readelf -x .gnu_debuglink "$lib"
2122 false
2123 fi
2124 fi
2125 done
2126
2127 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
2128 # javaCalls.cpp:58 should map to:
2129 # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
2130 # Using line number 1 might cause build problems. See:
2131 # https://bugzilla.redhat.com/show_bug.cgi?id=1539664
2132 # https://bugzilla.redhat.com/show_bug.cgi?id=1538767
2133 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
2134 handle SIGSEGV pass nostop noprint
2135 handle SIGILL pass nostop noprint
2136 set breakpoint pending on
2137 break javaCalls.cpp:58
2138 commands 1
2139 backtrace
2140 quit
2141 end
2142 run -version
2143 EOF
2144
2145 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
2146
2147 # Check src.zip has all sources. See RHBZ#1130490
2148 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
2149
2150 # Check class files include useful debugging information
2151 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
2152 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
2153 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
2154
2155 # Check generated class files include useful debugging information
2156 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
2157 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
2158 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
2159
2160 # build cycles check
2161 done
2162
2163 %install
2164 STRIP_KEEP_SYMTAB=libjvm*
2165
2166 for suffix in %{build_loop} ; do
2167
2168 # Install the jdk
2169 pushd %{buildoutputdir -- $suffix}/images/%{jdkimage}
2170
2171 # Install jsa directories so we can owe them
2172 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
2173 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
2174
2175 # Install main files.
2176 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
2177 cp -a bin include lib src.zip {ASSEMBLY_EXCEPTION,LICENSE,THIRD_PARTY_README} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
2178 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
2179 cp -a jre/bin jre/lib jre/{ASSEMBLY_EXCEPTION,LICENSE,THIRD_PARTY_README} $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
2180
2181 %if %{with_systemtap}
2182 # Install systemtap support files
2183 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
2184 # note, that uniquesuffix is in BUILD dir in this case
2185 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
2186 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
2187 tapsetFiles=`ls *.stp`
2188 popd
2189 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
2190 for name in $tapsetFiles ; do
2191 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
2192 ln -sf %{_jvmdir}/%{sdkdir -- $suffix}/tapset/$name $RPM_BUILD_ROOT%{tapsetdir}/$targetName
2193 done
2194 %endif
2195
2196 # Remove empty cacerts database
2197 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
2198 # Install cacerts symlink needed by some apps which hardcode the path
2199 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
2200 ln -sf /etc/pki/java/cacerts .
2201 popd
2202
2203 # Install versioned symlinks
2204 pushd $RPM_BUILD_ROOT%{_jvmdir}
2205 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
2206 popd
2207
2208 # Remove javaws man page
2209 rm -f man/man1/javaws*
2210
2211 # Install man pages
2212 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
2213 for manpage in man/man1/*
2214 do
2215 # Convert man pages to UTF8 encoding
2216 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
2217 mv -f $manpage.tmp $manpage
2218 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
2219 $manpage .1)-%{uniquesuffix -- $suffix}.1
2220 done
2221
2222 # Install demos and samples.
2223 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
2224 mkdir -p sample/rmi
2225 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
2226 # hack to allow --short-circuit on install
2227 mv bin/java-rmi.cgi sample/rmi
2228 fi
2229 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
2230
2231 popd
2232
2233 if ! echo $suffix | grep -q "debug" ; then
2234 # Install Javadoc documentation
2235 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
2236 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
2237 built_doc_archive=`echo "jdk-%{javaver}_%{updatever}%{milestone_version}$suffix-%{buildver}-docs.zip" | sed s/slowdebug/debug/`
2238 cp -a %{buildoutputdir -- $suffix}/bundles/$built_doc_archive $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
2239 fi
2240
2241 # Install release notes
2242 commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
2243 install -d -m 755 ${commondocdir}
2244 cp -a %{SOURCE7} ${commondocdir}
2245
2246 # Install icons and menu entries
2247 for s in 16 24 32 48 ; do
2248 install -D -p -m 644 \
2249 %{top_level_dir_name}/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
2250 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
2251 done
2252
2253 # Install desktop files
2254 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
2255 for e in jconsole$suffix policytool$suffix ; do
2256 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
2257 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
2258 done
2259
2260 # Install /etc/.java/.systemPrefs/ directory
2261 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
2262 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
2263
2264 # FIXME: remove SONAME entries from demo DSOs. See
2265 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
2266
2267 # Find non-documentation demo files.
2268 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
2269 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
2270 -type f -o -type l | sort \
2271 | grep -v README \
2272 | sed 's|'$RPM_BUILD_ROOT'||' \
2273 >> %{name}-demo.files"$suffix"
2274 # Find documentation demo files.
2275 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
2276 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
2277 -type f -o -type l | sort \
2278 | grep README \
2279 | sed 's|'$RPM_BUILD_ROOT'||' \
2280 | sed 's|^|%doc |' \
2281 >> %{name}-demo.files"$suffix"
2282
2283 # Create links which leads to separately installed java-atk-bridge and allow configuration
2284 # links points to java-atk-wrapper - an dependence
2285 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
2286 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
2287 popd
2288 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
2289 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
2290 popd
2291 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
2292 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
2293 echo "" >> accessibility.properties
2294 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
2295 echo "" >> accessibility.properties
2296 popd
2297
2298 # intentionally after all else, fx links with redirections on its own
2299 %if %{with_openjfx_binding}
2300 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
2301 FXJRE_FILES=%{name}-openjfx.files"$suffix"
2302 echo -n "" > $FXJRE_FILES
2303 echo -n "" > $FXSDK_FILES
2304 for file in %{jfx_jre_libs} ; do
2305 srcfile=%{jfx_jre_libs_dir}/$file
2306 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
2307 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2308 echo $targetfile >> $FXJRE_FILES
2309 done
2310 for file in %{jfx_jre_native} ; do
2311 srcfile=%{jfx_jre_native_dir}/$file
2312 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
2313 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2314 echo $targetfile >> $FXJRE_FILES
2315 done
2316 for file in %{jfx_jre_exts} ; do
2317 srcfile=%{jfx_jre_exts_dir}/$file
2318 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
2319 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2320 echo $targetfile >> $FXJRE_FILES
2321 done
2322 for file in %{jfx_sdk_libs} ; do
2323 srcfile=%{jfx_sdk_libs_dir}/$file
2324 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
2325 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2326 echo $targetfile >> $FXSDK_FILES
2327 done
2328 for file in %{jfx_sdk_bins} ; do
2329 srcfile=%{jfx_sdk_bins_dir}/$file
2330 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
2331 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
2332 echo $targetfile >> $FXSDK_FILES
2333 done
2334 %endif
2335
2336 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
2337 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
2338 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
2339
2340 # moving config files to /etc
2341 mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/unlimited/
2342 mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/limited/
2343 for file in lib/security/cacerts lib/security/policy/unlimited/US_export_policy.jar lib/security/policy/unlimited/local_policy.jar lib/security/policy/limited/US_export_policy.jar lib/security/policy/limited/local_policy.jar lib/security/java.policy lib/security/java.security lib/security/blacklisted.certs lib/logging.properties lib/calendars.properties lib/security/nss.cfg lib/net.properties ; do
2344 mv $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/$file
2345 ln -sf %{etcjavadir -- $suffix}/$file $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file
2346 done
2347
2348 # stabilize permissions
2349 find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "*.so" -exec chmod 755 {} \; ;
2350 find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -type d -exec chmod 755 {} \; ;
2351 find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "ASSEMBLY_EXCEPTION" -exec chmod 644 {} \; ;
2352 find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "LICENSE" -exec chmod 644 {} \; ;
2353 find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "THIRD_PARTY_README" -exec chmod 644 {} \; ;
2354
2355 # end, dual install
2356 done
2357
2358 %if %{include_normal_build}
2359 # intentionally only for non-debug
2360 %pretrans headless -p <lua>
2361 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2362 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
2363 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
2364 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction and so is
2365 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
2366 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
2367 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
2368 local posix = require "posix"
2369 local debug = false
2370
2371 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2372 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2373
2374 local stat1 = posix.stat(SOURCE1, "type");
2375 local stat2 = posix.stat(SOURCE2, "type");
2376
2377 if (stat1 ~= nil) then
2378 if (debug) then
2379 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2380 end;
2381 package.path = package.path .. ";" .. SOURCE1
2382 else
2383 if (stat2 ~= nil) then
2384 if (debug) then
2385 print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.")
2386 end;
2387 package.path = package.path .. ";" .. SOURCE2
2388 else
2389 if (debug) then
2390 print(SOURCE1 .." does NOT exists")
2391 print(SOURCE2 .." does NOT exists")
2392 print("No config files will be copied")
2393 end
2394 return
2395 end
2396 end
2397 -- run content of included file with fake args
2398 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2399 require "copy_jdk_configs.lua"
2400
2401 %post
2402 %{post_script %{nil}}
2403
2404 %post headless
2405 %{post_headless %{nil}}
2406
2407 %postun
2408 %{postun_script %{nil}}
2409
2410 %postun headless
2411 %{postun_headless %{nil}}
2412
2413 %posttrans
2414 %{posttrans_script %{nil}}
2415
2416 %post devel
2417 %{post_devel %{nil}}
2418
2419 %postun devel
2420 %{postun_devel %{nil}}
2421
2422 %posttrans devel
2423 %{posttrans_devel %{nil}}
2424
2425 %post javadoc
2426 %{post_javadoc %{nil}}
2427
2428 %postun javadoc
2429 %{postun_javadoc %{nil}}
2430
2431 %post javadoc-zip
2432 %{post_javadoc_zip %{nil}}
2433
2434 %postun javadoc-zip
2435 %{postun_javadoc_zip %{nil}}
2436 %endif
2437
2438 %if %{include_debug_build}
2439 %post slowdebug
2440 %{post_script -- %{debug_suffix_unquoted}}
2441
2442 %post headless-slowdebug
2443 %{post_headless -- %{debug_suffix_unquoted}}
2444
2445 %postun slowdebug
2446 %{postun_script -- %{debug_suffix_unquoted}}
2447
2448 %postun headless-slowdebug
2449 %{postun_headless -- %{debug_suffix_unquoted}}
2450
2451 %posttrans slowdebug
2452 %{posttrans_script -- %{debug_suffix_unquoted}}
2453
2454 %post devel-slowdebug
2455 %{post_devel -- %{debug_suffix_unquoted}}
2456
2457 %postun devel-slowdebug
2458 %{postun_devel -- %{debug_suffix_unquoted}}
2459
2460 %posttrans devel-slowdebug
2461 %{posttrans_devel -- %{debug_suffix_unquoted}}
2462 %endif
2463
2464 %if %{include_fastdebug_build}
2465 %post fastdebug
2466 %{post_script -- %{fastdebug_suffix_unquoted}}
2467
2468 %post headless-fastdebug
2469 %{post_headless -- %{fastdebug_suffix_unquoted}}
2470
2471 %postun fastdebug
2472 %{postun_script -- %{fastdebug_suffix_unquoted}}
2473
2474 %postun headless-fastdebug
2475 %{postun_headless -- %{fastdebug_suffix_unquoted}}
2476
2477 %posttrans fastdebug
2478 %{posttrans_script -- %{fastdebug_suffix_unquoted}}
2479
2480 %post devel-fastdebug
2481 %{post_devel -- %{fastdebug_suffix_unquoted}}
2482
2483 %postun devel-fastdebug
2484 %{postun_devel -- %{fastdebug_suffix_unquoted}}
2485
2486 %posttrans devel-fastdebug
2487 %{posttrans_devel -- %{fastdebug_suffix_unquoted}}
2488
2489 %endif
2490
2491 %if %{include_normal_build}
2492 %files
2493 # main package builds always
2494 %{files_jre %{nil}}
2495 %else
2496 %files
2497 # placeholder
2498 %endif
2499
2500
2501 %if %{include_normal_build}
2502 %files headless
2503 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2504 # all config/noreplace files (and more) have to be declared in pretrans. See pretrans
2505 %{files_jre_headless %{nil}}
2506
2507 %files devel
2508 %{files_devel %{nil}}
2509
2510 %files demo -f %{name}-demo.files
2511 %{files_demo %{nil}}
2512
2513 %files src
2514 %{files_src %{nil}}
2515
2516 %files javadoc
2517 %{files_javadoc %{nil}}
2518
2519 # This puts a huge documentation file in /usr/share
2520 # same for debug variant
2521 %files javadoc-zip
2522 %{files_javadoc_zip %{nil}}
2523
2524 %files accessibility
2525 %{files_accessibility %{nil}}
2526
2527 %if %{with_openjfx_binding}
2528 %files openjfx -f %{name}-openjfx.files
2529
2530 %files openjfx-devel -f %{name}-openjfx-devel.files
2531 %endif
2532 %endif
2533
2534 %if %{include_debug_build}
2535 %files slowdebug
2536 %{files_jre -- %{debug_suffix_unquoted}}
2537
2538 %files headless-slowdebug
2539 %{files_jre_headless -- %{debug_suffix_unquoted}}
2540
2541 %files devel-slowdebug
2542 %{files_devel -- %{debug_suffix_unquoted}}
2543
2544 %files demo-slowdebug -f %{name}-demo.files-slowdebug
2545 %{files_demo -- %{debug_suffix_unquoted}}
2546
2547 %files src-slowdebug
2548 %{files_src -- %{debug_suffix_unquoted}}
2549
2550 %files accessibility-slowdebug
2551 %{files_accessibility -- %{debug_suffix_unquoted}}
2552
2553 %if %{with_openjfx_binding}
2554 %files openjfx-slowdebug -f %{name}-openjfx.files-slowdebug
2555
2556 %files openjfx-devel-slowdebug -f %{name}-openjfx-devel.files-slowdebug
2557 %endif
2558 %endif
2559
2560 %if %{include_fastdebug_build}
2561 %files fastdebug
2562 %{files_jre -- %{fastdebug_suffix_unquoted}}
2563
2564 %files headless-fastdebug
2565 %{files_jre_headless -- %{fastdebug_suffix_unquoted}}
2566
2567 %files devel-fastdebug
2568 %{files_devel -- %{fastdebug_suffix_unquoted}}
2569
2570
2571 %files demo-fastdebug -f %{name}-demo.files-fastdebug
2572 %{files_demo -- %{fastdebug_suffix_unquoted}}
2573
2574 %files src-fastdebug
2575 %{files_src -- %{fastdebug_suffix_unquoted}}
2576
2577 %files accessibility-fastdebug
2578 %{files_accessibility -- %{fastdebug_suffix_unquoted}}
2579
2580 %if %{with_openjfx_binding}
2581 %files openjfx-fastdebug -f %{name}-openjfx.files-fastdebug
2582
2583 %files openjfx-devel-fastdebug -f %{name}-openjfx-devel.files-fastdebug
2584 %endif
2585 %endif
2586

  ViewVC Help
Powered by ViewVC 1.1.30