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

Contents of /cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2047701 - (show annotations) (download)
Tue Mar 5 14:56:30 2024 UTC (7 weeks ago) by ns80
File size: 101503 byte(s)
- Update to shenandoah-jdk8u402-b06 (GA)
- Update release notes for 8u402-b06.

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

  ViewVC Help
Powered by ViewVC 1.1.30