All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL
@ 2019-10-09 22:19 Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 2/4] package/selinux-python: remove redundant dependencies Arnout Vandecappelle
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-10-09 22:19 UTC (permalink / raw
  To: buildroot

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/selinux-python/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/selinux-python/Config.in b/package/selinux-python/Config.in
index 2013bd6445..5e44b5deb0 100644
--- a/package/selinux-python/Config.in
+++ b/package/selinux-python/Config.in
@@ -9,6 +9,7 @@ menuconfig BR2_PACKAGE_SELINUX_PYTHON
 	  A set of SELinux tools written in python that help with
 	  managing a system with SELinux enabled. If no packages are
 	  selected nothing will actually be built.
+
 	  https://github.com/SELinuxProject/selinux/wiki
 
 if BR2_PACKAGE_SELINUX_PYTHON
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 2/4] package/selinux-python: remove redundant dependencies
  2019-10-09 22:19 [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Arnout Vandecappelle
@ 2019-10-09 22:19 ` Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 3/4] package/selinux-python: use ordinary config instead of menuconfig Arnout Vandecappelle
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-10-09 22:19 UTC (permalink / raw
  To: buildroot

The selinux-python package has two sub-packages, audit2allow and
sepolgen. Both of these repeat the dependencies (and comment) of the
top-level selinux-python package. Remove those redundant dependencies
(and comments).

This redundancy was introduced by commit 9d6da7a26. Originally, sepolgen
was a separate package and audit2allow was a sub-package of
policycoreutils, so both of them had these dependencies. When the two
options were moved into selinux-python, the dependencies stayed.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: rebase on master - I created this patch series while I was half-way
applying the other selinux series from Thomas, and I hadn't noticed that
there was another patch updating selinux-python.
---
 package/selinux-python/Config.in | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/package/selinux-python/Config.in b/package/selinux-python/Config.in
index 5e44b5deb0..00ca6b9c38 100644
--- a/package/selinux-python/Config.in
+++ b/package/selinux-python/Config.in
@@ -16,10 +16,6 @@ if BR2_PACKAGE_SELINUX_PYTHON
 
 config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
 	bool "audit2allow"
-	depends on BR2_USE_WCHAR # sepolgen
-	depends on BR2_USE_MMU # sepolgen
-	depends on BR2_TOOLCHAIN_HAS_THREADS # sepolgen, checkpolicy
-	depends on !BR2_STATIC_LIBS # sepolgen
 	select BR2_PACKAGE_CHECKPOLICY
 	select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
 	select BR2_PACKAGE_SEMODULE_UTILS
@@ -32,27 +28,13 @@ config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
 	  audit2why - translates SELinux audit messages into a
 	  description of why the access was denied (audit2allow -w)
 
-comment "audit2allow needs a toolchain w/ wchar, threads, dynamic library"
-	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		BR2_STATIC_LIBS
-
 config BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
 	bool "sepolgen"
-	depends on BR2_USE_WCHAR
-	depends on BR2_USE_MMU
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_SEMODULE_UTILS
 	help
 	  This package contains a Python module that allows you to
 	  generate an initial SELinux policy module template.
 
-comment "sepolgen needs a toolchain w/ wchar, threads, dynamic library"
-	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		BR2_STATIC_LIBS
-
 endif
 
 comment "selinux-python packages needs a toolchain w/ wchar, threads, dynamic library"
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 3/4] package/selinux-python: use ordinary config instead of menuconfig
  2019-10-09 22:19 [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 2/4] package/selinux-python: remove redundant dependencies Arnout Vandecappelle
@ 2019-10-09 22:19 ` Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 4/4] package/selinux-python: always build sepolgen Arnout Vandecappelle
  2019-10-10 20:21 ` [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-10-09 22:19 UTC (permalink / raw
  To: buildroot

selinux-python only has two sub-options, so menuconfig is overkill.
Convert it to a normal config with indented sub-option.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/selinux-python/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/selinux-python/Config.in b/package/selinux-python/Config.in
index 00ca6b9c38..5b6cbc80e3 100644
--- a/package/selinux-python/Config.in
+++ b/package/selinux-python/Config.in
@@ -1,4 +1,4 @@
-menuconfig BR2_PACKAGE_SELINUX_PYTHON
+config BR2_PACKAGE_SELINUX_PYTHON
 	bool "selinux-python"
 	depends on BR2_USE_MMU
 	depends on BR2_USE_WCHAR
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 4/4] package/selinux-python: always build sepolgen
  2019-10-09 22:19 [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 2/4] package/selinux-python: remove redundant dependencies Arnout Vandecappelle
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 3/4] package/selinux-python: use ordinary config instead of menuconfig Arnout Vandecappelle
@ 2019-10-09 22:19 ` Arnout Vandecappelle
  2019-10-10 20:21 ` [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-10-09 22:19 UTC (permalink / raw
  To: buildroot

The selinux-python package has two suboptions, audit2allow and sepolgen.
If neither of them is selected, nothing gets installed, which is not so
nice. Since audit2allow selects sepolgen, sepolgen will always be
installed if anything is installed. Therefore, it makes no sense to have
a separate option for sepolgen.

Remove the BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN and always install
sepolgen. With this, it's more logical to move the unconditional
addition of sepolgen to SELINUX_PYTHON_MAKE_DIRS before audit2allow.

Remove selecting BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN from the legacy
handling of BR2_PACKAGE_SEPOLGEN. It already selects
BR2_PACKAGE_SELINUX_PYTHON, so sepolgen is implied.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 Config.in.legacy                         |  1 -
 package/selinux-python/Config.in         | 14 ++++----------
 package/selinux-python/selinux-python.mk |  6 ++----
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 4a670f0f0e..feb0a7d819 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -1693,7 +1693,6 @@ config BR2_PACKAGE_SEPOLGEN
 	bool "sepolgen package has been removed"
 	select BR2_LEGACY
 	select BR2_PACKAGE_SELINUX_PYTHON
-	select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
 	help
 	  Sepolgen is no longer a individual package, but instead has
 	  been moved into the selinux-python package by the SELinux
diff --git a/package/selinux-python/Config.in b/package/selinux-python/Config.in
index 5b6cbc80e3..5a561fda3b 100644
--- a/package/selinux-python/Config.in
+++ b/package/selinux-python/Config.in
@@ -7,8 +7,10 @@ config BR2_PACKAGE_SELINUX_PYTHON
 	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
 	help
 	  A set of SELinux tools written in python that help with
-	  managing a system with SELinux enabled. If no packages are
-	  selected nothing will actually be built.
+	  managing a system with SELinux enabled.
+
+	  The sepolgen program is always installed. It allows to
+	  generate an initial SELinux policy module template.
 
 	  https://github.com/SELinuxProject/selinux/wiki
 
@@ -17,7 +19,6 @@ if BR2_PACKAGE_SELINUX_PYTHON
 config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
 	bool "audit2allow"
 	select BR2_PACKAGE_CHECKPOLICY
-	select BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
 	select BR2_PACKAGE_SEMODULE_UTILS
 	help
 	  This module installs two programs:
@@ -28,13 +29,6 @@ config BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW
 	  audit2why - translates SELinux audit messages into a
 	  description of why the access was denied (audit2allow -w)
 
-config BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN
-	bool "sepolgen"
-	select BR2_PACKAGE_SEMODULE_UTILS
-	help
-	  This package contains a Python module that allows you to
-	  generate an initial SELinux policy module template.
-
 endif
 
 comment "selinux-python packages needs a toolchain w/ wchar, threads, dynamic library"
diff --git a/package/selinux-python/selinux-python.mk b/package/selinux-python/selinux-python.mk
index 978bee7c88..ebd91d5ab3 100644
--- a/package/selinux-python/selinux-python.mk
+++ b/package/selinux-python/selinux-python.mk
@@ -24,15 +24,13 @@ SELINUX_PYTHON_MAKE_OPTS += \
 	PYTHONLIBDIR="usr/lib/python$(PYTHON_VERSION_MAJOR)"
 endif
 
+SELINUX_PYTHON_MAKE_DIRS = sepolgen/src/sepolgen
+
 ifeq ($(BR2_PACKAGE_SELINUX_PYTHON_AUDIT2ALLOW),y)
 SELINUX_PYTHON_DEPENDENCIES += checkpolicy
 SELINUX_PYTHON_MAKE_DIRS += audit2allow
 endif
 
-ifeq ($(BR2_PACKAGE_SELINUX_PYTHON_SEPOLGEN),y)
-SELINUX_PYTHON_MAKE_DIRS += sepolgen/src/sepolgen
-endif
-
 define SELINUX_PYTHON_BUILD_CMDS
 	$(foreach d,$(SELINUX_PYTHON_MAKE_DIRS),
 		$(MAKE) -C $(@D)/$(d) $(SELINUX_PYTHON_MAKE_OPTS) \
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL
  2019-10-09 22:19 [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Arnout Vandecappelle
                   ` (2 preceding siblings ...)
  2019-10-09 22:19 ` [Buildroot] [PATCH v2 4/4] package/selinux-python: always build sepolgen Arnout Vandecappelle
@ 2019-10-10 20:21 ` Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-10-10 20:21 UTC (permalink / raw
  To: buildroot

On Thu, 10 Oct 2019 00:19:15 +0200
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> wrote:

> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  package/selinux-python/Config.in | 1 +
>  1 file changed, 1 insertion(+)

I've applied patches 1 to 3, and marked 4 as rejected, as discussed on
the v1 of this series.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-10 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 22:19 [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Arnout Vandecappelle
2019-10-09 22:19 ` [Buildroot] [PATCH v2 2/4] package/selinux-python: remove redundant dependencies Arnout Vandecappelle
2019-10-09 22:19 ` [Buildroot] [PATCH v2 3/4] package/selinux-python: use ordinary config instead of menuconfig Arnout Vandecappelle
2019-10-09 22:19 ` [Buildroot] [PATCH v2 4/4] package/selinux-python: always build sepolgen Arnout Vandecappelle
2019-10-10 20:21 ` [Buildroot] [PATCH v2 1/4] package/selinux-python: add missing empty line before URL Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.