From 12b2052a2896d772d545aea71061a69a9b24a1cdf46bee3443e314a4bb2a5f4d Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Thu, 19 Jan 2023 17:33:10 +0000 Subject: [PATCH 1/4] - Disabling 32-bit compatibility packages for Leap/SLE as they are causing conflicts with the lapack packages during SLE staging: found conflict of liblapacke3-32bit-3.5.0-4.6.1.x86_64 with libopenblas_openmp0-32bit-0.3.21-150500.1.2.x86_64 /usr/lib/liblapacke.so.3 [mode mismatch: l777 root:root -> liblapacke.so.3.5.0, g -644 root:root] OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=151 --- openblas.changes | 8 ++++++++ openblas.spec | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openblas.changes b/openblas.changes index 139e5fd..1ab5f35 100644 --- a/openblas.changes +++ b/openblas.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jan 19 17:29:17 UTC 2023 - Egbert Eich + +- Disabling 32-bit compatibility packages for Leap/SLE as they + are causing conflicts with the lapack packages during SLE staging: + found conflict of liblapacke3-32bit-3.5.0-4.6.1.x86_64 with libopenblas_openmp0-32bit-0.3.21-150500.1.2.x86_64 + /usr/lib/liblapacke.so.3 [mode mismatch: l777 root:root -> liblapacke.so.3.5.0, g -644 root:root] + ------------------------------------------------------------------- Sun Dec 25 00:19:21 UTC 2022 - Stefan Brüns diff --git a/openblas.spec b/openblas.spec index ae0151d..9b24fd1 100644 --- a/openblas.spec +++ b/openblas.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -301,6 +301,7 @@ cp %{SOURCE1} . cp %{SOURCE2} . %endif +%if !0%{?sle_version} # create baselibs.conf based on flavor cat > %{_sourcedir}/baselibs.conf < requires "lib%{name}%{?so_v}- = " EOF +%endif %build From fdaf650bf7f55799e9438c9cc2eb6e71c4a87c2abe21a682a6cc709eefa18d99 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Sat, 21 Jan 2023 11:14:53 +0000 Subject: [PATCH 2/4] - Reverted last change: it seems that the 32-bit compatibility packages have revealed a conflict which was not properly detected by installcheck and actually has made it into Leap 15.4/SLE-15-SP4 rather than caused it: The same issue exists in the 'regular' 64-bit packages but has remained undetected by installcheck so far. Factory hasn't suffered from this as lapack has been fixed properly - see boo#1207358. The possible installcheck issue has been reported in: https://github.com/openSUSE/openSUSE-release-tools/issues/2915 OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=152 --- openblas.changes | 8 -------- openblas.spec | 2 -- 2 files changed, 10 deletions(-) diff --git a/openblas.changes b/openblas.changes index 1ab5f35..139e5fd 100644 --- a/openblas.changes +++ b/openblas.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Thu Jan 19 17:29:17 UTC 2023 - Egbert Eich - -- Disabling 32-bit compatibility packages for Leap/SLE as they - are causing conflicts with the lapack packages during SLE staging: - found conflict of liblapacke3-32bit-3.5.0-4.6.1.x86_64 with libopenblas_openmp0-32bit-0.3.21-150500.1.2.x86_64 - /usr/lib/liblapacke.so.3 [mode mismatch: l777 root:root -> liblapacke.so.3.5.0, g -644 root:root] - ------------------------------------------------------------------- Sun Dec 25 00:19:21 UTC 2022 - Stefan Brüns diff --git a/openblas.spec b/openblas.spec index 9b24fd1..1c890ce 100644 --- a/openblas.spec +++ b/openblas.spec @@ -301,7 +301,6 @@ cp %{SOURCE1} . cp %{SOURCE2} . %endif -%if !0%{?sle_version} # create baselibs.conf based on flavor cat > %{_sourcedir}/baselibs.conf < requires "lib%{name}%{?so_v}- = " EOF -%endif %build From ee08ada4cdea6062a4f8c0c0a1e1197cd72c4e1947566449b7d6847e40f3bb14 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Thu, 26 Jan 2023 11:53:30 +0000 Subject: [PATCH 3/4] Accepting request 1061191 from home:eeich:branches:science - Make library links in the alternatives directory arch dependent. This avoids conflicts when both 32-bit and 64-bit versions are installed (boo#1207563). OBS-URL: https://build.opensuse.org/request/show/1061191 OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=153 --- openblas.changes | 7 +++++++ openblas.spec | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/openblas.changes b/openblas.changes index 139e5fd..5771da5 100644 --- a/openblas.changes +++ b/openblas.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 25 21:13:49 UTC 2023 - Egbert Eich + +- Make library links in the alternatives directory arch dependent. + This avoids conflicts when both 32-bit and 64-bit versions are + installed (boo#1207563). + ------------------------------------------------------------------- Sun Dec 25 00:19:21 UTC 2022 - Stefan Brüns diff --git a/openblas.spec b/openblas.spec index 1c890ce..d711c68 100644 --- a/openblas.spec +++ b/openblas.spec @@ -433,22 +433,22 @@ find -name \*.f -exec chmod 644 {} + # Dummy target for update-alternatives install -d %{buildroot}/%{_sysconfdir}/alternatives -ln -sf %{_sysconfdir}/alternatives/libblas.so.3 %{buildroot}/%{_libdir}/libblas.so.3 -ln -sf %{_sysconfdir}/alternatives/libcblas.so.3 %{buildroot}/%{_libdir}/libcblas.so.3 -ln -sf %{_sysconfdir}/alternatives/liblapack.so.3 %{buildroot}/%{_libdir}/liblapack.so.3 -ln -sf %{_sysconfdir}/alternatives/liblapacke.so.3 %{buildroot}/%{_libdir}/liblapacke.so.3 -ln -sf %{_sysconfdir}/alternatives/openblas-default %{buildroot}/%{_libdir}/openblas-default +ln -sf %{_sysconfdir}/alternatives/libblas.so.3_%{_arch} %{buildroot}/%{_libdir}/libblas.so.3 +ln -sf %{_sysconfdir}/alternatives/libcblas.so.3_%{_arch} %{buildroot}/%{_libdir}/libcblas.so.3 +ln -sf %{_sysconfdir}/alternatives/liblapack.so.3_%{_arch} %{buildroot}/%{_libdir}/liblapack.so.3 +ln -sf %{_sysconfdir}/alternatives/liblapacke.so.3_%{_arch} %{buildroot}/%{_libdir}/liblapacke.so.3 +ln -sf %{_sysconfdir}/alternatives/openblas-default_%{_arch} %{buildroot}/%{_libdir}/openblas-default ln -s lib%{pname}.so.%{so_v} %{buildroot}%{p_libdir}/lib%{pname}.so ln -s %{p_libdir}/lib%{pname}.so.%{so_v} %{buildroot}/%{_libdir}/lib%{name}.so.%{so_v} ln -s %{p_libdir}/lib%{pname}.so %{buildroot}/%{_libdir}/lib%{name}.so -ln -s %{_libdir}/openblas-default %{buildroot}%{_sysconfdir}/alternatives/openblas-default -ln -s %{_sysconfdir}/alternatives/openblas-default/lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so.%{so_v} +ln -s %{_libdir}/openblas-default %{buildroot}%{_sysconfdir}/alternatives/openblas-default_%{_arch} +ln -s %{_sysconfdir}/alternatives/openblas-default_%{_arch}/lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so.%{so_v} %if 0%{?build_devel} ln -s lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so install -d %{buildroot}%{_libdir}/pkgconfig/ -ln -s %{_sysconfdir}/alternatives/openblas-default/pkgconfig/openblas.pc %{buildroot}%{_libdir}/pkgconfig/ +ln -s %{_sysconfdir}/alternatives/openblas-default_%{_arch}/pkgconfig/openblas.pc %{buildroot}%{_libdir}/pkgconfig/ install -d %{buildroot}/%{_libdir}/cmake -ln -s %{_sysconfdir}/alternatives/openblas-default/cmake/openblas %{buildroot}/%{_libdir}/cmake/ +ln -s %{_sysconfdir}/alternatives/openblas-default_%{_arch}/cmake/openblas %{buildroot}/%{_libdir}/cmake/ %endif %else # with hpc @@ -506,10 +506,10 @@ d=%{_libdir}/cmake/openblas %post -n lib%{name}%{so_v} %{_sbindir}/update-alternatives --install \ - %{_libdir}/openblas-default openblas-default %{p_libdir} %openblas_so_prio + %{_libdir}/openblas-default openblas-default_%{_arch} %{p_libdir} %openblas_so_prio for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do %{_sbindir}/update-alternatives --install \ - %{_libdir}/${lib} ${lib} %{_libdir}/lib%{pname}.so.%{so_v} 20 + %{_libdir}/${lib} ${lib}_%{_arch} %{_libdir}/lib%{pname}.so.%{so_v} 20 done /sbin/ldconfig @@ -555,11 +555,11 @@ fi %ghost %{_libdir}/libcblas.so.3 %ghost %{_libdir}/liblapack.so.3 %ghost %{_libdir}/liblapacke.so.3 -%ghost %{_sysconfdir}/alternatives/openblas-default -%ghost %{_sysconfdir}/alternatives/libblas.so.3 -%ghost %{_sysconfdir}/alternatives/libcblas.so.3 -%ghost %{_sysconfdir}/alternatives/liblapack.so.3 -%ghost %{_sysconfdir}/alternatives/liblapacke.so.3 +%ghost %{_sysconfdir}/alternatives/openblas-default_%{_arch} +%ghost %{_sysconfdir}/alternatives/libblas.so.3_%{_arch} +%ghost %{_sysconfdir}/alternatives/libcblas.so.3_%{_arch} +%ghost %{_sysconfdir}/alternatives/liblapack.so.3_%{_arch} +%ghost %{_sysconfdir}/alternatives/liblapacke.so.3_%{_arch} %else %hpc_dirs %{p_libdir}/libopenblas*r*.so From 6076de7297fbf91304c06c22121f0159c3dd4e9f9163cf3706986e26bc0924e4 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Wed, 8 Feb 2023 08:12:25 +0000 Subject: [PATCH 4/4] Accepting request 1063627 from home:eeich:branches:science - Do not set LIBNAMESUFFIX to mark different flavors as this causes the SONAME to be different so that different flavors of OpenBLAS cannot serve as plugin replacements of each other (boo#1177260). - Fix a fallout of making alternatives directory arch dependent. - Remove unneeded links that will be created by update-alternatives. Create remaining links %post scripts properly %ghost-ing the files. OBS-URL: https://build.opensuse.org/request/show/1063627 OBS-URL: https://build.opensuse.org/package/show/science/openblas?expand=0&rev=154 --- openblas.changes | 10 +++++++ openblas.spec | 77 ++++++++++++++++++++++++++++-------------------- 2 files changed, 55 insertions(+), 32 deletions(-) diff --git a/openblas.changes b/openblas.changes index 5771da5..3e294b9 100644 --- a/openblas.changes +++ b/openblas.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Feb 3 07:52:04 UTC 2023 - Egbert Eich + +- Do not set LIBNAMESUFFIX to mark different flavors as this causes + the SONAME to be different so that different flavors of OpenBLAS + cannot serve as plugin replacements of each other (boo#1177260). +- Fix a fallout of making alternatives directory arch dependent. +- Remove unneeded links that will be created by update-alternatives. + Create remaining links %post scripts properly %ghost-ing the files. + ------------------------------------------------------------------- Wed Jan 25 21:13:49 UTC 2023 - Egbert Eich diff --git a/openblas.spec b/openblas.spec index d711c68..d2635e6 100644 --- a/openblas.spec +++ b/openblas.spec @@ -20,6 +20,7 @@ %define _vers 0_3_21 %define vers 0.3.21 +%define so_v 0 %define pname openblas %bcond_with ringdisabled @@ -146,10 +147,10 @@ ExclusiveArch: do_not_build %endif %if %{without hpc} +%define so_a %{so_v} %if 0%{!?package_name:1} %define package_name %{pname}_%{flavor} %endif -%define so_v 0 %define p_prefix %_prefix %define p_includedir %_includedir/%pname %define p_libdir %_libdir/openblas%{?flavor:-%{flavor}} @@ -157,6 +158,7 @@ ExclusiveArch: do_not_build %define num_threads 64 %else +%define so_a %{nil} # Magic for OBS Staging. Only build the flavors required by # other packages in the ring. %if %{with ringdisabled} @@ -211,7 +213,7 @@ BuildRequires: suse-hpc %description OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. -%package -n lib%{name}%{?so_v} +%package -n lib%{name}%{so_a} Summary: An optimized BLAS library based on GotoBLAS2, %{flavor} version Group: System/Libraries %if %{without hpc} @@ -233,7 +235,7 @@ Obsoletes: lib%{pname}o0 %hpc_requires %endif -%description -n lib%{name}%{?so_v} +%description -n lib%{name}%{so_a} OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. %{?with_hpc:%{hpc_master_package -l -L}} @@ -241,7 +243,7 @@ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. %package -n lib%{name}-devel Summary: Development libraries for OpenBLAS, %{flavor} version Group: Development/Libraries/C and C++ -Requires: lib%{name}%{?so_v} = %{version} +Requires: lib%{name}%{so_a} = %{version} %if %{without hpc} Requires: %{pname}-common-devel = %{version} %if 0%{?arch_flavor} @@ -303,7 +305,7 @@ cp %{SOURCE2} . # create baselibs.conf based on flavor cat > %{_sourcedir}/baselibs.conf < -> /etc/alternatives/libblas.so._ -> /usr/lib64/openblas-/libblas.so. +# /usr/lib64/openblas-default -> /etc/alternatives/openblas-default_ -> /usr/lib64/openblas- +# directly - default shared lib in default location +# /usr/lib64/libopenblas.so. -> /usr/lib64/openblas_default/libopenblas.so. +# /usr/lib64/libopenblas.so -> libopenblas.so. + install -d %{buildroot}/%{_sysconfdir}/alternatives -ln -sf %{_sysconfdir}/alternatives/libblas.so.3_%{_arch} %{buildroot}/%{_libdir}/libblas.so.3 -ln -sf %{_sysconfdir}/alternatives/libcblas.so.3_%{_arch} %{buildroot}/%{_libdir}/libcblas.so.3 -ln -sf %{_sysconfdir}/alternatives/liblapack.so.3_%{_arch} %{buildroot}/%{_libdir}/liblapack.so.3 -ln -sf %{_sysconfdir}/alternatives/liblapacke.so.3_%{_arch} %{buildroot}/%{_libdir}/liblapacke.so.3 -ln -sf %{_sysconfdir}/alternatives/openblas-default_%{_arch} %{buildroot}/%{_libdir}/openblas-default -ln -s lib%{pname}.so.%{so_v} %{buildroot}%{p_libdir}/lib%{pname}.so -ln -s %{p_libdir}/lib%{pname}.so.%{so_v} %{buildroot}/%{_libdir}/lib%{name}.so.%{so_v} -ln -s %{p_libdir}/lib%{pname}.so %{buildroot}/%{_libdir}/lib%{name}.so -ln -s %{_libdir}/openblas-default %{buildroot}%{_sysconfdir}/alternatives/openblas-default_%{_arch} -ln -s %{_sysconfdir}/alternatives/openblas-default_%{_arch}/lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so.%{so_v} + %if 0%{?build_devel} -ln -s lib%{pname}.so.%{so_v} %{buildroot}%{_libdir}/lib%{pname}.so install -d %{buildroot}%{_libdir}/pkgconfig/ ln -s %{_sysconfdir}/alternatives/openblas-default_%{_arch}/pkgconfig/openblas.pc %{buildroot}%{_libdir}/pkgconfig/ install -d %{buildroot}/%{_libdir}/cmake @@ -507,20 +515,25 @@ d=%{_libdir}/cmake/openblas %post -n lib%{name}%{so_v} %{_sbindir}/update-alternatives --install \ %{_libdir}/openblas-default openblas-default_%{_arch} %{p_libdir} %openblas_so_prio +# Cannot package this link - brp-25-symlink doesn't recognize links created by update-alternatives +ln -sf openblas-default/lib%{pname}.so.%{so_v} %{_libdir}/lib%{pname}.so.%{so_v} for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do %{_sbindir}/update-alternatives --install \ - %{_libdir}/${lib} ${lib}_%{_arch} %{_libdir}/lib%{pname}.so.%{so_v} 20 + %{_libdir}/${lib} ${lib}_%{_arch} %{p_libdir}/lib%{pname}.so.%{so_v} 20 done /sbin/ldconfig +%post -n %{pname}-common-devel +ln -sf lib%{pname}.so.%{so_v} %{_libdir}/lib%{pname}.so + %postun -n lib%{name}%{so_v} if [ ! -f %{p_libdir}/lib%{pname}.so.%{so_v} ]; then for lib in libblas.so.3 libcblas.so.3 liblapack.so.3 liblapacke.so.3; do - %{_sbindir}/update-alternatives --remove ${lib} %{_libdir}/lib%{pname}.so.%{so_v} + %{_sbindir}/update-alternatives --remove ${lib}_%{_arch} %{_libdir}/lib%{pname}.so.%{so_v} done fi if [ ! -d %{p_libdir} ]; then - %{_sbindir}/update-alternatives --remove openblas-default %{p_libdir} + %{_sbindir}/update-alternatives --remove openblas-default_%{_arch} %{p_libdir} fi /sbin/ldconfig @@ -543,14 +556,14 @@ fi %endif -%files -n lib%{name}%{?so_v} +%files -n lib%{name}%{so_a} %defattr(-,root,root,-) -%{p_libdir}/lib%{pname}.so.0 +%{p_libdir}/lib%{pname}.so.%{so_v} %if %{without hpc} %dir %{p_libdir} -%{_libdir}/openblas-default -%{_libdir}/lib%{name}.so.%{so_v} -%{_libdir}/lib%{pname}.so.%{so_v} +# Created by %%post +%ghost %{_libdir}/lib%{pname}.so.%{so_v} +%ghost %{_libdir}/openblas-default %ghost %{_libdir}/libblas.so.3 %ghost %{_libdir}/libcblas.so.3 %ghost %{_libdir}/liblapack.so.3 @@ -575,7 +588,6 @@ fi %hpc_pkgconfig_file %{p_includedir}/ %else -%{_libdir}/lib%{name}.so %dir %{p_libdir}/cmake %dir %{p_libdir}/pkgconfig %{p_libdir}/pkgconfig @@ -588,7 +600,8 @@ fi %files -n %{pname}-common-devel %license LICENSE %doc Changelog.txt GotoBLAS* README.md README.SUSE -%{_libdir}/lib%{pname}.so +# created by %%post +%ghost %{_libdir}/lib%{pname}.so %{p_includedir}/ %{_libdir}/pkgconfig/openblas.pc %dir %{_libdir}/cmake