diff options
author | Sam James <sam@gentoo.org> | 2023-07-27 07:53:27 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-07-27 07:53:44 +0100 |
commit | ae4506888d372bd15e01b089467efdc4e31386a1 (patch) | |
tree | 634aefe2ec6a1a3d3f49f45b4a9a0ced3bb6936c | |
parent | app-admin/setools: old needs <cython-3 (diff) | |
download | gentoo-ae4506888d372bd15e01b089467efdc4e31386a1.tar.gz gentoo-ae4506888d372bd15e01b089467efdc4e31386a1.tar.bz2 gentoo-ae4506888d372bd15e01b089467efdc4e31386a1.zip |
app-admin/setools: add 4.4.2
Closes: https://bugs.gentoo.org/909861
Closes: https://bugs.gentoo.org/911277
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | app-admin/setools/Manifest | 1 | ||||
-rw-r--r-- | app-admin/setools/files/setools-4.4.2-remove-gui.patch | 18 | ||||
-rw-r--r-- | app-admin/setools/setools-4.4.2.ebuild | 61 | ||||
-rw-r--r-- | app-admin/setools/setools-9999.ebuild | 24 |
4 files changed, 91 insertions, 13 deletions
diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest index e75db8a91552..603bd4cea940 100644 --- a/app-admin/setools/Manifest +++ b/app-admin/setools/Manifest @@ -1,2 +1,3 @@ DIST setools-4.4.0.tar.bz2 275218 BLAKE2B f716a78dd628e0309d3802f2155ef3a045dd8ebee7dec42be9f8b5fc0069b0df4e3d827b0a0cc03f7f02f5a3dff1d7ab7e4eee0d83d6cf4c87af82fe756a9321 SHA512 2ec92d7a6e30261549b6a8d2f17175d4a7d8313ef0cd81f4a19a91c53fe0107bac9a89c19dd67a4c534ee51ec520590795b4312f9e03e69fdf1763b0c35291f8 DIST setools-4.4.1.tar.bz2 262328 BLAKE2B 328a54b8efd570fad03b27a9e52b7c573e0afb6fe23a245ad248fe8931dd737729aac5d9b6371c163d1939043a777b69cf78091cde8c33e5ef7670110615285e SHA512 af1844f7f7232729eb7e93f6680775818cda93532c62524c5385a4ac7437c51bdb58ebd970a9f61f6e1b018367853d35303d3c5ee1cc087e0e26e893be42d559 +DIST setools-4.4.2.tar.bz2 261962 BLAKE2B 7c8e47d8c15f1eb72d93da5d3ae1a64e857ed0a75e1a47bbad9e4b0d11180581d9e4705ebe942e460acbc4d68261f06f9b03a8c4af1516cc388c201e30dca75e SHA512 4e8cba61ca28459387d862136a2d8ee0914c4bcd254a6d39792cbfcbbf7e58cb82223c05d66c114b08aebbd75c11cef11517c51f674ddb3c1913dc85414546c1 diff --git a/app-admin/setools/files/setools-4.4.2-remove-gui.patch b/app-admin/setools/files/setools-4.4.2-remove-gui.patch new file mode 100644 index 000000000000..49d16ec66b56 --- /dev/null +++ b/app-admin/setools/files/setools-4.4.2-remove-gui.patch @@ -0,0 +1,18 @@ +--- 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}, +- packages=['setools', 'setools.checker', 'setools.diff', 'setoolsgui', 'setoolsgui.apol'], +- scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta', 'sechecker'], ++ 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', +- '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/setools-4.4.2.ebuild b/app-admin/setools/setools-4.4.2.ebuild new file mode 100644 index 000000000000..c8bb3da428c1 --- /dev/null +++ b/app-admin/setools/setools-4.4.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 + +DESCRIPTION="Policy Analysis Tools for SELinux" +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 X" +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + 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[${PYTHON_USEDEP}] + test? ( + >=dev-python/networkx-2.0[${PYTHON_USEDEP}] + sys-apps/checkpolicy + )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.4.1-cython3.patch +) + +distutils_enable_tests pytest + +python_prepare_all() { + 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.2-remove-gui.patch ) + distutils-r1_python_prepare_all +} + +python_test() { + rm -rf setools || die + epytest +} diff --git a/app-admin/setools/setools-9999.ebuild b/app-admin/setools/setools-9999.ebuild index 4f18e7303d13..45491fdc5939 100644 --- a/app-admin/setools/setools-9999.ebuild +++ b/app-admin/setools/setools-9999.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI="8" -PYTHON_COMPAT=( python3_{10..11} ) DISTUTILS_EXT=1 -DISTUTILS_USE_SETUPTOOLS=rdepend +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..11} ) inherit distutils-r1 @@ -24,36 +24,34 @@ fi LICENSE="GPL-2 LGPL-2.1" SLOT="0" -IUSE="test infoflow X" +IUSE="test X" RESTRICT="!test? ( test )" RDEPEND="${PYTHON_DEPS} dev-python/setuptools[${PYTHON_USEDEP}] >=sys-libs/libsepol-3.2:= >=sys-libs/libselinux-3.2:= - infoflow? ( >=dev-python/networkx-2.0[${PYTHON_USEDEP}] ) X? ( dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] )" DEPEND="${RDEPEND}" BDEPEND=">=dev-python/cython-0.27[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] test? ( >=dev-python/networkx-2.0[${PYTHON_USEDEP}] sys-apps/checkpolicy )" -PATCHES=( - "${FILESDIR}"/0001-__init__.py-Make-NetworkX-dep-optional.patch -) - -distutils_enable_tests setup.py +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 || local PATCHES+=( "${FILESDIR}"/setools-4.4.2-remove-gui.patch ) distutils-r1_python_prepare_all } + +python_test() { + rm -rf setools || die + epytest +} |