mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Ladislav Michl <oss-lists@triops.cz>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2 16/17] sepolgen: version bump 1.1.8 -> 3.11
Date: Sat, 14 Nov 2026 17:07:28 +0100	[thread overview]
Message-ID: <aviHQPGm8pCLrNsT@pengutronix.de> (raw)
In-Reply-To: <20261031203823.357406-17-oss-lists@triops.cz>

On Sat, Oct 31, 2026 at 09:38:17PM +0100, Ladislav Michl wrote:
> From: Ladislav Michl <ladis@triops.cz>
> 
> Since SELinux userspace 2.8, the sepolgen python module is shipped in the
> selinux-python tarball together with audit2allow, so rename the package
> to selinux-python.
> 
> Signed-off-by: Ladislav Michl <ladis@triops.cz>
> ---
>  CHANGES:
>  - v2: pass PREFIX, BINDIR, PYTHON, PYTHONLIBDIR and CFLAGS as make
>        options instead of environment, so they apply to install as well.
> 
>  rules/selinux-python.in   | 12 +++++++
>  rules/selinux-python.make | 68 +++++++++++++++++++++++++++++++++++++++
>  rules/sepolgen.in         | 29 -----------------
>  rules/sepolgen.make       | 54 -------------------------------
>  4 files changed, 80 insertions(+), 83 deletions(-)
>  create mode 100644 rules/selinux-python.in
>  create mode 100644 rules/selinux-python.make
>  delete mode 100644 rules/sepolgen.in
>  delete mode 100644 rules/sepolgen.make
> 
> diff --git a/rules/selinux-python.in b/rules/selinux-python.in
> new file mode 100644
> index 000000000..d2f6eb655
> --- /dev/null
> +++ b/rules/selinux-python.in
> @@ -0,0 +1,12 @@
> +## SECTION=selinux
> +
> +config SELINUX_PYTHON
> +	tristate
> +	prompt "selinux-python"
> +	select PYTHON3
> +	select LIBSEPOL
> +	select LIBSELINUX
> +	select LIBSELINUX_PYTHON
> +	help
> +	  audit2allow and the sepolgen python module it uses to
> +	  generate SELinux policy from audit messages.
> diff --git a/rules/selinux-python.make b/rules/selinux-python.make
> new file mode 100644
> index 000000000..89e4c0f32
> --- /dev/null
> +++ b/rules/selinux-python.make
> @@ -0,0 +1,68 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2013 by Marc Kleine-Budde <mkl@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_SELINUX_PYTHON) += selinux-python
> +
> +#
> +# Paths and names
> +#
> +SELINUX_PYTHON_VERSION	:= $(SELINUX_VERSION)
> +SELINUX_PYTHON_SHA256	:= f854d7fe67981d80c612067e97c1804f641a9dfcca2d38baeb3efe52b7875398
> +SELINUX_PYTHON		:= selinux-python-$(SELINUX_PYTHON_VERSION)
> +SELINUX_PYTHON_SUFFIX	:= tar.gz
> +SELINUX_PYTHON_URL	:= $(SELINUX_URL)/$(SELINUX_PYTHON).$(SELINUX_PYTHON_SUFFIX)
> +SELINUX_PYTHON_SOURCE	:= $(SRCDIR)/$(SELINUX_PYTHON).$(SELINUX_PYTHON_SUFFIX)
> +SELINUX_PYTHON_DIR	:= $(BUILDDIR)/$(SELINUX_PYTHON)
> +SELINUX_PYTHON_LICENSE	:= GPL-2.0-only
> +SELINUX_PYTHON_LICENSE_FILES	:= file://LICENSE;md5=393a5ca445f6965873eca0259a17f833
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +SELINUX_PYTHON_CONF_TOOL	:= NO
> +SELINUX_PYTHON_MAKE_ENV		:= $(CROSS_ENV)
> +SELINUX_PYTHON_MAKE_OPT		= \
> +	SUBDIRS="sepolgen audit2allow" \
> +	PREFIX=/usr \
> +	BINDIR=/usr/bin \
> +	PYTHON=$(CROSS_PYTHON3) \
> +	PYTHONLIBDIR=$(PYTHON3_SITEPACKAGES) \
> +	CFLAGS="-O2 -Wall -g"
> +SELINUX_PYTHON_INSTALL_OPT	= \
> +	$(SELINUX_PYTHON_MAKE_OPT) \
> +	install
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/selinux-python.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, selinux-python)
> +	@$(call install_fixup, selinux-python,PRIORITY,optional)
> +	@$(call install_fixup, selinux-python,SECTION,base)
> +	@$(call install_fixup, selinux-python,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
> +	@$(call install_fixup, selinux-python,DESCRIPTION,missing)
> +
> +	@$(call install_tree, selinux-python, 0, 0, -, $(PYTHON3_SITEPACKAGES))

Again, use install_glob.

Michael

> +	@$(call install_alternative, selinux-python, 0, 0, 0644, /var/lib/sepolgen/perm_map)
> +	@$(call install_copy, selinux-python, 0, 0, 0755, -, /usr/bin/audit2allow)
> +	@$(call install_link, selinux-python, audit2allow, /usr/bin/audit2why)
> +	@$(call install_copy, selinux-python, 0, 0, 0755, -, /usr/bin/sepolgen-ifgen)
> +	@$(call install_copy, selinux-python, 0, 0, 0755, -, /usr/bin/sepolgen-ifgen-attr-helper)
> +
> +	@$(call install_finish, selinux-python)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> diff --git a/rules/sepolgen.in b/rules/sepolgen.in
> deleted file mode 100644
> index 94f2ce071..000000000
> --- a/rules/sepolgen.in
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -## SECTION=staging
> -## old section:
> -### SECTION=selinux
> -
> -config SEPOLGEN
> -	tristate
> -	prompt "sepolgen"
> -	select PYTHON
> -	select LIBSELINUX
> -	select LIBSELINUX_PYTHON
> -	help
> -	  A Python module used in SELinux policy generation
> -
> -	  This package contains a Python module that forms the core of
> -	  the modern audit2allow (which is a part of the package
> -	  policycoreutils). The sepolgen library is structured to give
> -	  flexibility to the application using it. The library
> -	  contains: Reference Policy Representation, which are Objects
> -	  for representing policies and the reference policy
> -	  interfaces. Secondly, it has objects and algorithms for
> -	  representing access and sets of access in an abstract way
> -	  and searching that access. It also has a parser for
> -	  reference policy "headers". It contains infrastructure for
> -	  parsing SELinux related messages as produced by the audit
> -	  system. It has facilities for generating policy based on
> -	  required access.
> -
> -	  STAGING: remove in ptxdist-2020.06.0
> -	  Old version that needs to be updated.
> diff --git a/rules/sepolgen.make b/rules/sepolgen.make
> deleted file mode 100644
> index 7084e1d1d..000000000
> --- a/rules/sepolgen.make
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -# -*-makefile-*-
> -#
> -# Copyright (C) 2013 by Marc Kleine-Budde <mkl@pengutronix.de>
> -#
> -# For further information about the PTXdist project and license conditions
> -# see the README file.
> -#
> -
> -#
> -# We provide this package
> -#
> -PACKAGES-$(PTXCONF_SEPOLGEN) += sepolgen
> -
> -#
> -# Paths and names
> -#
> -SEPOLGEN_VERSION	:= 1.1.8
> -SEPOLGEN_MD5		:= d734ff236639cc1bd3a33901774fa98d
> -SEPOLGEN		:= sepolgen-$(SEPOLGEN_VERSION)
> -SEPOLGEN_SUFFIX		:= tar.gz
> -SEPOLGEN_URL		:= https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20120924/$(SEPOLGEN).$(SEPOLGEN_SUFFIX)
> -SEPOLGEN_SOURCE		:= $(SRCDIR)/$(SEPOLGEN).$(SEPOLGEN_SUFFIX)
> -SEPOLGEN_DIR		:= $(BUILDDIR)/$(SEPOLGEN)
> -SEPOLGEN_LICENSE	:= GPL-2.0-only
> -
> -# ----------------------------------------------------------------------------
> -# Prepare
> -# ----------------------------------------------------------------------------
> -
> -SEPOLGEN_CONF_TOOL := NO
> -# no ':=' because of $(PYTHON_SITEPACKAGES)
> -SEPOLGEN_MAKE_ENV = PYTHONLIBDIR=$(PYTHON_SITEPACKAGES)
> -
> -# ----------------------------------------------------------------------------
> -# Target-Install
> -# ----------------------------------------------------------------------------
> -
> -$(STATEDIR)/sepolgen.targetinstall:
> -	@$(call targetinfo)
> -
> -	@$(call install_init, sepolgen)
> -	@$(call install_fixup, sepolgen,PRIORITY,optional)
> -	@$(call install_fixup, sepolgen,SECTION,base)
> -	@$(call install_fixup, sepolgen,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>")
> -	@$(call install_fixup, sepolgen,DESCRIPTION,missing)
> -
> -	@$(call install_tree, sepolgen, 0, 0, -, $(PYTHON_SITEPACKAGES))
> -	@$(call install_alternative, sepolgen, 0, 0, 0644, /var/lib/sepolgen/perm_map)
> -
> -	@$(call install_finish, sepolgen)
> -
> -	@$(call touch)
> -
> -# vim: syntax=make
> -- 
> 2.47.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2026-11-14 16:07 UTC|newest]

Thread overview: 22+ 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-11-14 15:55   ` Michael Olbrich
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-11-14 16:05   ` Michael Olbrich
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-11-14 16:01   ` Michael Olbrich
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-11-14 16:07   ` Michael Olbrich [this message]
2026-10-31 20:38 ` [ptxdist] [PATCH v2 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=aviHQPGm8pCLrNsT@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=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