diff mbox series

[meta-selinux,1/4] selint: add recipe

Message ID 20261124114137.2203106-2-chenqi_hycx@cetc.com.cn
State New
Headers show
Series Add selint and fix local refpolicy patches | expand

Commit Message

Chen Qi Nov. 24, 2026, 11:41 a.m. UTC
From: Chen Qi <chenqi_hycx@cetc.com.cn>

SELint statically checks SELinux policy source files.  The native build
is what refpolicy uses at build time; a target package is provided too.

Version 1.5.1 (fdf0d417bf).  The testsuite is disabled so the recipe
does not pull in the check framework.

Assisted-by: Codewhale:deepseek-flash
Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
 recipes-security/selint/selint_git.bb | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 recipes-security/selint/selint_git.bb
diff mbox series

Patch

diff --git a/recipes-security/selint/selint_git.bb b/recipes-security/selint/selint_git.bb
new file mode 100644
index 0000000..a2d5e41
--- /dev/null
+++ b/recipes-security/selint/selint_git.bb
@@ -0,0 +1,27 @@ 
+SUMMARY = "Static analysis tool for SELinux policy source files"
+DESCRIPTION = "SELint checks refpolicy style .te, .if and .fc files for \
+convention, style, warning and error level issues."
+HOMEPAGE = "https://github.com/SELinuxProject/selint"
+SECTION = "devel"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "git://github.com/SELinuxProject/selint.git;branch=main;protocol=https"
+# Bumping this means re-syncing files/selint.conf in the refpolicy recipe.
+SRCREV = "fdf0d417bcefc6a82be7349d47bbef14e8d5fbbb"
+PV = "1.5.1+git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+# libconfuse and uthash come from meta-oe; the rest are for autoreconf.
+DEPENDS = "libconfuse uthash pkgconfig-native autoconf-archive-native \
+           bison-native flex-native"
+
+# The testsuite would need the check framework for no benefit here.
+EXTRA_OECONF = "--without-check"
+
+CONFFILES:${PN} = "${sysconfdir}/selint.conf"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"