[DSE-Dev] Bug#966687: libselinux1-dev should be named libselinux-dev

Helmut Grohne helmut at subdivi.de
Sat Aug 1 20:58:16 BST 2020


Package: libselinux1-dev
Version: 3.1-2
User: helmutg at debian.org
Usertags: rebootstrap
Tags: patch

Development packages should not include a version. For that reason
libselinux1-dev also provides libselinux-dev. Downstream packages such
as sed correctly build depend on the unversioned libselinux-dev.

Unfortunately, there is no reliable way to determine which source
package provides libselinux-dev from looking at the .dsc files.
Therefore bootstrapping tools fail to figure out that libselinux needs
to be built for building sed. The information included in .dscs misses
provides. For packages that participate in the build closure of
essential, we need dependencies to target real packages.

Therefore libselinux-dev needs to become real. I think that renaming
libselinux1-dev to libselinux-dev and simultaneously switching the
provides to libselinux1-dev would do the trick with little risk of
disrupting others.

I'm attaching a patch for the proposed change. Do you see any
alternative solution?

Helmut
-------------- next part --------------
diff --minimal -Nru libselinux-3.1/debian/changelog libselinux-3.1/debian/changelog
--- libselinux-3.1/debian/changelog	2020-07-16 18:28:55.000000000 +0200
+++ libselinux-3.1/debian/changelog	2020-08-01 21:53:48.000000000 +0200
@@ -1,3 +1,10 @@
+libselinux (3.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Turn libselinux-dev real and make libselinux1-dev virtual. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sat, 01 Aug 2020 21:53:48 +0200
+
 libselinux (3.1-2) unstable; urgency=medium
 
   [ Laurent Bigonville ]
diff --minimal -Nru libselinux-3.1/debian/control libselinux-3.1/debian/control
--- libselinux-3.1/debian/control	2020-07-16 18:28:55.000000000 +0200
+++ libselinux-3.1/debian/control	2020-08-01 21:52:30.000000000 +0200
@@ -58,7 +58,7 @@
  policy if necessary (e.g. to downgrade the policy format to an older
  version supported by the kernel) when loading policy.
 
-Package: libselinux1-dev
+Package: libselinux-dev
 Architecture: linux-any
 Depends: libselinux1 (= ${binary:Version}),
          libsepol1-dev (>= 3.1),
@@ -66,8 +66,8 @@
          ${misc:Depends}
 Section: libdevel
 Multi-Arch: same
-Provides: libselinux-dev
-Conflicts: libselinux-dev
+Provides: libselinux1-dev
+Conflicts: libselinux1-dev
 Description: SELinux development headers
  This package provides the  static libraries and header files
  needed for developing SELinux applications.  Security-enhanced Linux
diff --minimal -Nru libselinux-3.1/debian/libselinux-dev.install libselinux-3.1/debian/libselinux-dev.install
--- libselinux-3.1/debian/libselinux-dev.install	1970-01-01 01:00:00.000000000 +0100
+++ libselinux-3.1/debian/libselinux-dev.install	2020-07-16 18:28:55.000000000 +0200
@@ -0,0 +1,5 @@
+usr/include/selinux/*.h
+usr/lib/*/*.a
+usr/lib/*/*.so
+usr/lib/*/pkgconfig/*.pc
+usr/share/man/man3/*.3
diff --minimal -Nru libselinux-3.1/debian/libselinux1-dev.install libselinux-3.1/debian/libselinux1-dev.install
--- libselinux-3.1/debian/libselinux1-dev.install	2020-07-16 18:28:55.000000000 +0200
+++ libselinux-3.1/debian/libselinux1-dev.install	1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-usr/include/selinux/*.h
-usr/lib/*/*.a
-usr/lib/*/*.so
-usr/lib/*/pkgconfig/*.pc
-usr/share/man/man3/*.3
diff --minimal -Nru libselinux-3.1/debian/libselinux1.symbols libselinux-3.1/debian/libselinux1.symbols
--- libselinux-3.1/debian/libselinux1.symbols	2020-07-16 18:28:55.000000000 +0200
+++ libselinux-3.1/debian/libselinux1.symbols	2020-08-01 21:53:20.000000000 +0200
@@ -1,5 +1,5 @@
 libselinux.so.1 libselinux1 #MINVER#
-* Build-Depends-Package: libselinux1-dev
+* Build-Depends-Package: libselinux-dev
  LIBSELINUX_1.0 at LIBSELINUX_1.0 3.1~
  avc_add_callback at LIBSELINUX_1.0 3.1~
  avc_audit at LIBSELINUX_1.0 3.1~
diff --minimal -Nru libselinux-3.1/debian/tests/control libselinux-3.1/debian/tests/control
--- libselinux-3.1/debian/tests/control	2020-07-16 18:28:55.000000000 +0200
+++ libselinux-3.1/debian/tests/control	2020-08-01 21:53:44.000000000 +0200
@@ -1,5 +1,5 @@
 Tests: build
-Depends: build-essential, libselinux1-dev, pkg-config
+Depends: build-essential, libselinux-dev, pkg-config
 Restrictions: allow-stderr, superficial
 
 Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import selinux; print(selinux)" ; done


More information about the SELinux-devel mailing list