diff options
Diffstat (limited to 'app-admin/setools')
-rw-r--r-- | app-admin/setools/Manifest | 4 | ||||
-rw-r--r-- | app-admin/setools/files/0001-__init__.py-Make-NetworkX-dep-optional.patch | 62 | ||||
-rw-r--r-- | app-admin/setools/files/setools-4.3.0-remove-gui.patch | 16 | ||||
-rw-r--r-- | app-admin/setools/files/setools-4.4.2-remove-gui.patch (renamed from app-admin/setools/files/setools-4.4.0-remove-gui.patch) | 12 | ||||
-rw-r--r-- | app-admin/setools/metadata.xml | 3 | ||||
-rw-r--r-- | app-admin/setools/setools-4.4.4.ebuild (renamed from app-admin/setools/setools-4.3.0.ebuild) | 31 | ||||
-rw-r--r-- | app-admin/setools/setools-4.5.1.ebuild (renamed from app-admin/setools/setools-4.4.0-r2.ebuild) | 41 | ||||
-rw-r--r-- | app-admin/setools/setools-9999.ebuild | 38 |
8 files changed, 71 insertions, 136 deletions
diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest index 8e30ccb5acea..dafa5d1085b1 100644 --- a/app-admin/setools/Manifest +++ b/app-admin/setools/Manifest @@ -1,2 +1,2 @@ -DIST setools-4.3.0.tar.bz2 249694 BLAKE2B 03d689f0f7dcc5ad7cf1ed114b7466aa0add96b70aa4b4a0a563805ad58cd1bde5651b155d202835e238aee9f07bf7595bfb09c20d2984ef6b921866ac1dca2e SHA512 f2ef045e76223918f16d8b0d8365166d6afa320558269be96f3a8875189607253056179092fb8134aaa2e50a5d0862f246c0aa0f8d33060919f4bc1257c109d8 -DIST setools-4.4.0.tar.bz2 275218 BLAKE2B f716a78dd628e0309d3802f2155ef3a045dd8ebee7dec42be9f8b5fc0069b0df4e3d827b0a0cc03f7f02f5a3dff1d7ab7e4eee0d83d6cf4c87af82fe756a9321 SHA512 2ec92d7a6e30261549b6a8d2f17175d4a7d8313ef0cd81f4a19a91c53fe0107bac9a89c19dd67a4c534ee51ec520590795b4312f9e03e69fdf1763b0c35291f8 +DIST setools-4.4.4.tar.bz2 262867 BLAKE2B d64605ef050a2d51531e2a180bff086da536aa8d5e5c8cb96a81e137f575d089f9e9ec117cf0de9864f07174d92258b27ebf8fbc462714ef50bbd6d9f80d0a60 SHA512 ef72a7244ba0c724c4aea3afc40d71427e9c0592715f81cccaa8917e96836a88807ea78039c11c261dd3b4d72294accd76ab4bd37447cd500772030245db3c6e +DIST setools-4.5.1.tar.bz2 264998 BLAKE2B 479cec6f541c1e7125d641928ba49aee949e538612a478840cec2d70106dcf9f7fa5b8049c9d18c560587670ee624a3a744714667d52b99cff24c51e72026db7 SHA512 1045c223423fcb056ffbc2f93c4dc0ccc6ae078ce7d2acbe3a3c65de19440fe801b5b9f71038cde62bf9851f52d868c845aafbe33691ee531cf9854217e061d8 diff --git a/app-admin/setools/files/0001-__init__.py-Make-NetworkX-dep-optional.patch b/app-admin/setools/files/0001-__init__.py-Make-NetworkX-dep-optional.patch deleted file mode 100644 index 3137f1a89f9a..000000000000 --- a/app-admin/setools/files/0001-__init__.py-Make-NetworkX-dep-optional.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 32eed2ae8fcd868179a317d48cfd61d828c834df Mon Sep 17 00:00:00 2001 -From: Jason Zaman <jason@perfinion.com> -Date: Sun, 19 Sep 2021 14:12:44 +0200 -Subject: [PATCH] __init__.py: Make NetworkX dep optional - -selinux commit ba23ba068364ab11ff51f52bd1e20e3c63798a62 -"python: Import specific modules from setools for less deps" -Makes userspace tools only need specific parts of setools so that the -NetworkX dep can be dropped for minimal installations. -Unfortunately the __init__ still imports the parts which require -NetworkX. Wrap them in try except to guard for missing NetworkX. - -$ semanage export -Traceback (most recent call last): - File "/usr/lib/python-exec/python3.9/semanage", line 29, in <module> - import seobject - File "/usr/lib/python3.9/site-packages/seobject.py", line 33, in <module> - import sepolicy - File "/usr/lib/python3.9/site-packages/sepolicy/__init__.py", line 15, in <module> - from setools.boolquery import BoolQuery - File "/usr/lib/python3.9/site-packages/setools/__init__.py", line 94, in <module> - from .infoflow import InfoFlowAnalysis - File "/usr/lib/python3.9/site-packages/setools/infoflow.py", line 24, in <module> - import networkx as nx -ModuleNotFoundError: No module named 'networkx' - -Bug: https://bugs.gentoo.org/809038 -Signed-off-by: Jason Zaman <jason@perfinion.com> ---- - setools/__init__.py | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/setools/__init__.py b/setools/__init__.py -index d72d343..e583737 100644 ---- a/setools/__init__.py -+++ b/setools/__init__.py -@@ -91,11 +91,20 @@ from .pcideviceconquery import PcideviceconQuery - from .devicetreeconquery import DevicetreeconQuery - - # Information Flow Analysis --from .infoflow import InfoFlowAnalysis -+try: -+ from .infoflow import InfoFlowAnalysis -+except ImportError: -+ # NetworkX is optional -+ pass -+ - from .permmap import PermissionMap, RuleWeight, Mapping - - # Domain Transition Analysis --from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition -+try: -+ from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition -+except ImportError: -+ # NetworkX is optional -+ pass - - # Policy difference - from .diff import PolicyDifference --- -2.32.0 - diff --git a/app-admin/setools/files/setools-4.3.0-remove-gui.patch b/app-admin/setools/files/setools-4.3.0-remove-gui.patch deleted file mode 100644 index 85abbf5a7aa3..000000000000 --- a/app-admin/setools/files/setools-4.3.0-remove-gui.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -146,10 +146,10 @@ setup(name='setools', - author_email='pebenito@ieee.org', - url='https://github.com/SELinuxProject/setools', - cmdclass={'build_qhc': QtHelpCommand, 'clean': CleanCommand}, -- packages=['setools', 'setools.diff', 'setoolsgui', 'setoolsgui.apol'], -- scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta'], -+ packages=['setools', 'setools.diff'], -+ scripts=['sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta'], - data_files=installed_data, -- package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map']}, -+ package_data={'setools': ['perm_map']}, - ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'], - annotate=cython_annotate, - compiler_directives={"language_level": 3, diff --git a/app-admin/setools/files/setools-4.4.0-remove-gui.patch b/app-admin/setools/files/setools-4.4.2-remove-gui.patch index 01b40adb29db..49d16ec66b56 100644 --- a/app-admin/setools/files/setools-4.4.0-remove-gui.patch +++ b/app-admin/setools/files/setools-4.4.2-remove-gui.patch @@ -1,6 +1,6 @@ ---- a/setup.py 2021-03-17 22:56:42.016632635 +0000 -+++ b/setup.py 2021-03-17 23:02:33.625713629 +0000 -@@ -139,10 +139,10 @@ setup(name='setools', +--- a/setup.py ++++ b/setup.py +@@ -139,12 +139,10 @@ setup(name='setools', author_email='pebenito@ieee.org', url='https://github.com/SELinuxProject/setools', cmdclass={'build_qhc': QtHelpCommand, 'clean': CleanCommand}, @@ -9,8 +9,10 @@ + packages=['setools', 'setools.checker', 'setools.diff'], + scripts=['sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta', 'sechecker'], data_files=installed_data, -- package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map']}, -+ package_data={'setools': ['perm_map']}, +- package_data={'': ['*.ui', '*.qhc', '*.qch'], 'setools': ['perm_map', +- 'policyrep.pyi', +- 'py.typed']}, ++ package_data={'setools': ['perm_map', 'policyrep.pyi', 'py.typed']}, ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'], annotate=cython_annotate, compiler_directives={"language_level": 3, diff --git a/app-admin/setools/metadata.xml b/app-admin/setools/metadata.xml index 9e77647c601c..2367a4105f5c 100644 --- a/app-admin/setools/metadata.xml +++ b/app-admin/setools/metadata.xml @@ -5,9 +5,6 @@ <email>selinux@gentoo.org</email> <name>SELinux Team</name> </maintainer> - <use> - <flag name="infoflow">Depend on <pkg>dev-python/networkx</pkg> to use seinfoflow</flag> - </use> <upstream> <remote-id type="github">SELinuxProject/setools</remote-id> </upstream> diff --git a/app-admin/setools/setools-4.3.0.ebuild b/app-admin/setools/setools-4.4.4.ebuild index 19992dacb4a2..d74e1d12b4bf 100644 --- a/app-admin/setools/setools-4.3.0.ebuild +++ b/app-admin/setools/setools-4.4.4.ebuild @@ -1,8 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" -PYTHON_COMPAT=( python{3_7,3_8,3_9} ) +EAPI="8" + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 @@ -12,39 +15,43 @@ HOMEPAGE="https://github.com/SELinuxProject/setools/wiki" if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/SELinuxProject/setools.git" + S="${WORKDIR}/${P}" else SRC_URI="https://github.com/SELinuxProject/setools/releases/download/${PV}/${P}.tar.bz2" - KEYWORDS="amd64 ~arm ~arm64 x86" + KEYWORDS="amd64 arm arm64 x86" + S="${WORKDIR}/${PN}" fi LICENSE="GPL-2 LGPL-2.1" SLOT="0" -IUSE="X test" +IUSE="test X" RESTRICT="!test? ( test )" -S="${WORKDIR}/${PN}" RDEPEND="${PYTHON_DEPS} >=dev-python/networkx-2.0[${PYTHON_USEDEP}] - >=sys-libs/libsepol-2.8:= - >=sys-libs/libselinux-2.8:= + dev-python/setuptools[${PYTHON_USEDEP}] + >=sys-libs/libsepol-3.2:= + >=sys-libs/libselinux-3.2:= X? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )" DEPEND="${RDEPEND}" -BDEPEND=">=dev-python/cython-0.27 +BDEPEND=">=dev-python/cython-0.27[${PYTHON_USEDEP}] test? ( sys-apps/checkpolicy )" +distutils_enable_tests pytest + python_prepare_all() { - sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror" sed -i "s@^lib_dirs = .*@lib_dirs = ['${ROOT:-/}usr/$(get_libdir)']@" "${S}"/setup.py || \ die "failed to set lib_dirs" - use X || local PATCHES=( "${FILESDIR}"/setools-4.3.0-remove-gui.patch ) + use X || PATCHES+=( "${FILESDIR}"/setools-4.4.2-remove-gui.patch ) distutils-r1_python_prepare_all } python_test() { - esetup.py test + rm -rf setools || die + epytest } diff --git a/app-admin/setools/setools-4.4.0-r2.ebuild b/app-admin/setools/setools-4.5.1.ebuild index 0d3f876fd18f..22f10e5d09ca 100644 --- a/app-admin/setools/setools-4.4.0-r2.ebuild +++ b/app-admin/setools/setools-4.5.1.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" -PYTHON_COMPAT=( python{3_7,3_8,3_9} ) -DISTUTILS_USE_SETUPTOOLS=rdepend +EAPI="8" + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 @@ -13,43 +15,44 @@ HOMEPAGE="https://github.com/SELinuxProject/setools/wiki" if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/SELinuxProject/setools.git" + S="${WORKDIR}/${P}" else SRC_URI="https://github.com/SELinuxProject/setools/releases/download/${PV}/${P}.tar.bz2" - KEYWORDS="amd64 arm arm64 x86" + KEYWORDS="~amd64 ~arm64" + S="${WORKDIR}/${PN}" fi LICENSE="GPL-2 LGPL-2.1" SLOT="0" -IUSE="test infoflow X" +IUSE="test X" RESTRICT="!test? ( test )" -S="${WORKDIR}/${PN}" RDEPEND="${PYTHON_DEPS} - dev-python/setuptools - >=sys-libs/libsepol-2.8:= - >=sys-libs/libselinux-2.8:= - infoflow? ( >=dev-python/networkx-2.0[${PYTHON_USEDEP}] ) + >=dev-python/networkx-2.6[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=sys-libs/libsepol-3.2:= + >=sys-libs/libselinux-3.2:= X? ( - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] + dev-python/PyQt6[gui,widgets,${PYTHON_USEDEP}] + dev-python/pygraphviz[${PYTHON_USEDEP}] )" DEPEND="${RDEPEND}" -BDEPEND=">=dev-python/cython-0.27 - dev-python/setuptools +BDEPEND=">=dev-python/cython-0.29.14[${PYTHON_USEDEP}] test? ( - >=dev-python/networkx-2.0[${PYTHON_USEDEP}] sys-apps/checkpolicy )" +distutils_enable_tests pytest + python_prepare_all() { - sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror" sed -i "s@^lib_dirs = .*@lib_dirs = ['${ROOT:-/}usr/$(get_libdir)']@" "${S}"/setup.py || \ die "failed to set lib_dirs" - local PATCHES=( "${FILESDIR}"/0001-__init__.py-Make-NetworkX-dep-optional.patch ) - use X || PATCHES+=( "${FILESDIR}"/setools-4.4.0-remove-gui.patch ) + use X || PATCHES+=( "${FILESDIR}"/setools-4.4.2-remove-gui.patch ) distutils-r1_python_prepare_all } python_test() { - esetup.py test + rm -rf setools || die + epytest } diff --git a/app-admin/setools/setools-9999.ebuild b/app-admin/setools/setools-9999.ebuild index 3737750ca8eb..0ce34473cb2a 100644 --- a/app-admin/setools/setools-9999.ebuild +++ b/app-admin/setools/setools-9999.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" -PYTHON_COMPAT=( python{3_7,3_8,3_9} ) -DISTUTILS_USE_SETUPTOOLS=rdepend +EAPI="8" + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 @@ -13,42 +15,44 @@ HOMEPAGE="https://github.com/SELinuxProject/setools/wiki" if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/SELinuxProject/setools.git" + S="${WORKDIR}/${P}" else SRC_URI="https://github.com/SELinuxProject/setools/releases/download/${PV}/${P}.tar.bz2" KEYWORDS="~amd64 ~arm ~arm64 ~x86" + S="${WORKDIR}/${PN}" fi LICENSE="GPL-2 LGPL-2.1" SLOT="0" -IUSE="test infoflow X" +IUSE="test X" RESTRICT="!test? ( test )" -S="${WORKDIR}/${PN}" RDEPEND="${PYTHON_DEPS} - dev-python/setuptools - >=sys-libs/libsepol-2.8:= - >=sys-libs/libselinux-2.8:= - infoflow? ( >=dev-python/networkx-2.0[${PYTHON_USEDEP}] ) + >=dev-python/networkx-2.6[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=sys-libs/libsepol-3.2:= + >=sys-libs/libselinux-3.2:= X? ( - dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] + dev-python/PyQt6[gui,widgets,${PYTHON_USEDEP}] + dev-python/pygraphviz[${PYTHON_USEDEP}] )" DEPEND="${RDEPEND}" -BDEPEND=">=dev-python/cython-0.27 - dev-python/setuptools +BDEPEND=">=dev-python/cython-0.29.14[${PYTHON_USEDEP}] test? ( - >=dev-python/networkx-2.0[${PYTHON_USEDEP}] sys-apps/checkpolicy )" +distutils_enable_tests pytest + python_prepare_all() { - sed -i "s/'-Werror', //" "${S}"/setup.py || die "failed to remove Werror" sed -i "s@^lib_dirs = .*@lib_dirs = ['${ROOT:-/}usr/$(get_libdir)']@" "${S}"/setup.py || \ die "failed to set lib_dirs" - use X || local PATCHES=( "${FILESDIR}"/setools-4.4.0-remove-gui.patch ) + use X || PATCHES+=( "${FILESDIR}"/setools-4.4.2-remove-gui.patch ) distutils-r1_python_prepare_all } python_test() { - esetup.py test + rm -rf setools || die + epytest } |