update to 11.0.14_6 [release 11.0.14_6-1mamba;Wed Dec 08 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 00:08:49 +01:00
parent d97f87b4d4
commit 4d1381e2fc

View File

@ -1,6 +1,7 @@
%define javaver %(echo %version | cut -d. -f1)
%define updver %(echo %version | cut -d_ -f2)
%define srcver %(echo %version | tr _ +)
%define srcdirver %(echo %version | tr _ -)
%define altver %(expr 60 + %javaver)
%define altverjdk %(expr 61 + %javaver)
@ -57,15 +58,15 @@
%define _jvmdir /usr/lib/jvm
Name: java-openjdk11
Version: 11.0.10_9
Version: 11.0.14_6
Release: 1mamba
Summary: OpenJDK Java %{javaver} environment
Group: System/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://jdk.java.net/archive/
Source: https://hg.openjdk.java.net/jdk-updates/jdk%{javaver}u/archive/jdk-%{srcver}.tar.gz
URL: https://openjdk.java.net/projects/jdk-updates/
Source: https://github.com/openjdk/jdk%{javaver}u/archive/refs/tags/jdk-%{srcver}.tar.gz
Source1: freedesktop-java.desktop
Source2: freedesktop-jconsole.desktop
Source3: freedesktop-jshell.desktop
@ -81,6 +82,7 @@ BuildRequires: libalsa-devel
BuildRequires: libfreetype-devel
BuildRequires: libgcc
BuildRequires: libgif-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libjpeg-devel
BuildRequires: liblcms2-devel
BuildRequires: libpng-devel
@ -153,7 +155,6 @@ Provides: java-environment-openjdk = %{javaver}
#Provides: java-openjdk
#Obsoletes: java-openjdk
Provides: sun-java
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
OpenJDK Java %{javaver} environment.
@ -225,13 +226,11 @@ Provides: java-javadoc = %{javaver}
OpenJDK Java %{javaver} API documentation.
%prep
%setup -q -n jdk11u-jdk-%{srcver}
## Build workaround
#%ifnarch x86_64
#sed "s|-Xshare:dump|-Xshare:dump -Xmx512m|" Makefile.in
#%endif
%setup -q -n jdk%{javaver}u-jdk-%{srcdirver}
#-D -T
%build
#:<< ___EOF
#if [[ ${CARCH} = i686 ]]; then
# echo "Removing '-fno-plt' from CFLAGS and CXXFLAGS to prevent build fail with this architecture"
# _CFLAGS=${CFLAGS/-fno-plt/}
@ -252,6 +251,7 @@ bash configure \
--with-libpng=system \
--with-lcms=system \
--with-zlib=system \
--with-harfbuzz=system \
--with-jvm-features=zgc \
--enable-unlimited-crypto \
--disable-warnings-as-errors
@ -264,29 +264,40 @@ make images legacy-jre-image docs
pushd %{buildoutputdir}/images/
# Install main files
# JRE
install -d -m 755 %{buildroot}%{_jvmdir}/%{sdkdir}
cp -a jre/{bin,lib} %{buildroot}%{_jvmdir}/%{sdkdir}
find %{buildroot} -type f | grep -v "\.debuginfo$" | sed "s|%{buildroot}||" > jre.fileslist
# Non headless
> nonheadless.fileslist
for f in libawt_xawt libjawt libjsound libsplashscreen; do
grep ${f} jre.fileslist >> nonheadless.fileslist
done
# Headless
cat jre.fileslist | grep -v -x -f nonheadless.fileslist > headless.fileslist
# JDK
install -d -m 755 %{buildroot}%{_jvmdir}/%{sdkdir}
cp -a jdk/{bin,demo,include,lib} %{buildroot}%{_jvmdir}/%{sdkdir}
# JRE
install -d -m 755 %{buildroot}%{_jvmdir}/%{jredir}
cp -a jre/{bin,lib} %{buildroot}%{_jvmdir}/%{jredir}
find %{buildroot} -type f | grep -v "\.debuginfo$" | sed "s|%{buildroot}||" | grep -v -x -f jre.fileslist > jdk.fileslist
# Install cacerts symlink.
rm -f %{buildroot}%{_jvmdir}/%{jredir}/lib/security/cacerts
ln -sf %{_sysconfdir}/pki/java/cacerts %{buildroot}%{_jvmdir}/%{jredir}/lib/security
rm -f %{buildroot}%{_jvmdir}/%{sdkdir}/lib/security/cacerts
ln -sf %{_sysconfdir}/pki/java/cacerts %{buildroot}%{_jvmdir}/%{sdkdir}/lib/security
# Conf
install -d -m755 %{buildroot}%{_sysconfdir}
cp -r jdk/conf %{buildroot}%{_sysconfdir}/%{name}
ln -s %{_sysconfdir}/%{name} %{buildroot}%{_jvmdir}/%{sdkdir}/conf
ln -s %{_sysconfdir}/%{name} %{buildroot}%{_jvmdir}/%{jredir}/conf
## Install JCE policy symlinks
#install -d -m 755 %{buildroot}%{_jvmprivdir}/java-%{java_version}-openjdk/jce/vanilla
## Install versionless symlinks.
ln -sf %{jredir} %{buildroot}%{_jvmdir}/%{jrelnk}
#ln -sf %{jredir} %{buildroot}%{_jvmdir}/%{jrelnk}
# Install man pages.
install -d -m 755 %{buildroot}%{_mandir}/man1
@ -376,82 +387,50 @@ if [ $1 -eq 0 ]; then
fi
:
%postun
if [ $1 -eq 0 ]; then
for b in java javac jar jarsigner javadoc javap jconsole jdb jinfo jmap jps jrunscript jstack jstat jstatd rmic serialver keytool pack200 rmid rmiregistry unpack200; do
/usr/sbin/update-alternatives --remove $b \
%{sdkbindir}/$b
%post headless
if [ $1 -ge 1 ]; then
if ! echo ${PATH} | grep -q %{sdkbindir}; then
export PATH="$PATH:%{sdkbindir}"
fi
for b in java keytool pack200 rmid rmiregistry unpack200 ; do
[ -L /usr/bin/$b -a "`readlink /usr/bin/$b`" != "/etc/alternatives/$b" ] && rm -f /usr/bin/$b 2>/dev/null
/usr/sbin/update-alternatives --install %{_bindir}/$b $b %{sdkbindir}/$b %{altver}
done
/usr/sbin/update-alternatives --remove jdk %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jdk_%{javaver}_openjdk %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jdk_java %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jdk_openjdk %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jdk_%{javaver} %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --install %{javaprefix}/jre jre %{_jvmdir}/%{sdklnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-%{javaver} jre_%{javaver} %{_jvmdir}/%{sdklnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-%{javaver}-openjdk jre_%{javaver}_openjdk %{_jvmdir}/%{sdklnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-openjdk jre_openjdk %{_jvmdir}/%{sdklnk} %{altver}
fi
:
%post headless
if ! echo ${PATH} | grep -q %{jrebindir}; then
export PATH="$PATH:%{jrebindir}"
fi
%triggerpreun -- java-openjdk11-headless < 11.0.14_6
# remove obsoleted alternatives poiting to /jre subdir
/usr/sbin/update-alternatives --remove jre %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
for b in java keytool pack200 rmid rmiregistry unpack200 ; do
[ -L /usr/bin/$b -a "`readlink /usr/bin/$b`" != "/etc/alternatives/$b" ] &&
rm -f /usr/bin/$b 2>/dev/null
/usr/sbin/update-alternatives \
--install %{_bindir}/$b $b \
%{jrebindir}/$b %{altver}
done
for b in java keytool pack200 rmid rmiregistry unpack200 ; do
/usr/sbin/update-alternatives --remove $b %{jrebindir}/$b
done
:
/usr/sbin/update-alternatives --install %{javaprefix}/jre jre %{_jvmdir}/%{jrelnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-%{javaver} jre_%{javaver} %{_jvmdir}/%{jrelnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-%{javaver}-openjdk jre_%{javaver}_openjdk %{_jvmdir}/%{jrelnk} %{altver}
/usr/sbin/update-alternatives --install %{javaprefix}/jre-openjdk jre_openjdk %{_jvmdir}/%{jrelnk} %{altver}
# /usr/sbin/update-alternatives --install %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk} %{altver}
# /usr/sbin/update-alternatives --install %{_jvmjardir}/jre-openjdk jre_openjdk_exports %{_jvmjardir}/%{jrelnk} %{altver}
# /usr/sbin/update-alternatives --install %{_jvmjardir}/jre-%{javaver}-openjdk jre_%{javaver}_openjdk_exports %{_jvmjardir}/%{jrelnk} %{altver}
# /usr/sbin/update-alternatives --install %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk} %{altver}
%triggerpostun -- java-openjdk11-headless < 11.0.14_6
rmdir %{_jvmdir}/%{jrelnk} 2>/dev/null || true
:
%preun headless
if [ $1 -eq 0 ]; then
for b in java keytool pack200 rmid rmiregistry unpack200 ; do
[ -L /usr/bin/$b -a "`readlink /usr/bin/$b`" != "/etc/alternatives/$b" ] &&
rm -f /usr/bin/$b
/usr/sbin/update-alternatives --remove $b %{jrebindir}/$b
/usr/sbin/update-alternatives --remove $b %{sdkbindir}/$b
done
/usr/sbin/update-alternatives --remove jre %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_openjdk_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
fi
:
%postun headless
if [ $1 -eq 0 ]; then
for b in java keytool pack200 rmid rmiregistry unpack200 ; do
[ -L /usr/bin/$b -a "`readlink /usr/bin/$b`" != "/etc/alternatives/$b" ] && rm -f /usr/bin/$b
/usr/sbin/update-alternatives --remove $b %{jrebindir}/$b
done
/usr/sbin/update-alternatives --remove jre %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk %{_jvmdir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_openjdk_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk_exports %{_jvmjardir}/%{jrelnk}
# /usr/sbin/update-alternatives --remove jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
/usr/sbin/update-alternatives --remove jre %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jre_openjdk %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jre_%{javaver}_openjdk %{_jvmdir}/%{sdklnk}
/usr/sbin/update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{sdklnk}
fi
:
@ -479,35 +458,8 @@ fi
/usr/sbin/update-alternatives --install %{_javadocdir}/java javadocdir%{javaver}-openjdk %{_javadocdir}/%{sdkdir}/api %{altver}
:
%files
%files -f %{buildoutputdir}/images/jdk.fileslist
%defattr(-,root,root)
%{_jvmdir}/%{sdkdir}/bin/*
%dir %{_jvmdir}/%{sdkdir}
%{_jvmdir}/%{sdkdir}/conf
%{_jvmdir}/%{sdkdir}/man
%dir %{_jvmdir}/%{sdkdir}/include
%{_jvmdir}/%{sdkdir}/include/*.h
%dir %{_jvmdir}/%{sdkdir}/include/linux
%{_jvmdir}/%{sdkdir}/include/linux/*.h
%{_jvmdir}/%{sdkdir}/lib/ct.sym
%{_jvmdir}/%{sdkdir}/lib/jexec
%{_jvmdir}/%{sdkdir}/lib/classlist
%dir %{_jvmdir}/%{sdkdir}/lib/jfr
%{_jvmdir}/%{sdkdir}/lib/jfr/*
%dir %{_jvmdir}/%{sdkdir}/lib/jli
%{_jvmdir}/%{sdkdir}/lib/jli/*
%{_jvmdir}/%{sdkdir}/lib/jrt-fs.jar
%{_jvmdir}/%{sdkdir}/lib/jspawnhelper*
%{_jvmdir}/%{sdkdir}/lib/jvm.cfg
%{_jvmdir}/%{sdkdir}/lib/lib*.so
%{_jvmdir}/%{sdkdir}/lib/modules
%{_jvmdir}/%{sdkdir}/lib/psfont.properties.ja
%{_jvmdir}/%{sdkdir}/lib/psfontj2d.properties
%dir %{_jvmdir}/%{sdkdir}/lib/security
%{_jvmdir}/%{sdkdir}/lib/security/*
%dir %{_jvmdir}/%{sdkdir}/lib/server
%{_jvmdir}/%{sdkdir}/lib/server/*
%{_jvmdir}/%{sdkdir}/lib/tzdb.dat
%{_datadir}/applications/java-openjdk%{javaver}.desktop
%{_datadir}/applications/jconsole-openjdk%{javaver}.desktop
%{_datadir}/applications/jshell-openjdk%{javaver}.desktop
@ -531,8 +483,15 @@ fi
%{_mandir}/man1/jstatd-openjdk%{javaver}.1*
%{_mandir}/man1/rmic-openjdk%{javaver}.1*
%{_mandir}/man1/serialver-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/java-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/keytool-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/pack200-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/rmid-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/rmiregistry-openjdk%{javaver}.1*
%exclude %{_mandir}/man1/unpack200-openjdk%{javaver}.1*
%exclude %{_jvmdir}/%{sdkdir}/demo
%files headless
%files headless -f %{buildoutputdir}/images/headless.fileslist
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/logging.properties
@ -541,6 +500,7 @@ fi
%{_sysconfdir}/%{name}/management/jmxremote.password.template
%config(noreplace) %{_sysconfdir}/%{name}/management/management.properties
%config(noreplace) %{_sysconfdir}/%{name}/net.properties
%config(noreplace) %{_sysconfdir}/%{name}/sound.properties
%dir %{_sysconfdir}/%{name}/security
%config(noreplace) %{_sysconfdir}/%{name}/security/java.policy
%config(noreplace) %{_sysconfdir}/%{name}/security/java.security
@ -553,40 +513,8 @@ fi
%dir %{_sysconfdir}/%{name}/security/policy/unlimited
%{_sysconfdir}/%{name}/security/policy/unlimited/default_US_export.policy
%{_sysconfdir}/%{name}/security/policy/unlimited/default_local.policy
%{_jvmdir}/%{jrelnk}
%dir %{_jvmdir}/%{jredir}
%dir %{_jvmdir}/%{jredir}/bin
%{_jvmdir}/%{jredir}/bin/*
%{_jvmdir}/%{jredir}/conf
%dir %{_jvmdir}/%{jredir}/lib
%{_jvmdir}/%{jredir}/lib/classlist
%{_jvmdir}/%{jredir}/lib/tzdb.dat
%dir %{_jvmdir}/%{jredir}/lib/jli
%{_jvmdir}/%{jredir}/lib/jli/libjli.*
%{_jvmdir}/%{jredir}/lib/jvm.cfg
%{_jvmdir}/%{jredir}/lib/lib*.so
%exclude %{_jvmdir}/%{jredir}/lib/libawt_xawt.so
%exclude %{_jvmdir}/%{jredir}/lib/libjawt.so
%exclude %{_jvmdir}/%{jredir}/lib/libjsound.so
%{_jvmdir}/%{jredir}/lib/jexec*
%{_jvmdir}/%{jredir}/lib/psfont.properties.ja
%{_jvmdir}/%{jredir}/lib/*.properties
%{_jvmdir}/%{jredir}/lib/jrt-fs.jar
%{_jvmdir}/%{jredir}/lib/jspawnhelper*
%{_jvmdir}/%{jredir}/lib/modules
%dir %{_jvmdir}/%{jredir}/lib/jfr
%{_jvmdir}/%{jredir}/lib/jfr/*
%dir %{_jvmdir}/%{jredir}/lib/security
%{_jvmdir}/%{jredir}/lib/security/*
%ifnarch arm
%dir %{_jvmdir}/%{jredir}/lib/server
%{_jvmdir}/%{jredir}/lib/server/Xusage.txt
%{_jvmdir}/%{jredir}/lib/server/lib*.so
%endif
%ifarch arm
%dir %{_jvmdir}/%{jredir}/lib/client
%{_jvmdir}/%{jredir}/lib/client/*
%endif
%{_jvmdir}/%{sdklnk}/conf
%{_jvmdir}/%{sdklnk}/man
%{_mandir}/man1/java-openjdk%{javaver}.1*
%{_mandir}/man1/keytool-openjdk%{javaver}.1*
%{_mandir}/man1/pack200-openjdk%{javaver}.1*
@ -595,12 +523,8 @@ fi
%{_mandir}/man1/unpack200-openjdk%{javaver}.1*
%doc LICENSE ADDITIONAL_LICENSE_INFO ASSEMBLY_EXCEPTION
%files runtime
%files runtime -f %{buildoutputdir}/images/nonheadless.fileslist
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/%{name}/sound.properties
%{_jvmdir}/%{jredir}/lib/libawt_xawt.so
%{_jvmdir}/%{jredir}/lib/libjawt.so
%{_jvmdir}/%{jredir}/lib/libjsound.so
%files demo
%defattr(-,root,root)
@ -622,6 +546,9 @@ fi
%doc README
%changelog
* Wed Dec 08 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 11.0.14_6-1mamba
- update to 11.0.14_6
* Mon Jan 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 11.0.10_9-1mamba
- update to 11.0.10_9
- java-opendk11: give higher priority alternatives to binaries than jre