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