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