Hello community,

here is the log from the commit of package ocl-icd for openSUSE:Factory checked 
in at 2019-01-24 14:11:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocl-icd (Old)
 and      /work/SRC/openSUSE:Factory/.ocl-icd.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocl-icd"

Thu Jan 24 14:11:36 2019 rev:7 rq:667197 version:2.2.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocl-icd/ocl-icd.changes  2017-07-12 
19:36:49.009476316 +0200
+++ /work/SRC/openSUSE:Factory/.ocl-icd.new.28833/ocl-icd.changes       
2019-01-24 14:11:36.831487122 +0100
@@ -1,0 +2,17 @@
+Sat Jan 19 21:35:38 UTC 2019 - [email protected]
+
+- Add missing Requires(post): update-alternatives
+
+-------------------------------------------------------------------
+Mon Jan 14 01:22:04 UTC 2019 - [email protected]
+
+- limit usage of update-alernatives to sle15-sp1/Leap 15.1 and newer 
+
+-------------------------------------------------------------------
+Sun Jan 13 19:51:09 UTC 2019 - [email protected]
+
+- sle15/Leap15 and newer: switch to usage of update-alternatives, 
+  so the package no longer conflicts with nvidia packages
+  (boo#1108304)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocl-icd.spec ++++++
--- /var/tmp/diff_new_pack.M8XnxX/_old  2019-01-24 14:11:37.167486735 +0100
+++ /var/tmp/diff_new_pack.M8XnxX/_new  2019-01-24 14:11:37.167486735 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ocl-icd
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,6 +28,11 @@
 BuildRequires:  pkgconfig
 BuildRequires:  ruby
 BuildRequires:  pkgconfig(egl)
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+BuildRequires:  update-alternatives
+Requires(pre):  update-alternatives
+Requires(post): update-alternatives
+%endif
 
 %description
 OpenCL is a royalty-free standard for cross-platform, parallel programming
@@ -42,6 +47,10 @@
 Summary:        OpenCL ICD Bindings
 Group:          System/Libraries
 Recommends:     pocl
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+Requires(pre):  update-alternatives
+Requires(post): update-alternatives
+%endif
 
 %description -n libOpenCL1
 OpenCL is a royalty-free standard for cross-platform, parallel programming
@@ -82,14 +91,58 @@
 find %{buildroot} -type f -name "*.la" -delete -print
 rm -rf instdocs
 mv %{buildroot}%{_datadir}/doc/%{name} instdocs
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+install -d %{buildroot}/%{_sysconfdir}/alternatives \
+           %{buildroot}/%{_libdir}/ocl-icd
+mv %{buildroot}/%{_libdir}/libOpenCL.so.1* %{buildroot}/%{_libdir}/ocl-icd
+ln -snf ocl-icd/libOpenCL.so.1 %{buildroot}/%{_libdir}/libOpenCL.so
+# dummy target for update-alternatives
+ln -s %{_sysconfdir}/alternatives/libOpenCL.so.1 
%{buildroot}/%{_libdir}/libOpenCL.so.1
+ln -s %{_libdir}/ocl-icd/libOpenCL.so.1 
%{buildroot}/%{_sysconfdir}/alternatives/libOpenCL.so.1
+%endif
+
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+
+%post -n libOpenCL1
+# apparently needed when updating from a pre update-alternatives package ...
+rm -f %{_libdir}/libOpenCL.so.1.*
+%{_sbindir}/update-alternatives --force --install \
+   %{_libdir}/libOpenCL.so.1 libOpenCL.so.1 %{_libdir}/ocl-icd/libOpenCL.so.1  
50
+/sbin/ldconfig
+
+%preun -n libOpenCL1
+if [ "$1" = 0 ] ; then
+   %{_sbindir}/update-alternatives --remove libOpenCL.so.1  
%{_libdir}/ocl-icd/libOpenCL.so.1
+fi
+
+%else
 
 %post -n libOpenCL1 -p /sbin/ldconfig
+
+%endif
+
 %postun -n libOpenCL1 -p /sbin/ldconfig
 
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+%posttrans -n libOpenCL1
+if [ "$1" = 0 ] ; then
+  if ! [ -f %{_libdir}/libOpenCl.so.1 ] ; then
+      "%{_sbindir}/update-alternatives" --auto libOpenCL.so.1
+  fi
+fi
+%endif
+
 %files -n libOpenCL1
 %defattr(-, root, root)
 %doc README
+%if (0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550)
+%dir %{_libdir}/ocl-icd
+%{_libdir}/ocl-icd/libOpenCL.so.1*
+%ghost %{_libdir}/libOpenCL.so.1
+%ghost %{_sysconfdir}/alternatives/libOpenCL.so.1
+%else
 %{_libdir}/libOpenCL.so.1*
+%endif
 
 %files devel
 %defattr(-, root, root)


Reply via email to