https://bugzilla.novell.com/show_bug.cgi?id=355868
https://bugzilla.novell.com/show_bug.cgi?id=355868#c33
Michal Vyskocil changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 - None |P1 - Urgent
Status|REOPENED |ASSIGNED
--- Comment #33 from Michal Vyskocil 2010-10-11 14:27:18 UTC ---
Hi Tamas,
thanks for a pointer - I newer met this policy problem, so was not able to
reproduce it! Anyway this seems like an ugly code - the policy jars should be
replaced anyway and even the correct location is /usr/lib64/jvm-private/ update
should not replace it.
So as a first step - I removed the rm -f part, that is really not necessary.
Instead of it I added a check of existence of policy files, which changed the
status to auto if they are missing
The later update-alternatives call might simply fail if the target exists, this
is user's responsibility.
Will test and submit it asap!
Index: java-1_6_0-sun.spec
===================================================================
--- java-1_6_0-sun.spec (revision 41ac85e98f8c3ed62cb6c2ef9d39d088)
+++ java-1_6_0-sun.spec (working copy)
@@ -458,11 +458,15 @@
--slave %{_jvmjardir}/jre-%{origin} jre_%{origin}_exports
%{_jvmjardir}/%{jrelnk}
update-alternatives --install %{_jvmdir}/jre-%{javamajver} jre_%{javamajver}
%{_jvmdir}/%{jrelnk} %{priority} \
--slave %{_jvmjardir}/jre-%{javamajver} jre_%{javamajver}_exports
%{_jvmjardir}/%{jrelnk}
-if [ -d %{_jvmdir}/%{jrelnk}/lib/security ]; then
- # Need to remove the old jars in order to support upgrading, ugly :(
- # update-alternatives fails silently if the link targets exist as files.
- rm -f %{_jvmdir}/%{jrelnk}/lib/security/{local,US_export}_policy.jar
+# bnc#355868
+# 1.) the local_policy and US_export_policy link has to be there, if not
+# then move alternatives status back to auto
+if [ ! -e %{_jvmdir}/%{jrelnk}/lib/security/local_policy.jar -o
+ ! -e %{_jvmdir}/%{jrelnk}/lib/security/US_export_policy]; then
+ update-alternatives --auto jce_%{javamajver}_%{origin}_local_policy
fi
+# 2.) The call can simply fails, when the link target already exists, because
user
+# should modify it
update-alternatives \
--install \
%{_jvmdir}/%{jrelnk}/lib/security/local_policy.jar \
@@ -472,7 +476,8 @@
--slave \
%{_jvmdir}/%{jrelnk}/lib/security/US_export_policy.jar \
jce_%{javamajver}_%{origin}_us_export_policy \
- %{_jvmprivdir}/%{name}/jce/vanilla/US_export_policy.jar
+ %{_jvmprivdir}/%{name}/jce/vanilla/US_export_policy.jar 2>/dev/null || :
+
if [ -f %{_sysconfdir}/mime.types ]; then
perl -p -i -e 's|application/x-java-jnlp-file.*||g'
%{_sysconfdir}/mailcap.bak 2>/dev/null
echo "type=application/x-java-jnlp-file; description=\"Java Web Start\";
exts=\"jnlp\"" >> %{_sysconfdir}/mailcap 2>/dev/null
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.