tensorflow/tensorflow.spec

195 lines
8.7 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: tensorflow
Version: 2.3.1
Release: 8
Summary: An Open Source Machine Learning Framework for Everyone
License: Apache License 2.0
URL: https://www.tensorflow.org/
Source0: https://github.com/tensorflow/tensorflow/archive/v%{version}.tar.gz#/tensorflow-%{version}.tar.gz
#sh -x updateSource1.sh
Source1: external-%{_arch}.tar.bz2
Patch0001: 0001-Add-arm-source-file-into-aws-checksums.patch
Patch0002: CVE-2021-29538.patch
Patch0003: CVE-2021-29535.patch
Patch0004: CVE-2021-29566.patch
Patch0005: CVE-2021-29534.patch
Patch0006: fix_compile.patch
Patch0007: CVE-2021-29513.patch
Patch0008: CVE-2020-26266.patch
Patch0009: CVE-2020-26268.patch
Patch0010: CVE-2020-26270.patch
Patch0011: CVE-2020-26271.patch
Patch0012: CVE-2021-29512_CVE-2021-29514.patch
Patch0013: CVE-2021-29519.patch
Patch0014: CVE-2021-29520.patch
Patch0015: CVE-2021-29522.patch
Patch0016: CVE-2021-29524.patch
Patch0017: CVE-2021-29527.patch
Patch0018: CVE-2021-29528.patch
Patch0019: CVE-2021-29529.patch
Patch0020: CVE-2021-29530.patch
Patch0021: CVE-2021-29532.patch
Patch0022: CVE-2021-29536.patch
Patch0023: CVE-2021-29539.patch
Patch0024: CVE-2021-29541_CVE-2021-29542.patch
Patch0025: CVE-2021-29543.patch
Patch0026: CVE-2021-29545.patch
Patch0027: CVE-2021-29546.patch
Patch0028: CVE-2021-29547.patch
Patch0029: CVE-2021-29549.patch
Patch0030: CVE-2021-29550.patch
Patch0031: CVE-2021-29552.patch
Patch0032: CVE-2021-29553.patch
Patch0033: CVE-2021-29554.patch
Patch0034: CVE-2021-29555.patch
Patch0035: CVE-2021-29556.patch
Patch0036: CVE-2021-29557.patch
Patch0037: CVE-2021-29558.patch
Patch0038: CVE-2021-29559.patch
Patch0039: CVE-2021-29561.patch
Patch0040: CVE-2021-29562.patch
Patch0041: CVE-2021-29563.patch
Patch0042: CVE-2021-29564.patch
Patch0043: CVE-2021-29567.patch
Patch0044: CVE-2021-29568.patch
Patch0045: CVE-2021-29569.patch
Patch0046: CVE-2021-29570.patch
Patch0047: CVE-2021-29572.patch
Patch0048: CVE-2021-29573.patch
Patch0049: CVE-2021-29574.patch
Patch0050: CVE-2021-29575.patch
Patch0051: CVE-2021-29576.patch
Patch0052: CVE-2021-29577.patch
Patch0053: CVE-2021-29578.patch
Patch0054: CVE-2021-29579.patch
Patch0055: CVE-2021-29580.patch
Patch0056: CVE-2021-29581.patch
Patch0057: CVE-2021-29582.patch
Patch0058: CVE-2021-29585.patch
Patch0059: CVE-2021-29586.patch
Patch0060: CVE-2021-29587.patch
Patch0061: CVE-2021-29588.patch
Patch0062: CVE-2021-29590.patch
Patch0063: CVE-2021-29591.patch
Patch0064: CVE-2021-29592.patch
Patch0065: CVE-2021-29593.patch
Patch0066: CVE-2021-29596.patch
Patch0067: CVE-2021-29597.patch
Patch0068: CVE-2021-29598.patch
Patch0069: CVE-2021-29599.patch
Patch0070: CVE-2021-29600.patch
Patch0071: CVE-2021-29601.patch
Patch0072: CVE-2021-29603.patch
Patch0073: CVE-2021-29605.patch
Patch0074: CVE-2021-29606.patch
Patch0075: CVE-2021-29607-1.patch
Patch0076: CVE-2021-29607-2.patch
Patch0077: CVE-2021-29608-1.patch
Patch0078: CVE-2021-29608-2.patch
Patch0079: CVE-2021-29609.patch
Patch0080: CVE-2021-29613-1.patch
Patch0081: CVE-2021-29613-2.patch
Patch0082: CVE-2021-29615.patch
Patch0083: CVE-2021-29616.patch
Patch0084: CVE-2021-29617.patch
Patch0085: CVE-2021-29619.patch
Patch0086: CVE-2021-37637.patch
Patch0087: CVE-2021-37638.patch
Patch0088: CVE-2021-37639.patch
Patch0089: CVE-2021-37641.patch
Patch0090: CVE-2021-37644.patch
Patch0091: CVE-2021-37646.patch
Patch0092: CVE-2021-37647.patch
Patch0093: CVE-2021-37648.patch
Patch0094: CVE-2021-37649.patch
Patch0095: CVE-2021-37652.patch
Patch0096: CVE-2021-37656.patch
Patch0097: CVE-2021-37659.patch
Patch0098: CVE-2021-37660.patch
Patch0099: CVE-2021-37663.patch
Patch0100: CVE-2021-37667.patch
Patch0101: CVE-2021-37670.patch
Patch0102: CVE-2021-37671.patch
Patch0103: CVE-2021-37672.patch
Patch0104: CVE-2021-37673.patch
Patch0105: CVE-2021-37676.patch
Patch0106: CVE-2021-37677.patch
Patch0107: CVE-2021-37680.patch
Patch0108: CVE-2021-37682-1.patch
Patch0109: CVE-2021-37682-2.patch
Patch0110: CVE-2021-37685.patch
Patch0111: CVE-2021-37687.patch
Patch0112: CVE-2021-37688.patch
Patch0113: CVE-2021-37689.patch
Requires: python3-future
Requires: python3-numpy
%description
TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.
TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence Research organization to conduct machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well.
TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages.
%package -n python3-tensorflow
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: python3-numpy python3-devel python3-Keras-Preprocessing
BuildRequires: python3-pip python3-wheel
%description -n python3-tensorflow
TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.
TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence Research organization to conduct machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well.
TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages.
%prep
%autosetup -p1
extdir=$(bazel --output_user_root=`pwd`/../output_user_root info output_base)
mkdir -p ${extdir}
tar xf %{SOURCE1} -C ${extdir}
ln -sfn $(find ${extdir}/../install -name embedded_tools) ${extdir}/external/bazel_tools
ln -sfn $(find ${extdir}/../install -maxdepth 2 -name platforms) ${extdir}/external/platforms
rm -rf ${extdir}/external/local_config*
%build
bazel --output_user_root=`pwd`/../output_user_root build --host_copt=-Wno-stringop-truncation //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package dist
%install
%py3_install_wheel *
%files -n python3-tensorflow
%{python3_sitearch}/*
%{_bindir}/*
%changelog
* Thu Aug 26 2021 yaoxin <yaoxin30@huawei.com> - 2.3.1-8
- Fix CVE-2021-29512 CVE-2021-29514 CVE-2021-29519 CVE-2021-29520 CVE-2021-29522 CVE-2021-29524 CVE-2021-29527-to-CVE-2021-29530 CVE-2021-29532 CVE-2021-29536 CVE-2021-29539 CVE-2021-29541-to-CVE-2021-29543 CVE-2021-29545-to-CVE-2021-29547 CVE-2021-29549 CVE-2021-29550 CVE-2021-29552-to-CVE-2021-29559 CVE-2021-29561-to-CVE-2021-29564 CVE-2021-29567-to-CVE-2021-29570 CVE-2021-29572-to-CVE-2021-29582 CVE-2021-29585-to-CVE-2021-29588 CVE-2021-29590-to-CVE-2021-29593 CVE-2021-29596-to-CVE-2021-29601 CVE-2021-29603 CVE-2021-29605-to-CVE-2021-29609 CVE-2021-29613 CVE-2021-29615-to-CVE-2021-29617 CVE-2021-29619 CVE-2021-37637-to-CVE-2021-37639 CVE-2021-37641 CVE-2021-37644 CVE-2021-37646-to-CVE-2021-37649 CVE-2021-37652 CVE-2021-37656 CVE-2021-37659 CVE-2021-37660 CVE-2021-37663 CVE-2021-37667 CVE-2021-37670-to-CVE-2021-37673 CVE-2021-37676 CVE-2021-37677 CVE-2021-37680 CVE-2021-37682 CVE-2021-37685 CVE-2021-37687-to-CVE-2021-37689
* Tue Aug 24 2021 yaoxin <yaoxin30@huawei.com> - 2.3.1-7
- Fix CVE-2020-26266 CVE-2020-26268 CVE-2020-26270 CVE-2020-26271
* Fri Aug 06 2021 Ding Taixin <1315774958@qq.com> - 2.3.1-6
- Add patch CVE-2021-29513
* Fri Aug 06 2021 linjiaxin5 <linjiaxin5@huawei.com> - 2.3.1-5
- Fix failure caused by GCC upgrade to 10
- add patch fix_compile.patch
* Mon Jun 28 2021 polite2anyone <zhangyao05@outlook,com> - 2.3.1-4
- Add patch CVE-2021-29534
* Fri Jun 25 2021 yaozc7 <yaozc7@foxmail.com> - 2.3.1-3
- Add patch CVE-2021-29538,CVE-2021-29535,CVE-2021-29566
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 2.3.1-2
- Completing build dependencies to fix gcc/gcc-c++ compiler missing error
* Wed Sep 30 2020 Zhipeng Xie<xiezhipeng1@huawei.com> - 2.3.1-1
- Package init