summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2023-02-22 09:03:32 +0100
committerAlfredo Tupone <tupone@gentoo.org>2023-02-22 09:03:47 +0100
commit32fc208629a6e23dc5c64902ab73be47a305743a (patch)
tree3ed43ae9980b2106fd2f82841dfa001e15088759 /sci-libs
parentnet-irc/inspircd: Stabilize 3.15.0 amd64, #895648 (diff)
downloadgentoo-32fc208629a6e23dc5c64902ab73be47a305743a.tar.gz
gentoo-32fc208629a6e23dc5c64902ab73be47a305743a.tar.bz2
gentoo-32fc208629a6e23dc5c64902ab73be47a305743a.zip
sci-libs/pytorch: drop 1.12.0-r2, 1.12.1, 1.13.0
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/pytorch/Manifest3
-rw-r--r--sci-libs/pytorch/files/pytorch-1.12.0-CVE-2022-45907.patch59
-rw-r--r--sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch15
-rw-r--r--sci-libs/pytorch/pytorch-1.12.0-r2.ebuild62
-rw-r--r--sci-libs/pytorch/pytorch-1.12.1.ebuild62
-rw-r--r--sci-libs/pytorch/pytorch-1.13.0.ebuild63
6 files changed, 0 insertions, 264 deletions
diff --git a/sci-libs/pytorch/Manifest b/sci-libs/pytorch/Manifest
index 7a1c9e4370ae..616b75a49763 100644
--- a/sci-libs/pytorch/Manifest
+++ b/sci-libs/pytorch/Manifest
@@ -1,4 +1 @@
-DIST pytorch-1.12.0.tar.gz 106286765 BLAKE2B ff9bafedb35f859f7dccb9b606299cf9c345bdaa0deb87ecfe0c0c30c3c828414d989e1d9a243d9b7cd3f376d56a2f81c241ca2e3c9a8a2b30cddcdeddd3a5c7 SHA512 c9c748a2e0047daaaf199a1ba3198d2d1aee47f664170a9b34ccacd3deeb95f2070e4035eeb900012ef48dc62cf6fb6806f1a1dfe22de8c94892963076e593b7
-DIST pytorch-1.12.1.tar.gz 106311625 BLAKE2B e8ca19d0e1987449c33ad4c36722a3a467f7f8a9f90be2a7f2de643cbd665038f6802b5ff1f1d3da09b6253d8f29e11549a24295de013d97f73affe538c84c99 SHA512 afeb551904ebd9b5901ae623a98eadbb3045115247cedf8006a940742cfad04e5ce24cfaf363336a9ed88d7ce6a4ac53dbb6a5c690aef6efdf20477c3a22c7ca
-DIST pytorch-1.13.0.tar.gz 108276317 BLAKE2B 8149775dea06d8e4027b741c828169d33f768a96aef58cd2f86daa3bbad5bf36143454e26b683a992aca34e7fb52e6483c46168b698db48ff6978c9605d7a3d2 SHA512 5a0e8c589bdf552ccf682511a8860c754ab6f5844f51e568c5034793f787b97707af4340b338b9b8606dd27a6ced6ef50091f0cc514458b3021a2220409d7f20
DIST pytorch-1.13.1.tar.gz 108279745 BLAKE2B 75de03b74dfdaf8d8fb5ea743fcc0c1b0e408a714ad4160c487921220a7b1755e5fa6e587e6bbc8c9f34dd75e096d2e6dd69c80d24821835fff6c833314434d3 SHA512 f16f89d027efade11d057245cad5b69a390e88b458398310ae30de2dbff7c8fd7f1165be7b8da7ea989c81ac3f5a66c5cb9050610e441a97c83fb8aa28c0bd62
diff --git a/sci-libs/pytorch/files/pytorch-1.12.0-CVE-2022-45907.patch b/sci-libs/pytorch/files/pytorch-1.12.0-CVE-2022-45907.patch
deleted file mode 100644
index 085b6d9ca1bb..000000000000
--- a/sci-libs/pytorch/files/pytorch-1.12.0-CVE-2022-45907.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 78cad998e505b667d25ac42f8aaa24409f5031e1 Mon Sep 17 00:00:00 2001
-From: Nikita Shulga <nshulga@meta.com>
-Date: Thu, 17 Nov 2022 22:05:27 +0000
-Subject: [PATCH] [JIT][Security] Do not blindly eval input string (#89189)
-
-Introduce `_eval_no_call` method, that evaluates statement only if it
-does not contain any calls(done by examining the bytecode), thus preventing command injection exploit
-
-Added simple unit test to check for that
-`torch.jit.annotations.get_signature` would not result in calling random
-code.
-
-Although, this code path exists for Python-2 compatibility, and perhaps
-should be simply removed.
-
-diff --git a/torch/jit/annotations.py b/torch/jit/annotations.py
-index a4a36ce36a5e8..a6ff2d04d2076 100644
---- a/torch/jit/annotations.py
-+++ b/torch/jit/annotations.py
-@@ -1,4 +1,5 @@
- import ast
-+import dis
- import enum
- import inspect
- import re
-@@ -144,6 +145,15 @@ def check_fn(fn, loc):
- raise torch.jit.frontend.FrontendError(loc, "Expected a single top-level function")
-
-
-+def _eval_no_call(stmt, glob, loc):
-+ """Evaluate statement as long as it does not contain any method/function calls"""
-+ bytecode = compile(stmt, "", mode="eval")
-+ for insn in dis.get_instructions(bytecode):
-+ if "CALL" in insn.opname:
-+ raise RuntimeError(f"Type annotation should not contain calls, but '{stmt}' does")
-+ return eval(bytecode, glob, loc) # type: ignore[arg-type] # noqa: P204
-+
-+
- def parse_type_line(type_line, rcb, loc):
- """Parses a type annotation specified as a comment.
-
-@@ -154,7 +164,7 @@ def parse_type_line(type_line, rcb, loc):
- arg_ann_str, ret_ann_str = split_type_line(type_line)
-
- try:
-- arg_ann = eval(arg_ann_str, {}, EvalEnv(rcb)) # type: ignore[arg-type] # noqa: P204
-+ arg_ann = _eval_no_call(arg_ann_str, {}, EvalEnv(rcb))
- except (NameError, SyntaxError) as e:
- raise RuntimeError("Failed to parse the argument list of a type annotation") from e
-
-@@ -162,7 +172,7 @@ def parse_type_line(type_line, rcb, loc):
- arg_ann = (arg_ann,)
-
- try:
-- ret_ann = eval(ret_ann_str, {}, EvalEnv(rcb)) # type: ignore[arg-type] # noqa: P204
-+ ret_ann = _eval_no_call(ret_ann_str, {}, EvalEnv(rcb))
- except (NameError, SyntaxError) as e:
- raise RuntimeError("Failed to parse the return type of a type annotation") from e
-
diff --git a/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch b/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch
deleted file mode 100644
index 1e9388ff17a6..000000000000
--- a/sci-libs/pytorch/files/pytorch-1.6.0-global-dlopen.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Don't hardcode the library path. Leave it to the dynamic loader.
-
-Index: pytorch-1.6.0/torch/__init__.py
-===================================================================
---- pytorch-1.6.0.orig/torch/__init__.py
-+++ pytorch-1.6.0/torch/__init__.py
-@@ -138,7 +138,7 @@ def _load_global_deps():
- here = os.path.abspath(__file__)
- lib_path = os.path.join(os.path.dirname(here), 'lib', lib_name)
-
-- ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
-+ ctypes.CDLL(lib_name, mode=ctypes.RTLD_GLOBAL)
-
-
- if (USE_RTLD_GLOBAL_WITH_LIBTORCH or os.getenv('TORCH_USE_RTLD_GLOBAL')) and \
diff --git a/sci-libs/pytorch/pytorch-1.12.0-r2.ebuild b/sci-libs/pytorch/pytorch-1.12.0-r2.ebuild
deleted file mode 100644
index 0948de848ca1..000000000000
--- a/sci-libs/pytorch/pytorch-1.12.0-r2.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9,10} )
-DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1
-
-DESCRIPTION="Tensors and Dynamic neural networks in Python"
-HOMEPAGE="https://pytorch.org/"
-SRC_URI="https://github.com/pytorch/${PN}/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="test"
-
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
-RDEPEND="
- ${PYTHON_DEPS}
- ~sci-libs/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ')
-"
-DEPEND="${RDEPEND}
- $(python_gen_cond_dep '
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
-"
-
-src_prepare() {
- eapply \
- "${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.7.1.patch \
- "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \
- "${FILESDIR}"/${PN}-1.6.0-global-dlopen.patch \
- "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \
- "${FILESDIR}"/pytorch-1.12.0-CVE-2022-45907.patch
-
- # Set build dir for pytorch's setup
- sed -i \
- -e "/BUILD_DIR/s|build|/var/lib/caffe2/|" \
- tools/setup_helpers/env.py \
- || die
- distutils-r1_src_prepare
-}
-
-src_compile() {
- PYTORCH_BUILD_VERSION=${PV} \
- PYTORCH_BUILD_NUMBER=0 \
- USE_SYSTEM_LIBS=ON \
- CMAKE_BUILD_DIR="${BUILD_DIR}" \
- BUILD_DIR= \
- distutils-r1_src_compile
-}
-
-src_install() {
- USE_SYSTEM_LIBS=ON distutils-r1_src_install
-}
diff --git a/sci-libs/pytorch/pytorch-1.12.1.ebuild b/sci-libs/pytorch/pytorch-1.12.1.ebuild
deleted file mode 100644
index 0948de848ca1..000000000000
--- a/sci-libs/pytorch/pytorch-1.12.1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9,10} )
-DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1
-
-DESCRIPTION="Tensors and Dynamic neural networks in Python"
-HOMEPAGE="https://pytorch.org/"
-SRC_URI="https://github.com/pytorch/${PN}/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="test"
-
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
-RDEPEND="
- ${PYTHON_DEPS}
- ~sci-libs/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ')
-"
-DEPEND="${RDEPEND}
- $(python_gen_cond_dep '
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
-"
-
-src_prepare() {
- eapply \
- "${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.7.1.patch \
- "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \
- "${FILESDIR}"/${PN}-1.6.0-global-dlopen.patch \
- "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \
- "${FILESDIR}"/pytorch-1.12.0-CVE-2022-45907.patch
-
- # Set build dir for pytorch's setup
- sed -i \
- -e "/BUILD_DIR/s|build|/var/lib/caffe2/|" \
- tools/setup_helpers/env.py \
- || die
- distutils-r1_src_prepare
-}
-
-src_compile() {
- PYTORCH_BUILD_VERSION=${PV} \
- PYTORCH_BUILD_NUMBER=0 \
- USE_SYSTEM_LIBS=ON \
- CMAKE_BUILD_DIR="${BUILD_DIR}" \
- BUILD_DIR= \
- distutils-r1_src_compile
-}
-
-src_install() {
- USE_SYSTEM_LIBS=ON distutils-r1_src_install
-}
diff --git a/sci-libs/pytorch/pytorch-1.13.0.ebuild b/sci-libs/pytorch/pytorch-1.13.0.ebuild
deleted file mode 100644
index 7cde7f7262bb..000000000000
--- a/sci-libs/pytorch/pytorch-1.13.0.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9,10} )
-DISTUTILS_SINGLE_IMPL=1
-inherit distutils-r1
-
-DESCRIPTION="Tensors and Dynamic neural networks in Python"
-HOMEPAGE="https://pytorch.org/"
-SRC_URI="https://github.com/pytorch/${PN}/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="test"
-
-REQUIRED_USE=${PYTHON_REQUIRED_USE}
-RDEPEND="
- ${PYTHON_DEPS}
- ~sci-libs/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}]
- $(python_gen_cond_dep '
- dev-python/typing-extensions[${PYTHON_USEDEP}]
- ')
-"
-DEPEND="${RDEPEND}
- $(python_gen_cond_dep '
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
-"
-
-src_prepare() {
- eapply \
- "${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.7.1.patch \
- "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \
- "${FILESDIR}"/${PN}-1.6.0-global-dlopen.patch \
- "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \
- "${FILESDIR}"/${P}-setup.patch \
- "${FILESDIR}"/pytorch-1.12.0-CVE-2022-45907.patch
-
- # Set build dir for pytorch's setup
- sed -i \
- -e "/BUILD_DIR/s|build|/var/lib/caffe2/|" \
- tools/setup_helpers/env.py \
- || die
- distutils-r1_src_prepare
-}
-
-src_compile() {
- PYTORCH_BUILD_VERSION=${PV} \
- PYTORCH_BUILD_NUMBER=0 \
- USE_SYSTEM_LIBS=ON \
- CMAKE_BUILD_DIR="${BUILD_DIR}" \
- BUILD_DIR= \
- distutils-r1_src_compile
-}
-
-src_install() {
- USE_SYSTEM_LIBS=ON distutils-r1_src_install
-}