mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <oss-lists@triops.cz>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 17/17] selinux: restore the global option
Date: Sat, 31 Oct 2026 21:38:18 +0100	[thread overview]
Message-ID: <20261031203823.357406-18-oss-lists@triops.cz> (raw)
In-Reply-To: <20261031203823.357406-1-oss-lists@triops.cz>

From: Ladislav Michl <ladis@triops.cz>

Restore the GLOBAL_SELINUX option in its former glory.

As GLOBAL_SELINUX_OPTION has no users, drop it.

Signed-off-by: Ladislav Michl <ladis@triops.cz>
---
 CHANGES:
 - v2: wire GLOBAL_SELINUX also into dbus (replacing BROKEN DBUS_SELINUX)
       and iproute2.

 rules/at.in           | 1 +
 rules/busybox.in      | 1 +
 rules/casync.in       | 1 +
 rules/connman.in      | 1 +
 rules/core-selinux.in | 1 -
 rules/coreutils.in    | 1 +
 rules/dbus.in         | 6 +-----
 rules/dbus.make       | 2 +-
 rules/f2fs-tools.in   | 1 +
 rules/gnupg.in        | 1 +
 rules/iproute2.in     | 1 +
 rules/iproute2.make   | 3 +++
 rules/logrotate.in    | 1 +
 rules/lxc.in          | 1 +
 rules/mtd-utils.in    | 1 +
 rules/openssh.in      | 1 +
 rules/pre/Rules.make  | 6 ------
 rules/shadow.in       | 1 +
 rules/strongswan.in   | 1 +
 rules/systemd.in      | 1 +
 20 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/rules/at.in b/rules/at.in
index 13a1916c6..567324300 100644
--- a/rules/at.in
+++ b/rules/at.in
@@ -9,6 +9,7 @@ menuconfig AT
 	select ROOTFS_VAR_SPOOL_CRON
 	select BUSYBOX_START_STOP_DAEMON			if AT_STARTSCRIPT
 	select BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY		if AT_STARTSCRIPT
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  Delayed job execution and batch processing
 
diff --git a/rules/busybox.in b/rules/busybox.in
index 6bb60145d..612e21ade 100644
--- a/rules/busybox.in
+++ b/rules/busybox.in
@@ -10,6 +10,7 @@ menuconfig BUSYBOX
 	select GCCLIBS_GCC_S	if !BUSYBOX_STATIC
 	select PAM		if GLOBAL_PAM
 	select BUSYBOX_PAM	if GLOBAL_PAM
+	select LIBSELINUX	if BUSYBOX_SELINUX
 	select LIBTIRPC		if BUSYBOX_NEED_LIBTIRPC
 	select BUSYBOX_INSTALL_NO_USR
 	help
diff --git a/rules/casync.in b/rules/casync.in
index 2135e84ff..b11b8c5ce 100644
--- a/rules/casync.in
+++ b/rules/casync.in
@@ -16,6 +16,7 @@ menuconfig CASYNC
 	select UDEV_LIBUDEV	if CASYNC_UDEV
 	select XZ		if CASYNC_LZMA
 	select ZLIB		if CASYNC_ZLIB
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  casync - Content Addressable Data Synchronizer.
 
diff --git a/rules/connman.in b/rules/connman.in
index a051e66f7..53738fcf0 100644
--- a/rules/connman.in
+++ b/rules/connman.in
@@ -14,6 +14,7 @@ menuconfig CONNMAN
 	select WPA_SUPPLICANT_CTRL_IFACE_DBUS	if CONNMAN_WIFI
 	select BUSYBOX_START_STOP_DAEMON	if CONNMAN_STARTSCRIPT && RUNTIME
 	select ROOTFS_VAR_LIB			if RUNTIME
+	select LIBSELINUX	if GLOBAL_SELINUX
 	prompt "connman                       "
 	help
 	  The Connection Manager project provides a daemon for
diff --git a/rules/core-selinux.in b/rules/core-selinux.in
index 2a5cb87ef..236c77441 100644
--- a/rules/core-selinux.in
+++ b/rules/core-selinux.in
@@ -5,7 +5,6 @@ config GLOBAL_SELINUX
 	select BUSYBOX_SELINUX			if BUSYBOX
 	select BUSYBOX_BUILD_LIBBUSYBOX		if BUSYBOX
 	select BUSYBOX_FEATURE_INDIVIDUAL	if BUSYBOX
-	depends on BROKEN
 	prompt "SELinux support"
 	help
 	  This will enable SELinux for all packages with optional
diff --git a/rules/coreutils.in b/rules/coreutils.in
index 504283736..c3aee2786 100644
--- a/rules/coreutils.in
+++ b/rules/coreutils.in
@@ -8,6 +8,7 @@ menuconfig COREUTILS
 	select GCCLIBS_GCC_S
 	select ATTR		if COREUTILS_XATTR
 	select SYSTEMD		if COREUTILS_SYSTEMD
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  This package contains the essential basic system utilities.
 
diff --git a/rules/dbus.in b/rules/dbus.in
index b205ee62f..d4776a5d1 100644
--- a/rules/dbus.in
+++ b/rules/dbus.in
@@ -8,6 +8,7 @@ menuconfig DBUS
 	select XORG_LIB_X11	if DBUS_X
 	select MACHINE_ID	if RUNTIME
 	select SYSTEMD		if DBUS_SYSTEMD
+	select LIBSELINUX	if GLOBAL_SELINUX
 	select LIBC_PTHREAD
 	select LIBC_RT
 	help
@@ -27,11 +28,6 @@ menuconfig DBUS
 
 if DBUS
 
-config DBUS_SELINUX
-	prompt "selinux support [BROKEN]"
-	depends on BROKEN
-	bool
-
 config DBUS_SYSTEMD
 	bool
 	default INITMETHOD_SYSTEMD
diff --git a/rules/dbus.make b/rules/dbus.make
index db5b9d0b6..fd0f3fb1e 100644
--- a/rules/dbus.make
+++ b/rules/dbus.make
@@ -62,7 +62,7 @@ DBUS_CONF_OPT	:= \
 	-Dmodular_tests=disabled \
 	-Dqt_help=disabled \
 	-Drelocation=disabled \
-	-Dselinux=$(call ptx/endis, PTXCONF_DBUS_SELINUX)d \
+	-Dselinux=$(call ptx/endis, PTXCONF_GLOBAL_SELINUX)d \
 	-Dstats=false \
 	-Dsystemd=$(call ptx/endis, PTXCONF_DBUS_SYSTEMD)d \
 	-Dsystemd_system_unitdir=/usr/lib/systemd/system \
diff --git a/rules/f2fs-tools.in b/rules/f2fs-tools.in
index dbcdb9d96..5d2ba5f41 100644
--- a/rules/f2fs-tools.in
+++ b/rules/f2fs-tools.in
@@ -5,6 +5,7 @@ config F2FS_TOOLS
 	prompt "f2fs-tools"
 	select LIBUUID
 	select LIBBLKID
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  The f2fs-tools package provides the filesystem utilities for use
 	  with the f2fs filesystem (flash-friendly filesystem)
diff --git a/rules/gnupg.in b/rules/gnupg.in
index 2bad06187..9b731efc0 100644
--- a/rules/gnupg.in
+++ b/rules/gnupg.in
@@ -15,6 +15,7 @@ menuconfig GNUPG
 	select BZIP2_LIBBZ2 if GNUPG_GPG_BZIP2
 	# disabling GNUPG_GPG_EDDSA is broken
 	select GNUPG_GPG_EDDSA
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  GnuPG - The GNU Privacy Guard suite of programs
 
diff --git a/rules/iproute2.in b/rules/iproute2.in
index 48e44fb3b..03a7bf4a1 100644
--- a/rules/iproute2.in
+++ b/rules/iproute2.in
@@ -11,6 +11,7 @@ menuconfig IPROUTE2
 	select LIBC_PTHREAD	if IPROUTE2_ARPD
 	select LIBC_RESOLV
 	select LIBMNL		if IPROUTE2_DEVLINK || IPROUTE2_DCB
+	select LIBSELINUX	if GLOBAL_SELINUX
 	select PYTHON3		if IPROUTE2_ROUTEL && RUNTIME
 	help
 	  Networking and traffic control tools
diff --git a/rules/iproute2.make b/rules/iproute2.make
index 18222d792..706d31089 100644
--- a/rules/iproute2.make
+++ b/rules/iproute2.make
@@ -39,6 +39,9 @@ $(STATEDIR)/iproute2.prepare:
 	@echo 'TC_CONFIG_ATM:=n'	>> $(IPROUTE2_DIR)/config.mk
 ifndef PTXCONF_IPROUTE2_ARPD
 	@echo 'HAVE_BERKELEY_DB:=n'	>> $(IPROUTE2_DIR)/config.mk
+endif
+ifndef PTXCONF_GLOBAL_SELINUX
+	@echo 'HAVE_SELINUX:=n'		>> $(IPROUTE2_DIR)/config.mk
 endif
 	@$(call touch)
 
diff --git a/rules/logrotate.in b/rules/logrotate.in
index f3b465b87..9f13695d3 100644
--- a/rules/logrotate.in
+++ b/rules/logrotate.in
@@ -6,6 +6,7 @@ menuconfig LOGROTATE
 	select LIBPOPT
 	select ACL if LOGROTATE_ACL
 	select ROOTFS_VAR_LIB		if RUNTIME
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  The logrotate utility is designed to simplify the
 	  administration of log files on a system which generates a lot
diff --git a/rules/lxc.in b/rules/lxc.in
index e8dc765e6..3a06c8724 100644
--- a/rules/lxc.in
+++ b/rules/lxc.in
@@ -13,6 +13,7 @@ menuconfig LXC
 	select IPTABLES_IPV4		if LXC_SYSTEMD_UNIT
 	select IPTABLES_IPV6		if LXC_SYSTEMD_UNIT
 	select IPTABLES_INSTALL_TOOLS	if LXC_SYSTEMD_UNIT
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  LXC is a userspace interface for the Linux kernel containment
 	  features. Through a powerful API and simple tools, it lets
diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index d3143e2d5..265279f72 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -8,6 +8,7 @@ menuconfig MTD_UTILS
 	select ZLIB
 	select LIBUUID		if MTD_UTILS_UBIFS
 	select LIBLZO		if MTD_UTILS_USE_LIBLZO
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  Memory Technology Device Utilities
 
diff --git a/rules/openssh.in b/rules/openssh.in
index afbd19675..e73b3343e 100644
--- a/rules/openssh.in
+++ b/rules/openssh.in
@@ -9,6 +9,7 @@ menuconfig OPENSSH
 	select RC_ONCE if OPENSSH_SSHD_GENKEYS && RUNTIME
 	select BUSYBOX_START_STOP_DAEMON if OPENSSH_SSHD_STARTSCRIPT
 	select OPENSSH_KEYGEN if OPENSSH_SSHD_GENKEYS
+	select LIBSELINUX	if GLOBAL_SELINUX
 	prompt "openssh                       "
 	help
 	  secure shell client/server, an rlogin/rsh/rcp replacement
diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index fd5ddfe55..89b4e9c02 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -296,12 +296,6 @@ else
 GLOBAL_PAM_OPTION := --disable-pam
 endif
 
-ifdef PTXCONF_GLOBAL_SELINUX
-GLOBAL_SELINUX_OPTION := --enable-selinux
-else
-GLOBAL_SELINUX_OPTION := --disable-selinux
-endif
-
 # ----------------------------------------------------------------------------
 # HOST stuff
 # ----------------------------------------------------------------------------
diff --git a/rules/shadow.in b/rules/shadow.in
index b3979ebd3..3313d3771 100644
--- a/rules/shadow.in
+++ b/rules/shadow.in
@@ -7,6 +7,7 @@ menuconfig SHADOW
 	depends on (!BUSYBOX_ADDUSER && !BUSYBOX_ADDGROUP && !BUSYBOX_LOGIN && !BUSYBOX_PASSWD && !BUSYBOX_SU) || ALLYES
 	select LIBC_CRYPT
 	select PAM		if GLOBAL_PAM
+	select LIBSELINUX	if GLOBAL_SELINUX
 	prompt "shadow                        "
 	help
 	  Password and account management tool suite with support
diff --git a/rules/strongswan.in b/rules/strongswan.in
index dca4cac99..78ddbd526 100644
--- a/rules/strongswan.in
+++ b/rules/strongswan.in
@@ -7,6 +7,7 @@ menuconfig STRONGSWAN
 	select LIBCURL if STRONGSWAN_LIBCURL
 	select OPENSSL if STRONGSWAN_OPENSSL
 	select SYSTEMD if STRONGSWAN_SYSTEMD_UNIT
+	select LIBSELINUX	if GLOBAL_SELINUX
 	help
 	  strongSwan is a complete IPsec implementation.
 	  Please keep in mind to configure the kernel accordingly to fulfill
diff --git a/rules/systemd.in b/rules/systemd.in
index cfe4d40b5..cc1fda27e 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -35,6 +35,7 @@ config SYSTEMD
 	select LZ4		if SYSTEMD_LZ4
 	select ZSTD		if SYSTEMD_ZSTD
 	select PCRE2		if SYSTEMD_PCRE2
+	select LIBSELINUX	if GLOBAL_SELINUX
 	select LIBMICROHTTPD	if SYSTEMD_MICROHTTPD
 	select LIBSECCOMP	if SYSTEMD_SECCOMP
 	select IPTABLES		if SYSTEMD_IPMASQUERADE
-- 
2.47.3




      parent reply	other threads:[~2026-10-31 20:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 20:38 [ptxdist] [PATCH v2 00/17] selinux: back at version 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 01/17] selinux: add common version and URL Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 02/17] Revert "python: remove after more than one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 03/17] host-swig: version bump 4.0.1 -> 4.5.1 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 04/17] Revert "*libsepol: remove" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 05/17] libsepol: version bump 2.1.8 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 06/17] Revert "libselinux: remove after more than one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 07/17] libselinux: version bump 2.1.12 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 08/17] audit: new package Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 09/17] Revert "libsemanage: remove after more than one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 10/17] libsemanage: version bump 2.1.9 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 11/17] Revert "checkpolicy: remove after more than one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 12/17] checkpolicy: version bump 2.1.11 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 13/17] Revert "policycoreutils: remove after more than one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 14/17] policycoreutils: version bump 2.1.13 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 15/17] Revert "sepolgen: remove after one year in staging" Ladislav Michl
2026-10-31 20:38 ` [ptxdist] [PATCH v2 16/17] sepolgen: version bump 1.1.8 -> 3.11 Ladislav Michl
2026-10-31 20:38 ` Ladislav Michl [this message]

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=20261031203823.357406-18-oss-lists@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