From: Ladislav Michl <oss-lists@triops.cz>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v1 06/17] Revert "libselinux: remove after more than one year in staging"
Date: Tue, 20 Oct 2026 13:48:59 +0200 [thread overview]
Message-ID: <fe93bcc72f805e6940f924ea7817b91add3a1975.1792491301.git.ladis@triops.cz> (raw)
In-Reply-To: <cover.1792491301.git.ladis@triops.cz>
From: Ladislav Michl <ladis@triops.cz>
This partially reverts commit f4b8d42822a645d4336f9c25090fc3281886ce7e.
Signed-off-by: Ladislav Michl <ladis@triops.cz>
---
rules/libselinux.in | 27 +++++++++++++
rules/libselinux.make | 94 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 121 insertions(+)
create mode 100644 rules/libselinux.in
create mode 100644 rules/libselinux.make
diff --git a/rules/libselinux.in b/rules/libselinux.in
new file mode 100644
index 000000000..6d6b1e655
--- /dev/null
+++ b/rules/libselinux.in
@@ -0,0 +1,27 @@
+## SECTION=staging
+## old section:
+### SECTION=selinux
+
+menuconfig LIBSELINUX
+ tristate
+ prompt "libselinux "
+ select LIBPCRE
+ select LIBSEPOL
+ select PYTHON if LIBSELINUX_PYTHON
+ select HOST_SWIG if LIBSELINUX_PYTHON
+ help
+ libselinux provides an API for SELinux applications to get and set
+ process and file security contexts and to obtain security policy
+ decisions. Required for any applications that use the SELinux
+ API.
+
+ STAGING: remove in ptxdist-2020.12.0
+ Old version that need to be updated. Fails to build with gcc >= 9.x.
+
+if LIBSELINUX
+
+config LIBSELINUX_PYTHON
+ bool "python wrapper"
+ depends on STAGING
+
+endif
diff --git a/rules/libselinux.make b/rules/libselinux.make
new file mode 100644
index 000000000..9f6b6a62f
--- /dev/null
+++ b/rules/libselinux.make
@@ -0,0 +1,94 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Wolfram Sang <w.sang@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBSELINUX) += libselinux
+
+#
+# Paths and names
+#
+LIBSELINUX_VERSION := 2.1.12
+LIBSELINUX_MD5 := 73270f384a032fad34b5fe075fa05ce2
+LIBSELINUX := libselinux-$(LIBSELINUX_VERSION)
+LIBSELINUX_SUFFIX := tar.gz
+LIBSELINUX_URL := https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20120924/$(LIBSELINUX).$(LIBSELINUX_SUFFIX)
+LIBSELINUX_SOURCE := $(SRCDIR)/$(LIBSELINUX).$(LIBSELINUX_SUFFIX)
+LIBSELINUX_DIR := $(BUILDDIR)/$(LIBSELINUX)
+LIBSELINUX_LICENSE := public_domain
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBSELINUX_CONF_TOOL := NO
+# no := due to CROSS_PYTHON
+LIBSELINUX_MAKE_ENV = \
+ $(CROSS_ENV) \
+ CFLAGS="-O2 -Wall -g" \
+ PYTHON=$(CROSS_PYTHON)
+LIBSELINUX_MAKE_OPT := \
+ LIBDIR=$(PTXDIST_SYSROOT_TARGET)/usr/lib
+LIBSELINUX_INSTALL_OPT := \
+ install
+
+ifdef PTXCONF_LIBSELINUX_PYTHON
+LIBSELINUX_MAKE_OPT += pywrap
+LIBSELINUX_INSTALL_OPT += install-pywrap
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+LIBSELINUX_PROGS := \
+ avcstat \
+ compute_av \
+ compute_create \
+ compute_member \
+ compute_relabel \
+ compute_user \
+ getconlist \
+ getdefaultcon \
+ getenforce \
+ getfilecon \
+ getpidcon \
+ getsebool \
+ getseuser \
+ matchpathcon \
+ policyvers \
+ selinux_check_securetty_context \
+ selinuxenabled \
+ selinuxexeccon \
+ setenforce \
+ setfilecon \
+ togglesebool
+
+$(STATEDIR)/libselinux.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libselinux)
+ @$(call install_fixup, libselinux,PRIORITY,optional)
+ @$(call install_fixup, libselinux,SECTION,base)
+ @$(call install_fixup, libselinux,AUTHOR,"Wolfram Sang <w.sang@pengutronix.de>")
+ @$(call install_fixup, libselinux,DESCRIPTION,missing)
+
+ @$(call install_lib, libselinux, 0, 0, 0644, libselinux)
+
+ @$(foreach prog, $(LIBSELINUX_PROGS), \
+ $(call install_copy, libselinux, 0, 0, 0755, -, /usr/sbin/$(prog));)
+
+ifdef PTXCONF_LIBSELINUX_PYTHON
+ @$(call install_tree, libselinux, 0, 0, -, $(PYTHON_SITEPACKAGES))
+endif
+ @$(call install_finish, libselinux)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.47.3
next prev parent reply other threads:[~2026-10-20 11:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 11:48 [ptxdist] [PATCH v1 00/17] selinux: back at version 3.11 Ladislav Michl
2026-10-20 11:48 ` [ptxdist] [PATCH v1 01/17] selinux: add common version and URL Ladislav Michl
2026-10-20 11:48 ` [ptxdist] [PATCH v1 02/17] Revert "python: remove after more than one year in staging" Ladislav Michl
2026-10-20 11:48 ` [ptxdist] [PATCH v1 03/17] host-swig: version bump 4.0.1 -> 4.5.1 Ladislav Michl
2026-10-20 11:48 ` [ptxdist] [PATCH v1 04/17] Revert "*libsepol: remove" Ladislav Michl
2026-10-20 11:48 ` [ptxdist] [PATCH v1 05/17] libsepol: version bump 2.1.8 -> 3.11 Ladislav Michl
2026-10-20 11:48 ` Ladislav Michl [this message]
2026-10-20 11:49 ` [ptxdist] [PATCH v1 07/17] libselinux: version bump 2.1.12 " Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 08/17] audit: new package Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 09/17] Revert "libsemanage: remove after more than one year in staging" Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 10/17] libsemanage: version bump 2.1.9 -> 3.11 Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 11/17] Revert "checkpolicy: remove after more than one year in staging" Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 12/17] checkpolicy: version bump 2.1.11 -> 3.11 Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 13/17] Revert "policycoreutils: remove after more than one year in staging" Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 14/17] policycoreutils: version bump 2.1.13 -> 3.11 Ladislav Michl
2026-10-26 13:22 ` Michael Olbrich
2026-10-27 0:07 ` Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 15/17] Revert "sepolgen: remove after one year in staging" Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 16/17] sepolgen: version bump 1.1.8 -> 3.11 Ladislav Michl
2026-10-20 11:49 ` [ptxdist] [PATCH v1 17/17] selinux: restore the global option Ladislav Michl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe93bcc72f805e6940f924ea7817b91add3a1975.1792491301.git.ladis@triops.cz \
--to=oss-lists@triops.cz \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox