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