Your message dated Sun, 19 Oct 2025 05:33:57 +0000
with message-id <[email protected]>
and subject line Bug#1065539: fixed in libselinux 3.9-2
has caused the Debian Bug report #1065539,
regarding libselinux: style suggestions for the packaging, not changing the debs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1065539: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065539
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libselinux
Severity: wishlist
Tags: patch

Hello.
Once the t64 transition is completed, you may want to review the
attached small suggestions and pick the ones you are interested in.
>From e5cdfa6d7d4236380eecc1af60610f65fbc42f20 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 19:38:30 +0100
Subject: [PATCH 01/16] Delegate Built-Using to dh-sequence-builtusing

---
 debian/control | 3 ++-
 debian/rules   | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/debian/control b/debian/control
index cdbeb88..c265940 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Uploaders: Laurent Bigonville <[email protected]>,
            Russell Coker <[email protected]>
 Standards-Version: 4.6.2
 Build-Depends: debhelper-compat (= 13),
+               dh-sequence-builtusing,
                dh-sequence-python3 <!nopython>,
                dh-sequence-ruby <!noruby>,
                file,
@@ -128,7 +129,7 @@ Description: Ruby bindings to SELinux shared libraries
 Package: python3-selinux
 Architecture: linux-any
 Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
-Built-Using: ${Built-Using}
+Built-Using: ${dh-builtusing:libsepol-dev}
 Section: python
 Provides: ${python3:Provides}
 Build-Profiles: <!nopython>
diff --git a/debian/rules b/debian/rules
index d3300f1..393ec9d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,8 +26,6 @@ endif
 
 DOPACKAGES = $(shell dh_listpackages)
 
-BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W "libsepol-dev")
-
 # Upstream recommends using this flag
 export DEB_CFLAGS_MAINT_APPEND = -fno-semantic-interposition
 ## The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
@@ -93,9 +91,6 @@ ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
 	done;
 endif
 
-override_dh_gencontrol:
-	dh_gencontrol -- -VBuilt-Using="$(BUILT_USING)"
-
 override_dh_makeshlibs:
 	dh_makeshlibs -plibselinux1 --add-udeb="libselinux1-udeb" -V
 	dh_makeshlibs --remaining-packages
-- 
2.39.2

>From c79f75c7d3a88e59521906d0079670e814670607 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 20:26:03 +0100
Subject: [PATCH 02/16] Refine pattern in debian/*.install with
 DEB_HOST_MULTIARCH

---
 debian/libselinux1-dev.install  | 6 +++---
 debian/libselinux1-udeb.install | 2 +-
 debian/libselinux1.install      | 2 +-
 debian/ruby-selinux.install     | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/debian/libselinux1-dev.install b/debian/libselinux1-dev.install
index 9b93167..1169fad 100644
--- a/debian/libselinux1-dev.install
+++ b/debian/libselinux1-dev.install
@@ -1,5 +1,5 @@
 usr/include/selinux/*.h
-usr/lib/*/*.a
-usr/lib/*/*.so
-usr/lib/*/pkgconfig/*.pc
+usr/lib/${DEB_HOST_MULTIARCH}/*.a
+usr/lib/${DEB_HOST_MULTIARCH}/*.so
+usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/*.pc
 usr/share/man/man3/*.3
diff --git a/debian/libselinux1-udeb.install b/debian/libselinux1-udeb.install
index 3de3b10..8b38ff6 100644
--- a/debian/libselinux1-udeb.install
+++ b/debian/libselinux1-udeb.install
@@ -1 +1 @@
-usr/lib/*/*.so.*
+usr/lib/${DEB_HOST_MULTIARCH}/*.so.*
diff --git a/debian/libselinux1.install b/debian/libselinux1.install
index 3de3b10..8b38ff6 100644
--- a/debian/libselinux1.install
+++ b/debian/libselinux1.install
@@ -1 +1 @@
-usr/lib/*/*.so.*
+usr/lib/${DEB_HOST_MULTIARCH}/*.so.*
diff --git a/debian/ruby-selinux.install b/debian/ruby-selinux.install
index 267ca7a..4117767 100644
--- a/debian/ruby-selinux.install
+++ b/debian/ruby-selinux.install
@@ -1 +1 @@
-usr/lib/*/ruby
+usr/lib/${DEB_HOST_MULTIARCH}/ruby
-- 
2.39.2

>From 15471b83749b22370d8f055861a1deb5e2ab24b2 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 21:58:00 +0100
Subject: [PATCH 03/16] debian/rules: use dpkg buildtools.mk Makefile snippet

---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 393ec9d..6fbf312 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,10 +6,10 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 include /usr/share/dpkg/architecture.mk
+
+include /usr/share/dpkg/buildtools.mk
 # for cross compilation
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-export CC := $(DEB_HOST_GNU_TYPE)-gcc
-export PKG_CONFIG := $(DEB_HOST_GNU_TYPE)-pkg-config
 export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
 define ruby_env
   RUBYLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/ruby-crossbuild/$$($(1) -e "puts RbConfig::CONFIG['ruby_version']")
-- 
2.39.2

>From 1c5907ac492b432af884e51719ae42da9e193836 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 21:58:41 +0100
Subject: [PATCH 04/16] debian/rules: use dpkg buildopts.mk Makefile snippet

---
 debian/rules | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 6fbf312..8b63043 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,10 +19,8 @@ define ruby_env
 endef
 endif
 
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-    MAKEFLAGS += -j$(NUMJOBS)
-endif
+include /usr/share/dpkg/buildopts.mk
+MAKEFLAGS += $(DEB_BUILD_OPTION_PARALLEL:%=-j%)
 
 DOPACKAGES = $(shell dh_listpackages)
 
-- 
2.39.2

>From a83f1a53d75f28c181a92f1adb975a55a3ec681c Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 22:02:05 +0100
Subject: [PATCH 05/16] debian/rules: use dpkg buildflags.mk Makefile snippet

This is recommended by dpkg-buildflags(1) in case debian/rules is
invoked directly.
---
 debian/rules | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 8b63043..5faf854 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DEB_BUILD_MAINT_OPTIONS := hardening=+all
 
 include /usr/share/dpkg/architecture.mk
 
@@ -25,10 +25,13 @@ MAKEFLAGS += $(DEB_BUILD_OPTION_PARALLEL:%=-j%)
 DOPACKAGES = $(shell dh_listpackages)
 
 # Upstream recommends using this flag
-export DEB_CFLAGS_MAINT_APPEND = -fno-semantic-interposition
+DEB_CFLAGS_MAINT_APPEND := -fno-semantic-interposition
 ## The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
 ## missing (hardening) flags. Also enable Wall and Wextra to spot basic irregularities.
-export DEB_CFLAGS_MAINT_APPEND += $(shell dpkg-buildflags --get CPPFLAGS) -Wall -Wextra
+DEB_CFLAGS_MAINT_APPEND += -Wall -Wextra
+DPKG_EXPORT_BUILDFLAGS := 1
+include /usr/share/dpkg/buildflags.mk
+export CFLAGS += $(CPPFLAGS)
 
 ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
 PY3VERSIONS = $(shell py3versions -rv)
-- 
2.39.2

>From e307d1210120115d6e3b9c2105c32ee442853508 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Sun, 3 Mar 2024 22:05:19 +0100
Subject: [PATCH 06/16] debian/rules: replace shell loops with Make loops

Each actually executed command is displayed first, and any failure
interrupts the build (without sh -e).

The order of the recursive Makes is different ('make python' and 'make
ruby' are executed before 'make all'), and the patch of some python
files happens even if python is disabled (but does nothing then).
---
 debian/rules | 63 +++++++++++++++++++++-------------------------------
 1 file changed, 25 insertions(+), 38 deletions(-)

diff --git a/debian/rules b/debian/rules
index 5faf854..31c1fad 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,51 +46,38 @@ endif
 ## Set up some variables to be passed to the upstream Makefile
 extra_make_args = ARCH=$(patsubst i%86,i386,$(DEB_HOST_GNU_CPU))
 extra_make_args += USE_PCRE2=y
-override_dh_auto_build:
+
+override_dh_auto_build: $(PY3VERSIONS:%=build-python-%) \
+                        $(RUBY_VERSIONS:%=build-ruby-%)
 	$(MAKE) all $(extra_make_args)
-ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(PY3VERSIONS); do        \
-	  $(MAKE) pywrap $(extra_make_args) PYTHON=python$$version; \
-	done;
-endif
-ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(RUBY_VERSIONS); do      \
-	  $(call ruby_env,$$version) \
-	  $(MAKE) rubywrap $(extra_make_args) RUBY=$$version; \
-	done;
-endif
+build-python-%:
+	$(MAKE) pywrap $(extra_make_args) PYTHON=python$*
+build-ruby-%:
+	$(call ruby_env,$*) \
+	$(MAKE) rubywrap $(extra_make_args) RUBY=$*
 
-override_dh_auto_install:
+override_dh_auto_install: $(PY3VERSIONS:%=install-python-%) \
+                          $(RUBY_VERSIONS:%=install-ruby-%)
 	$(MAKE) install $(extra_make_args) DESTDIR="${CURDIR}/debian/tmp" \
 	  LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
 	  SHLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
-ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(PY3VERSIONS); do \
-	  $(MAKE) install-pywrap $(extra_make_args) PYTHON=python$$version DESTDIR="${CURDIR}/debian/tmp" DEB_PYTHON_INSTALL_LAYOUT=deb; \
-	done;
-	find "${CURDIR}/debian/tmp" -name direct_url.json -delete ;
-	find "${CURDIR}/debian/tmp" -name RECORD -exec sed -i '/\/direct_url.json,/d' {} + ;
-endif
-ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(RUBY_VERSIONS); do \
-	  $(call ruby_env,$$version) \
-	  $(MAKE) install-rubywrap $(extra_make_args) RUBY=$$version DESTDIR="${CURDIR}/debian/tmp"; \
-	done;
-endif
+  # Patch the python installations.
+	find "${CURDIR}/debian/tmp" -name direct_url.json -delete
+	find "${CURDIR}/debian/tmp" -name RECORD -exec sed -i '/\/direct_url.json,/d' {} +
+install-python-%:
+	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* DESTDIR="${CURDIR}/debian/tmp" DEB_PYTHON_INSTALL_LAYOUT=deb
+install-ruby-%:
+	$(call ruby_env,$*) \
+	$(MAKE) install-rubywrap $(extra_make_args) RUBY=$* DESTDIR="${CURDIR}/debian/tmp"
 
-override_dh_auto_clean:
+override_dh_auto_clean: $(PY3VERSIONS:%=clean-python-%) \
+                        $(RUBY_VERSIONS:%=clean-ruby-%)
 	$(MAKE) distclean $(extra_make_args) PYTHON=true
-ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(PY3VERSIONS); do         \
-	  $(MAKE) clean-pywrap $(extra_make_args) PYTHON=python$$version;  \
-	done;
-endif
-ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
-	set -e; for version in $(RUBY_VERSIONS); do      \
-	  $(call ruby_env,$$version) \
-	  $(MAKE) clean-rubywrap $(extra_make_args) RUBY=$$version; \
-	done;
-endif
+clean-python-%:
+	$(MAKE) clean-pywrap $(extra_make_args) PYTHON=python$*
+clean-ruby-%:
+	$(call ruby_env,$*) \
+	$(MAKE) clean-rubywrap $(extra_make_args) RUBY=$*
 
 override_dh_makeshlibs:
 	dh_makeshlibs -plibselinux1 --add-udeb="libselinux1-udeb" -V
-- 
2.39.2

>From cbd8cbea7ad72cb8b5607a21df58d914cd361ac9 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 11:04:49 +0100
Subject: [PATCH 07/16] debian/rules: remove obsolete dh_makeshlibs override

This is automatic since debhelper 12.3.
---
 debian/rules | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 31c1fad..1d7f062 100755
--- a/debian/rules
+++ b/debian/rules
@@ -78,7 +78,3 @@ clean-python-%:
 clean-ruby-%:
 	$(call ruby_env,$*) \
 	$(MAKE) clean-rubywrap $(extra_make_args) RUBY=$*
-
-override_dh_makeshlibs:
-	dh_makeshlibs -plibselinux1 --add-udeb="libselinux1-udeb" -V
-	dh_makeshlibs --remaining-packages
-- 
2.39.2

>From fcefa311d4696e1cbd327cfafbce6ecd187eb2ba Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:08:39 +0100
Subject: [PATCH 08/16] debian/rules: avoid hardcoded duplications of libdir

---
 debian/rules | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 1d7f062..4ccd8de 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,13 +6,14 @@
 DEB_BUILD_MAINT_OPTIONS := hardening=+all
 
 include /usr/share/dpkg/architecture.mk
+libdir := /usr/lib/$(DEB_HOST_MULTIARCH)
 
 include /usr/share/dpkg/buildtools.mk
 # for cross compilation
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
 define ruby_env
-  RUBYLIB=/usr/lib/$(DEB_HOST_MULTIARCH)/ruby-crossbuild/$$($(1) -e "puts RbConfig::CONFIG['ruby_version']")
+  RUBYLIB=$(libdir)/ruby-crossbuild/$$($(1) -e "puts RbConfig::CONFIG['ruby_version']")
 endef
 else
 define ruby_env
@@ -59,8 +60,8 @@ build-ruby-%:
 override_dh_auto_install: $(PY3VERSIONS:%=install-python-%) \
                           $(RUBY_VERSIONS:%=install-ruby-%)
 	$(MAKE) install $(extra_make_args) DESTDIR="${CURDIR}/debian/tmp" \
-	  LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-	  SHLIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+	  LIBDIR=$(libdir) \
+	  SHLIBDIR=$(libdir)
   # Patch the python installations.
 	find "${CURDIR}/debian/tmp" -name direct_url.json -delete
 	find "${CURDIR}/debian/tmp" -name RECORD -exec sed -i '/\/direct_url.json,/d' {} +
-- 
2.39.2

>From 38562d0cbecbada42aac43a93382569de68a085d Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:09:06 +0100
Subject: [PATCH 09/16] debian/rules: avoid hardcoded duplications of destdir

---
 debian/rules | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 4ccd8de..596f7a2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -57,19 +57,20 @@ build-ruby-%:
 	$(call ruby_env,$*) \
 	$(MAKE) rubywrap $(extra_make_args) RUBY=$*
 
+destdir := '$(CURDIR)/debian/tmp'
 override_dh_auto_install: $(PY3VERSIONS:%=install-python-%) \
                           $(RUBY_VERSIONS:%=install-ruby-%)
-	$(MAKE) install $(extra_make_args) DESTDIR="${CURDIR}/debian/tmp" \
+	$(MAKE) install $(extra_make_args) DESTDIR=$(destdir) \
 	  LIBDIR=$(libdir) \
 	  SHLIBDIR=$(libdir)
   # Patch the python installations.
-	find "${CURDIR}/debian/tmp" -name direct_url.json -delete
-	find "${CURDIR}/debian/tmp" -name RECORD -exec sed -i '/\/direct_url.json,/d' {} +
+	find $(destdir) -name direct_url.json -delete
+	find $(destdir) -name RECORD -exec sed -i '/\/direct_url.json,/d' {} +
 install-python-%:
-	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* DESTDIR="${CURDIR}/debian/tmp" DEB_PYTHON_INSTALL_LAYOUT=deb
+	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* DESTDIR=$(destdir) DEB_PYTHON_INSTALL_LAYOUT=deb
 install-ruby-%:
 	$(call ruby_env,$*) \
-	$(MAKE) install-rubywrap $(extra_make_args) RUBY=$* DESTDIR="${CURDIR}/debian/tmp"
+	$(MAKE) install-rubywrap $(extra_make_args) RUBY=$* DESTDIR=$(destdir)
 
 override_dh_auto_clean: $(PY3VERSIONS:%=clean-python-%) \
                         $(RUBY_VERSIONS:%=clean-ruby-%)
-- 
2.39.2

>From e5159c72f6a9c7bfac6592a2e8b61304309fbeb6 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:14:37 +0100
Subject: [PATCH 10/16] debian/rules: assign some variables with := instead of
 =

This is cosmetic for extra_make_args, but avoids a lot of subshells
for DOPACKAGES and PY3VERSIONS.
---
 debian/rules | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 596f7a2..976c457 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,7 +23,7 @@ endif
 include /usr/share/dpkg/buildopts.mk
 MAKEFLAGS += $(DEB_BUILD_OPTION_PARALLEL:%=-j%)
 
-DOPACKAGES = $(shell dh_listpackages)
+DOPACKAGES := $(shell dh_listpackages)
 
 # Upstream recommends using this flag
 DEB_CFLAGS_MAINT_APPEND := -fno-semantic-interposition
@@ -35,7 +35,7 @@ include /usr/share/dpkg/buildflags.mk
 export CFLAGS += $(CPPFLAGS)
 
 ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
-PY3VERSIONS = $(shell py3versions -rv)
+PY3VERSIONS := $(shell py3versions -rv)
 endif
 ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
 RUBY_VERSIONS := $(shell dh_ruby --print-supported)
@@ -45,7 +45,7 @@ endif
 	@dh $@
 
 ## Set up some variables to be passed to the upstream Makefile
-extra_make_args = ARCH=$(patsubst i%86,i386,$(DEB_HOST_GNU_CPU))
+extra_make_args := ARCH=$(patsubst i%86,i386,$(DEB_HOST_GNU_CPU))
 extra_make_args += USE_PCRE2=y
 
 override_dh_auto_build: $(PY3VERSIONS:%=build-python-%) \
-- 
2.39.2

>From 62906e2a0ffb0445a905ab191b59cd6a995e3b04 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:18:05 +0100
Subject: [PATCH 11/16] debian/rules: replace define and call constructs with
 simpler ones

---
 debian/rules | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/debian/rules b/debian/rules
index 976c457..4e5e3b7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,12 +12,8 @@ include /usr/share/dpkg/buildtools.mk
 # for cross compilation
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
-define ruby_env
-  RUBYLIB=$(libdir)/ruby-crossbuild/$$($(1) -e "puts RbConfig::CONFIG['ruby_version']")
-endef
-else
-define ruby_env
-endef
+# When ruby_env is expanded, $* is the ruby interpreter.
+ruby_env = RUBYLIB=$(libdir)/ruby-crossbuild/$$($* -e "puts RbConfig::CONFIG['ruby_version']")
 endif
 
 include /usr/share/dpkg/buildopts.mk
@@ -54,7 +50,7 @@ override_dh_auto_build: $(PY3VERSIONS:%=build-python-%) \
 build-python-%:
 	$(MAKE) pywrap $(extra_make_args) PYTHON=python$*
 build-ruby-%:
-	$(call ruby_env,$*) \
+	$(ruby_env) \
 	$(MAKE) rubywrap $(extra_make_args) RUBY=$*
 
 destdir := '$(CURDIR)/debian/tmp'
@@ -69,7 +65,7 @@ override_dh_auto_install: $(PY3VERSIONS:%=install-python-%) \
 install-python-%:
 	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* DESTDIR=$(destdir) DEB_PYTHON_INSTALL_LAYOUT=deb
 install-ruby-%:
-	$(call ruby_env,$*) \
+	$(ruby_env) \
 	$(MAKE) install-rubywrap $(extra_make_args) RUBY=$* DESTDIR=$(destdir)
 
 override_dh_auto_clean: $(PY3VERSIONS:%=clean-python-%) \
@@ -78,5 +74,5 @@ override_dh_auto_clean: $(PY3VERSIONS:%=clean-python-%) \
 clean-python-%:
 	$(MAKE) clean-pywrap $(extra_make_args) PYTHON=python$*
 clean-ruby-%:
-	$(call ruby_env,$*) \
+	$(ruby_env) \
 	$(MAKE) clean-rubywrap $(extra_make_args) RUBY=$*
-- 
2.39.2

>From caf214e5ff535d52b3a49924397d783c6a000c46 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:22:08 +0100
Subject: [PATCH 12/16] debian/rules: move the DOPACKAGES variable near its
 usage

---
 debian/rules | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 4e5e3b7..cdb926e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,8 +19,6 @@ endif
 include /usr/share/dpkg/buildopts.mk
 MAKEFLAGS += $(DEB_BUILD_OPTION_PARALLEL:%=-j%)
 
-DOPACKAGES := $(shell dh_listpackages)
-
 # Upstream recommends using this flag
 DEB_CFLAGS_MAINT_APPEND := -fno-semantic-interposition
 ## The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
@@ -30,6 +28,7 @@ DPKG_EXPORT_BUILDFLAGS := 1
 include /usr/share/dpkg/buildflags.mk
 export CFLAGS += $(CPPFLAGS)
 
+DOPACKAGES := $(shell dh_listpackages)
 ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
 PY3VERSIONS := $(shell py3versions -rv)
 endif
-- 
2.39.2

>From c2bb0f8005297dcb83cc2d8e4b752a39453d67d2 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:22:38 +0100
Subject: [PATCH 13/16] debian/rules: show the dh command in build logs

---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index cdb926e..694f7f4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,7 +37,7 @@ RUBY_VERSIONS := $(shell dh_ruby --print-supported)
 endif
 
 %:
-	@dh $@
+	dh $@
 
 ## Set up some variables to be passed to the upstream Makefile
 extra_make_args := ARCH=$(patsubst i%86,i386,$(DEB_HOST_GNU_CPU))
-- 
2.39.2

>From 70557ee93ffc6a44852f7cd3d7d2df64df07a8ea Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 12:33:51 +0100
Subject: [PATCH 14/16] debian/rules: indent conditionals and split a comment

---
 debian/rules | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index 694f7f4..796c630 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,9 @@ libdir := /usr/lib/$(DEB_HOST_MULTIARCH)
 include /usr/share/dpkg/buildtools.mk
 # for cross compilation
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
-# When ruby_env is expanded, $* is the ruby interpreter.
-ruby_env = RUBYLIB=$(libdir)/ruby-crossbuild/$$($* -e "puts RbConfig::CONFIG['ruby_version']")
+  export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
+  # When ruby_env is expanded, $* is the ruby interpreter.
+  ruby_env = RUBYLIB=$(libdir)/ruby-crossbuild/$$($* -e "puts RbConfig::CONFIG['ruby_version']")
 endif
 
 include /usr/share/dpkg/buildopts.mk
@@ -21,19 +21,20 @@ MAKEFLAGS += $(DEB_BUILD_OPTION_PARALLEL:%=-j%)
 
 # Upstream recommends using this flag
 DEB_CFLAGS_MAINT_APPEND := -fno-semantic-interposition
-## The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable the
-## missing (hardening) flags. Also enable Wall and Wextra to spot basic irregularities.
+# Enable Wall and Wextra to spot basic irregularities.
 DEB_CFLAGS_MAINT_APPEND += -Wall -Wextra
 DPKG_EXPORT_BUILDFLAGS := 1
 include /usr/share/dpkg/buildflags.mk
+# The build system doesn't use CPPFLAGS, pass them to CFLAGS to enable
+# the missing (hardening) flags.
 export CFLAGS += $(CPPFLAGS)
 
 DOPACKAGES := $(shell dh_listpackages)
 ifneq ($(filter python3-selinux,$(DOPACKAGES)),)
-PY3VERSIONS := $(shell py3versions -rv)
+  PY3VERSIONS := $(shell py3versions -rv)
 endif
 ifneq ($(filter ruby-selinux,$(DOPACKAGES)),)
-RUBY_VERSIONS := $(shell dh_ruby --print-supported)
+  RUBY_VERSIONS := $(shell dh_ruby --print-supported)
 endif
 
 %:
-- 
2.39.2

>From 90cf791b8fc834f11d6fcd469b1e1ef68010e228 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 13:25:56 +0100
Subject: [PATCH 15/16] debian/rules: split long lines

---
 debian/rules | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 796c630..2bb47d7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,8 @@ include /usr/share/dpkg/buildtools.mk
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
   export _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_MULTIARCH)
   # When ruby_env is expanded, $* is the ruby interpreter.
-  ruby_env = RUBYLIB=$(libdir)/ruby-crossbuild/$$($* -e "puts RbConfig::CONFIG['ruby_version']")
+  ruby_env = RUBYLIB=$(libdir)/ruby-crossbuild/$$($* -e \
+    "puts RbConfig::CONFIG['ruby_version']")
 endif
 
 include /usr/share/dpkg/buildopts.mk
@@ -63,7 +64,8 @@ override_dh_auto_install: $(PY3VERSIONS:%=install-python-%) \
 	find $(destdir) -name direct_url.json -delete
 	find $(destdir) -name RECORD -exec sed -i '/\/direct_url.json,/d' {} +
 install-python-%:
-	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* DESTDIR=$(destdir) DEB_PYTHON_INSTALL_LAYOUT=deb
+	$(MAKE) install-pywrap $(extra_make_args) PYTHON=python$* \
+	  DESTDIR=$(destdir) DEB_PYTHON_INSTALL_LAYOUT=deb
 install-ruby-%:
 	$(ruby_env) \
 	$(MAKE) install-rubywrap $(extra_make_args) RUBY=$* DESTDIR=$(destdir)
-- 
2.39.2

>From 3ebb2784f2ab500886e458bb43bd1b7ce3da8d7d Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Tue, 5 Mar 2024 14:57:18 +0100
Subject: [PATCH 16/16] Build-Depend on pkgconf instead of obsolete pkg-config

---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index c265940..06fe71a 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Build-Depends: debhelper-compat (= 13),
                libsepol-dev (>= 3.5),
                libpcre2-dev,
                libpython3-all-dev <!nopython>,
-               pkg-config,
+               pkgconf,
                python3-all-dev:any <!nopython>,
                python3-pip <!nopython>,
                python3-setuptools <!nopython>,
-- 
2.39.2


--- End Message ---
--- Begin Message ---
Source: libselinux
Source-Version: 3.9-2
Done: Russell Coker <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libselinux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Russell Coker <[email protected]> (supplier of updated libselinux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 19 Oct 2025 15:31:28 +1100
Source: libselinux
Architecture: source
Version: 3.9-2
Distribution: unstable
Urgency: medium
Maintainer: Debian SELinux maintainers <[email protected]>
Changed-By: Russell Coker <[email protected]>
Closes: 1065539 1088171 1099889 1118350
Changes:
 libselinux (3.9-2) unstable; urgency=medium
 .
   * Fix race condition in build  Closes: #1118350
   * Added patches except #15 because I like long lines  Closes: #1065539
   * Added LTO  Closes: #1099889
   # Added merge request 
https://salsa.debian.org/selinux-team/libselinux/-/merge_requests/11/diffs
     manually which should fix PCRE upgrade  Closes: #1088171
Checksums-Sha1:
 737ee6638fff9ab8b9ad0ad75b849adcceca4660 3011 libselinux_3.9-2.dsc
 d7d50f3d9a0f9da8c9a9c9f8772f17f94c12e371 38432 libselinux_3.9-2.debian.tar.xz
 7dd1a2f1eb39945e8f05799fb778223ec585dda2 16586 libselinux_3.9-2_amd64.buildinfo
Checksums-Sha256:
 09c456be5461595a58c1cfd2384ab8c993d8c907e0e04dda2684d23893de834f 3011 
libselinux_3.9-2.dsc
 bfb77d3acaf51b056c48b9d677d29915bb8a1c41b98335d410a7249f16ea5ac1 38432 
libselinux_3.9-2.debian.tar.xz
 31155b8dd8155fcd3428557194446cf75e891951f47fb36c5ea69924409f2dc3 16586 
libselinux_3.9-2_amd64.buildinfo
Files:
 743f8b9c19db98d3f2c167dcfb2320ad 3011 libs optional libselinux_3.9-2.dsc
 82bdf85eff5afbdc775837191972c38d 38432 libs optional 
libselinux_3.9-2.debian.tar.xz
 76839cc2e84e53ebb0e9cc854c76280d 16586 libs optional 
libselinux_3.9-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn31hncwG9XwCqmbH0UHNMPxLj3kFAmj0c5UACgkQ0UHNMPxL
j3mIbQ/+LooHiNAGZewcqgEoTq1KFyIL9jQu7DoxflKONCBABeZSSj5p1sCV/xhA
DGP+mnrU1IBreQmjMedoUbf7sZshHAqb3YDEICeb10qi5atVtldnooLFRQDADg7N
VZsbjy9bymbrAwxUzp50Rd2KKKExoEAQRBw8SRFepWM/C/hAT+Id7gnlsdtuZW0+
XFfUBJSSgRS2ftcyBVcuSo7C9EP9MPkHrBsnYkUgfE95gjyOzqGriYLJ+Pz0Pimb
HoCkQE3Xfxr9hAdSqjH1fN2+NyeE87RoAuw1hvf6Iyei3hDtYFwdYGw0gWt6G+rY
sPMTXdmvBUVymdg6lfECHCR6DZfF+aysj/QVEiE0Itm+Pnaabt5wupXqRHfHeoSr
oSol1dJCN8QdYWSpMUFTf9+jLzypInRb/xtg07sS+ny8h2Hocvm1/PJbzuf80HP+
CibppTUqOWrPdb2PoBtjXZrPP9/zybdjNJO8SzzNO7OUaIkxNWtbEtoztW3PeS9D
58YPsfSJwr8LJ2/Toi1D5eETWCIqF8vWqmZULg/RgqViUfw0N5TvhNrIYl0mcOPs
Kkog7csPQcKjJyU3HOapUJKiil0nf4tKM+6t1YMRTaE5SwH9golmOhKHRdGE/pbf
ZcWh14ncFZrNA69Sxdj5cncFHGbxVecNZXU4Y36/mCNxLPnOnlE=
=E9d9
-----END PGP SIGNATURE-----

Attachment: pgpJulX3nHcZe.pgp
Description: PGP signature


--- End Message ---
_______________________________________________
SELinux-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/selinux-devel

Reply via email to