mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
app-admin/setools: Add from Gentoo
It's from Gentoo commit e96f3f5c911c831949de872f43bbb4ebd511fadb. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
This commit is contained in:
parent
e63aaa2680
commit
7017e066d9
1
sdk_container/src/third_party/portage-stable/app-admin/setools/Manifest
vendored
Normal file
1
sdk_container/src/third_party/portage-stable/app-admin/setools/Manifest
vendored
Normal file
@ -0,0 +1 @@
|
||||
DIST setools-4.5.1.tar.bz2 264998 BLAKE2B 479cec6f541c1e7125d641928ba49aee949e538612a478840cec2d70106dcf9f7fa5b8049c9d18c560587670ee624a3a744714667d52b99cff24c51e72026db7 SHA512 1045c223423fcb056ffbc2f93c4dc0ccc6ae078ce7d2acbe3a3c65de19440fe801b5b9f71038cde62bf9851f52d868c845aafbe33691ee531cf9854217e061d8
|
||||
@ -0,0 +1,21 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 05aac33..c685791 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -70,13 +70,10 @@ setup(name='setools',
|
||||
author='Chris PeBenito',
|
||||
author_email='pebenito@ieee.org',
|
||||
url='https://github.com/SELinuxProject/setools',
|
||||
- packages=['setools', 'setools.checker', 'setools.diff', 'setoolsgui', 'setoolsgui.widgets',
|
||||
- 'setoolsgui.widgets.criteria', 'setoolsgui.widgets.details',
|
||||
- 'setoolsgui.widgets.models', 'setoolsgui.widgets.views'],
|
||||
- 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={'': ['*.css', '*.html'],
|
||||
- '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,
|
||||
11
sdk_container/src/third_party/portage-stable/app-admin/setools/metadata.xml
vendored
Normal file
11
sdk_container/src/third_party/portage-stable/app-admin/setools/metadata.xml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>selinux@gentoo.org</email>
|
||||
<name>SELinux Team</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">SELinuxProject/setools</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
60
sdk_container/src/third_party/portage-stable/app-admin/setools/setools-4.5.1.ebuild
vendored
Normal file
60
sdk_container/src/third_party/portage-stable/app-admin/setools/setools-4.5.1.ebuild
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2025 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..13} )
|
||||
|
||||
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 ~riscv x86"
|
||||
S="${WORKDIR}/${PN}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
IUSE="gui test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
>=dev-python/networkx-2.6[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=sys-libs/libsepol-3.2:=
|
||||
>=sys-libs/libselinux-3.2:=
|
||||
gui? (
|
||||
dev-python/pyqt6[gui,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pygraphviz[${PYTHON_USEDEP}]
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND=">=dev-python/cython-0.29.14[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pyqt6[gui,testlib,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pytest-qt[${PYTHON_USEDEP}]
|
||||
sys-apps/checkpolicy
|
||||
)"
|
||||
|
||||
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 gui || PATCHES+=( "${FILESDIR}"/${P}-remove-gui.patch )
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
rm -rf setools || die
|
||||
epytest
|
||||
}
|
||||
59
sdk_container/src/third_party/portage-stable/app-admin/setools/setools-9999.ebuild
vendored
Normal file
59
sdk_container/src/third_party/portage-stable/app-admin/setools/setools-9999.ebuild
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# Copyright 1999-2026 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..14} )
|
||||
|
||||
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 ~riscv ~x86"
|
||||
S="${WORKDIR}/${PN}"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
IUSE="gui test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
>=dev-python/networkx-2.6[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=sys-libs/libsepol-3.2:=
|
||||
>=sys-libs/libselinux-3.2:=
|
||||
gui? (
|
||||
dev-python/pyqt6[gui,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pygraphviz[${PYTHON_USEDEP}]
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND=">=dev-python/cython-0.29.14[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pyqt6[gui,testlib,widgets,${PYTHON_USEDEP}]
|
||||
dev-python/pytest-qt[${PYTHON_USEDEP}]
|
||||
sys-apps/checkpolicy
|
||||
)"
|
||||
|
||||
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"
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
rm -rf setools || die
|
||||
epytest
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user