/[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 1655124 - (show annotations) (download)
Thu Dec 10 10:56:59 2020 UTC (3 years, 4 months ago) by neoclust
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 90987 byte(s)
- added patch600, rh1750419-redhat_alt_java.patch 
- Replaced alt-java palceholder by real pathced alt-java
- remove patch529 rh1566890-CVE_2018_3639-speculative_store_bypass.patch
- remove patch531 rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
- both suprassed by new patch
- Created copy of java as alt-java and adapted alternatives and man pages
- Update to aarch64-shenandoah-jdk8u275-b01 (GA)
- Update release notes for 8u275.
- Avoid "register" for C++17


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

  ViewVC Help
Powered by ViewVC 1.1.30