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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1669574 - (show annotations) (download)
Thu Jan 7 16:47:14 2021 UTC (3 years, 2 months ago) by neoclust
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 96652 byte(s)
 - Update to aarch64-shenandoah-jdk8u282-b04 (EA)
- Update release notes for 8u282-b04.
- Remove upstreamed patch PR3519 

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

  ViewVC Help
Powered by ViewVC 1.1.30