1 |
# synced up to 2891e38fa239f7fe4404264ae0a58670db64f7bb |
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-latest-openjdk.spec |
12 |
# |
13 |
# Produce only release builds (no debug builds) on x86_64: |
14 |
# $ rpmbuild -ba java-latest-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 |
# Enable static library builds by default. |
29 |
%bcond_without staticlibs |
30 |
|
31 |
# Workaround for stripping of debug symbols from static libraries |
32 |
%if %{with staticlibs} |
33 |
%define __brp_strip_static_archive %{nil} |
34 |
%global include_staticlibs 1 |
35 |
%else |
36 |
%global include_staticlibs 0 |
37 |
%endif |
38 |
|
39 |
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs. |
40 |
# This fixes detailed NMT and other tools which need minimal debug info. |
41 |
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879 |
42 |
%global _find_debuginfo_opts -g |
43 |
|
44 |
# With LTO flags enabled, debuginfo checks fail for some reason. Disable |
45 |
# LTO for a passing build. This really needs to be looked at. |
46 |
%define _lto_cflags %{nil} |
47 |
|
48 |
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros |
49 |
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch |
50 |
# see the difference between global and define: |
51 |
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at "pmatilai commented on Aug 18, 2017" |
52 |
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192) |
53 |
%global debug_suffix_unquoted -slowdebug |
54 |
%global fastdebug_suffix_unquoted -fastdebug |
55 |
%global main_suffix_unquoted -main |
56 |
%global staticlibs_suffix_unquoted -staticlibs |
57 |
# quoted one for shell operations |
58 |
%global debug_suffix "%{debug_suffix_unquoted}" |
59 |
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}" |
60 |
%global normal_suffix "" |
61 |
%global main_suffix "%{main_suffix_unquoted}" |
62 |
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}" |
63 |
|
64 |
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP. |
65 |
%global debug_on with full debugging on |
66 |
%global fastdebug_on with minimal debugging on |
67 |
%global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP. |
68 |
%global for_fastdebug_on for packages with minimal debugging on |
69 |
%global for_debug for packages with debugging on |
70 |
|
71 |
%if %{with release} |
72 |
%global include_normal_build 1 |
73 |
%else |
74 |
%global include_normal_build 0 |
75 |
%endif |
76 |
|
77 |
%if %{include_normal_build} |
78 |
%global normal_build %{normal_suffix} |
79 |
%else |
80 |
%global normal_build %{nil} |
81 |
%endif |
82 |
|
83 |
# We have hardcoded list of files, which is appearing in alternatives, and in files |
84 |
# in alternatives those are slaves and master, very often triplicated by man pages |
85 |
# in files all masters and slaves are ghosted |
86 |
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java` |
87 |
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_ |
88 |
# TODO - fix those hardcoded lists via single list |
89 |
# Those files must *NOT* be ghosted for *slowdebug* packages |
90 |
# FIXME - if you are moving jshell or jlink or similar, always modify all three sections |
91 |
# you can check via headless and devels: |
92 |
# rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin |
93 |
# == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm | grep bin |
94 |
# != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin |
95 |
# similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip} |
96 |
%define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi ) |
97 |
|
98 |
# 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 |
99 |
# as sytem JDK, we mean any JDK which can run whole system java stack without issues (like bytecode issues, module issues, dependencies...) |
100 |
%global is_system_jdk 0 |
101 |
|
102 |
%global aarch64 aarch64 arm64 armv8 |
103 |
# we need to distinguish between big and little endian PPC64 |
104 |
%global ppc64le ppc64le |
105 |
%global ppc64be ppc64 ppc64p7 |
106 |
# Set of architectures which support multiple ABIs |
107 |
%global multilib_arches %{power64} sparc64 x86_64 |
108 |
# Set of architectures for which we build debug builds |
109 |
%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} s390x |
110 |
# Set of architectures with a Just-In-Time (JIT) compiler |
111 |
%global jit_arches %{debug_arches} %{arm} |
112 |
# Set of architectures which run a full bootstrap cycle |
113 |
%global bootstrap_arches %{jit_arches} |
114 |
# Set of architectures which support SystemTap tapsets |
115 |
%global systemtap_arches %{jit_arches} |
116 |
# Set of architectures with a Ahead-Of-Time (AOT) compiler |
117 |
%global aot_arches x86_64 %{aarch64} |
118 |
%global fastdebug_arches x86_64 ppc64le aarch64 |
119 |
# Set of architectures which support the serviceability agent |
120 |
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm} |
121 |
# Set of architectures which support class data sharing |
122 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=513605 |
123 |
# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT |
124 |
%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{arm} s390x |
125 |
# Set of architectures for which we build the Shenandoah garbage collector |
126 |
%global shenandoah_arches x86_64 %{aarch64} |
127 |
# Set of architectures for which we build the Z garbage collector |
128 |
%global zgc_arches x86_64 |
129 |
# Set of architectures for which alt-java has SSB mitigation |
130 |
%global ssbd_arches x86_64 |
131 |
|
132 |
# By default, we build a debug build during main build on JIT architectures |
133 |
%if %{with slowdebug} |
134 |
%ifarch %{debug_arches} |
135 |
%global include_debug_build 1 |
136 |
%else |
137 |
%global include_debug_build 0 |
138 |
%endif |
139 |
%else |
140 |
%global include_debug_build 0 |
141 |
%endif |
142 |
|
143 |
# On certain architectures, we compile the Shenandoah GC |
144 |
%ifarch %{shenandoah_arches} |
145 |
%global use_shenandoah_hotspot 1 |
146 |
%else |
147 |
%global use_shenandoah_hotspot 0 |
148 |
%endif |
149 |
|
150 |
# By default, we build a fastdebug build during main build only on fastdebug architectures |
151 |
%if %{with fastdebug} |
152 |
%ifarch %{fastdebug_arches} |
153 |
%global include_fastdebug_build 1 |
154 |
%else |
155 |
%global include_fastdebug_build 0 |
156 |
%endif |
157 |
%else |
158 |
%global include_fastdebug_build 0 |
159 |
%endif |
160 |
|
161 |
%if %{include_debug_build} |
162 |
%global slowdebug_build %{debug_suffix} |
163 |
%else |
164 |
%global slowdebug_build %{nil} |
165 |
%endif |
166 |
|
167 |
%if %{include_fastdebug_build} |
168 |
%global fastdebug_build %{fastdebug_suffix} |
169 |
%else |
170 |
%global fastdebug_build %{nil} |
171 |
%endif |
172 |
|
173 |
# If you disable both builds, then the build fails |
174 |
# Note that the debug build requires the normal build for docs |
175 |
%global build_loop %{normal_build} %{fastdebug_build} %{slowdebug_build} |
176 |
# Test slowdebug first as it provides the best diagnostics |
177 |
%global rev_build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build} |
178 |
|
179 |
%if %{include_staticlibs} |
180 |
%global staticlibs_loop %{staticlibs_suffix} |
181 |
%else |
182 |
%global staticlibs_loop %{nil} |
183 |
%endif |
184 |
|
185 |
%ifarch %{bootstrap_arches} |
186 |
%global bootstrap_build 1 |
187 |
%else |
188 |
%global bootstrap_build 1 |
189 |
%endif |
190 |
|
191 |
%if %{bootstrap_build} |
192 |
%global release_targets bootcycle-images docs-zip |
193 |
%else |
194 |
%global release_targets images docs-zip |
195 |
%endif |
196 |
# No docs nor bootcycle for debug builds |
197 |
%global debug_targets images |
198 |
|
199 |
%if %{include_staticlibs} |
200 |
# Extra target for producing the static-libraries. Separate from |
201 |
# other targets since this target is configured to use in-tree |
202 |
# AWT dependencies: lcms, libjpeg, libpng, libharfbuzz, giflib |
203 |
# and possibly others |
204 |
%global static_libs_target static-libs-image |
205 |
%endif |
206 |
|
207 |
|
208 |
# Filter out flags from the optflags macro that cause problems with the OpenJDK build |
209 |
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2 |
210 |
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) |
211 |
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings |
212 |
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ |
213 |
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||') |
214 |
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') |
215 |
%global ourldflags %{__global_ldflags} |
216 |
|
217 |
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path |
218 |
# the initialization must be here. Later the pkg-config have buggy behavior |
219 |
# looks like openjdk RPM specific bug |
220 |
# Always set this so the nss.cfg file is not broken |
221 |
%global NSS_LIBDIR %(pkg-config --variable=libdir nss) |
222 |
|
223 |
# In some cases, the arch used by the JDK does |
224 |
# not match _arch. |
225 |
# Also, in some cases, the machine name used by SystemTap |
226 |
# does not match that given by _build_cpu |
227 |
%ifarch x86_64 |
228 |
%global archinstall amd64 |
229 |
%endif |
230 |
%ifarch ppc |
231 |
%global archinstall ppc |
232 |
%endif |
233 |
%ifarch %{ppc64be} |
234 |
%global archinstall ppc64 |
235 |
%endif |
236 |
%ifarch %{ppc64le} |
237 |
%global archinstall ppc64le |
238 |
%endif |
239 |
%ifarch %{ix86} |
240 |
%global archinstall i686 |
241 |
%endif |
242 |
%ifarch ia64 |
243 |
%global archinstall ia64 |
244 |
%endif |
245 |
%ifarch s390 |
246 |
%global archinstall s390 |
247 |
%endif |
248 |
%ifarch s390x |
249 |
%global archinstall s390x |
250 |
%endif |
251 |
%ifarch %{arm} |
252 |
%global archinstall arm |
253 |
%endif |
254 |
%ifarch %{aarch64} |
255 |
%global archinstall aarch64 |
256 |
%endif |
257 |
# 32 bit sparc, optimized for v9 |
258 |
%ifarch sparcv9 |
259 |
%global archinstall sparc |
260 |
%endif |
261 |
# 64 bit sparc |
262 |
%ifarch sparc64 |
263 |
%global archinstall sparcv9 |
264 |
%endif |
265 |
%ifnarch %{jit_arches} |
266 |
%global archinstall %{_arch} |
267 |
%endif |
268 |
|
269 |
|
270 |
|
271 |
%ifarch %{systemtap_arches} |
272 |
%global with_systemtap 1 |
273 |
%else |
274 |
%global with_systemtap 0 |
275 |
%endif |
276 |
|
277 |
# New Version-String scheme-style defines |
278 |
%global featurever 16 |
279 |
%global interimver 0 |
280 |
%global updatever 2 |
281 |
%global patchver 0 |
282 |
# If you bump featurever, you must bump also vendor_version_string |
283 |
# Used via new version scheme. JDK 16 was |
284 |
# GA'ed in March 2020 => 21.3 |
285 |
%global vendor_version_string 21.3 |
286 |
# buildjdkver is usually same as %%{featurever}, |
287 |
# but in time of bootstrap of next jdk, it is featurever-1, |
288 |
# and this it is better to change it here, on single place |
289 |
%global buildjdkver 16 |
290 |
# We don't add any LTS designator for STS packages (this package). |
291 |
# Neither for Fedora nor EPEL which would have %%{rhel} macro defined. |
292 |
%global lts_designator "" |
293 |
%global lts_designator_zip "" |
294 |
|
295 |
# Define IcedTea version used for SystemTap tapsets and desktop file |
296 |
%global icedteaver 3.15.0 |
297 |
|
298 |
# Standard JPackage naming and versioning defines |
299 |
%global origin openjdk |
300 |
%global origin_nice OpenJDK |
301 |
%global top_level_dir_name %{origin} |
302 |
%global top_level_dir_name_backup %{top_level_dir_name}-backup |
303 |
%global buildver 7 |
304 |
%global rpmrelease 1 |
305 |
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit |
306 |
%if %is_system_jdk |
307 |
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions |
308 |
# It is very unlikely we will ever have a patch version > 4 or a build version > 20, so we combine as (patch * 20) + build. |
309 |
# This means 11.0.9.0+11 would have had a priority of 11000911 as before |
310 |
# A 11.0.9.1+1 would have had a priority of 11000921 (20 * 1 + 1), thus ensuring it is bigger than 11.0.9.0+11 |
311 |
%global combiver $( expr 20 '*' %{patchver} + %{buildver} ) |
312 |
%global priority %( printf '%02d%02d%02d%02d' %{featurever} %{interimver} %{updatever} %{combiver} ) |
313 |
%else |
314 |
# for techpreview, using 1, so slowdebugs can have 0 |
315 |
%global priority %( printf '%08d' 1 ) |
316 |
%endif |
317 |
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver} |
318 |
%global javaver %{featurever} |
319 |
|
320 |
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames |
321 |
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn}) |
322 |
|
323 |
# Define milestone (EA for pre-releases, GA for releases) |
324 |
# Release will be (where N is usually a number starting at 1): |
325 |
# - 0.N%%{?extraver}%%{?dist} for EA releases, |
326 |
# - N%%{?extraver}{?dist} for GA releases |
327 |
%global is_ga 1 |
328 |
%if %{is_ga} |
329 |
%global build_type GA |
330 |
%global expected_ea_designator "" |
331 |
%global ea_designator_zip "" |
332 |
%global extraver %{nil} |
333 |
%global eaprefix %{nil} |
334 |
%else |
335 |
%global build_type EA |
336 |
%global expected_ea_designator ea |
337 |
%global ea_designator_zip -%{expected_ea_designator} |
338 |
%global extraver .%{expected_ea_designator} |
339 |
%global eaprefix 0. |
340 |
%endif |
341 |
|
342 |
# Define what url should JVM offer in case of a crash report |
343 |
# order may be important, epel may have rhel declared |
344 |
%global bugs https://bugs.mageia.org/enter_bug.cgi |
345 |
|
346 |
# parametrized macros are order-sensitive |
347 |
%global compatiblename java-%{featurever}-%{origin} |
348 |
%global fullversion %{compatiblename}-%{version}-%{release} |
349 |
# images directories from upstream build |
350 |
%global jdkimage jdk |
351 |
%global static_libs_image static-libs |
352 |
# output dir stub |
353 |
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}} |
354 |
# we can copy the javadoc to not arched dir, or make it not noarch |
355 |
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}} |
356 |
# main id and dir of this jdk |
357 |
%define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}} |
358 |
|
359 |
################################################################# |
360 |
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349 |
361 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14 |
362 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938 |
363 |
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libzip[.]so.* |
364 |
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.* |
365 |
%if %is_system_jdk |
366 |
%global __provides_exclude ^(%{_privatelibs})$ |
367 |
%global __requires_exclude ^(%{_privatelibs})$ |
368 |
# Never generate lib-style provides/requires for any debug packages |
369 |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$ |
370 |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$ |
371 |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$ |
372 |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$ |
373 |
%else |
374 |
# Don't generate provides/requires for JDK provided shared libraries at all. |
375 |
%global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$ |
376 |
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$ |
377 |
%endif |
378 |
|
379 |
|
380 |
%global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin} |
381 |
%define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}} |
382 |
# Standard JPackage directories and symbolic links. |
383 |
%define sdkdir() %{expand:%{uniquesuffix -- %{?1}}} |
384 |
%define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}} |
385 |
|
386 |
%define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin} |
387 |
%define jrebindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin} |
388 |
|
389 |
%global alt_java_name alt-java |
390 |
|
391 |
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/ |
392 |
|
393 |
# For flatpack builds hard-code /usr/sbin/alternatives, |
394 |
# otherwise use %%{_sbindir} relative path. |
395 |
%if 0%{?flatpak} |
396 |
%global alternatives_requires /usr/sbin/alternatives |
397 |
%else |
398 |
%global alternatives_requires %{_sbindir}/alternatives |
399 |
%endif |
400 |
|
401 |
%if %{with_systemtap} |
402 |
# Where to install systemtap tapset (links) |
403 |
# We would like these to be in a package specific sub-dir, |
404 |
# but currently systemtap doesn't support that, so we have to |
405 |
# use the root tapset dir for now. To distinguish between 64 |
406 |
# and 32 bit architectures we place the tapsets under the arch |
407 |
# specific dir (note that systemtap will only pickup the tapset |
408 |
# for the primary arch for now). Systemtap uses the machine name |
409 |
# aka build_cpu as architecture specific directory name. |
410 |
%global tapsetroot /usr/share/systemtap |
411 |
%global tapsetdirttapset %{tapsetroot}/tapset/ |
412 |
%global tapsetdir %{tapsetdirttapset}/%{_build_cpu} |
413 |
%endif |
414 |
|
415 |
# not-duplicated scriptlets for normal/debug packages |
416 |
%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
417 |
|
418 |
|
419 |
%define post_script() %{expand: |
420 |
update-desktop-database %{_datadir}/applications &> /dev/null || : |
421 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
422 |
exit 0 |
423 |
} |
424 |
|
425 |
|
426 |
%define post_headless() %{expand: |
427 |
%ifarch %{share_arches} |
428 |
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null |
429 |
%endif |
430 |
|
431 |
PRIORITY=%{priority} |
432 |
if [ "%{?1}" == %{debug_suffix} ]; then |
433 |
let PRIORITY=PRIORITY-1 |
434 |
fi |
435 |
|
436 |
ext=.xz |
437 |
alternatives \\ |
438 |
--install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\ |
439 |
--slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\ |
440 |
--slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\ |
441 |
--slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\ |
442 |
--slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\ |
443 |
--slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\ |
444 |
--slave %{_mandir}/man1/java.1$ext java.1$ext \\ |
445 |
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\ |
446 |
--slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\ |
447 |
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\ |
448 |
--slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\ |
449 |
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\ |
450 |
--slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\ |
451 |
%{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\ |
452 |
--slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\ |
453 |
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext |
454 |
|
455 |
for X in %{origin} %{javaver} ; do |
456 |
alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} |
457 |
done |
458 |
|
459 |
update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch} |
460 |
|
461 |
|
462 |
update-desktop-database %{_datadir}/applications &> /dev/null || : |
463 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
464 |
|
465 |
# see pretrans where this file is declared |
466 |
# also see that pretrans is only for non-debug |
467 |
if [ ! "%{?1}" == %{debug_suffix} ]; then |
468 |
if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then |
469 |
sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}} |
470 |
fi |
471 |
fi |
472 |
|
473 |
exit 0 |
474 |
} |
475 |
|
476 |
%define postun_script() %{expand: |
477 |
update-desktop-database %{_datadir}/applications &> /dev/null || : |
478 |
if [ $1 -eq 0 ] ; then |
479 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
480 |
%{update_desktop_icons} |
481 |
fi |
482 |
exit 0 |
483 |
} |
484 |
|
485 |
|
486 |
%define postun_headless() %{expand: |
487 |
alternatives --remove java %{jrebindir -- %{?1}}/java |
488 |
alternatives --remove jre_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} |
489 |
alternatives --remove jre_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} |
490 |
alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} |
491 |
} |
492 |
|
493 |
%define posttrans_script() %{expand: |
494 |
%{update_desktop_icons} |
495 |
} |
496 |
|
497 |
%define post_devel() %{expand: |
498 |
|
499 |
PRIORITY=%{priority} |
500 |
if [ "%{?1}" == %{debug_suffix} ]; then |
501 |
let PRIORITY=PRIORITY-1 |
502 |
fi |
503 |
|
504 |
ext=.xz |
505 |
alternatives \\ |
506 |
--install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\ |
507 |
--slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\ |
508 |
%ifarch %{aot_arches} |
509 |
--slave %{_bindir}/jaotc jaotc %{sdkbindir -- %{?1}}/jaotc \\ |
510 |
%endif |
511 |
--slave %{_bindir}/jlink jlink %{sdkbindir -- %{?1}}/jlink \\ |
512 |
--slave %{_bindir}/jmod jmod %{sdkbindir -- %{?1}}/jmod \\ |
513 |
%ifarch %{sa_arches} |
514 |
--slave %{_bindir}/jhsdb jhsdb %{sdkbindir -- %{?1}}/jhsdb \\ |
515 |
%endif |
516 |
--slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\ |
517 |
--slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\ |
518 |
--slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\ |
519 |
--slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\ |
520 |
--slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\ |
521 |
--slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\ |
522 |
--slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\ |
523 |
--slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\ |
524 |
--slave %{_bindir}/jdeprscan jdeprscan %{sdkbindir -- %{?1}}/jdeprscan \\ |
525 |
--slave %{_bindir}/jfr jfr %{sdkbindir -- %{?1}}/jfr \\ |
526 |
--slave %{_bindir}/jimage jimage %{sdkbindir -- %{?1}}/jimage \\ |
527 |
--slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\ |
528 |
--slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\ |
529 |
--slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\ |
530 |
--slave %{_bindir}/jpackage jpackage %{sdkbindir -- %{?1}}/jpackage \\ |
531 |
--slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\ |
532 |
--slave %{_bindir}/jshell jshell %{sdkbindir -- %{?1}}/jshell \\ |
533 |
--slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\ |
534 |
--slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\ |
535 |
--slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\ |
536 |
--slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\ |
537 |
--slave %{_mandir}/man1/jar.1$ext jar.1$ext \\ |
538 |
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\ |
539 |
--slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\ |
540 |
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\ |
541 |
--slave %{_mandir}/man1/javac.1$ext javac.1$ext \\ |
542 |
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\ |
543 |
--slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\ |
544 |
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\ |
545 |
--slave %{_mandir}/man1/javap.1$ext javap.1$ext \\ |
546 |
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\ |
547 |
--slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\ |
548 |
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\ |
549 |
--slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\ |
550 |
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\ |
551 |
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\ |
552 |
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\ |
553 |
--slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\ |
554 |
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\ |
555 |
--slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\ |
556 |
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\ |
557 |
--slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\ |
558 |
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\ |
559 |
--slave %{_mandir}/man1/jps.1$ext jps.1$ext \\ |
560 |
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\ |
561 |
--slave %{_mandir}/man1/jpackage.1$ext jpackage.1$ext \\ |
562 |
%{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1$ext \\ |
563 |
--slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\ |
564 |
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\ |
565 |
--slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\ |
566 |
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\ |
567 |
--slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\ |
568 |
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\ |
569 |
--slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\ |
570 |
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\ |
571 |
--slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\ |
572 |
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext |
573 |
|
574 |
for X in %{origin} %{javaver} ; do |
575 |
alternatives \\ |
576 |
--install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} |
577 |
done |
578 |
|
579 |
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} |
580 |
|
581 |
update-desktop-database %{_datadir}/applications &> /dev/null || : |
582 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
583 |
|
584 |
exit 0 |
585 |
} |
586 |
|
587 |
%define postun_devel() %{expand: |
588 |
alternatives --remove javac %{sdkbindir -- %{?1}}/javac |
589 |
alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} |
590 |
alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} |
591 |
alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} |
592 |
|
593 |
update-desktop-database %{_datadir}/applications &> /dev/null || : |
594 |
|
595 |
if [ $1 -eq 0 ] ; then |
596 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
597 |
%{update_desktop_icons} |
598 |
fi |
599 |
exit 0 |
600 |
} |
601 |
|
602 |
%define posttrans_devel() %{expand: |
603 |
%{update_desktop_icons} |
604 |
} |
605 |
|
606 |
%define post_javadoc() %{expand: |
607 |
|
608 |
PRIORITY=%{priority} |
609 |
if [ "%{?1}" == %{debug_suffix} ]; then |
610 |
let PRIORITY=PRIORITY-1 |
611 |
fi |
612 |
|
613 |
alternatives \\ |
614 |
--install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\ |
615 |
$PRIORITY --family %{name} |
616 |
exit 0 |
617 |
} |
618 |
|
619 |
%define postun_javadoc() %{expand: |
620 |
alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api |
621 |
exit 0 |
622 |
} |
623 |
|
624 |
%define post_javadoc_zip() %{expand: |
625 |
|
626 |
PRIORITY=%{priority} |
627 |
if [ "%{?1}" == %{debug_suffix} ]; then |
628 |
let PRIORITY=PRIORITY-1 |
629 |
fi |
630 |
|
631 |
alternatives \\ |
632 |
--install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\ |
633 |
$PRIORITY --family %{name} |
634 |
exit 0 |
635 |
} |
636 |
|
637 |
%define postun_javadoc_zip() %{expand: |
638 |
alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip |
639 |
exit 0 |
640 |
} |
641 |
|
642 |
%define files_jre() %{expand: |
643 |
%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png |
644 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsplashscreen.so |
645 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_xawt.so |
646 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjawt.so |
647 |
} |
648 |
|
649 |
|
650 |
%define files_jre_headless() %{expand: |
651 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal |
652 |
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS |
653 |
%dir %{_sysconfdir}/.java/.systemPrefs |
654 |
%dir %{_sysconfdir}/.java |
655 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}} |
656 |
%{_jvmdir}/%{sdkdir -- %{?1}}/release |
657 |
%{_jvmdir}/%{jrelnk -- %{?1}} |
658 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin |
659 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java |
660 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name} |
661 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool |
662 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid |
663 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry |
664 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib |
665 |
%ifarch %{jit_arches} |
666 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist |
667 |
%endif |
668 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec |
669 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper |
670 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar |
671 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/modules |
672 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfont.properties.ja |
673 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfontj2d.properties |
674 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/tzdb.dat |
675 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjli.so |
676 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jvm.cfg |
677 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libattach.so |
678 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt.so |
679 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libextnet.so |
680 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsig.so |
681 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_headless.so |
682 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libdt_socket.so |
683 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libfontmanager.so |
684 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libinstrument.so |
685 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2gss.so |
686 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pcsc.so |
687 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pkcs11.so |
688 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjaas.so |
689 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjava.so |
690 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjavajpeg.so |
691 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjdwp.so |
692 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so |
693 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so |
694 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so |
695 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so |
696 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so |
697 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so |
698 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmlib_image.so |
699 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnet.so |
700 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnio.so |
701 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libprefs.so |
702 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/librmi.so |
703 |
# Some architectures don't have the serviceability agent |
704 |
%ifarch %{sa_arches} |
705 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsaproc.so |
706 |
%endif |
707 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsctp.so |
708 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libverify.so |
709 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libzip.so |
710 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr |
711 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/default.jfc |
712 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc |
713 |
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1* |
714 |
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1* |
715 |
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1* |
716 |
%{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1* |
717 |
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1* |
718 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/ |
719 |
%ifarch %{share_arches} |
720 |
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa |
721 |
%endif |
722 |
%dir %{etcjavasubdir} |
723 |
%dir %{etcjavadir -- %{?1}} |
724 |
%dir %{etcjavadir -- %{?1}}/lib |
725 |
%dir %{etcjavadir -- %{?1}}/lib/security |
726 |
%{etcjavadir -- %{?1}}/lib/security/cacerts |
727 |
%dir %{etcjavadir -- %{?1}}/conf |
728 |
%dir %{etcjavadir -- %{?1}}/conf/sdp |
729 |
%dir %{etcjavadir -- %{?1}}/conf/management |
730 |
%dir %{etcjavadir -- %{?1}}/conf/security |
731 |
%dir %{etcjavadir -- %{?1}}/conf/security/policy |
732 |
%dir %{etcjavadir -- %{?1}}/conf/security/policy/limited |
733 |
%dir %{etcjavadir -- %{?1}}/conf/security/policy/unlimited |
734 |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/default.policy |
735 |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/blacklisted.certs |
736 |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/public_suffix_list.dat |
737 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/exempt_local.policy |
738 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_local.policy |
739 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_US_export.policy |
740 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_local.policy |
741 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_US_export.policy |
742 |
%{etcjavadir -- %{?1}}/conf/security/policy/README.txt |
743 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.policy |
744 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.security |
745 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties |
746 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.cfg |
747 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access |
748 |
# this is conifg template, thus not config-noreplace |
749 |
%config %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template |
750 |
%config %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template |
751 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties |
752 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties |
753 |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties |
754 |
%{_jvmdir}/%{sdkdir -- %{?1}}/conf |
755 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/security |
756 |
%if %is_system_jdk |
757 |
%if %{is_release_build -- %{?1}} |
758 |
%ghost %{_bindir}/java |
759 |
%ghost %{_bindir}/%{alt_java_name} |
760 |
%ghost %{_jvmdir}/jre |
761 |
%ghost %{_bindir}/keytool |
762 |
%ghost %{_bindir}/pack200 |
763 |
%ghost %{_bindir}/rmid |
764 |
%ghost %{_bindir}/rmiregistry |
765 |
%ghost %{_bindir}/unpack200 |
766 |
%ghost %{_jvmdir}/jre-%{origin} |
767 |
%ghost %{_jvmdir}/jre-%{javaver} |
768 |
%ghost %{_jvmdir}/jre-%{javaver}-%{origin} |
769 |
%endif |
770 |
%endif |
771 |
} |
772 |
|
773 |
%define files_devel() %{expand: |
774 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin |
775 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar |
776 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner |
777 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac |
778 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc |
779 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap |
780 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole |
781 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd |
782 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb |
783 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps |
784 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan |
785 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jfr |
786 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jimage |
787 |
# Some architectures don't have the serviceability agent |
788 |
%ifarch %{sa_arches} |
789 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhsdb |
790 |
%{_mandir}/man1/jhsdb-%{uniquesuffix -- %{?1}}.1.xz |
791 |
%endif |
792 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo |
793 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jlink |
794 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap |
795 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmod |
796 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps |
797 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jpackage |
798 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript |
799 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jshell |
800 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack |
801 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat |
802 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd |
803 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver |
804 |
%ifarch %{aot_arches} |
805 |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jaotc |
806 |
%endif |
807 |
%{_jvmdir}/%{sdkdir -- %{?1}}/include |
808 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym |
809 |
%if %{with_systemtap} |
810 |
%{_jvmdir}/%{sdkdir -- %{?1}}/tapset |
811 |
%endif |
812 |
%{_datadir}/applications/*jconsole%{?1}.desktop |
813 |
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1* |
814 |
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1* |
815 |
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1* |
816 |
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1* |
817 |
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1* |
818 |
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1* |
819 |
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1* |
820 |
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1* |
821 |
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1* |
822 |
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1* |
823 |
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1* |
824 |
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1* |
825 |
%{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1* |
826 |
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1* |
827 |
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1* |
828 |
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1* |
829 |
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1* |
830 |
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1* |
831 |
%{_mandir}/man1/jdeprscan-%{uniquesuffix -- %{?1}}.1.xz |
832 |
%{_mandir}/man1/jlink-%{uniquesuffix -- %{?1}}.1.xz |
833 |
%{_mandir}/man1/jmod-%{uniquesuffix -- %{?1}}.1.xz |
834 |
%{_mandir}/man1/jshell-%{uniquesuffix -- %{?1}}.1.xz |
835 |
%{_mandir}/man1/jfr-%{uniquesuffix -- %{?1}}.1.xz |
836 |
%ifarch %{aot_arches} |
837 |
%{_mandir}/man1/jaotc-%{uniquesuffix -- %{?1}}.1.xz |
838 |
%endif |
839 |
|
840 |
%if %{with_systemtap} |
841 |
%dir %{tapsetroot} |
842 |
%dir %{tapsetdirttapset} |
843 |
%dir %{tapsetdir} |
844 |
%{tapsetdir}/*%{_arch}%{?1}.stp |
845 |
%endif |
846 |
%if %is_system_jdk |
847 |
%if %{is_release_build -- %{?1}} |
848 |
%ghost %{_bindir}/javac |
849 |
%ghost %{_jvmdir}/java |
850 |
%ghost %{_jvmdir}/%{alt_java_name} |
851 |
%ghost %{_bindir}/jaotc |
852 |
%ghost %{_bindir}/jlink |
853 |
%ghost %{_bindir}/jmod |
854 |
%ghost %{_bindir}/jhsdb |
855 |
%ghost %{_bindir}/jar |
856 |
%ghost %{_bindir}/jarsigner |
857 |
%ghost %{_bindir}/javadoc |
858 |
%ghost %{_bindir}/javap |
859 |
%ghost %{_bindir}/jcmd |
860 |
%ghost %{_bindir}/jconsole |
861 |
%ghost %{_bindir}/jdb |
862 |
%ghost %{_bindir}/jdeps |
863 |
%ghost %{_bindir}/jdeprscan |
864 |
%ghost %{_bindir}/jimage |
865 |
%ghost %{_bindir}/jinfo |
866 |
%ghost %{_bindir}/jmap |
867 |
%ghost %{_bindir}/jps |
868 |
%ghost %{_bindir}/jrunscript |
869 |
%ghost %{_bindir}/jshell |
870 |
%ghost %{_bindir}/jstack |
871 |
%ghost %{_bindir}/jstat |
872 |
%ghost %{_bindir}/jstatd |
873 |
%ghost %{_bindir}/serialver |
874 |
%ghost %{_jvmdir}/java-%{origin} |
875 |
%ghost %{_jvmdir}/java-%{javaver} |
876 |
%ghost %{_jvmdir}/java-%{javaver}-%{origin} |
877 |
%endif |
878 |
%endif |
879 |
} |
880 |
|
881 |
%define files_jmods() %{expand: |
882 |
%{_jvmdir}/%{sdkdir -- %{?1}}/jmods |
883 |
} |
884 |
|
885 |
%define files_demo() %{expand: |
886 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal |
887 |
%{_jvmdir}/%{sdkdir -- %{?1}}/demo |
888 |
%{_jvmdir}/%{sdkdir -- %{?1}}/sample |
889 |
} |
890 |
|
891 |
%define files_src() %{expand: |
892 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal |
893 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/src.zip |
894 |
} |
895 |
|
896 |
%define files_static_libs() %{expand: |
897 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static |
898 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall} |
899 |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc |
900 |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc/lib*.a |
901 |
} |
902 |
|
903 |
%define files_javadoc() %{expand: |
904 |
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}} |
905 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal |
906 |
%if %is_system_jdk |
907 |
%if %{is_release_build -- %{?1}} |
908 |
%ghost %{_javadocdir}/java |
909 |
%endif |
910 |
%endif |
911 |
} |
912 |
|
913 |
%define files_javadoc_zip() %{expand: |
914 |
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip |
915 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal |
916 |
%if %is_system_jdk |
917 |
%if %{is_release_build -- %{?1}} |
918 |
%ghost %{_javadocdir}/java-zip |
919 |
%endif |
920 |
%endif |
921 |
} |
922 |
|
923 |
# not-duplicated requires/provides/obsoletes for normal/debug packages |
924 |
%define java_rpo() %{expand: |
925 |
Requires: fontconfig%{?_isa} |
926 |
Requires: xorg-x11-fonts-Type1 |
927 |
# Require libXcomposite explicitly since it's only dynamically loaded |
928 |
# at runtime. Fixes screenshot issues. See JDK-8150954. |
929 |
Requires: %mklibname xcomposite 1 |
930 |
# Requires rest of java |
931 |
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} |
932 |
# for java-X-openjdk package's desktop binding |
933 |
Recommends: gtk3%{?_isa} |
934 |
|
935 |
Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
936 |
|
937 |
# Standard JPackage base provides |
938 |
Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release} |
939 |
Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
940 |
Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release} |
941 |
%if %is_system_jdk |
942 |
Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
943 |
Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
944 |
Provides: java%{?1} = %{epoch}:%{version}-%{release} |
945 |
Provides: jre%{?1} = %{epoch}:%{version}-%{release} |
946 |
%endif |
947 |
} |
948 |
|
949 |
%define java_headless_rpo() %{expand: |
950 |
# Require /etc/pki/java/cacerts |
951 |
Requires: ca-certificates |
952 |
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros |
953 |
Requires: javapackages-filesystem |
954 |
# Require zone-info data provided by tzdata-java sub-package |
955 |
Requires: tzdata-java >= 2015d |
956 |
# for support of kernel stream control |
957 |
# libsctp.so.1 is being `dlopen`ed on demand |
958 |
Requires: lksctp-tools%{?_isa} |
959 |
%if ! 0%{?flatpak} |
960 |
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it, |
961 |
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be |
962 |
# considered as regression |
963 |
Requires: copy-jdk-configs >= 4.0 |
964 |
%endif |
965 |
# for printing support |
966 |
# Requires: cups-libs |
967 |
# for FIPS PKCS11 provider |
968 |
Requires: nss |
969 |
# Post requires alternatives to install tool alternatives |
970 |
Requires(post): %{alternatives_requires} |
971 |
# Postun requires alternatives to uninstall tool alternatives |
972 |
Requires(postun): %{alternatives_requires} |
973 |
# for optional support of kernel stream control, card reader and printing bindings |
974 |
Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa} |
975 |
|
976 |
# Standard JPackage base provides |
977 |
Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} |
978 |
Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release} |
979 |
Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} |
980 |
Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release} |
981 |
%if %is_system_jdk |
982 |
Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} |
983 |
Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} |
984 |
Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release} |
985 |
Provides: java-headless%{?1} = %{epoch}:%{version}-%{release} |
986 |
%endif |
987 |
} |
988 |
|
989 |
%define java_devel_rpo() %{expand: |
990 |
# Requires base package |
991 |
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release} |
992 |
# Post requires alternatives to install tool alternatives |
993 |
Requires(post): %{alternatives_requires} |
994 |
# Postun requires alternatives to uninstall tool alternatives |
995 |
Requires(postun): %{alternatives_requires} |
996 |
|
997 |
# Standard JPackage devel provides |
998 |
Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
999 |
Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release} |
1000 |
Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release} |
1001 |
Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release} |
1002 |
%if %is_system_jdk |
1003 |
Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release} |
1004 |
Provides: java-devel%{?1} = %{epoch}:%{version}-%{release} |
1005 |
Provides: java-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release} |
1006 |
Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release} |
1007 |
%endif |
1008 |
} |
1009 |
|
1010 |
%define java_static_libs_rpo() %{expand: |
1011 |
Requires: %{name}-devel%{?1}%{?_isa} = %{epoch}:%{version}-%{release} |
1012 |
} |
1013 |
|
1014 |
%define java_jmods_rpo() %{expand: |
1015 |
# Requires devel package |
1016 |
# as jmods are bytecode, they should be OK without any _isa |
1017 |
Requires: %{name}-devel%{?1} = %{epoch}:%{version}-%{release} |
1018 |
|
1019 |
Provides: java-%{javaver}-jmods%{?1} = %{epoch}:%{version}-%{release} |
1020 |
Provides: java-%{javaver}-%{origin}-jmods%{?1} = %{epoch}:%{version}-%{release} |
1021 |
%if %is_system_jdk |
1022 |
Provides: java-jmods%{?1} = %{epoch}:%{version}-%{release} |
1023 |
%endif |
1024 |
} |
1025 |
|
1026 |
%define java_demo_rpo() %{expand: |
1027 |
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release} |
1028 |
|
1029 |
Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release} |
1030 |
Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release} |
1031 |
%if %is_system_jdk |
1032 |
Provides: java-demo%{?1} = %{epoch}:%{version}-%{release} |
1033 |
Provides: java-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release} |
1034 |
%endif |
1035 |
} |
1036 |
|
1037 |
%define java_javadoc_rpo() %{expand: |
1038 |
# Post requires alternatives to install javadoc alternative |
1039 |
Requires(post): %{alternatives_requires} |
1040 |
# Postun requires alternatives to uninstall javadoc alternative |
1041 |
Requires(postun): %{alternatives_requires} |
1042 |
|
1043 |
# Standard JPackage javadoc provides |
1044 |
Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release} |
1045 |
Provides: java-%{javaver}-%{origin}-javadoc%{?1} = %{epoch}:%{version}-%{release} |
1046 |
%if %is_system_jdk |
1047 |
Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release} |
1048 |
%endif |
1049 |
} |
1050 |
|
1051 |
%define java_src_rpo() %{expand: |
1052 |
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} |
1053 |
|
1054 |
# Standard JPackage sources provides |
1055 |
Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release} |
1056 |
Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release} |
1057 |
%if %is_system_jdk |
1058 |
Provides: java-src%{?1} = %{epoch}:%{version}-%{release} |
1059 |
Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release} |
1060 |
%endif |
1061 |
} |
1062 |
|
1063 |
# Prevent brp-java-repack-jars from being run |
1064 |
%global __jar_repack 0 |
1065 |
|
1066 |
Name: java-latest-%{origin} |
1067 |
Version: %{newjavaver}.%{buildver} |
1068 |
# This package needs `.rolling` as part of Release so as to not conflict on install with |
1069 |
# java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as |
1070 |
# java-X-openjdk. See: https://bugzilla.redhat.com/show_bug.cgi?id=1647298 |
1071 |
Release: %mkrel %{?eaprefix}%{rpmrelease}%{?extraver}.rolling.1 |
1072 |
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons |
1073 |
# and this change was brought into RHEL-4. java-1.5.0-ibm packages |
1074 |
# also included the epoch in their virtual provides. This created a |
1075 |
# situation where in-the-wild java-1.5.0-ibm packages provided "java = |
1076 |
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is |
1077 |
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be |
1078 |
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in |
1079 |
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual |
1080 |
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0". |
1081 |
Group: Development/Java |
1082 |
Epoch: 1 |
1083 |
Summary: %{origin_nice} %{featurever} Runtime Environment |
1084 |
|
1085 |
# HotSpot code is licensed under GPLv2 |
1086 |
# JDK library code is licensed under GPLv2 with the Classpath exception |
1087 |
# The Apache license is used in code taken from Apache projects (primarily xalan & xerces) |
1088 |
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License |
1089 |
# The JSR166 concurrency code is in the public domain |
1090 |
# The BSD and MIT licenses are used for a number of third-party libraries (see ADDITIONAL_LICENSE_INFO) |
1091 |
# The OpenJDK source tree includes: |
1092 |
# - JPEG library (IJG), zlib & libpng (zlib), giflib (MIT), harfbuzz (ISC), |
1093 |
# - freetype (FTL), jline (BSD) and LCMS (MIT) |
1094 |
# - jquery (MIT), jdk.crypto.cryptoki PKCS 11 wrapper (RSA) |
1095 |
# - public_suffix_list.dat from publicsuffix.org (MPLv2.0) |
1096 |
# The test code includes copies of NSS under the Mozilla Public License v2.0 |
1097 |
# The PCSClite headers are under a BSD with advertising license |
1098 |
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version |
1099 |
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 and ISC and FTL and RSA |
1100 |
URL: http://openjdk.java.net/ |
1101 |
|
1102 |
|
1103 |
# to regenerate source0 (jdk) run update_package.sh |
1104 |
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives |
1105 |
Source0: openjdk-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz |
1106 |
#Source0: openjdk-jdk%{featurever}-jdk-%{filever}+%{buildver}.tar.xz |
1107 |
|
1108 |
# Use 'icedtea_sync.sh' to update the following |
1109 |
# They are based on code contained in the IcedTea project (3.x). |
1110 |
# Systemtap tapsets. Zipped up to keep it small. |
1111 |
Source8: tapsets-icedtea-%{icedteaver}.tar.xz |
1112 |
|
1113 |
# Desktop files. Adapted from IcedTea |
1114 |
Source9: jconsole.desktop.in |
1115 |
|
1116 |
# Release notes |
1117 |
Source10: NEWS |
1118 |
|
1119 |
# nss configuration file |
1120 |
Source11: nss.cfg.in |
1121 |
|
1122 |
# Removed libraries that we link instead |
1123 |
Source12: remove-intree-libraries.sh |
1124 |
|
1125 |
# Ensure we aren't using the limited crypto policy |
1126 |
Source13: TestCryptoLevel.java |
1127 |
|
1128 |
# Ensure ECDSA is working |
1129 |
Source14: TestECDSA.java |
1130 |
|
1131 |
# nss fips configuration file |
1132 |
Source15: nss.fips.cfg.in |
1133 |
|
1134 |
# Verify system crypto (policy) can be disabled via a property |
1135 |
Source17: TestSecurityProperties.java |
1136 |
|
1137 |
############################################ |
1138 |
# |
1139 |
# RPM/distribution specific patches |
1140 |
# |
1141 |
############################################ |
1142 |
|
1143 |
# Ignore AWTError when assistive technologies are loaded |
1144 |
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch |
1145 |
# Restrict access to java-atk-wrapper classes |
1146 |
Patch2: rh1648644-java_access_bridge_privileged_security.patch |
1147 |
# NSS via SunPKCS11 Provider (disabled due to memory leak). |
1148 |
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch |
1149 |
# enable build of speculative store bypass hardened alt-java |
1150 |
Patch600: rh1750419-redhat_alt_java.patch |
1151 |
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch |
1152 |
# Follow system wide crypto policy RHBZ#1249083 |
1153 |
Patch4: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch |
1154 |
# Depend on pcs-lite-libs instead of pcs-lite-devel as this is only in optional repo |
1155 |
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch |
1156 |
Patch7: pr3695-toggle_system_crypto_policy.patch |
1157 |
|
1158 |
# FIPS support patches |
1159 |
# RH1655466: Support RHEL FIPS mode using SunPKCS11 provider |
1160 |
Patch1001: rh1655466-global_crypto_and_fips.patch |
1161 |
# RH1818909: No ciphersuites availale for SSLSocket in FIPS mode |
1162 |
Patch1002: rh1818909-fips_default_keystore_type.patch |
1163 |
# RH1860986: Disable TLSv1.3 with the NSS-FIPS provider until PKCS#11 v3.0 support is available |
1164 |
Patch1004: rh1860986-disable_tlsv1.3_in_fips_mode.patch |
1165 |
# RH1915071: Always initialise JavaSecuritySystemConfiguratorAccess |
1166 |
Patch1007: rh1915071-always_initialise_configurator_access.patch |
1167 |
|
1168 |
############################################# |
1169 |
# |
1170 |
# OpenJDK patches in need of upstreaming |
1171 |
# |
1172 |
############################################# |
1173 |
|
1174 |
|
1175 |
BuildRequires: autoconf |
1176 |
BuildRequires: automake |
1177 |
BuildRequires: alsa-lib-devel |
1178 |
BuildRequires: binutils |
1179 |
BuildRequires: cups-devel |
1180 |
BuildRequires: desktop-file-utils |
1181 |
# elfutils only are OK for build without AOT |
1182 |
BuildRequires: elfutils-devel |
1183 |
BuildRequires: fontconfig-devel |
1184 |
BuildRequires: freetype-devel |
1185 |
BuildRequires: giflib-devel |
1186 |
BuildRequires: gcc-c++ |
1187 |
BuildRequires: gdb |
1188 |
BuildRequires: harfbuzz-devel |
1189 |
BuildRequires: lcms2-devel |
1190 |
BuildRequires: libjpeg-devel |
1191 |
BuildRequires: libpng-devel |
1192 |
BuildRequires: libxslt |
1193 |
BuildRequires: libx11-devel |
1194 |
BuildRequires: libxi-devel |
1195 |
BuildRequires: libxinerama-devel |
1196 |
BuildRequires: libxrandr-devel |
1197 |
BuildRequires: libxrender-devel |
1198 |
BuildRequires: libxt-devel |
1199 |
BuildRequires: libxtst-devel |
1200 |
# Requirements for setting up the nss.cfg |
1201 |
BuildRequires: nss-devel |
1202 |
BuildRequires: pkgconfig |
1203 |
BuildRequires: x11-proto-devel |
1204 |
BuildRequires: zip |
1205 |
BuildRequires: javapackages-filesystem |
1206 |
BuildRequires: java-latest-openjdk-devel |
1207 |
# Zero-assembler build requirement |
1208 |
%ifnarch %{jit_arches} |
1209 |
BuildRequires: libffi-devel |
1210 |
%endif |
1211 |
BuildRequires: tzdata-java >= 2015d |
1212 |
# Earlier versions have a bug in tree vectorization on PPC |
1213 |
BuildRequires: gcc >= 4.8.3-8 |
1214 |
|
1215 |
%if %{with_systemtap} |
1216 |
BuildRequires: systemtap-sdt-devel |
1217 |
%endif |
1218 |
BuildRequires: make |
1219 |
|
1220 |
# this is always built, also during debug-only build |
1221 |
# when it is built in debug-only this package is just placeholder |
1222 |
%{java_rpo %{nil}} |
1223 |
|
1224 |
%description |
1225 |
The %{origin_nice} %{featurever} runtime environment. |
1226 |
|
1227 |
%if %{include_debug_build} |
1228 |
%package slowdebug |
1229 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on} |
1230 |
|
1231 |
%{java_rpo -- %{debug_suffix_unquoted}} |
1232 |
%description slowdebug |
1233 |
The %{origin_nice} %{featurever} runtime environment. |
1234 |
%{debug_warning} |
1235 |
%endif |
1236 |
|
1237 |
%if %{include_fastdebug_build} |
1238 |
%package fastdebug |
1239 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on} |
1240 |
Group: Development/Java |
1241 |
|
1242 |
%{java_rpo -- %{fastdebug_suffix_unquoted}} |
1243 |
%description fastdebug |
1244 |
The %{origin_nice} %{featurever} runtime environment. |
1245 |
%{fastdebug_warning} |
1246 |
%endif |
1247 |
|
1248 |
%if %{include_normal_build} |
1249 |
%package headless |
1250 |
Summary: %{origin_nice} %{featurever} Headless Runtime Environment |
1251 |
|
1252 |
%{java_headless_rpo %{nil}} |
1253 |
|
1254 |
%description headless |
1255 |
The %{origin_nice} %{featurever} runtime environment without audio and video support. |
1256 |
%endif |
1257 |
|
1258 |
%if %{include_debug_build} |
1259 |
%package headless-slowdebug |
1260 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on} |
1261 |
|
1262 |
%{java_headless_rpo -- %{debug_suffix_unquoted}} |
1263 |
|
1264 |
%description headless-slowdebug |
1265 |
The %{origin_nice} %{featurever} runtime environment without audio and video support. |
1266 |
%{debug_warning} |
1267 |
%endif |
1268 |
|
1269 |
%if %{include_fastdebug_build} |
1270 |
%package headless-fastdebug |
1271 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on} |
1272 |
Group: Development/Java |
1273 |
|
1274 |
%{java_headless_rpo -- %{fastdebug_suffix_unquoted}} |
1275 |
|
1276 |
%description headless-fastdebug |
1277 |
The %{origin_nice} %{featurever} runtime environment without audio and video support. |
1278 |
%{fastdebug_warning} |
1279 |
%endif |
1280 |
|
1281 |
%if %{include_normal_build} |
1282 |
%package devel |
1283 |
Summary: %{origin_nice} %{featurever} Development Environment |
1284 |
|
1285 |
%{java_devel_rpo %{nil}} |
1286 |
|
1287 |
%description devel |
1288 |
The %{origin_nice} %{featurever} development tools. |
1289 |
%endif |
1290 |
|
1291 |
%if %{include_debug_build} |
1292 |
%package devel-slowdebug |
1293 |
Summary: %{origin_nice} %{featurever} Development Environment %{debug_on} |
1294 |
|
1295 |
%{java_devel_rpo -- %{debug_suffix_unquoted}} |
1296 |
|
1297 |
%description devel-slowdebug |
1298 |
The %{origin_nice} %{featurever} development tools. |
1299 |
%{debug_warning} |
1300 |
%endif |
1301 |
|
1302 |
%if %{include_fastdebug_build} |
1303 |
%package devel-fastdebug |
1304 |
Summary: %{origin_nice} %{featurever} Development Environment %{fastdebug_on} |
1305 |
Group: Development/Tools |
1306 |
|
1307 |
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}} |
1308 |
|
1309 |
%description devel-fastdebug |
1310 |
The %{origin_nice} %{featurever} development tools . |
1311 |
%{fastdebug_warning} |
1312 |
%endif |
1313 |
|
1314 |
%if %{include_staticlibs} |
1315 |
|
1316 |
%if %{include_normal_build} |
1317 |
%package static-libs |
1318 |
Summary: %{origin_nice} %{featurever} libraries for static linking |
1319 |
|
1320 |
%{java_static_libs_rpo %{nil}} |
1321 |
|
1322 |
%description static-libs |
1323 |
The %{origin_nice} %{featurever} libraries for static linking. |
1324 |
%endif |
1325 |
|
1326 |
%if %{include_debug_build} |
1327 |
%package static-libs-slowdebug |
1328 |
Summary: %{origin_nice} %{featurever} libraries for static linking %{debug_on} |
1329 |
|
1330 |
%{java_static_libs_rpo -- %{debug_suffix_unquoted}} |
1331 |
|
1332 |
%description static-libs-slowdebug |
1333 |
The %{origin_nice} %{featurever} libraries for static linking. |
1334 |
%{debug_warning} |
1335 |
%endif |
1336 |
|
1337 |
%if %{include_fastdebug_build} |
1338 |
%package static-libs-fastdebug |
1339 |
Summary: %{origin_nice} %{featurever} libraries for static linking %{fastdebug_on} |
1340 |
|
1341 |
%{java_static_libs_rpo -- %{fastdebug_suffix_unquoted}} |
1342 |
|
1343 |
%description static-libs-fastdebug |
1344 |
The %{origin_nice} %{featurever} libraries for static linking. |
1345 |
%{fastdebug_warning} |
1346 |
%endif |
1347 |
|
1348 |
# staticlibs |
1349 |
%endif |
1350 |
|
1351 |
%if %{include_normal_build} |
1352 |
%package jmods |
1353 |
Summary: JMods for %{origin_nice} %{featurever} |
1354 |
|
1355 |
%{java_jmods_rpo %{nil}} |
1356 |
|
1357 |
%description jmods |
1358 |
The JMods for %{origin_nice} %{featurever}. |
1359 |
%endif |
1360 |
|
1361 |
%if %{include_debug_build} |
1362 |
%package jmods-slowdebug |
1363 |
Summary: JMods for %{origin_nice} %{featurever} %{debug_on} |
1364 |
|
1365 |
%{java_jmods_rpo -- %{debug_suffix_unquoted}} |
1366 |
|
1367 |
%description jmods-slowdebug |
1368 |
The JMods for %{origin_nice} %{featurever}. |
1369 |
%{debug_warning} |
1370 |
%endif |
1371 |
|
1372 |
%if %{include_fastdebug_build} |
1373 |
%package jmods-fastdebug |
1374 |
Summary: JMods for %{origin_nice} %{featurever} %{fastdebug_on} |
1375 |
Group: Development/Tools |
1376 |
|
1377 |
%{java_jmods_rpo -- %{fastdebug_suffix_unquoted}} |
1378 |
|
1379 |
%description jmods-fastdebug |
1380 |
The JMods for %{origin_nice} %{featurever}. |
1381 |
%{fastdebug_warning} |
1382 |
%endif |
1383 |
|
1384 |
|
1385 |
%if %{include_normal_build} |
1386 |
%package demo |
1387 |
Summary: %{origin_nice} %{featurever} Demos |
1388 |
|
1389 |
%{java_demo_rpo %{nil}} |
1390 |
|
1391 |
%description demo |
1392 |
The %{origin_nice} %{featurever} demos. |
1393 |
%endif |
1394 |
|
1395 |
%if %{include_debug_build} |
1396 |
%package demo-slowdebug |
1397 |
Summary: %{origin_nice} %{featurever} Demos %{debug_on} |
1398 |
|
1399 |
%{java_demo_rpo -- %{debug_suffix_unquoted}} |
1400 |
|
1401 |
%description demo-slowdebug |
1402 |
The %{origin_nice} %{featurever} demos. |
1403 |
%{debug_warning} |
1404 |
%endif |
1405 |
|
1406 |
%if %{include_fastdebug_build} |
1407 |
%package demo-fastdebug |
1408 |
Summary: %{origin_nice} %{featurever} Demos %{fastdebug_on} |
1409 |
Group: Development/Java |
1410 |
|
1411 |
%{java_demo_rpo -- %{fastdebug_suffix_unquoted}} |
1412 |
|
1413 |
%description demo-fastdebug |
1414 |
The %{origin_nice} %{featurever} demos. |
1415 |
%{fastdebug_warning} |
1416 |
%endif |
1417 |
|
1418 |
%if %{include_normal_build} |
1419 |
%package src |
1420 |
Summary: %{origin_nice} %{featurever} Source Bundle |
1421 |
|
1422 |
%{java_src_rpo %{nil}} |
1423 |
|
1424 |
%description src |
1425 |
The %{compatiblename}-src sub-package contains the complete %{origin_nice} %{featurever} |
1426 |
class library source code for use by IDE indexers and debuggers. |
1427 |
%endif |
1428 |
|
1429 |
%if %{include_debug_build} |
1430 |
%package src-slowdebug |
1431 |
Summary: %{origin_nice} %{featurever} Source Bundle %{for_debug} |
1432 |
|
1433 |
%{java_src_rpo -- %{debug_suffix_unquoted}} |
1434 |
|
1435 |
%description src-slowdebug |
1436 |
The %{compatiblename}-src-slowdebug sub-package contains the complete %{origin_nice} %{featurever} |
1437 |
class library source code for use by IDE indexers and debuggers, %{for_debug}. |
1438 |
%endif |
1439 |
|
1440 |
%if %{include_fastdebug_build} |
1441 |
%package src-fastdebug |
1442 |
Summary: %{origin_nice} %{featurever} Source Bundle %{for_fastdebug} |
1443 |
Group: Development/Java |
1444 |
|
1445 |
%{java_src_rpo -- %{fastdebug_suffix_unquoted}} |
1446 |
|
1447 |
%description src-fastdebug |
1448 |
The %{compatiblename}-src-fastdebug sub-package contains the complete %{origin_nice} %{featurever} |
1449 |
class library source code for use by IDE indexers and debuggers, %{for_fastdebug}. |
1450 |
%endif |
1451 |
|
1452 |
|
1453 |
%if %{include_normal_build} |
1454 |
%package javadoc |
1455 |
Summary: %{origin_nice} %{featurever} API documentation |
1456 |
Requires: javapackages-filesystem |
1457 |
Obsoletes: javadoc-slowdebug < 1:13.0.0.33-1.rolling |
1458 |
|
1459 |
%{java_javadoc_rpo %{nil}} |
1460 |
|
1461 |
%description javadoc |
1462 |
The %{origin_nice} %{featurever} API documentation. |
1463 |
%endif |
1464 |
|
1465 |
%if %{include_normal_build} |
1466 |
%package javadoc-zip |
1467 |
Summary: %{origin_nice} %{featurever} API documentation compressed in a single archive |
1468 |
Requires: javapackages-filesystem |
1469 |
Obsoletes: javadoc-zip-slowdebug < 1:13.0.0.33-1.rolling |
1470 |
|
1471 |
%{java_javadoc_rpo %{nil}} |
1472 |
|
1473 |
%description javadoc-zip |
1474 |
The %{origin_nice} %{featurever} API documentation compressed in a single archive. |
1475 |
%endif |
1476 |
|
1477 |
%prep |
1478 |
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then |
1479 |
echo "include_normal_build is %{include_normal_build}" |
1480 |
else |
1481 |
echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for yes or 0 for no" |
1482 |
exit 11 |
1483 |
fi |
1484 |
if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then |
1485 |
echo "include_debug_build is %{include_debug_build}" |
1486 |
else |
1487 |
echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for yes or 0 for no" |
1488 |
exit 12 |
1489 |
fi |
1490 |
if [ %{include_fastdebug_build} -eq 0 -o %{include_fastdebug_build} -eq 1 ] ; then |
1491 |
echo "include_fastdebug_build is %{include_fastdebug_build}" |
1492 |
else |
1493 |
echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no" |
1494 |
exit 13 |
1495 |
fi |
1496 |
if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{include_fastdebug_build} -eq 0 ] ; then |
1497 |
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go." |
1498 |
exit 14 |
1499 |
fi |
1500 |
if [ %{include_normal_build} -eq 0 ] ; then |
1501 |
echo "You have disabled the normal build, but this is required to provide docs for the debug build." |
1502 |
exit 15 |
1503 |
fi |
1504 |
%setup -q -c -n %{uniquesuffix ""} -T -a 0 |
1505 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084 |
1506 |
prioritylength=`expr length %{priority}` |
1507 |
if [ $prioritylength -ne 8 ] ; then |
1508 |
echo "priority must be 8 digits in total, violated" |
1509 |
exit 14 |
1510 |
fi |
1511 |
|
1512 |
# OpenJDK patches |
1513 |
# Remove libraries that are linked by both static and dynamic builds |
1514 |
sh %{SOURCE12} %{top_level_dir_name} |
1515 |
|
1516 |
# Patch the JDK |
1517 |
pushd %{top_level_dir_name} |
1518 |
%patch1 -p1 |
1519 |
%patch2 -p1 |
1520 |
%patch3 -p1 |
1521 |
%patch4 -p1 |
1522 |
%patch6 -p1 |
1523 |
%patch7 -p1 |
1524 |
popd # openjdk |
1525 |
|
1526 |
%patch1000 |
1527 |
%patch600 |
1528 |
%patch1001 |
1529 |
%patch1002 |
1530 |
%patch1004 |
1531 |
%patch1007 |
1532 |
|
1533 |
# Extract systemtap tapsets |
1534 |
%if %{with_systemtap} |
1535 |
tar --strip-components=1 -x -I xz -f %{SOURCE8} |
1536 |
%if %{include_debug_build} |
1537 |
cp -r tapset tapset%{debug_suffix} |
1538 |
%endif |
1539 |
%if %{include_fastdebug_build} |
1540 |
cp -r tapset tapset%{fastdebug_suffix} |
1541 |
%endif |
1542 |
|
1543 |
|
1544 |
for suffix in %{build_loop} ; do |
1545 |
for file in "tapset"$suffix/*.in; do |
1546 |
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"` |
1547 |
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1 |
1548 |
# TODO find out which architectures other than i686 have a client vm |
1549 |
%ifarch %{ix86} |
1550 |
sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.1 > $OUTPUT_FILE |
1551 |
%else |
1552 |
sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.1 > $OUTPUT_FILE |
1553 |
%endif |
1554 |
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE |
1555 |
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE |
1556 |
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE |
1557 |
done |
1558 |
done |
1559 |
# systemtap tapsets ends |
1560 |
%endif |
1561 |
|
1562 |
# Prepare desktop files |
1563 |
for suffix in %{build_loop} ; do |
1564 |
for file in %{SOURCE9}; do |
1565 |
FILE=`basename $file | sed -e s:\.in$::g` |
1566 |
EXT="${FILE##*.}" |
1567 |
NAME="${FILE%.*}" |
1568 |
OUTPUT_FILE=$NAME$suffix.$EXT |
1569 |
sed -e "s:@JAVA_HOME@:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE |
1570 |
sed -i -e "s:@JRE_HOME@:%{jrebindir -- $suffix}:g" $OUTPUT_FILE |
1571 |
sed -i -e "s:@ARCH@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE |
1572 |
sed -i -e "s:@JAVA_MAJOR_VERSION@:%{featurever}:g" $OUTPUT_FILE |
1573 |
sed -i -e "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE |
1574 |
done |
1575 |
done |
1576 |
|
1577 |
# Setup nss.cfg |
1578 |
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg |
1579 |
|
1580 |
# Setup nss.fips.cfg |
1581 |
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE15} > nss.fips.cfg |
1582 |
sed -i -e "s:@NSS_SECMOD@:/etc/pki/nssdb:g" nss.fips.cfg |
1583 |
|
1584 |
%build |
1585 |
# How many CPU's do we have? |
1586 |
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :) |
1587 |
export NUM_PROC=${NUM_PROC:-1} |
1588 |
%if 0%{?_smp_ncpus_max} |
1589 |
# Honor %%_smp_ncpus_max |
1590 |
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max} |
1591 |
%endif |
1592 |
|
1593 |
%ifarch s390x sparc64 alpha %{power64} %{aarch64} |
1594 |
export ARCH_DATA_MODEL=64 |
1595 |
%endif |
1596 |
%ifarch alpha |
1597 |
export CFLAGS="$CFLAGS -mieee" |
1598 |
%endif |
1599 |
|
1600 |
# We use ourcppflags because the OpenJDK build seems to |
1601 |
# pass EXTRA_CFLAGS to the HotSpot C++ compiler... |
1602 |
# Explicitly set the C++ standard as the default has changed on GCC >= 6 |
1603 |
EXTRA_CFLAGS="%ourcppflags" |
1604 |
EXTRA_CPP_FLAGS="%ourcppflags" |
1605 |
|
1606 |
%ifarch %{power64} ppc |
1607 |
# fix rpmlint warnings |
1608 |
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing" |
1609 |
%endif |
1610 |
export EXTRA_CFLAGS |
1611 |
|
1612 |
for suffix in %{build_loop} ; do |
1613 |
if [ "x$suffix" = "x" ] ; then |
1614 |
debugbuild=release |
1615 |
else |
1616 |
# change --something to something |
1617 |
debugbuild=`echo $suffix | sed "s/-//g"` |
1618 |
fi |
1619 |
|
1620 |
for loop in %{main_suffix} %{staticlibs_loop} ; do |
1621 |
|
1622 |
if test "x${loop}" = "x%{main_suffix}" ; then |
1623 |
# Copy the source tree so we can remove all in-tree libraries |
1624 |
cp -a %{top_level_dir_name} %{top_level_dir_name_backup} |
1625 |
# Remove all libraries that are linked |
1626 |
sh %{SOURCE12} %{top_level_dir_name} full |
1627 |
# Variable used by configure and hs_err hook on build failures |
1628 |
link_opt="system" |
1629 |
# Debug builds don't need same targets as release for |
1630 |
# build speed-up |
1631 |
maketargets="%{release_targets}" |
1632 |
if echo $debugbuild | grep -q "debug" ; then |
1633 |
maketargets="%{debug_targets}" |
1634 |
fi |
1635 |
else |
1636 |
# Variable used by configure and hs_err hook on build failures |
1637 |
link_opt="bundled" |
1638 |
# Static library cycle only builds the static libraries |
1639 |
maketargets="%{static_libs_target}" |
1640 |
fi |
1641 |
|
1642 |
top_dir_abs_src_path=$(pwd)/%{top_level_dir_name} |
1643 |
top_dir_abs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}${loop}} |
1644 |
# The OpenJDK version file includes the current |
1645 |
# upstream version information. For some reason, |
1646 |
# configure does not automatically use the |
1647 |
# default pre-version supplied there (despite |
1648 |
# what the file claims), so we pass it manually |
1649 |
# to configure |
1650 |
VERSION_FILE=${top_dir_abs_src_path}/make/autoconf/version-numbers |
1651 |
if [ -f ${VERSION_FILE} ] ; then |
1652 |
EA_DESIGNATOR=$(grep '^DEFAULT_PROMOTED_VERSION_PRE' ${VERSION_FILE} | cut -d '=' -f 2) |
1653 |
else |
1654 |
echo "Could not find OpenJDK version file."; |
1655 |
exit 16 |
1656 |
fi |
1657 |
if [ "x${EA_DESIGNATOR}" != "x%{expected_ea_designator}" ] ; then |
1658 |
echo "Spec file is configured for a %{build_type} build, but upstream version-pre setting is ${EA_DESIGNATOR}"; |
1659 |
exit 17 |
1660 |
fi |
1661 |
|
1662 |
mkdir -p ${top_dir_abs_build_path} |
1663 |
pushd ${top_dir_abs_build_path} |
1664 |
|
1665 |
bash ${top_dir_abs_src_path}/configure \ |
1666 |
%ifnarch %{jit_arches} |
1667 |
--with-jvm-variants=zero \ |
1668 |
%endif |
1669 |
%ifarch %{ppc64le} |
1670 |
--with-jobs=1 \ |
1671 |
%endif |
1672 |
--with-version-build=%{buildver} \ |
1673 |
--with-version-pre="${EA_DESIGNATOR}" \ |
1674 |
--with-version-opt=%{lts_designator} \ |
1675 |
--with-vendor-version-string="%{vendor_version_string}" \ |
1676 |
--with-vendor-name="%_vendor" \ |
1677 |
--with-vendor-url="https://www.mageia.org/" \ |
1678 |
--with-vendor-bug-url="%{bugs}" \ |
1679 |
--with-vendor-vm-bug-url="%{bugs}" \ |
1680 |
--with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \ |
1681 |
--with-debug-level=$debugbuild \ |
1682 |
--with-native-debug-symbols=internal \ |
1683 |
--enable-unlimited-crypto \ |
1684 |
--with-zlib=system \ |
1685 |
--with-libjpeg=${link_opt} \ |
1686 |
--with-giflib=${link_opt} \ |
1687 |
--with-libpng=${link_opt} \ |
1688 |
--with-lcms=${link_opt} \ |
1689 |
--with-harfbuzz=${link_opt} \ |
1690 |
--with-stdc++lib=dynamic \ |
1691 |
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ |
1692 |
--with-extra-cflags="$EXTRA_CFLAGS" \ |
1693 |
--with-extra-ldflags="%{ourldflags}" \ |
1694 |
--with-num-cores="$NUM_PROC" \ |
1695 |
--with-source-date="${SOURCE_DATE_EPOCH}" \ |
1696 |
--disable-javac-server \ |
1697 |
%ifarch %{zgc_arches} |
1698 |
--with-jvm-features=zgc \ |
1699 |
%endif |
1700 |
--disable-warnings-as-errors |
1701 |
|
1702 |
make \ |
1703 |
JAVAC_FLAGS=-g \ |
1704 |
LOG=trace \ |
1705 |
WARNINGS_ARE_ERRORS="-Wno-error" \ |
1706 |
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \ |
1707 |
$maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false ) |
1708 |
|
1709 |
popd >& /dev/null |
1710 |
|
1711 |
# Restore original source tree if we modified it by removing full in-tree sources |
1712 |
if [ -d %{top_level_dir_name_backup} ] ; then |
1713 |
rm -rf %{top_level_dir_name} |
1714 |
mv %{top_level_dir_name_backup} %{top_level_dir_name} |
1715 |
fi |
1716 |
|
1717 |
done # end of main / staticlibs loop |
1718 |
|
1719 |
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} |
1720 |
|
1721 |
# the build (erroneously) removes read permissions from some jars |
1722 |
# this is a regression in OpenJDK 7 (our compiler): |
1723 |
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437 |
1724 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \; |
1725 |
|
1726 |
# Build screws up permissions on binaries |
1727 |
# https://bugs.openjdk.java.net/browse/JDK-8173610 |
1728 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.so' -exec chmod +x {} \; |
1729 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage}/bin/ -exec chmod +x {} \; |
1730 |
|
1731 |
# Install nss.cfg right away as we will be using the JRE above |
1732 |
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage} |
1733 |
|
1734 |
# Install nss.cfg right away as we will be using the JRE above |
1735 |
install -m 644 nss.cfg $JAVA_HOME/conf/security/ |
1736 |
|
1737 |
# Install nss.fips.cfg: NSS configuration for global FIPS mode (crypto-policies) |
1738 |
##install -m 644 nss.fips.cfg $JAVA_HOME/conf/security/ |
1739 |
|
1740 |
# Use system-wide tzdata |
1741 |
rm $JAVA_HOME/lib/tzdb.dat |
1742 |
ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/lib/tzdb.dat |
1743 |
|
1744 |
# Create fake alt-java as a placeholder for future alt-java |
1745 |
pushd ${JAVA_HOME} |
1746 |
# add alt-java man page |
1747 |
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1 |
1748 |
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1 |
1749 |
popd |
1750 |
|
1751 |
# build cycles |
1752 |
done # end of release / debug cycle loop |
1753 |
|
1754 |
%check |
1755 |
|
1756 |
# We test debug first as it will give better diagnostics on a crash |
1757 |
for suffix in %{rev_build_loop} ; do |
1758 |
|
1759 |
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} |
1760 |
%if %{include_staticlibs} |
1761 |
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}} |
1762 |
%endif |
1763 |
|
1764 |
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage} |
1765 |
|
1766 |
#check Shenandoah is enabled |
1767 |
%if %{use_shenandoah_hotspot} |
1768 |
$JAVA_HOME//bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version |
1769 |
%endif |
1770 |
|
1771 |
# Check unlimited policy has been used |
1772 |
$JAVA_HOME/bin/javac -d . %{SOURCE13} |
1773 |
$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel |
1774 |
|
1775 |
# Check ECC is working |
1776 |
$JAVA_HOME/bin/javac -d . %{SOURCE14} |
1777 |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") |
1778 |
|
1779 |
# Check system crypto (policy) can be disabled |
1780 |
$JAVA_HOME/bin/javac -d . %{SOURCE17} |
1781 |
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE17})|sed "s|\.java||") || echo "crypto policy are now not honored i jdk15" |
1782 |
|
1783 |
# Check java launcher has no SSB mitigation |
1784 |
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi |
1785 |
|
1786 |
# Check alt-java launcher has SSB mitigation on supported architectures |
1787 |
%ifarch %{ssbd_arches} |
1788 |
nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation |
1789 |
%else |
1790 |
if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi |
1791 |
%endif |
1792 |
|
1793 |
%if %{include_staticlibs} |
1794 |
# Check debug symbols in static libraries (smoke test) |
1795 |
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image} |
1796 |
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c |
1797 |
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c |
1798 |
%endif |
1799 |
|
1800 |
# Check debug symbols are present and can identify code |
1801 |
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib |
1802 |
do |
1803 |
if [ -f "$lib" ] ; then |
1804 |
echo "Testing $lib for debug symbols" |
1805 |
# All these tests rely on RPM failing the build if the exit code of any set |
1806 |
# of piped commands is non-zero. |
1807 |
|
1808 |
# Test for .debug_* sections in the shared object. This is the main test |
1809 |
# Stripped objects will not contain these |
1810 |
eu-readelf -S "$lib" | grep "] .debug_" |
1811 |
test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2 |
1812 |
|
1813 |
# Test FILE symbols. These will most likely be removed by anything that |
1814 |
# manipulates symbol tables because it's generally useless. So a nice test |
1815 |
# that nothing has messed with symbols |
1816 |
old_IFS="$IFS" |
1817 |
IFS=$'\n' |
1818 |
for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT") |
1819 |
do |
1820 |
# We expect to see .cpp files, except for architectures like aarch64 and |
1821 |
# s390 where we expect .o and .oS files |
1822 |
echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$" |
1823 |
done |
1824 |
IFS="$old_IFS" |
1825 |
|
1826 |
# If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking |
1827 |
if [ "`basename $lib`" = "libjvm.so" ]; then |
1828 |
eu-readelf -s "$lib" | \ |
1829 |
grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$" |
1830 |
fi |
1831 |
|
1832 |
# Test that there are no .gnu_debuglink sections pointing to another |
1833 |
# debuginfo file. There shouldn't be any debuginfo files, so the link makes |
1834 |
# no sense either |
1835 |
eu-readelf -S "$lib" | grep 'gnu' |
1836 |
if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then |
1837 |
echo "bad .gnu_debuglink section." |
1838 |
eu-readelf -x .gnu_debuglink "$lib" |
1839 |
false |
1840 |
fi |
1841 |
fi |
1842 |
done |
1843 |
|
1844 |
# Make sure gdb can do a backtrace based on line numbers on libjvm.so |
1845 |
# javaCalls.cpp:58 should map to: |
1846 |
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 |
1847 |
# Using line number 1 might cause build problems. See: |
1848 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664 |
1849 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767 |
1850 |
gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out |
1851 |
handle SIGSEGV pass nostop noprint |
1852 |
handle SIGILL pass nostop noprint |
1853 |
set breakpoint pending on |
1854 |
break javaCalls.cpp:1 |
1855 |
commands 1 |
1856 |
backtrace |
1857 |
quit |
1858 |
end |
1859 |
run -version |
1860 |
EOF |
1861 |
|
1862 |
# This fails on s390x for some reason. Disable for now. See: |
1863 |
# https://koji.fedoraproject.org/koji/taskinfo?taskID=41499227 |
1864 |
%ifnarch s390x |
1865 |
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out |
1866 |
%endif |
1867 |
|
1868 |
# Check src.zip has all sources. See RHBZ#1130490 |
1869 |
jar -tf $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe' |
1870 |
|
1871 |
# Check class files include useful debugging information |
1872 |
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from" |
1873 |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable |
1874 |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable |
1875 |
|
1876 |
# Check generated class files include useful debugging information |
1877 |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from" |
1878 |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable |
1879 |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable |
1880 |
|
1881 |
# build cycles check |
1882 |
done |
1883 |
|
1884 |
%install |
1885 |
STRIP_KEEP_SYMTAB=libjvm* |
1886 |
|
1887 |
for suffix in %{build_loop} ; do |
1888 |
|
1889 |
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} |
1890 |
%if %{include_staticlibs} |
1891 |
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}} |
1892 |
%endif |
1893 |
jdk_image=${top_dir_abs_main_build_path}/images/%{jdkimage} |
1894 |
|
1895 |
# Install the jdk |
1896 |
mkdir -p $RPM_BUILD_ROOT%{_jvmdir} |
1897 |
cp -a ${jdk_image} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix} |
1898 |
|
1899 |
pushd ${jdk_image} |
1900 |
|
1901 |
%if %{with_systemtap} |
1902 |
# Install systemtap support files |
1903 |
install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset |
1904 |
# note, that uniquesuffix is in BUILD dir in this case |
1905 |
cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/ |
1906 |
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/ |
1907 |
tapsetFiles=`ls *.stp` |
1908 |
popd |
1909 |
install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir} |
1910 |
for name in $tapsetFiles ; do |
1911 |
targetName=`echo $name | sed "s/.stp/$suffix.stp/"` |
1912 |
ln -sf %{_jvmdir}/%{sdkdir -- $suffix}/tapset/$name $RPM_BUILD_ROOT%{tapsetdir}/$targetName |
1913 |
done |
1914 |
%endif |
1915 |
|
1916 |
# Remove empty cacerts database |
1917 |
rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security/cacerts |
1918 |
# Install cacerts symlink needed by some apps which hard-code the path |
1919 |
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security |
1920 |
ln -sf /etc/pki/java/cacerts . |
1921 |
popd |
1922 |
|
1923 |
# Install version-ed symlinks |
1924 |
pushd $RPM_BUILD_ROOT%{_jvmdir} |
1925 |
ln -sf %{sdkdir -- $suffix} %{jrelnk -- $suffix} |
1926 |
popd |
1927 |
|
1928 |
# Install man pages |
1929 |
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1 |
1930 |
for manpage in man/man1/* |
1931 |
do |
1932 |
# Convert man pages to UTF8 encoding |
1933 |
iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp |
1934 |
mv -f $manpage.tmp $manpage |
1935 |
install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \ |
1936 |
$manpage .1)-%{uniquesuffix -- $suffix}.1 |
1937 |
done |
1938 |
# Remove man pages from jdk image |
1939 |
rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man |
1940 |
|
1941 |
popd |
1942 |
# Install static libs artefacts |
1943 |
%if %{include_staticlibs} |
1944 |
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc |
1945 |
cp -a ${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}/lib/*.a \ |
1946 |
$RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc |
1947 |
%endif |
1948 |
|
1949 |
if ! echo $suffix | grep -q "debug" ; then |
1950 |
# Install Javadoc documentation |
1951 |
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} |
1952 |
cp -a ${top_dir_abs_main_build_path}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix} |
1953 |
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip |
1954 |
cp -a ${top_dir_abs_main_build_path}/bundles/${built_doc_archive} \ |
1955 |
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/ |
1956 |
fi |
1957 |
|
1958 |
# Install release notes |
1959 |
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix} |
1960 |
install -d -m 755 ${commondocdir} |
1961 |
cp -a %{SOURCE10} ${commondocdir} |
1962 |
|
1963 |
# Install icons and menu entries |
1964 |
for s in 16 24 32 48 ; do |
1965 |
install -D -p -m 644 \ |
1966 |
%{top_level_dir_name}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \ |
1967 |
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png |
1968 |
done |
1969 |
|
1970 |
# Install desktop files |
1971 |
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps} |
1972 |
for e in jconsole$suffix ; do |
1973 |
desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \ |
1974 |
--dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop |
1975 |
done |
1976 |
|
1977 |
# Install /etc/.java/.systemPrefs/ directory |
1978 |
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821 |
1979 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs |
1980 |
|
1981 |
# copy samples next to demos; samples are mostly js files |
1982 |
cp -r %{top_level_dir_name}/src/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ |
1983 |
|
1984 |
|
1985 |
# moving config files to /etc |
1986 |
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix} |
1987 |
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib |
1988 |
mv $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/conf/ $RPM_BUILD_ROOT/%{etcjavadir -- $suffix} |
1989 |
mv $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib/security $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib |
1990 |
pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix} |
1991 |
ln -s %{etcjavadir -- $suffix}/conf ./conf |
1992 |
popd |
1993 |
pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib |
1994 |
ln -s %{etcjavadir -- $suffix}/lib/security ./security |
1995 |
popd |
1996 |
# end moving files to /etc |
1997 |
|
1998 |
# stabilize permissions |
1999 |
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "*.so" -exec chmod 755 {} \; ; |
2000 |
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -type d -exec chmod 755 {} \; ; |
2001 |
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/legal -type f -exec chmod 644 {} \; ; |
2002 |
|
2003 |
# end, dual install |
2004 |
done |
2005 |
|
2006 |
%if %{include_normal_build} |
2007 |
# intentionally only for non-debug |
2008 |
%pretrans headless -p <lua> |
2009 |
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue |
2010 |
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre |
2011 |
-- if copy-jdk-configs is in transaction, it installs in pretrans to temp |
2012 |
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction and so is |
2013 |
-- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends |
2014 |
-- whether copy-jdk-configs is installed or not. If so, then configs are copied |
2015 |
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all |
2016 |
local posix = require "posix" |
2017 |
|
2018 |
if (os.getenv("debug") == "true") then |
2019 |
debug = true; |
2020 |
print("cjc: in spec debug is on") |
2021 |
else |
2022 |
debug = false; |
2023 |
end |
2024 |
|
2025 |
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua" |
2026 |
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua" |
2027 |
|
2028 |
local stat1 = posix.stat(SOURCE1, "type"); |
2029 |
local stat2 = posix.stat(SOURCE2, "type"); |
2030 |
|
2031 |
if (stat1 ~= nil) then |
2032 |
if (debug) then |
2033 |
print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.") |
2034 |
end; |
2035 |
package.path = package.path .. ";" .. SOURCE1 |
2036 |
else |
2037 |
if (stat2 ~= nil) then |
2038 |
if (debug) then |
2039 |
print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.") |
2040 |
end; |
2041 |
package.path = package.path .. ";" .. SOURCE2 |
2042 |
else |
2043 |
if (debug) then |
2044 |
print(SOURCE1 .." does NOT exists") |
2045 |
print(SOURCE2 .." does NOT exists") |
2046 |
print("No config files will be copied") |
2047 |
end |
2048 |
return |
2049 |
end |
2050 |
end |
2051 |
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" |
2052 |
cjc = require "copy_jdk_configs.lua" |
2053 |
args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"} |
2054 |
cjc.mainProgram(args) |
2055 |
|
2056 |
%post |
2057 |
%{post_script %{nil}} |
2058 |
|
2059 |
%post headless |
2060 |
%{post_headless %{nil}} |
2061 |
|
2062 |
%postun |
2063 |
%{postun_script %{nil}} |
2064 |
|
2065 |
%postun headless |
2066 |
%{postun_headless %{nil}} |
2067 |
|
2068 |
%posttrans |
2069 |
%{posttrans_script %{nil}} |
2070 |
|
2071 |
%post devel |
2072 |
%{post_devel %{nil}} |
2073 |
|
2074 |
%postun devel |
2075 |
%{postun_devel %{nil}} |
2076 |
|
2077 |
%posttrans devel |
2078 |
%{posttrans_devel %{nil}} |
2079 |
|
2080 |
%post javadoc |
2081 |
%{post_javadoc %{nil}} |
2082 |
|
2083 |
%postun javadoc |
2084 |
%{postun_javadoc %{nil}} |
2085 |
|
2086 |
%post javadoc-zip |
2087 |
%{post_javadoc_zip %{nil}} |
2088 |
|
2089 |
%postun javadoc-zip |
2090 |
%{postun_javadoc_zip %{nil}} |
2091 |
%endif |
2092 |
|
2093 |
%if %{include_debug_build} |
2094 |
%post slowdebug |
2095 |
%{post_script -- %{debug_suffix_unquoted}} |
2096 |
|
2097 |
%post headless-slowdebug |
2098 |
%{post_headless -- %{debug_suffix_unquoted}} |
2099 |
|
2100 |
%postun slowdebug |
2101 |
%{postun_script -- %{debug_suffix_unquoted}} |
2102 |
|
2103 |
%postun headless-slowdebug |
2104 |
%{postun_headless -- %{debug_suffix_unquoted}} |
2105 |
|
2106 |
%posttrans slowdebug |
2107 |
%{posttrans_script -- %{debug_suffix_unquoted}} |
2108 |
|
2109 |
%post devel-slowdebug |
2110 |
%{post_devel -- %{debug_suffix_unquoted}} |
2111 |
|
2112 |
%postun devel-slowdebug |
2113 |
%{postun_devel -- %{debug_suffix_unquoted}} |
2114 |
|
2115 |
%posttrans devel-slowdebug |
2116 |
%{posttrans_devel -- %{debug_suffix_unquoted}} |
2117 |
%endif |
2118 |
|
2119 |
%if %{include_fastdebug_build} |
2120 |
%post fastdebug |
2121 |
%{post_script -- %{fastdebug_suffix_unquoted}} |
2122 |
|
2123 |
%post headless-fastdebug |
2124 |
%{post_headless -- %{fastdebug_suffix_unquoted}} |
2125 |
|
2126 |
%postun fastdebug |
2127 |
%{postun_script -- %{fastdebug_suffix_unquoted}} |
2128 |
|
2129 |
%postun headless-fastdebug |
2130 |
%{postun_headless -- %{fastdebug_suffix_unquoted}} |
2131 |
|
2132 |
%posttrans fastdebug |
2133 |
%{posttrans_script -- %{fastdebug_suffix_unquoted}} |
2134 |
|
2135 |
%post devel-fastdebug |
2136 |
%{post_devel -- %{fastdebug_suffix_unquoted}} |
2137 |
|
2138 |
%postun devel-fastdebug |
2139 |
%{postun_devel -- %{fastdebug_suffix_unquoted}} |
2140 |
|
2141 |
%posttrans devel-fastdebug |
2142 |
%{posttrans_devel -- %{fastdebug_suffix_unquoted}} |
2143 |
|
2144 |
%endif |
2145 |
|
2146 |
%if %{include_normal_build} |
2147 |
%files |
2148 |
# main package builds always |
2149 |
%{files_jre %{nil}} |
2150 |
%else |
2151 |
%files |
2152 |
# placeholder |
2153 |
%endif |
2154 |
|
2155 |
|
2156 |
%if %{include_normal_build} |
2157 |
%files headless |
2158 |
# important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue |
2159 |
# all config/noreplace files (and more) have to be declared in pretrans. See pretrans |
2160 |
%{files_jre_headless %{nil}} |
2161 |
|
2162 |
%files devel |
2163 |
%{files_devel %{nil}} |
2164 |
|
2165 |
%if %{include_staticlibs} |
2166 |
%files static-libs |
2167 |
%{files_static_libs %{nil}} |
2168 |
%endif |
2169 |
|
2170 |
%files jmods |
2171 |
%{files_jmods %{nil}} |
2172 |
|
2173 |
%files demo |
2174 |
%{files_demo %{nil}} |
2175 |
|
2176 |
%files src |
2177 |
%{files_src %{nil}} |
2178 |
|
2179 |
%files javadoc |
2180 |
%{files_javadoc %{nil}} |
2181 |
|
2182 |
# This puts a huge documentation file in /usr/share |
2183 |
# It is now architecture-dependent, as eg. AOT and Graal are now x86_64 only |
2184 |
# same for debug variant |
2185 |
%files javadoc-zip |
2186 |
%{files_javadoc_zip %{nil}} |
2187 |
%endif |
2188 |
|
2189 |
%if %{include_debug_build} |
2190 |
%files slowdebug |
2191 |
%{files_jre -- %{debug_suffix_unquoted}} |
2192 |
|
2193 |
%files headless-slowdebug |
2194 |
%{files_jre_headless -- %{debug_suffix_unquoted}} |
2195 |
|
2196 |
%files devel-slowdebug |
2197 |
%{files_devel -- %{debug_suffix_unquoted}} |
2198 |
|
2199 |
%if %{include_staticlibs} |
2200 |
%files static-libs-slowdebug |
2201 |
%{files_static_libs -- %{debug_suffix_unquoted}} |
2202 |
%endif |
2203 |
|
2204 |
%files jmods-slowdebug |
2205 |
%{files_jmods -- %{debug_suffix_unquoted}} |
2206 |
|
2207 |
%files demo-slowdebug |
2208 |
%{files_demo -- %{debug_suffix_unquoted}} |
2209 |
|
2210 |
%files src-slowdebug |
2211 |
%{files_src -- %{debug_suffix_unquoted}} |
2212 |
%endif |
2213 |
|
2214 |
%if %{include_fastdebug_build} |
2215 |
%files fastdebug |
2216 |
%{files_jre -- %{fastdebug_suffix_unquoted}} |
2217 |
|
2218 |
%files headless-fastdebug |
2219 |
%{files_jre_headless -- %{fastdebug_suffix_unquoted}} |
2220 |
|
2221 |
%files devel-fastdebug |
2222 |
%{files_devel -- %{fastdebug_suffix_unquoted}} |
2223 |
|
2224 |
%if %{include_staticlibs} |
2225 |
%files static-libs-fastdebug |
2226 |
%{files_static_libs -- %{fastdebug_suffix_unquoted}} |
2227 |
%endif |
2228 |
|
2229 |
%files jmods-fastdebug |
2230 |
%{files_jmods -- %{fastdebug_suffix_unquoted}} |
2231 |
|
2232 |
%files demo-fastdebug |
2233 |
%{files_demo -- %{fastdebug_suffix_unquoted}} |
2234 |
|
2235 |
%files src-fastdebug |
2236 |
%{files_src -- %{fastdebug_suffix_unquoted}} |
2237 |
|
2238 |
%endif |
2239 |
|