Sometimes life is strange. Just 4 days ago I was releasing the spec file for Java 1.6u14, and now Sun releases the new patched vm. Anyway, go grab the new jdk bin package (check for update 15) and download the spec file from here . Follow the instructions from previous post and all should be ok.
Just in case, the older spec file can be found here .
A sidenote – the behaviour here is that fixes of major version will update the base package. So 1.6u15 will just upgrade 1.6u14. If you wish something different, let me know. But this is JPackage standard.
Update – please remove previous version of packages. I am studying the update path + alternatives issues which emerged.
Updated from your previous version (u14). Everything it’s ok but I’d to manually set the java-plugin to new version using “sudo alternatives –config java-plugin” because it was still pointing to the previous version (u14)
This is a fix for correct plugin behavior when registered via updates-alternatives.
java-1.6.0-sun.spec.diff:
*** java-1.6.0-sun.spec.orig 2009-08-08 01:42:34.000000000 -0500
— java-1.6.0-sun.spec 2009-08-08 01:45:37.000000000 -0500
***************
*** 63,68 ****
— 63,70 —-
%define target_cpu i586
%define pluginbasename libjavaplugin_oji.so
%define pluginname %{_jvmdir}/%{jredir}/plugin/i386/ns7/%{pluginbasename}
+ %define pluginbasenamenew libjavaplugin_nscp.so
+ %define pluginnamenew %{_jvmdir}/%{jredir}/lib/i386/%{pluginbasenamenew}
%endif
%ifarch x86_64
%define target_cpu x64
***************
*** 70,75 ****
— 72,86 —-
%define pluginname %{_jvmdir}/%{jredir}/lib/amd64/%{pluginbasename}
%endif
+ #next lines needs tests
+ #%ifarch %{multilib_arches}
+ #%define javaplugin libjavaplugin.so.%{_arch}
+ #%else
+ %define javaplugin libjavaplugin.so
+ #%endif
+
+
+
%define cgibindir %{_var}/www/cgi-bin
# Avoid RPM 4.2+’s internal dep generator, it may produce bogus
***************
*** 82,88 ****
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
! Release: 1.0.lb
Epoch: 0
Summary: Java Runtime Environment for %{name}
License: Sun Binary Code License
— 93,99 —-
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
! Release: 1.0.lc
Epoch: 0
Summary: Java Runtime Environment for %{name}
License: Sun Binary Code License
***************
*** 596,610 ****
%post plugin
! update-alternatives –install %{_libdir}/mozilla/plugins/%{pluginbasename} java-plugin \
%{pluginname} %{priority}
%postun plugin
! if [ $1 -eq 0 ]; then
! update-alternatives –remove java-plugin %{pluginname}
fi
# We do not care if all/any of this actually succeeds
# Therefore errors are catched but messages allowed
— 607,644 —-
+ #%post plugin
+ #update-alternatives –install %{_libdir}/mozilla/plugins/%{pluginbasename} java-plugin \
+ # %{pluginname} %{priority}
+
+ #%postun plugin
+ #if [ $1 -eq 0 ]; then
+ # update-alternatives –remove java-plugin %{pluginname}
+ #fi
+
+
%post plugin
! alternatives \
! –install %{syslibdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \
%{pluginname} %{priority}
+ # new plugin option
+ alternatives \
+ –install %{syslibdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \
+ %{pluginnamenew} %{priority}
+
+ exit 0
%postun plugin
! if [ $1 -eq 0 ]
! then
! alternatives –remove %{javaplugin} \
! %{pluginname}
!
! alternatives –remove %{javaplugin} \
! %{pluginnamenew}
fi
+ exit 0
# We do not care if all/any of this actually succeeds
# Therefore errors are catched but messages allowed
***************
*** 750,756 ****
%ghost %{fontdir}/encodings.dir
%changelog
! * Thu Aug 07 2009 Luca Botti – 0:1.6.0.15-1.0.lb
– Updated to lates Sun Java Version
– Added blacklist to list of jre files
— 784,795 —-
%ghost %{fontdir}/encodings.dir
%changelog
! * Sat Aug 08 2009 Santiago Angel – 0:1.6.0.15-1.0.lc
! – Fix plugin’s alternatives registration
! – Added nscp(java new plugin) plugin option to alternatives
!
!
! * Fri Aug 07 2009 Luca Botti – 0:1.6.0.15-1.0.lb
– Updated to lates Sun Java Version
– Added blacklist to list of jre files
please forget previous entry there was an error.
This actually works !!!!
This is a fix for correct plugin behavior when registered via updates-alternatives.
java-1.6.0-sun.spec.diff:
*** java-1.6.0-sun.spec.orig 2009-08-08 01:42:34.000000000 -0500
— java-1.6.0-sun.spec 2009-08-08 03:30:10.000000000 -0500
***************
*** 63,68 ****
— 63,70 —-
%define target_cpu i586
%define pluginbasename libjavaplugin_oji.so
%define pluginname %{_jvmdir}/%{jredir}/plugin/i386/ns7/%{pluginbasename}
+ %define pluginbasenamenew libnpjp2.so
+ %define pluginnamenew %{_jvmdir}/%{jredir}/lib/i386/%{pluginbasenamenew}
%endif
%ifarch x86_64
%define target_cpu x64
***************
*** 70,75 ****
— 72,86 —-
%define pluginname %{_jvmdir}/%{jredir}/lib/amd64/%{pluginbasename}
%endif
+ #next lines needs tests
+ #%ifarch %{multilib_arches}
+ #%define javaplugin libjavaplugin.so.%{_arch}
+ #%else
+ %define javaplugin libjavaplugin.so
+ #%endif
+
+
+
%define cgibindir %{_var}/www/cgi-bin
# Avoid RPM 4.2+’s internal dep generator, it may produce bogus
***************
*** 82,88 ****
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
! Release: 1.0.lb
Epoch: 0
Summary: Java Runtime Environment for %{name}
License: Sun Binary Code License
— 93,99 —-
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
! Release: 1.0.lc
Epoch: 0
Summary: Java Runtime Environment for %{name}
License: Sun Binary Code License
***************
*** 596,610 ****
%post plugin
! update-alternatives –install %{_libdir}/mozilla/plugins/%{pluginbasename} java-plugin \
%{pluginname} %{priority}
%postun plugin
! if [ $1 -eq 0 ]; then
! update-alternatives –remove java-plugin %{pluginname}
fi
# We do not care if all/any of this actually succeeds
# Therefore errors are catched but messages allowed
— 607,644 —-
+ #%post plugin
+ #update-alternatives –install %{_libdir}/mozilla/plugins/%{pluginbasename} java-plugin \
+ # %{pluginname} %{priority}
+
+ #%postun plugin
+ #if [ $1 -eq 0 ]; then
+ # update-alternatives –remove java-plugin %{pluginname}
+ #fi
+
+
%post plugin
! update-alternatives \
! –install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \
%{pluginname} %{priority}
+ # new plugin option
+ update-alternatives \
+ –install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} \
+ %{pluginnamenew} %{priority}
+
+ exit 0
%postun plugin
! if [ $1 -eq 0 ]
! then
! update-alternatives –remove %{javaplugin} \
! %{pluginname}
!
! update-alternatives –remove %{javaplugin} \
! %{pluginnamenew}
fi
+ exit 0
# We do not care if all/any of this actually succeeds
# Therefore errors are catched but messages allowed
***************
*** 750,756 ****
%ghost %{fontdir}/encodings.dir
%changelog
! * Thu Aug 07 2009 Luca Botti – 0:1.6.0.15-1.0.lb
– Updated to lates Sun Java Version
– Added blacklist to list of jre files
— 784,795 —-
%ghost %{fontdir}/encodings.dir
%changelog
! * Sat Aug 08 2009 Santiago Angel – 0:1.6.0.15-java-1.6.0-sun.spec.diff1.0.lc
! – Fix plugin’s alternatives registration
! – Added npjp2(java new plugin) plugin option to alternatives
!
!
! * Fri Aug 07 2009 Luca Botti – 0:1.6.0.15-1.0.lb
– Updated to lates Sun Java Version
– Added blacklist to list of jre files
After that you released java-1.6.0 spec file, Sun developers stated to work very hard to test your packaging abilites…
jdk-1.6.0u16 is out…
[...] Everything technical Linux, Java, Python…just techie blogging « Java 1.6u15 installation in Fedora 11 [...]
[...] virtual machine. I already had updated the spec file, which you can find here and then follow my previous post. Right now, I am using Chromium (open source version of Google Chrome) and I will fix the Java [...]