From 60272f0c385adf1213a4056b29151feed2a8d61b Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Fri, 10 Sep 2021 17:17:48 +0800 Subject: [PATCH] fix rpath --- tensorflow.spec | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/tensorflow.spec b/tensorflow.spec index 452f6c8..0e75f81 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: tensorflow Version: 2.3.1 -Release: 8 +Release: 9 Summary: An Open Source Machine Learning Framework for Everyone License: Apache License 2.0 URL: https://www.tensorflow.org/ @@ -187,7 +187,7 @@ TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backwa Summary: An Open Source Machine Learning Framework for Everyone Provides: python-tensorflow #It is because external-$(arch).tar.bz2 is built on bazel 3.5.0 -BuildRequires: bazel == 3.5.0 gcc gcc-c++ +BuildRequires: bazel == 3.5.0 gcc gcc-c++ chrpath BuildRequires: python3-numpy python3-devel python3-Keras-Preprocessing BuildRequires: python3-pip python3-wheel @@ -213,12 +213,37 @@ bazel --output_user_root=`pwd`/../output_user_root build --host_copt=-Wno-string %install %py3_install_wheel * +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/libtensorflow_framework.so.2 +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/core/kernels/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/python/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/python/autograph/impl/testing/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/python/profiler/internal/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/python/data/experimental/service/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/compiler/tf2xla/ops/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/compiler/tf2tensorrt/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/lite/python/optimize/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/lite/python/interpreter_wrapper/*.so +chrpath -d %{buildroot}%{_libdir}/python3.8/site-packages/tensorflow/lite/experimental//microfrontend/python/ops/*.so + +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig %files -n python3-tensorflow %{python3_sitearch}/* %{_bindir}/* +%config(noreplace) /etc/ld.so.conf.d/* + %changelog +* Thu Stp 10 2021 Shaowei Cheng - 2.3.1-9 +- fix rpath + * Tue Aug 31 2021 houyingchao - 2.3.1-8 - Fix CVE-2020-15265 CVE-2020-15266 CVE-2021-29517 CVE-2021-29518 CVE-2021-29521 CVE-2021-29526 CVE-2021-29533 CVE-2021-29537 CVE-2021-29544 CVE-2021-29560 CVE-2021-29571 CVE-2021-29583 CVE-2021-29589 CVE-2021-29595 CVE-2021-29602 CVE-2021-29604 CVE-2021-29610 CVE-2021-29611 CVE-2021-29612 CVE-2021-29614 CVE-2021-29618 CVE-2021-37635 CVE-2021-37640 CVE-2021-37642 CVE-2021-37643 CVE-2021-37651 CVE-2021-37653 CVE-2021-37654 CVE-2021-37655 CVE-2021-37657 CVE-2021-37658 CVE-2021-37661 CVE-2021-37662 CVE-2021-37664 CVE-2021-37665 CVE-2021-37666 CVE-2021-37668 CVE-2021-37669 CVE-2021-37674 CVE-2021-37675 CVE-2021-37678 CVE-2021-37683 CVE-2021-37691 CVE-2021-29513 -- Gitee