Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions net/fail2ban/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=fail2ban
PKG_VERSION:=1.1.0
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/fail2ban/fail2ban/tar.gz/$(PKG_VERSION)?
PKG_HASH:=474fcc25afdaf929c74329d1e4d24420caabeea1ef2e041a267ce19269570bae

PKG_MAINTAINER:=
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:fail2ban:fail2ban
Expand All @@ -37,8 +37,7 @@ define Package/fail2ban
+python3-email \
+python3-logging \
+python3-sqlite3 \
+python3-urllib \
+python3-pkg-resources
+python3-urllib
endef

define Package/fail2ban/description
Expand Down
23 changes: 23 additions & 0 deletions net/fail2ban/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

[ "$1" = fail2ban ] || exit 0

# Verify fail2ban-client binary is present and functional
fail2ban-client --version 2>&1 | grep -qi "fail2ban" || \
{ echo "fail2ban-client --version did not produce expected output"; exit 1; }

python3 - << 'EOF'
import fail2ban

from fail2ban.version import version
assert version, "fail2ban version is empty"

from fail2ban.helpers import formatExceptionInfo
from fail2ban.exceptions import UnknownJailException

# Verify core exception class is accessible
try:
raise UnknownJailException("test")
except UnknownJailException:
pass
EOF
8 changes: 4 additions & 4 deletions utils/setools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=setools
PKG_VERSION:=4.5.1
PKG_VERSION:=4.6.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/$(PKG_VERSION)
PKG_HASH:=25e47d00bbffd6046f55409c9ba3b08d9b1d5788cc159ea247d9e0ced8e482e7
PKG_HASH:=97319aabaf9d4237841ee60dcc9b2f291e73a761f317fd13e293ea2367d5806c

PKG_BUILD_DEPENDS:=python-cython/host # Cython>=0.27
PKG_BUILD_DEPENDS:=python-cython/host # Cython>=0.29.14

PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE:=GPL-2.0-only LGPL-2.1-only
Expand Down Expand Up @@ -45,7 +45,7 @@ define Package/python3-setools
SUBMENU:=Python
TITLE:=SETools Python bindings
URL:=http://selinuxproject.org/page/Main_Page
DEPENDS:=+python3-light +python3-logging +python3-pkg-resources +libselinux +libsepol
DEPENDS:=+python3-light +python3-logging +libselinux +libsepol
endef

define Package/python3-setools/description
Expand Down
44 changes: 25 additions & 19 deletions utils/setools/patches/010-no-gui.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
--- 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,
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -48,8 +48,7 @@ optional-dependencies.test = ["tox"]

[tool.setuptools]
include-package-data = false
-script-files = ["apol",
- "sediff",
+script-files = ["sediff",
"seinfo",
"seinfoflow",
"sesearch",
@@ -57,10 +56,10 @@ script-files = ["apol",
"sechecker"]

[tool.setuptools.packages.find]
-include = ["setools*"]
+include = ["setools", "setools.*"]

[tool.setuptools.package-data]
-"*" = ["*.css", "*.html", "perm_map", "py.typed"]
+"setools" = ["perm_map", "py.typed"]

[tool.setuptools.exclude-package-data]
"*" = ["*.c", "*.pyi", "*.pyx"]
10 changes: 5 additions & 5 deletions utils/setools/patches/030-remove-host-paths.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ import os.path
@@ -10,7 +10,7 @@ from Cython.Build import cythonize


# Library linkage
-lib_dirs = ['.', '/usr/lib64', '/usr/lib', '/usr/local/lib']
+lib_dirs = ['.', os.environ["STAGING_DIR"] + '/usr/lib']
include_dirs = []
-lib_dirs: list[str] = ['.', '/usr/lib64', '/usr/lib', '/usr/local/lib']
+lib_dirs: list[str] = ['.', os.environ["STAGING_DIR"] + '/usr/lib']
include_dirs: list[str] = []

with suppress(KeyError):
userspace_src = os.getenv("USERSPACE_SRC", "")
19 changes: 19 additions & 0 deletions utils/setools/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

[ "$1" = python3-setools ] || exit 0

python3 - << 'EOF'
import setools

# Verify the module loads and basic query classes are accessible
assert hasattr(setools, 'SELinuxPolicy'), \
"setools missing SELinuxPolicy class"
assert hasattr(setools, 'BoolQuery'), \
"setools missing BoolQuery class"
assert hasattr(setools, 'TypeQuery'), \
"setools missing TypeQuery class"
assert hasattr(setools, 'RoleQuery'), \
"setools missing RoleQuery class"
assert hasattr(setools, 'UserQuery'), \
"setools missing UserQuery class"
EOF
Loading