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