diff --git a/SPECS/java-1.8.0-openjdk.spec b/SPECS/java-1.8.0-openjdk.spec index 24ca7fe..927f576 100644 --- a/SPECS/java-1.8.0-openjdk.spec +++ b/SPECS/java-1.8.0-openjdk.spec @@ -1,5 +1,43 @@ -# If debug is 1, OpenJDK is built with all debug info present. -%global debug 0 +# note, parametrised macros are order-senisitve (unlike not-parametrized) even with normal macros +# also necessary when passing it as parameter other macros. If not macro, then it is considered as switch +%global debug_suffix_unquoted -debug +# quoted one for shell operations +%global debug_suffix "%{debug_suffix_unquoted}" +%global normal_suffix "" + +#if you wont only debug build, but providing java, build only normal build, but set normalbuild_parameter +%global debugbuild_parameter slowdebug +%global normalbuild_parameter release +%global debug_warning This package have full debug on. Install only in need, and remove asap. +%global debug_on with full debug on +%global for_debug for packages with debug on + +# by default we build normal build always. +%global include_normal_build 1 +%if %{include_normal_build} +%global build_loop1 %{normal_suffix} +%else +%global build_loop1 %{nil} +%endif + +# by default we build debug build during main build only on intel arches +%ifarch %{ix86} x86_64 +%global include_debug_build 1 +%else +%global include_debug_build 0 +%endif + +%if %{include_debug_build} +%global build_loop2 %{debug_suffix} +%else +%global build_loop2 %{nil} +%endif + +# if you disable both builds, then build fails +%global build_loop %{build_loop1} %{build_loop2} +# note, that order normal_suffix debug_suffix, in case of both enabled, +# is expected in one single case at the end of build + %global aarch64 aarch64 arm64 armv8 # sometimes we need to distinguish big and little endian PPC64 @@ -61,13 +99,7 @@ %global archinstall %{_arch} %endif -%if %{debug} -%global debugbuild slowdebug -%else -%global debugbuild release -%endif -%global buildoutputdir openjdk/build/jdk8.build %ifarch %{jit_arches} %global with_systemtap 1 @@ -97,23 +129,28 @@ %global aarch64_buildver b17 %global aarch64_changesetid aarch64-jdk8u%{aarch64_updatever}-%{aarch64_buildver} # priority must be 7 digits in total -%global priority 00000%{updatever} +%global priority 18000%{updatever} %global javaver 1.8.0 -# Standard JPackage directories and symbolic links. -%global sdkdir %{uniquesuffix} -%global jrelnk jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch} - -%global jredir %{sdkdir}/jre -%global sdkbindir %{_jvmdir}/%{sdkdir}/bin -%global jrebindir %{_jvmdir}/%{jredir}/bin -%global jvmjardir %{_jvmjardir}/%{uniquesuffix} - +# parametrized macros are order-sensitive %global fullversion %{name}-%{version}-%{release} - -%global uniquesuffix %{fullversion}.%{_arch} +#images stub +%global j2sdkimage j2sdk-image +# output dir stub +%global buildoutputdir() %{expand:openjdk/build/jdk8.build%1} #we can copy the javadoc to not arched dir, or made it not noarch -%global uniquejavadocdir %{fullversion} +%global uniquejavadocdir() %{expand:%{fullversion}%1} +#main id and dir of this jdk +%global uniquesuffix() %{expand:%{fullversion}.%{_arch}%1} + +# Standard JPackage directories and symbolic links. +%global sdkdir() %{expand:%{uniquesuffix %%1}} +%global jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%1} + +%global jredir() %{expand:%{sdkdir %%1}/jre} +%global sdkbindir() %{expand:%{_jvmdir}/%{sdkdir %%1}/bin} +%global jrebindir() %{expand:%{_jvmdir}/%{jredir %%1}/bin} +%global jvmjardir() %{expand:%{_jvmjardir}/%{uniquesuffix %%1}} %if %{with_systemtap} # Where to install systemtap tapset (links) @@ -128,12 +165,513 @@ %global tapsetdir %{tapsetroot}/tapset/%{_build_cpu} %endif +# not-duplicated scriplets for normal/debug packages +%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%global post_script() %{expand: +update-desktop-database %{_datadir}/applications &> /dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +exit 0 +} + + +%global post_headless() %{expand: +# FIXME: identical binaries are copied, not linked. This needs to be +# fixed upstream. +# The pretrans lua scriptlet prevents an unmodified java.security +# from being replaced via an update. It gets created as +# java.security.rpmnew instead. This invalidates the patch of +# JDK-8061210 of the January 2015 CPU or JDK-8043201 of the +# July 2015 CPU. We fix this via a post scriptlet which runs on updates. +if [ "$1" -gt 1 ]; then + javasecurity="%{_jvmdir}/%{uniquesuffix}/jre/lib/security/java.security" + sum=$(md5sum "${javasecurity}" | cut -d' ' -f1) + # This is the md5sum of an unmodified java.security file + if [ "${sum}" = '1690ac33955594f71dc952c9e83fd396' -o \\ + "${sum}" = 'b138695d0c0ea947e64a21a627d973ba' -o \\ + "${sum}" = 'd17958676bdb9f9d941c8a59655311fb' -o \\ + "${sum}" = '5463aef7dbf0bbcfe79e0336a7f92701' -o \\ + "${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' ]; then + if [ -f "${javasecurity}.rpmnew" ]; then + mv -f "${javasecurity}.rpmnew" "${javasecurity}" + fi + fi +fi + +%ifarch %{jit_arches} +# MetaspaceShared::generate_vtable_methods not implemented for PPC JIT +%ifnarch %{power64} +#see https://bugzilla.redhat.com/show_bug.cgi?id=513605 +%{jrebindir %%1}/java -Xshare:dump >/dev/null 2>/dev/null +%endif +%endif + +ext=.gz +alternatives \\ + --install %{_bindir}/java java %{jrebindir %%1}/java %{priority} \\ + --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir %%1} \\ + --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk %%1} \\ + --slave %{_bindir}/jjs jjs %{jrebindir %%1}/jjs \\ + --slave %{_bindir}/keytool keytool %{jrebindir %%1}/keytool \\ + --slave %{_bindir}/orbd orbd %{jrebindir %%1}/orbd \\ + --slave %{_bindir}/pack200 pack200 %{jrebindir %%1}/pack200 \\ + --slave %{_bindir}/rmid rmid %{jrebindir %%1}/rmid \\ + --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir %%1}/rmiregistry \\ + --slave %{_bindir}/servertool servertool %{jrebindir %%1}/servertool \\ + --slave %{_bindir}/tnameserv tnameserv %{jrebindir %%1}/tnameserv \\ + --slave %{_bindir}/unpack200 unpack200 %{jrebindir %%1}/unpack200 \\ + --slave %{_mandir}/man1/java.1$ext java.1$ext \\ + %{_mandir}/man1/java-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\ + %{_mandir}/man1/jjs-%{uniquesuffix %%1}.1$ext \\ + --slave %{_bindir}/policytool policytool %{jrebindir %%1}/policytool \\ + --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\ + %{_mandir}/man1/keytool-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\ + %{_mandir}/man1/orbd-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\ + %{_mandir}/man1/pack200-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\ + %{_mandir}/man1/rmid-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\ + %{_mandir}/man1/rmiregistry-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \\ + %{_mandir}/man1/servertool-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\ + %{_mandir}/man1/tnameserv-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\ + %{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1$ext + +for X in %{origin} %{javaver} ; do + alternatives \\ + --install %{_jvmdir}/jre-"$X" \\ + jre_"$X" %{_jvmdir}/%{jredir %%1} %{priority} \\ + --slave %{_jvmjardir}/jre-"$X" \\ + jre_"$X"_exports %{_jvmdir}/%{jredir %%1} +done + +update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1} %{priority} \\ +--slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir %%1} + +update-desktop-database %{_datadir}/applications &> /dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +exit 0 +} + +%global postun_script() %{expand: +update-desktop-database %{_datadir}/applications &> /dev/null || : +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + %{update_desktop_icons} +fi +exit 0 +} + + +%global postun_headless() %{expand: + alternatives --remove java %{jrebindir %%1}/java + alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir %%1} + alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir %%1} + alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1} +} + +%global posttrans_script() %{expand: +%{update_desktop_icons} +} + +%global post_devel() %{expand: +ext=.gz +alternatives \\ + --install %{_bindir}/javac javac %{sdkbindir %%1}/javac %{priority} \\ + --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir %%1} \\ + --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir %%1} \\ + --slave %{_bindir}/appletviewer appletviewer %{sdkbindir %%1}/appletviewer \\ + --slave %{_bindir}/extcheck extcheck %{sdkbindir %%1}/extcheck \\ + --slave %{_bindir}/idlj idlj %{sdkbindir %%1}/idlj \\ + --slave %{_bindir}/jar jar %{sdkbindir %%1}/jar \\ + --slave %{_bindir}/jarsigner jarsigner %{sdkbindir %%1}/jarsigner \\ + --slave %{_bindir}/javadoc javadoc %{sdkbindir %%1}/javadoc \\ + --slave %{_bindir}/javah javah %{sdkbindir %%1}/javah \\ + --slave %{_bindir}/javap javap %{sdkbindir %%1}/javap \\ + --slave %{_bindir}/jcmd jcmd %{sdkbindir %%1}/jcmd \\ + --slave %{_bindir}/jconsole jconsole %{sdkbindir %%1}/jconsole \\ + --slave %{_bindir}/jdb jdb %{sdkbindir %%1}/jdb \\ + --slave %{_bindir}/jdeps jdeps %{sdkbindir %%1}/jdeps \\ + --slave %{_bindir}/jhat jhat %{sdkbindir %%1}/jhat \\ + --slave %{_bindir}/jinfo jinfo %{sdkbindir %%1}/jinfo \\ + --slave %{_bindir}/jmap jmap %{sdkbindir %%1}/jmap \\ + --slave %{_bindir}/jps jps %{sdkbindir %%1}/jps \\ + --slave %{_bindir}/jrunscript jrunscript %{sdkbindir %%1}/jrunscript \\ + --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir %%1}/jsadebugd \\ + --slave %{_bindir}/jstack jstack %{sdkbindir %%1}/jstack \\ + --slave %{_bindir}/jstat jstat %{sdkbindir %%1}/jstat \\ + --slave %{_bindir}/jstatd jstatd %{sdkbindir %%1}/jstatd \\ + --slave %{_bindir}/native2ascii native2ascii %{sdkbindir %%1}/native2ascii \\ + --slave %{_bindir}/rmic rmic %{sdkbindir %%1}/rmic \\ + --slave %{_bindir}/schemagen schemagen %{sdkbindir %%1}/schemagen \\ + --slave %{_bindir}/serialver serialver %{sdkbindir %%1}/serialver \\ + --slave %{_bindir}/wsgen wsgen %{sdkbindir %%1}/wsgen \\ + --slave %{_bindir}/wsimport wsimport %{sdkbindir %%1}/wsimport \\ + --slave %{_bindir}/xjc xjc %{sdkbindir %%1}/xjc \\ + --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \\ + %{_mandir}/man1/appletviewer-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \\ + %{_mandir}/man1/extcheck-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \\ + %{_mandir}/man1/idlj-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\ + %{_mandir}/man1/jar-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\ + %{_mandir}/man1/jarsigner-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\ + %{_mandir}/man1/javac-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\ + %{_mandir}/man1/javadoc-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/javah.1$ext javah.1$ext \\ + %{_mandir}/man1/javah-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\ + %{_mandir}/man1/javap-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\ + %{_mandir}/man1/jcmd-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\ + %{_mandir}/man1/jconsole-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\ + %{_mandir}/man1/jdb-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\ + %{_mandir}/man1/jdeps-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \\ + %{_mandir}/man1/jhat-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\ + %{_mandir}/man1/jinfo-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\ + %{_mandir}/man1/jmap-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\ + %{_mandir}/man1/jps-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\ + %{_mandir}/man1/jrunscript-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \\ + %{_mandir}/man1/jsadebugd-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\ + %{_mandir}/man1/jstack-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\ + %{_mandir}/man1/jstat-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\ + %{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\ + %{_mandir}/man1/native2ascii-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\ + %{_mandir}/man1/policytool-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\ + %{_mandir}/man1/rmic-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\ + %{_mandir}/man1/schemagen-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\ + %{_mandir}/man1/serialver-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \\ + %{_mandir}/man1/wsgen-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \\ + %{_mandir}/man1/wsimport-%{uniquesuffix %%1}.1$ext \\ + --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \\ + %{_mandir}/man1/xjc-%{uniquesuffix %%1}.1$ext + +for X in %{origin} %{javaver} ; do + alternatives \\ + --install %{_jvmdir}/java-"$X" \\ + java_sdk_"$X" %{_jvmdir}/%{sdkdir %%1} %{priority} \\ + --slave %{_jvmjardir}/java-"$X" \\ + java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir %%1} +done + +update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1} %{priority} \\ +--slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir %%1} + +update-desktop-database %{_datadir}/applications &> /dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +exit 0 +} + +%global postun_devel() %{expand: + alternatives --remove javac %{sdkbindir %%1}/javac + alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir %%1} + alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir %%1} + alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1} + +update-desktop-database %{_datadir}/applications &> /dev/null || : + +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + %{update_desktop_icons} +fi +exit 0 +} + +%global posttrans_devel() %{expand: +%{update_desktop_icons} +} + +%global post_javadoc() %{expand: +alternatives \\ + --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir %%1}/api \\ + %{priority} +exit 0 +} + +%global postun_javadoc() %{expand: + alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir %%1}/api +exit 0 +} + +%global files_jre() %{expand: +%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png +%{_datadir}/applications/*policytool%1.desktop +} + + +%global files_jre_headless() %{expand: +%defattr(-,root,root,-) +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/jre/ASSEMBLY_EXCEPTION +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/jre/LICENSE +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/jre/THIRD_PARTY_README +%dir %{_jvmdir}/%{sdkdir %%1} +%{_jvmdir}/%{jrelnk %%1} +%{_jvmjardir}/%{jrelnk %%1} +%{_jvmprivdir}/* +%{jvmjardir %%1} +%dir %{_jvmdir}/%{jredir %%1}/lib/security +%{_jvmdir}/%{jredir %%1}/lib/security/cacerts +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/US_export_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/local_policy.jar +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/java.policy +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/java.security +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/blacklisted.certs +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/logging.properties +%{_mandir}/man1/java-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jjs-%{uniquesuffix %%1}.1* +%{_mandir}/man1/keytool-%{uniquesuffix %%1}.1* +%{_mandir}/man1/orbd-%{uniquesuffix %%1}.1* +%{_mandir}/man1/pack200-%{uniquesuffix %%1}.1* +%{_mandir}/man1/rmid-%{uniquesuffix %%1}.1* +%{_mandir}/man1/rmiregistry-%{uniquesuffix %%1}.1* +%{_mandir}/man1/servertool-%{uniquesuffix %%1}.1* +%{_mandir}/man1/tnameserv-%{uniquesuffix %%1}.1* +%{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1* +%config(noreplace) %{_jvmdir}/%{jredir %%1}/lib/security/nss.cfg +# removed {_jvmdir}/{jredir}/lib/audio/ +# see soundfont in install +%ifarch %{jit_arches} +%ifnarch %{power64} +%attr(664, root, root) %ghost %{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/server/classes.jsa +%attr(664, root, root) %ghost %{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/client/classes.jsa +%endif +%endif +%{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/server/ +%{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/client/ +} + +%global files_devel() %{expand: +%defattr(-,root,root,-) +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/ASSEMBLY_EXCEPTION +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/LICENSE +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/THIRD_PARTY_README +%dir %{_jvmdir}/%{sdkdir %%1}/bin +%dir %{_jvmdir}/%{sdkdir %%1}/include +%dir %{_jvmdir}/%{sdkdir %%1}/lib +%{_jvmdir}/%{sdkdir %%1}/bin/* +%{_jvmdir}/%{sdkdir %%1}/include/* +%{_jvmdir}/%{sdkdir %%1}/lib/* +%{_jvmjardir}/%{sdkdir %%1} +%{_datadir}/applications/*jconsole%1.desktop +%{_mandir}/man1/appletviewer-%{uniquesuffix %%1}.1* +%{_mandir}/man1/extcheck-%{uniquesuffix %%1}.1* +%{_mandir}/man1/idlj-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jar-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jarsigner-%{uniquesuffix %%1}.1* +%{_mandir}/man1/javac-%{uniquesuffix %%1}.1* +%{_mandir}/man1/javadoc-%{uniquesuffix %%1}.1* +%{_mandir}/man1/javah-%{uniquesuffix %%1}.1* +%{_mandir}/man1/javap-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jconsole-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jcmd-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jdb-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jdeps-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jhat-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jinfo-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jmap-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jps-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jrunscript-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jsadebugd-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jstack-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jstat-%{uniquesuffix %%1}.1* +%{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1* +%{_mandir}/man1/native2ascii-%{uniquesuffix %%1}.1* +%{_mandir}/man1/policytool-%{uniquesuffix %%1}.1* +%{_mandir}/man1/rmic-%{uniquesuffix %%1}.1* +%{_mandir}/man1/schemagen-%{uniquesuffix %%1}.1* +%{_mandir}/man1/serialver-%{uniquesuffix %%1}.1* +%{_mandir}/man1/wsgen-%{uniquesuffix %%1}.1* +%{_mandir}/man1/wsimport-%{uniquesuffix %%1}.1* +%{_mandir}/man1/xjc-%{uniquesuffix %%1}.1* +%if %{with_systemtap} +%dir %{tapsetroot} +%dir %{tapsetdir} +%{tapsetdir}/*%{version}-%{release}.%{_arch}%1.stp +%dir %{_jvmdir}/%{sdkdir %%1}/tapset +%{_jvmdir}/%{sdkdir %%1}/tapset/*.stp +%endif +} + +%global files_demo() %{expand: +%defattr(-,root,root,-) +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/jre/LICENSE +} + +%global files_src() %{expand: +%defattr(-,root,root,-) +%doc README.src +%{_jvmdir}/%{sdkdir %%1}/src.zip +} + +%global files_javadoc() %{expand: +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{uniquejavadocdir %%1} +%doc %{buildoutputdir %%1}/images/%{j2sdkimage}/jre/LICENSE +} + +%global files_accessibility() %{expand: +%{_jvmdir}/%{jredir %%1}/lib/%{archinstall}/libatk-wrapper.so +%{_jvmdir}/%{jredir %%1}/lib/ext/java-atk-wrapper.jar +%{_jvmdir}/%{jredir %%1}/lib/accessibility.properties +} + +# not-duplicated requires/provides/obsolate for normal/debug packages +%global java_rpo() %{expand: +Requires: fontconfig +Requires: xorg-x11-fonts-Type1 + +# Requires rest of java +Requires: %{name}-headless%1 = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} + + +# Standard JPackage base provides. +Provides: jre-%{javaver}-%{origin}%1 = %{epoch}:%{version}-%{release} +Provides: jre-%{origin}%1 = %{epoch}:%{version}-%{release} +Provides: jre-%{javaver}%1 = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}%1 = %{epoch}:%{version}-%{release} +Provides: jre = %{javaver}%1 +Provides: java-%{origin}%1 = %{epoch}:%{version}-%{release} +Provides: java%1 = %{epoch}:%{javaver} +# Standard JPackage extensions provides. +Provides: java-fonts%1 = %{epoch}:%{version} + +#Obsoletes: java-1.7.0-openjdk%1 +Obsoletes: java-1.5.0-gcj%1 +Obsoletes: sinjdoc +} + +%global java_headless_rpo() %{expand: +# Require /etc/pki/java/cacerts. +Requires: ca-certificates +# Require jpackage-utils for ownership of /usr/lib/jvm/ +Requires: jpackage-utils +# Require zoneinfo data provided by tzdata-java subpackage. +Requires: tzdata-java >= 2015d +# libsctp.so.1 is being `dlopen`ed on demand +Requires: lksctp-tools +# Post requires alternatives to install tool alternatives. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall tool alternatives. +Requires(postun): %{_sbindir}/alternatives + +# Standard JPackage base provides. +Provides: jre-%{javaver}-%{origin}-headless%1 = %{epoch}:%{version}-%{release} +Provides: jre-%{origin}-headless%1 = %{epoch}:%{version}-%{release} +Provides: jre-%{javaver}-headless%1 = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-headless%1 = %{epoch}:%{version}-%{release} +Provides: jre-headless%1 = %{epoch}:%{javaver} +Provides: java-%{origin}-headless%1 = %{epoch}:%{version}-%{release} +Provides: java-headless%1 = %{epoch}:%{javaver} +# Standard JPackage extensions provides. +Provides: jndi%1 = %{epoch}:%{version} +Provides: jndi-ldap%1 = %{epoch}:%{version} +Provides: jndi-cos%1 = %{epoch}:%{version} +Provides: jndi-rmi%1 = %{epoch}:%{version} +Provides: jndi-dns%1 = %{epoch}:%{version} +Provides: jaas%1 = %{epoch}:%{version} +Provides: jsse%1 = %{epoch}:%{version} +Provides: jce%1 = %{epoch}:%{version} +Provides: jdbc-stdext%1 = 4.1 +Provides: java-sasl%1 = %{epoch}:%{version} + +#Obsoletes: java-1.7.0-openjdk-headless%1 +} + +%global java_devel_rpo() %{expand: +# Require base package. +Requires: %{name}%1 = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} +# Post requires alternatives to install tool alternatives. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall tool alternatives. +Requires(postun): %{_sbindir}/alternatives + +# Standard JPackage devel provides. +#Provides: java-sdk-%{javaver}-%{origin}%1 = %{epoch}:%{version} +#Provides: java-sdk-%{javaver}%1 = %{epoch}:%{version} +#Provides: java-sdk-%{origin}%1 = %{epoch}:%{version} +#Provides: java-sdk%1 = %{epoch}:%{javaver} +#Provides: java-%{javaver}-devel%1 = %{epoch}:%{version} +#Provides: java-devel-%{origin}%1 = %{epoch}:%{version} +#Provides: java-devel%1 = %{epoch}:%{javaver} + +#Obsoletes: java-1.7.0-openjdk-devel%1 +#Obsoletes: java-1.5.0-gcj-devel%1 +} + + +%global java_demo_rpo() %{expand: +Requires: %{name}%1 = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} + +#Obsoletes: java-1.7.0-openjdk-demo%1 +} + +%global java_javadoc_rpo() %{expand: +OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} +# Post requires alternatives to install javadoc alternative. +Requires(post): %{_sbindir}/alternatives +# Postun requires alternatives to uninstall javadoc alternative. +Requires(postun): %{_sbindir}/alternatives + +# Standard JPackage javadoc provides. +Provides: java-javadoc%1 = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-javadoc%1 = %{epoch}:%{version}-%{release} + +#Obsoletes: java-1.7.0-openjdk-javadoc%1 + +} + +%global java_src_rpo() %{expand: +Requires: %{name}-headless%1 = %{epoch}:%{version}-%{release} + +#Obsoletes: java-1.7.0-openjdk-src%1 +} + +%global java_accessibility_rpo() %{expand: +Requires: java-atk-wrapper +Requires: %{name}%1 = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release} + +#Obsoletes: java-1.7.0-openjdk-accessibility%1 +} + # Prevent brp-java-repack-jars from being run. %global __jar_repack 0 Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 2.%{buildver}%{?dist} +Release: 3.%{buildver}%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -259,11 +797,12 @@ BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel #BuildRequires: redhat-lsb BuildRequires: zip -BuildRequires: java-1.7.0-openjdk-devel +BuildRequires: java-1.8.0-openjdk-devel # Zero-assembler build requirement. %ifnarch %{jit_arches} BuildRequires: libffi-devel %endif +BuildRequires: tzdata-java >= 2015d # cacerts build requirement. BuildRequires: openssl @@ -276,134 +815,147 @@ BuildRequires: prelink BuildRequires: systemtap-sdt-devel %endif -Requires: fontconfig -Requires: xorg-x11-fonts-Type1 -# Requires rest of java -Requires: %{name}-headless = %{epoch}:%{version}-%{release} -OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} +# this is built always, also during debug-only build +# when it is built in debug-only, then this package is just placeholder +%{java_rpo %{nil}} +%description +The OpenJDK runtime environment. -# Standard JPackage base provides. -Provides: jre-%{javaver}-%{origin} = %{epoch}:%{version}-%{release} -Provides: jre-%{origin} = %{epoch}:%{version}-%{release} -Provides: jre-%{javaver} = %{epoch}:%{version}-%{release} -Provides: java-%{javaver} = %{epoch}:%{version}-%{release} -Provides: jre = %{javaver} -Provides: java-%{origin} = %{epoch}:%{version}-%{release} -Provides: java = %{epoch}:%{javaver} -# Standard JPackage extensions provides. -Provides: java-fonts = %{epoch}:%{version} +%if %{include_debug_build} +%package debug +Summary: OpenJDK Runtime Environment %{debug_on} +Group: Development/Languages -%description +%{java_rpo %{debug_suffix_unquoted}} +%description debug The OpenJDK runtime environment. +%{debug_warning} +%endif +%if %{include_normal_build} %package headless Summary: OpenJDK Runtime Environment Group: Development/Languages -# Require /etc/pki/java/cacerts. -Requires: ca-certificates -# Require jpackage-utils for ownership of /usr/lib/jvm/ -Requires: jpackage-utils -# Require zoneinfo data provided by tzdata-java subpackage. -Requires: tzdata-java -# Post requires alternatives to install tool alternatives. -Requires(post): %{_sbindir}/alternatives -# Postun requires alternatives to uninstall tool alternatives. -Requires(postun): %{_sbindir}/alternatives - -# Standard JPackage base provides. -Provides: jre-%{javaver}-%{origin}-headless = %{epoch}:%{version}-%{release} -Provides: jre-%{origin}-headless = %{epoch}:%{version}-%{release} -Provides: jre-%{javaver}-headless = %{epoch}:%{version}-%{release} -Provides: java-%{javaver}-headless = %{epoch}:%{version}-%{release} -Provides: jre-headless = %{epoch}:%{javaver} -Provides: java-%{origin}-headless = %{epoch}:%{version}-%{release} -Provides: java-headless = %{epoch}:%{javaver} -# Standard JPackage extensions provides. -Provides: jndi = %{epoch}:%{version} -Provides: jndi-ldap = %{epoch}:%{version} -Provides: jndi-cos = %{epoch}:%{version} -Provides: jndi-rmi = %{epoch}:%{version} -Provides: jndi-dns = %{epoch}:%{version} -Provides: jaas = %{epoch}:%{version} -Provides: jsse = %{epoch}:%{version} -Provides: jce = %{epoch}:%{version} -Provides: jdbc-stdext = 4.1 -Provides: java-sasl = %{epoch}:%{version} +%{java_headless_rpo %{nil}} %description headless The OpenJDK runtime environment without audio and video support. +%endif + +%if %{include_debug_build} +%package headless-debug +Summary: OpenJDK Runtime Environment %{debug_on} +Group: Development/Languages + +%{java_headless_rpo %{debug_suffix_unquoted}} + +%description headless-debug +The OpenJDK runtime environment without audio and video support. +%{debug_warning} +%endif +%if %{include_normal_build} %package devel Summary: OpenJDK Development Environment Group: Development/Tools -# Require base package. -Requires: %{name} = %{epoch}:%{version}-%{release} -OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} -# Post requires alternatives to install tool alternatives. -Requires(post): %{_sbindir}/alternatives -# Postun requires alternatives to uninstall tool alternatives. -Requires(postun): %{_sbindir}/alternatives +%{java_devel_rpo %{nil}} -# Standard JPackage devel provides. -#Provides: java-sdk-%{javaver}-%{origin} = %{epoch}:%{version} -#Provides: java-sdk-%{javaver} = %{epoch}:%{version} -#Provides: java-sdk-%{origin} = %{epoch}:%{version} -#Provides: java-sdk = %{epoch}:%{javaver} -#Provides: java-%{javaver}-devel = %{epoch}:%{version} -#Provides: java-devel-%{origin} = %{epoch}:%{version} -#Provides: java-devel = %{epoch}:%{javaver} +%description devel +The OpenJDK development tools. +%endif +%if %{include_debug_build} +%package devel-debug +Summary: OpenJDK Development Environment %{debug_on} +Group: Development/Tools -%description devel +%{java_devel_rpo %{debug_suffix_unquoted}} + +%description devel-debug The OpenJDK development tools. +%{debug_warning} +%endif +%if %{include_normal_build} %package demo Summary: OpenJDK Demos Group: Development/Languages -Requires: %{name} = %{epoch}:%{version}-%{release} -OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} +%{java_demo_rpo %{nil}} %description demo The OpenJDK demos. +%endif + +%if %{include_debug_build} +%package demo-debug +Summary: OpenJDK Demos %{debug_on} +Group: Development/Languages + +%{java_demo_rpo %{debug_suffix_unquoted}} + +%description demo-debug +The OpenJDK demos. +%{debug_warning} +%endif +%if %{include_normal_build} %package src Summary: OpenJDK Source Bundle Group: Development/Languages -Requires: %{name} = %{epoch}:%{version}-%{release} +%{java_src_rpo %{nil}} %description src The OpenJDK source bundle. +%endif + +%if %{include_debug_build} +%package src-debug +Summary: OpenJDK Source Bundle %{for_debug} +Group: Development/Languages + +%{java_src_rpo %{debug_suffix_unquoted}} + +%description src-debug +The OpenJDK source bundle %{for_debug}. +%endif +%if %{include_normal_build} %package javadoc Summary: OpenJDK API Documentation Group: Documentation Requires: jpackage-utils BuildArch: noarch -OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} -# Post requires alternatives to install javadoc alternative. -Requires(post): %{_sbindir}/alternatives -# Postun requires alternatives to uninstall javadoc alternative. -Requires(postun): %{_sbindir}/alternatives - -# Standard JPackage javadoc provides. -Provides: java-javadoc = %{epoch}:%{version}-%{release} -Provides: java-%{javaver}-javadoc = %{epoch}:%{version}-%{release} +%{java_javadoc_rpo %{nil}} %description javadoc The OpenJDK API documentation. +%endif + +%if %{include_debug_build} +%package javadoc-debug +Summary: OpenJDK API Documentation %{for_debug} +Group: Documentation +Requires: jpackage-utils +BuildArch: noarch +%{java_javadoc_rpo %{debug_suffix_unquoted}} + +%description javadoc-debug +The OpenJDK API documentation %{for_debug}. +%endif + +%if %{include_normal_build} %package accessibility Summary: OpenJDK accessibility connector -Requires: java-atk-wrapper -Requires: %{name} = %{epoch}:%{version}-%{release} -OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} + +%{java_accessibility_rpo %{nil}} %description accessibility Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows @@ -414,10 +966,36 @@ Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still being tuned to be working with accessibility features. There are known issues with accessibility on, so please do not install this package unless you really need to. +%endif + +%if %{include_debug_build} +%package accessibility-debug +Summary: OpenJDK accessibility connector %{for_debug} + +%{java_accessibility_rpo %{debug_suffix_unquoted}} +%description accessibility-debug +See normal java-%{version}-openjdk-accessibility description. +%endif %prep -%setup -q -c -n %{uniquesuffix} -T -a %{openjdk_sourceid} +if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then + echo "include_normal_build is %{include_normal_build}" +else + echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no" + exit 11 +fi +if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then + echo "include_debug_build is %{include_debug_build}" +else + echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no" + exit 12 +fi +if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then + echo "you have disabled both include_debug_build and include_debug_build. no go." + exit 13 +fi +%setup -q -c -n %{uniquesuffix ""} -T -a %{openjdk_sourceid} # https://bugzilla.redhat.com/show_bug.cgi?id=1189084 prioritylength=`expr length %{priority}` if [ $prioritylength -ne 7 ] ; then @@ -491,30 +1069,39 @@ sh %{SOURCE12} %if %{with_systemtap} tar xzf %{SOURCE8} %patch300 +%if %{include_debug_build} +cp -r tapset tapset%{debug_suffix} +%endif -for file in tapset/*.in; do +for suffix in %{build_loop} ; do + for file in "tapset"$suffix/*.in; do OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g` - sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1 + sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1 # TODO find out which architectures other than i686 have a client vm %ifarch %{ix86} - sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE + sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE %else sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE %endif - sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir}:g $OUTPUT_FILE + sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir $suffix}:g $OUTPUT_FILE sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE - + done done # systemtap tapsets ends %endif # Prepare desktop files +for suffix in %{build_loop} ; do for file in %{SOURCE9} %{SOURCE10} ; do - OUTPUT_FILE=`basename $file | sed -e s:\.in$::g` - sed -e s:#JAVA_HOME#:%{sdkbindir}:g $file > $OUTPUT_FILE - sed -i -e s:#JRE_HOME#:%{jrebindir}:g $OUTPUT_FILE - sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}:g $OUTPUT_FILE + FILE=`basename $file | sed -e s:\.in$::g` + EXT="${FILE##*.}" + NAME="${FILE%.*}" + OUTPUT_FILE=$NAME$suffix.$EXT + sed -e s:#JAVA_HOME#:%{sdkbindir $suffix}:g $file > $OUTPUT_FILE + sed -i -e s:#JRE_HOME#:%{jrebindir $suffix}:g $OUTPUT_FILE + sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE +done done %build @@ -544,9 +1131,15 @@ export EXTRA_CFLAGS bash ./autogen.sh ) -mkdir -p %{buildoutputdir} +for suffix in %{build_loop} ; do +if [ "$suffix" = "%{debug_suffix}" ] ; then +debugbuild=%{debugbuild_parameter} +else +debugbuild=%{normalbuild_parameter} +fi -pushd %{buildoutputdir} +mkdir -p %{buildoutputdir $suffix} +pushd %{buildoutputdir $suffix} bash ../../configure \ %ifnarch %{jit_arches} @@ -559,8 +1152,8 @@ bash ../../configure \ %ifarch %{aarch64} --with-user-release-suffix="aarch64-%{aarch64_updatever}-%{aarch64_buildver}-%{aarch64_changesetid}" \ %endif - --with-boot-jdk=/usr/lib/jvm/java-1.7.0-openjdk \ - --with-debug-level=%{debugbuild} \ + --with-boot-jdk=/usr/lib/jvm/java-openjdk \ + --with-debug-level=$debugbuild \ --enable-unlimited-crypto \ --with-zlib=system \ --with-libjpeg=system \ @@ -591,24 +1184,25 @@ make \ # the build (erroneously) removes read permissions from some jars # this is a regression in OpenJDK 7 (our compiler): # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437 -find images/j2sdk-image -iname '*.jar' -exec chmod ugo+r {} \; -chmod ugo+r images/j2sdk-image/lib/ct.sym +find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \; +chmod ugo+r images/%{j2sdkimage}/lib/ct.sym # remove redundant *diz and *debuginfo files -find images/j2sdk-image -iname '*.diz' -exec rm {} \; -find images/j2sdk-image -iname '*.debuginfo' -exec rm {} \; +find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \; +find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \; popd >& /dev/null # Install nss.cfg right away as we will be using the JRE above -export JAVA_HOME=$(pwd)/%{buildoutputdir}/images/j2sdk-image +export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{j2sdkimage} # Install nss.cfg right away as we will be using the JRE above install -m 644 %{SOURCE11} $JAVA_HOME/jre/lib/security/ -# Copy tz.properties -echo "sun.zoneinfo.dir=/usr/share/javazi" >> $JAVA_HOME/jre/lib/tz.properties +# Use system-wide tzdata +rm $JAVA_HOME/jre/lib/tzdb.dat +ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat # Check unlimited policy has been used $JAVA_HOME/bin/javac -d . %{SOURCE13} @@ -629,51 +1223,73 @@ if [ -f "$ZERO_JVM" ] ; then fi # Check src.zip has all sources. See RHBZ#1130490 -jar -tf $JAVA_HOME/src.zip | grep Unsafe +jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe' + +# Check class files include useful debugging information +$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from" +$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable +$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable + +# Check generated class files include useful debugging information +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from" +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable + +#build cycles +done %install rm -rf $RPM_BUILD_ROOT STRIP_KEEP_SYMTAB=libjvm* +for suffix in %{build_loop} ; do + # there used to be and link to soundfont # will be replaced by fix of http://mail.openjdk.java.net/pipermail/sound-dev/2015-October/000352.html # once done, and have to go to fedora first. Removed from rhel7 for now -pushd %{buildoutputdir}/images/j2sdk-image +pushd %{buildoutputdir $suffix}/images/%{j2sdkimage} #install jsa directories so we can owe them -mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/ -mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ +mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix}/lib/%{archinstall}/server/ +mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix}/lib/%{archinstall}/client/ # Install main files. - install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} - cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} - install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} - cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} + install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix} + cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix} + install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix} + cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix} %if %{with_systemtap} # Install systemtap support files. - install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset - cp -a $RPM_BUILD_DIR/%{uniquesuffix}/tapset/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset/ + install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset + # note, that uniquesuffix is in BUILD dir in this case + cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset/ + pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset/ + tapsetFiles=`ls *.stp` + popd install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir} pushd $RPM_BUILD_ROOT%{tapsetdir} - RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir}) - ln -sf $RELATIVE/*.stp . + RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir $suffix}/tapset %{tapsetdir}) + for name in $tapsetFiles ; do + targetName=`echo $name | sed "s/.stp/$suffix.stp/"` + ln -sf $RELATIVE/$name $targetName + done popd %endif # Install cacerts symlink. - rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/cacerts - pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security + rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix}/lib/security/cacerts + pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix}/lib/security RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \ - %{_jvmdir}/%{jredir}/lib/security) + %{_jvmdir}/%{jredir $suffix}/lib/security) ln -sf $RELATIVE/cacerts . popd # Install extension symlinks. - install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir} - pushd $RPM_BUILD_ROOT%{jvmjardir} - RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir}/lib %{jvmjardir}) + install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir $suffix} + pushd $RPM_BUILD_ROOT%{jvmjardir $suffix} + RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir $suffix}/lib %{jvmjardir $suffix}) ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar ln -sf $RELATIVE/jce.jar jce-%{version}.jar ln -sf $RELATIVE/rt.jar jndi-%{version}.jar @@ -695,15 +1311,15 @@ mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ popd # Install JCE policy symlinks. - install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix}/jce/vanilla + install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix $suffix}/jce/vanilla # Install versioned symlinks. pushd $RPM_BUILD_ROOT%{_jvmdir} - ln -sf %{jredir} %{jrelnk} + ln -sf %{jredir $suffix} %{jrelnk $suffix} popd pushd $RPM_BUILD_ROOT%{_jvmjardir} - ln -sf %{sdkdir} %{jrelnk} + ln -sf %{sdkdir $suffix} %{jrelnk $suffix} popd # Remove javaws man page @@ -717,21 +1333,24 @@ mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp mv -f $manpage.tmp $manpage install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \ - $manpage .1)-%{uniquesuffix}.1 + $manpage .1)-%{uniquesuffix $suffix}.1 done # Install demos and samples. - cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix} mkdir -p sample/rmi - mv bin/java-rmi.cgi sample/rmi - cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir} + if [ ! -e sample/rmi/java-rmi.cgi ] ; then + # hack to allow --short-circuit on install + mv bin/java-rmi.cgi sample/rmi + fi + cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix} popd # Install Javadoc documentation. install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} -cp -a %{buildoutputdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir} +cp -a %{buildoutputdir $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir $suffix} # Install icons and menu entries. for s in 16 24 32 48 ; do @@ -742,8 +1361,8 @@ done # Install desktop files. install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps} -for e in jconsole policytool ; do - desktop-file-install --vendor=%{uniquesuffix} --mode=644 \ +for e in jconsole$suffix policytool$suffix ; do + desktop-file-install --vendor=%{uniquesuffix $suffix} --mode=644 \ --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop done @@ -752,26 +1371,26 @@ done mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs # Find JRE directories. -find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type d \ +find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix} -type d \ | grep -v jre/lib/security \ | sed 's|'$RPM_BUILD_ROOT'|%dir |' \ - > %{name}.files-headless + > %{name}.files-headless"$suffix" # Find JRE files. -find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type f -o -type l \ +find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir $suffix} -type f -o -type l \ | grep -v jre/lib/security \ | sed 's|'$RPM_BUILD_ROOT'||' \ - > %{name}.files.all + > %{name}.files.all"$suffix" #split %%{name}.files to %%{name}.files-headless and %%{name}.files #see https://bugzilla.redhat.com/show_bug.cgi?id=875408 NOT_HEADLESS=\ -"%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libjsoundalsa.so -%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libpulse-java.so -%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libsplashscreen.so -%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libawt_xawt.so -%{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libjawt.so -%{_jvmdir}/%{uniquesuffix}/jre/bin/policytool" +"%{_jvmdir}/%{uniquesuffix $suffix}/jre/lib/%{archinstall}/libjsoundalsa.so +%{_jvmdir}/%{uniquesuffix $suffix}/jre/lib/%{archinstall}/libpulse-java.so +%{_jvmdir}/%{uniquesuffix $suffix}/jre/lib/%{archinstall}/libsplashscreen.so +%{_jvmdir}/%{uniquesuffix $suffix}/jre/lib/%{archinstall}/libawt_xawt.so +%{_jvmdir}/%{uniquesuffix $suffix}/jre/lib/%{archinstall}/libjawt.so +%{_jvmdir}/%{uniquesuffix $suffix}/jre/bin/policytool" #filter %%{name}.files from %%{name}.files.all to %%{name}.files-headless -ALL=`cat %{name}.files.all` +ALL=`cat %{name}.files.all"$suffix"` for file in $ALL ; do INLCUDE="NO" ; for blacklist in $NOT_HEADLESS ; do @@ -783,46 +1402,46 @@ for file in $ALL ; do fi; done if [ "x$INLCUDE" = "xNO" ]; then - echo "$file" >> %{name}.files-headless + echo "$file" >> %{name}.files-headless"$suffix" else - echo "$file" >> %{name}.files + echo "$file" >> %{name}.files"$suffix" fi done # Find demo directories. -find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ - $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample -type d \ +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/sample -type d \ | sed 's|'$RPM_BUILD_ROOT'|%dir |' \ - > %{name}-demo.files + > %{name}-demo.files"$suffix" # FIXME: remove SONAME entries from demo DSOs. See # https://bugzilla.redhat.com/show_bug.cgi?id=436497 # Find non-documentation demo files. -find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ - $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \ +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/sample \ -type f -o -type l | sort \ | grep -v README \ | sed 's|'$RPM_BUILD_ROOT'||' \ - >> %{name}-demo.files + >> %{name}-demo.files"$suffix" # Find documentation demo files. -find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ - $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \ +find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/demo \ + $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/sample \ -type f -o -type l | sort \ | grep README \ | sed 's|'$RPM_BUILD_ROOT'||' \ | sed 's|^|%doc |' \ - >> %{name}-demo.files + >> %{name}-demo.files"$suffix" # intentionally after the files generation, as it goes to separate package # Create links which leads to separately installed java-atk-bridge and allow configuration # links points to java-atk-wrapper - an dependence - pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/%{archinstall} + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir $suffix}/lib/%{archinstall} ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so popd - pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/ext + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir $suffix}/lib/ext ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar popd - pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir}/lib/ + pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir $suffix}/lib/ echo "#Config file to enable java-atk-wrapper" > accessibility.properties echo "" >> accessibility.properties echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties @@ -831,13 +1450,18 @@ find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir $suffix} %{javaver} +# end, dual install +done + +%if %{include_normal_build} +# intentioanlly only for non-debug %pretrans headless -p -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue local posix = require "posix" -local currentjvm = "%{uniquesuffix}" -local jvmdir = "%{_jvmdir}" +local currentjvm = "%{uniquesuffix %{nil}}" +local jvmdir = "%{_jvmdir %{nil}}" local jvmDestdir = jvmdir local origname = "%{name}" local origjavaver = "%{javaver}" @@ -857,7 +1481,6 @@ local caredFiles = {"jre/lib/calendars.properties", "jre/lib/net.properties", "jre/lib/psfontj2d.properties", "jre/lib/sound.properties", - "jre/lib/tz.properties", "jre/lib/deployment.properties", "jre/lib/deployment.config", "jre/lib/security/US_export_policy.jar", @@ -1002,385 +1625,131 @@ for i,file in pairs(caredFiles) do end %post -update-desktop-database %{_datadir}/applications &> /dev/null || : -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -exit 0 - +%{post_script %{nil}} -# FIXME: identical binaries are copied, not linked. This needs to be -# fixed upstream. %post headless -# The pretrans lua scriptlet prevents an unmodified java.security -# from being replaced via an update. It gets created as -# java.security.rpmnew instead. This invalidates the patch of -# JDK-8061210 of the January 2015 CPU or JDk-8043201 of the -# July 2015 CPU. We fix this via a post scriptlet which runs on updates. -if [ "$1" -gt 1 ]; then - javasecurity="%{_jvmdir}/%{uniquesuffix}/jre/lib/security/java.security" - sum=$(md5sum "${javasecurity}" | cut -d' ' -f1) - # This is the md5sum of an unmodified java.security file - if [ "${sum}" = '1690ac33955594f71dc952c9e83fd396' -o \ - "${sum}" = 'b138695d0c0ea947e64a21a627d973ba' -o \ - "${sum}" = 'd17958676bdb9f9d941c8a59655311fb' -o \ - "${sum}" = '5463aef7dbf0bbcfe79e0336a7f92701' -o \ - "${sum}" = '400cc64d4dd31f36dc0cc2c701d603db' ]; then - if [ -f "${javasecurity}.rpmnew" ]; then - mv -f "${javasecurity}.rpmnew" "${javasecurity}" - fi - fi -fi - -%ifarch %{jit_arches} -%ifnarch %{ppc64} -#see https://bugzilla.redhat.com/show_bug.cgi?id=513605 -%{jrebindir}/java -Xshare:dump >/dev/null 2>/dev/null -%endif -%endif - -ext=.gz -alternatives \ - --install %{_bindir}/java java %{jrebindir}/java %{priority} \ - --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir} \ - --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk} \ - --slave %{_bindir}/jjs jjs %{jrebindir}/jjs \ - --slave %{_bindir}/keytool keytool %{jrebindir}/keytool \ - --slave %{_bindir}/orbd orbd %{jrebindir}/orbd \ - --slave %{_bindir}/pack200 pack200 %{jrebindir}/pack200 \ - --slave %{_bindir}/rmid rmid %{jrebindir}/rmid \ - --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir}/rmiregistry \ - --slave %{_bindir}/servertool servertool %{jrebindir}/servertool \ - --slave %{_bindir}/tnameserv tnameserv %{jrebindir}/tnameserv \ - --slave %{_bindir}/unpack200 unpack200 %{jrebindir}/unpack200 \ - --slave %{_mandir}/man1/java.1$ext java.1$ext \ - %{_mandir}/man1/java-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \ - %{_mandir}/man1/jjs-%{uniquesuffix}.1$ext \ - --slave %{_bindir}/policytool policytool %{jrebindir}/policytool \ - --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \ - %{_mandir}/man1/keytool-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \ - %{_mandir}/man1/orbd-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \ - %{_mandir}/man1/pack200-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \ - %{_mandir}/man1/rmid-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \ - %{_mandir}/man1/rmiregistry-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \ - %{_mandir}/man1/servertool-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \ - %{_mandir}/man1/tnameserv-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \ - %{_mandir}/man1/unpack200-%{uniquesuffix}.1$ext - -for X in %{origin} %{javaver} ; do - alternatives \ - --install %{_jvmdir}/jre-"$X" \ - jre_"$X" %{_jvmdir}/%{jredir} %{priority} \ - --slave %{_jvmjardir}/jre-"$X" \ - jre_"$X"_exports %{_jvmjardir}/%{jredir} -done - -update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \ ---slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir} - -update-desktop-database %{_datadir}/applications &> /dev/null || : - -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -exit 0 +%{post_headless %{nil}} %postun -update-desktop-database %{_datadir}/applications &> /dev/null || : - -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -exit 0 - +%{postun_script %{nil}} %postun headless - alternatives --remove java %{jrebindir}/java - alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir} - alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir} - alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk} - +%{postun_headless %{nil}} %posttrans -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%{posttrans_script %{nil}} %post devel -ext=.gz -alternatives \ - --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority} \ - --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir} \ - --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir} \ - --slave %{_bindir}/appletviewer appletviewer %{sdkbindir}/appletviewer \ - --slave %{_bindir}/extcheck extcheck %{sdkbindir}/extcheck \ - --slave %{_bindir}/idlj idlj %{sdkbindir}/idlj \ - --slave %{_bindir}/jar jar %{sdkbindir}/jar \ - --slave %{_bindir}/jarsigner jarsigner %{sdkbindir}/jarsigner \ - --slave %{_bindir}/javadoc javadoc %{sdkbindir}/javadoc \ - --slave %{_bindir}/javah javah %{sdkbindir}/javah \ - --slave %{_bindir}/javap javap %{sdkbindir}/javap \ - --slave %{_bindir}/jcmd jcmd %{sdkbindir}/jcmd \ - --slave %{_bindir}/jconsole jconsole %{sdkbindir}/jconsole \ - --slave %{_bindir}/jdb jdb %{sdkbindir}/jdb \ - --slave %{_bindir}/jdeps jdeps %{sdkbindir}/jdeps \ - --slave %{_bindir}/jhat jhat %{sdkbindir}/jhat \ - --slave %{_bindir}/jinfo jinfo %{sdkbindir}/jinfo \ - --slave %{_bindir}/jmap jmap %{sdkbindir}/jmap \ - --slave %{_bindir}/jps jps %{sdkbindir}/jps \ - --slave %{_bindir}/jrunscript jrunscript %{sdkbindir}/jrunscript \ - --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir}/jsadebugd \ - --slave %{_bindir}/jstack jstack %{sdkbindir}/jstack \ - --slave %{_bindir}/jstat jstat %{sdkbindir}/jstat \ - --slave %{_bindir}/jstatd jstatd %{sdkbindir}/jstatd \ - --slave %{_bindir}/native2ascii native2ascii %{sdkbindir}/native2ascii \ - --slave %{_bindir}/rmic rmic %{sdkbindir}/rmic \ - --slave %{_bindir}/schemagen schemagen %{sdkbindir}/schemagen \ - --slave %{_bindir}/serialver serialver %{sdkbindir}/serialver \ - --slave %{_bindir}/wsgen wsgen %{sdkbindir}/wsgen \ - --slave %{_bindir}/wsimport wsimport %{sdkbindir}/wsimport \ - --slave %{_bindir}/xjc xjc %{sdkbindir}/xjc \ - --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \ - %{_mandir}/man1/appletviewer-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \ - %{_mandir}/man1/extcheck-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \ - %{_mandir}/man1/idlj-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jar.1$ext jar.1$ext \ - %{_mandir}/man1/jar-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \ - %{_mandir}/man1/jarsigner-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/javac.1$ext javac.1$ext \ - %{_mandir}/man1/javac-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \ - %{_mandir}/man1/javadoc-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/javah.1$ext javah.1$ext \ - %{_mandir}/man1/javah-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/javap.1$ext javap.1$ext \ - %{_mandir}/man1/javap-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \ - %{_mandir}/man1/jcmd-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \ - %{_mandir}/man1/jconsole-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \ - %{_mandir}/man1/jdb-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \ - %{_mandir}/man1/jdeps-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \ - %{_mandir}/man1/jhat-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \ - %{_mandir}/man1/jinfo-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \ - %{_mandir}/man1/jmap-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jps.1$ext jps.1$ext \ - %{_mandir}/man1/jps-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \ - %{_mandir}/man1/jrunscript-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \ - %{_mandir}/man1/jsadebugd-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \ - %{_mandir}/man1/jstack-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \ - %{_mandir}/man1/jstat-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \ - %{_mandir}/man1/jstatd-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \ - %{_mandir}/man1/native2ascii-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \ - %{_mandir}/man1/policytool-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \ - %{_mandir}/man1/rmic-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \ - %{_mandir}/man1/schemagen-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \ - %{_mandir}/man1/serialver-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \ - %{_mandir}/man1/wsgen-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \ - %{_mandir}/man1/wsimport-%{uniquesuffix}.1$ext \ - --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \ - %{_mandir}/man1/xjc-%{uniquesuffix}.1$ext +%{post_devel %{nil}} -for X in %{origin} %{javaver} ; do - alternatives \ - --install %{_jvmdir}/java-"$X" \ - java_sdk_"$X" %{_jvmdir}/%{sdkdir} %{priority} \ - --slave %{_jvmjardir}/java-"$X" \ - java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir} -done +%postun devel +%{postun_devel %{nil}} -update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir} %{priority} \ ---slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir} +%posttrans devel +%{posttrans_devel %{nil}} -update-desktop-database %{_datadir}/applications &> /dev/null || : -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +%post javadoc +%{post_javadoc %{nil}} -exit 0 +%postun javadoc +%{postun_javadoc %{nil}} +%endif -%postun devel - alternatives --remove javac %{sdkbindir}/javac - alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir} - alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir} - alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir} +%if %{include_debug_build} +%post debug +%{post_script %{debug_suffix_unquoted}} -update-desktop-database %{_datadir}/applications &> /dev/null || : +%post headless-debug +%{post_headless %{debug_suffix_unquoted}} -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi +%postun debug +%{postun_script %{debug_suffix_unquoted}} -exit 0 +%postun headless-debug +%{postun_headless %{debug_suffix_unquoted}} -%posttrans devel -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%posttrans debug +%{posttrans_script %{debug_suffix_unquoted}} +%post devel-debug +%{post_devel %{debug_suffix_unquoted}} -%post javadoc -alternatives \ - --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir}/api \ - %{priority} +%postun devel-debug +%{postun_devel %{debug_suffix_unquoted}} -exit 0 +%posttrans devel-debug +%{posttrans_devel %{debug_suffix_unquoted}} -%postun javadoc - alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir}/api - -exit 0 +%post javadoc-debug +%{post_javadoc %{debug_suffix_unquoted}} +%postun javadoc-debug +%{postun_javadoc %{debug_suffix_unquoted}} +%endif +%if %{include_normal_build} %files -f %{name}.files -%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png -%{_datadir}/applications/*policytool.desktop +# main package builds always +%{files_jre %{nil}} +%else +%files +# placeholder +%endif + +%if %{include_normal_build} +%files headless -f %{name}.files-headless # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue # all config/norepalce files (and more) have to be declared in pretrans. See pretrans -%files headless -f %{name}.files-headless -%defattr(-,root,root,-) -%doc %{buildoutputdir}/images/j2sdk-image/jre/ASSEMBLY_EXCEPTION -%doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE -%doc %{buildoutputdir}/images/j2sdk-image/jre/THIRD_PARTY_README -%dir %{_jvmdir}/%{sdkdir} -%{_jvmdir}/%{jrelnk} -%{_jvmjardir}/%{jrelnk} -%{_jvmprivdir}/* -%{jvmjardir} -%dir %{_jvmdir}/%{jredir}/lib/security -%{_jvmdir}/%{jredir}/lib/security/cacerts -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/local_policy.jar -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/blacklisted.certs -%config(noreplace) %{_jvmdir}/%{jredir}/lib/logging.properties -%{_mandir}/man1/java-%{uniquesuffix}.1* -%{_mandir}/man1/jjs-%{uniquesuffix}.1* -%{_mandir}/man1/keytool-%{uniquesuffix}.1* -%{_mandir}/man1/orbd-%{uniquesuffix}.1* -%{_mandir}/man1/pack200-%{uniquesuffix}.1* -%{_mandir}/man1/rmid-%{uniquesuffix}.1* -%{_mandir}/man1/rmiregistry-%{uniquesuffix}.1* -%{_mandir}/man1/servertool-%{uniquesuffix}.1* -%{_mandir}/man1/tnameserv-%{uniquesuffix}.1* -%{_mandir}/man1/unpack200-%{uniquesuffix}.1* -%config(noreplace) %{_jvmdir}/%{jredir}/lib/security/nss.cfg -# removed %%{_jvmdir}/%%{jredir}/lib/audio/ -# see soundfont in %%install -%ifarch %{jit_arches} -%ifnarch %{ppc64} -%attr(664, root, root) %ghost %{_jvmdir}/%{jredir}/lib/%{archinstall}/server/classes.jsa -%attr(664, root, root) %ghost %{_jvmdir}/%{jredir}/lib/%{archinstall}/client/classes.jsa -%endif -%endif - -%{_jvmdir}/%{jredir}/lib/%{archinstall}/server/ -%{_jvmdir}/%{jredir}/lib/%{archinstall}/client/ +%{files_jre_headless %{nil}} %files devel -%defattr(-,root,root,-) -%doc %{buildoutputdir}/images/j2sdk-image/ASSEMBLY_EXCEPTION -%doc %{buildoutputdir}/images/j2sdk-image/LICENSE -%doc %{buildoutputdir}/images/j2sdk-image/THIRD_PARTY_README -%dir %{_jvmdir}/%{sdkdir}/bin -%dir %{_jvmdir}/%{sdkdir}/include -%dir %{_jvmdir}/%{sdkdir}/lib -%if %{with_systemtap} -%dir %{_jvmdir}/%{sdkdir}/tapset -%endif -%{_jvmdir}/%{sdkdir}/bin/* -%{_jvmdir}/%{sdkdir}/include/* -%{_jvmdir}/%{sdkdir}/lib/* -%if %{with_systemtap} -%{_jvmdir}/%{sdkdir}/tapset/*.stp -%endif -%{_jvmjardir}/%{sdkdir} -%{_datadir}/applications/*jconsole.desktop -%{_mandir}/man1/appletviewer-%{uniquesuffix}.1* -%{_mandir}/man1/extcheck-%{uniquesuffix}.1* -%{_mandir}/man1/idlj-%{uniquesuffix}.1* -%{_mandir}/man1/jar-%{uniquesuffix}.1* -%{_mandir}/man1/jarsigner-%{uniquesuffix}.1* -%{_mandir}/man1/javac-%{uniquesuffix}.1* -%{_mandir}/man1/javadoc-%{uniquesuffix}.1* -%{_mandir}/man1/javah-%{uniquesuffix}.1* -%{_mandir}/man1/javap-%{uniquesuffix}.1* -%{_mandir}/man1/jconsole-%{uniquesuffix}.1* -%{_mandir}/man1/jcmd-%{uniquesuffix}.1* -%{_mandir}/man1/jdb-%{uniquesuffix}.1* -%{_mandir}/man1/jdeps-%{uniquesuffix}.1* -%{_mandir}/man1/jhat-%{uniquesuffix}.1* -%{_mandir}/man1/jinfo-%{uniquesuffix}.1* -%{_mandir}/man1/jmap-%{uniquesuffix}.1* -%{_mandir}/man1/jps-%{uniquesuffix}.1* -%{_mandir}/man1/jrunscript-%{uniquesuffix}.1* -%{_mandir}/man1/jsadebugd-%{uniquesuffix}.1* -%{_mandir}/man1/jstack-%{uniquesuffix}.1* -%{_mandir}/man1/jstat-%{uniquesuffix}.1* -%{_mandir}/man1/jstatd-%{uniquesuffix}.1* -%{_mandir}/man1/native2ascii-%{uniquesuffix}.1* -%{_mandir}/man1/policytool-%{uniquesuffix}.1* -%{_mandir}/man1/rmic-%{uniquesuffix}.1* -%{_mandir}/man1/schemagen-%{uniquesuffix}.1* -%{_mandir}/man1/serialver-%{uniquesuffix}.1* -%{_mandir}/man1/wsgen-%{uniquesuffix}.1* -%{_mandir}/man1/wsimport-%{uniquesuffix}.1* -%{_mandir}/man1/xjc-%{uniquesuffix}.1* -%if %{with_systemtap} -%{tapsetroot} -%endif +%{files_devel %{nil}} %files demo -f %{name}-demo.files -%defattr(-,root,root,-) -%doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE +%{files_demo %{nil}} %files src -%defattr(-,root,root,-) -%doc README.src -%{_jvmdir}/%{sdkdir}/src.zip +%{files_src %{nil}} %files javadoc -%defattr(-,root,root,-) -%doc %{_javadocdir}/%{uniquejavadocdir} -%doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE +%{files_javadoc %{nil}} %files accessibility -%{_jvmdir}/%{jredir}/lib/%{archinstall}/libatk-wrapper.so -%{_jvmdir}/%{jredir}/lib/ext/java-atk-wrapper.jar -%{_jvmdir}/%{jredir}/lib/accessibility.properties +%{files_accessibility %{nil}} +%endif + +%if %{include_debug_build} +%files debug -f %{name}.files-debug +%{files_jre %{debug_suffix_unquoted}} + +%files headless-debug -f %{name}.files-headless-debug +%{files_jre_headless %{debug_suffix_unquoted}} + +%files devel-debug +%{files_devel %{debug_suffix_unquoted}} + +%files demo-debug -f %{name}-demo.files-debug +%{files_demo %{debug_suffix_unquoted}} + +%files src-debug +%{files_src %{debug_suffix_unquoted}} + +%files javadoc-debug +%{files_javadoc %{debug_suffix_unquoted}} + +%files accessibility-debug +%{files_accessibility %{debug_suffix_unquoted}} +%endif %changelog -* Mon Oct 19 2015 Jiri Vanek - 1:1.8.0.65-2.b17 -- fixd dual \\ to single \ -- Resolves: rhbz#1257656 +* Mon Oct 19 2015 Jiri Vanek - 1:1.8.0.65-3.b17 +- bumped release X.el7_1 is obviously > X.el7 :-/ +- Resolves: rhbz#1257657 * Fri Oct 16 2015 Jiri Vanek - 1:1.8.0.65-1.b17 - moved to bundled lcms -- Resolves: rhbz#1257656 +- Resolves: rhbz#1257657 * Thu Oct 15 2015 Andrew Hughes - 1:1.8.0.65-0.b17 - October 2015 security update to u65b17. @@ -1388,23 +1757,27 @@ exit 0 - Update RH1191652 patch to build against current AArch64 tree. - Use appropriate source ID to avoid unpacking both tarballs on AArch64. - Add MD5 checksums for java.security from 8u51 and 8u60 RPMs. -- Resolves: rhbz#1257656 +- Resolves: rhbz#1257657 -* Wed Oct 14 2015 Jiri Vanek - 1:1.8.0.60-3.b27 +* Wed Oct 14 2015 Jiri Vanek - 1:1.8.0.60-6.b27 - removed link to soundfont. Unused in rhel7 and will be fixed upstream - Resolves: rhbz#1257653 -* Tue Sep 08 2015 Jiri Vanek - 1:1.8.0.60-2.b27 -- removed double slash forgotten when sciplet mved out of macro -- Resolves: rhbz#1260077 +* Fri Sep 04 2015 Jiri Vanek - 1:1.8.0.60-4.b27 +- priority aligned to 7digits (sync with 6.8) +- Resolves: rhbz#1255350 -* Fri Sep 04 2015 Jiri Vanek - 1:1.8.0.60-1.b27 +* Fri Aug 28 2015 Jiri Vanek - 1:1.8.0.60-2.b27 - updated to u60 -- Resolves: rhbz#1260077 +- Resolves: rhbz#1255350 + +* Thu Jul 16 2015 Jiri Vanek - 1:1.8.0.51-2.b16 +- doubled slash in md5sum test in post +- Resolves: rhbz#1235163 -* Thu Jul 02 2015 Andrew Hughes - 1:1.8.0.51-1.b16 -- Add md5sum for January 2015 java.security update so it gets updated this time. -- Resolves: rhbz#1235162 +* Fri Jul 03 2015 Andrew Hughes - 1:1.8.0.51-1.b16 +- Re-introduce handling of java.security updates, with new md5sum of Jan 2015 version. +- Resolves: rhbz#1235163 * Thu Jul 02 2015 Andrew Hughes - 1:1.8.0.51-0.b16 - July 2015 security update to u51b16. @@ -1413,16 +1786,47 @@ exit 0 - Add patches for RH issues fixed in IcedTea 2.x and/or the upcoming u60. - Use 'openjdk' as directory prefix to allow patch interchange with IcedTea. - Re-generate EC disablement patch following CPU DH changes. -- Resolves: rhbz#1235162 +- Resolves: rhbz#1235163 + +* Wed May 13 2015 Jiri Vanek - 1:1.8.0.45-37.b13 +- added build requires on tzdata +- Resolves: rhbz#1212571 + +* Wed May 13 2015 Andrew Hughes - 1:1.8.0.45-36.b13 +- Correctly fix system timezone data issue by depending on correct tzdata version. +- Remove reference to tz.properties which is no longer used. +- Resolves: rhbz#1212571 + +* Wed Apr 29 2015 Jiri Vanek - 1:1.8.0.45-35.b13 +- Make use of system timezone data for OpenJDK 8. +- moved to boot build by openjdk8 +- priority set gcj < lengthOffFour < otherJdks (RH1175457) +- misusing already fixed bug +- Resolves: rhbz#1189530 -* Fri Apr 10 2015 Jiri Vanek - 1:1.8.0.45-30.b13 +* Wed Apr 29 2015 Andrew Hughes - 1:1.8.0.45-34.b13 +- Omit jsa files from power64 file list as well, as they are never generated +- Resolves: rhbz#1202726 + +* Mon Apr 27 2015 Andrew Hughes - 1:1.8.0.45-33.b13 +- -Xshare:dump is not implemented for the PPC JIT port (both ppc64be & le) +- Resolves: rhbz#1202726 + +* Mon Apr 20 2015 Andrew Hughes - 1:1.8.0.45-32.b13 +- Use the template interpreter on ppc64le +- Resolves: rhbz#1213042 + +* Fri Apr 10 2015 Jiri Vanek - 1:1.8.0.45-31.b13 - repacked sources -- Resolves: RHBZ#1209076 +- Resolves: RHBZ#1209077 -* Wed Apr 08 2015 Andrew Hughes - 1:1.8.0.45-7.b13 -- Re-add %%{name} prefix to patches to avoid conflicts with OpenJDK 7 versions. -- Remove ppc64le test case now fix has been verified. -- Resolves: rhbz#1194378 +* Thu Apr 09 2015 Jiri Vanek - 1:1.8.0.45-30.b13 +- do not obsolete openjdk7 +- Resolves: rhbz#1210006 + +* Tue Apr 07 2015 Andrew Hughes - 1:1.8.0.45-28.b13 +- Fix filenames broken by sync +- Resolves: rhbz#1209077 * Tue Apr 07 2015 Jiri Vanek - 1:1.8.0.45-27.b13 - updated to security u45 @@ -1437,7 +1841,7 @@ exit 0 - repacked policies (source20) - removed duplicated NVR provides - added automated test for priority (length7) -- Resolves: RHBZ#1209076 +- Resolves: RHBZ#1209077 * Wed Mar 18 2015 Andrew Hughes - 1:1.8.0.31-7.b13 - Set archinstall to ppc64le on that platform.