Subject: bug#911: libpolkit-gobject-consolekit-1-0: Ships the elogind variant of the library

From: "Plasma (David Paul)" <[email-masked]>
Date: Fri, 26 Sep 2025 19:57:42 -0500

Package: libpolkit-gobject-consolekit-1-0
Version: 0.105+26+devuan1
Severity: grave
Justification: ships the wrong shared-object library

Dear Maintainer,

Starting from version 0.105-26+devuan1, the
libpolkit-gobject-consolekit-1-0 package incorrectly ships the variant
of libpolkit-gobject-1.so.0.0.0 compiled with elogind session-tracking
rather than the variant compiled with ConsoleKit session-tracking. This
can be easily verified by comparing the checksums of the included
libpolkit-gobject-1.so.0.0.0 file in each of the
libpolkit-gobject-consolekit-1-0 and libpolkit-gobject-elogind-1-0
packages.

# Fix

Once this report is assigned a bug number, I will shortly be submitting
'git am'-ready patches to remedy this issue.

# Explanation

The issue lies with an interaction involving three commands in the
override_dh_install recipe in debian/rules, specifically
```
	dh_install -plibpolkit-gobject-consolekit-1-0 \
		--sourcedir=debian/install/consolekit
	dh_install -a -Nlibpolkit-gobject-consolekit-1-0
	[...]
	dh_install
```

The first command is required in order to copy the build of the
ConsoleKit variant of the library from its non-standard DESTDIR at
debian/install to the staging directory for the 
libpolkit-gobject-consolekit-1-0 binary package.

The second command then handles staging the files for the rest of the
arch-dependent packages, copying files from debian/tmp, the default
DESTDIR.

This leaves the third command with the task of staging the files for
all the remaining binary package which by this point should be all of
the arch-independent packages. However, because the command lacks
either a '-i' or '--remaining-packages' argument, it incorrectly stages
the files for *all* binary packages, copying files from only the
standard DESTDIR. This has the unfortunate consequence of re-staging
the libpolkit-gobject-consolekit-1-0 package, copying the elogind
variant of the library from within debian/tmp rather than the
ConsoleKit variant from debian/install.

-- 
Plasma

---

From: Simon Richter <[email-masked]>
Date: Sat, 27 Sep 2025 10:05:41 +0900

Hi,

On 9/27/25 09:57, Plasma (David Paul) wrote:

> standard DESTDIR.

Is that a Devuan specific change, or is that bug also present in the 
Debian package?

    Simon

---

From: "Plasma (David Paul)" <[email-masked]>
Date: Fri, 26 Sep 2025 20:13:26 -0500

Control: tags -1 patch

Dear Maintainer,

Attached are two patches which fix #911. They can be applied to the
head of the suites/unstable branch in the policykit-1 packaging
repository. Please also consider backporting them into
excalibur-proposed for the upcoming Excalibur release.

-- 
Plasma
From 375408241ad69054800e5d4790915d89b4a59ee4 Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <[email-masked]>
Date: Fri, 26 Sep 2025 16:00:39 -0500
Subject: [PATCH 1/2] refactor: rules: Move ubuntu-specific snippet

dh_auto_install is concerned with copying build artifacts to some
$DESTDIR, usually by running the buildsystem's install command.
dh_install handles copying individual files from a $DESTDIR to
binary-package-specific directories. The ubuntu-specific snippet
fits conceptually in the former category, so move it from
override_dh_install to override_dh_auto_install.
---
 debian/rules | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/debian/rules b/debian/rules
index 8bba501e..ddb2be3c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -80,6 +80,12 @@ override_dh_auto_install:
 	dh_auto_install
 	dh_auto_install --builddirectory=build-consolekit --destdir=debian/install/consolekit
 
+	# on Debian/Devuan use sudo group; on Ubuntu, also allow the admin group for
+	# historical reasons
+	if dpkg-vendor --is ubuntu; then \
+		install -m644 debian/49-ubuntu-admin.rules debian/tmp/usr/share/polkit-1/rules.d/; \
+	fi
+
 override_dh_install:
 	dh_install \
 	-plibpolkit-gobject-consolekit-1-0       \
@@ -88,9 +94,4 @@ override_dh_install:
 	dh_install -a                           \
 	-Nlibpolkit-gobject-consolekit-1-0
 
-	# on Debian/Devuan use sudo group; on Ubuntu, also allow the admin group for
-	# historical reasons
-	if dpkg-vendor --is ubuntu; then \
-		install -m644 debian/49-ubuntu-admin.rules debian/tmp/usr/share/polkit-1/rules.d/; \
-	fi
 	dh_install
-- 
2.30.2

From d703477bfdabe4b2fae81a748568f3f3acb3032d Mon Sep 17 00:00:00 2001
From: "Plasma (David Paul)" <[email-masked]>
Date: Fri, 26 Sep 2025 20:02:23 -0500
Subject: [PATCH 2/2] Fix override_dh_install target

Closes: #911
---
 debian/changelog | 6 ++++++
 debian/rules     | 5 +----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dc89fa70..28abc520 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+policykit-1 (126-2devuan2) UNRELEASED; urgency=medium
+
+  * d/rules: Fix override_dh_install target. (Closes: #911)
+
+ -- Plasma (David Paul) <[email-masked]>  Fri, 26 Sep 2025 19:23:41 -0500
+
 policykit-1 (126-2devuan1) unstable; urgency=medium
 
   * Merge tag debian/126-2.
diff --git a/debian/rules b/debian/rules
index ddb2be3c..3d94358b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -91,7 +91,4 @@ override_dh_install:
 	-plibpolkit-gobject-consolekit-1-0       \
 	--sourcedir=debian/install/consolekit
 
-	dh_install -a                           \
-	-Nlibpolkit-gobject-consolekit-1-0
-
-	dh_install
+	dh_install --remaining-packages
-- 
2.30.2

---

From: David Paul <[email-masked]>
Date: Fri, 26 Sep 2025 20:26:47 -0500

On Sat, 27 Sep 2025 10:05:41 +0900
Simon Richter <[email-masked]> wrote:

> > all the remaining binary package which by this point should be all
> > of the arch-independent packages. However, because the command lacks
> > either a '-i' or '--remaining-packages' argument, it incorrectly
> > stages the files for *all* binary packages, copying files from only
> > the standard DESTDIR.  
> 

This is a Devuan-specific issue. Debian is unaffected by this bug, but
may wish to adopt a modified version of the refactor present in the
first of the two patches I submitted to resolve this Devuan issue.
Adapting the refactor patch for Debian may not be worth it though as,
apart from simplifying the second patch in the series, the refactor
patch borders on splitting hairs. See the attached commit message for
details.

-- 
Plasma

---

From: Mark Hindley <[email-masked]>
Date: Mon, 29 Sep 2025 15:21:38 +0100

Plasma,

Thanks for your analysis and care with this.

I prefer to resolve the first of your suggested patches by realigning more
closely with Debian's d/rules.

Mark

commit 2f09bfa62e597cbfb9385e2807c84db05cd68247
Author: Mark Hindley <[email-masked]>
Date:   Mon Sep 29 15:05:08 2025 +0100

    d/rules: reduce unnecessary delta with Debian.

diff --git a/debian/rules b/debian/rules
index 8bba501e..152405ee 100755
--- a/debian/rules
+++ b/debian/rules
@@ -80,6 +80,14 @@ override_dh_auto_install:
 	dh_auto_install
 	dh_auto_install --builddirectory=build-consolekit --destdir=debian/install/consolekit
 
+execute_before_dh_install:
+	# on Debian use sudo group; on Ubuntu, also allow the admin group for
+	# on Debian/Devuan use sudo group; on Ubuntu, also allow the admin group for
+	# historical reasons
+	if dpkg-vendor --is ubuntu; then \
+		install -m644 debian/49-ubuntu-admin.rules debian/tmp/usr/share/polkit-1/rules.d/; \
+	fi
+
 override_dh_install:
 	dh_install \
 	-plibpolkit-gobject-consolekit-1-0       \
@@ -88,9 +96,4 @@ override_dh_install:
 	dh_install -a                           \
 	-Nlibpolkit-gobject-consolekit-1-0

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Mon, 29 Sep 2025 16:10:02 +0000

This is an automatic notification regarding your bug report
which was filed against the libpolkit-gobject-consolekit-1-0 package:

#911: libpolkit-gobject-consolekit-1-0: Ships the elogind variant of the library

It has been closed by [email-masked].

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact [email-masked] by
replying to this email.

-- 
911: https://bugs.devuan.org/cgi/bugreport.cgi?bug=911
Devuan Bug Tracking System
Contact [email-masked] with problems

Subject: #911: fixed in src:policykit-1 version 126-2devuan2
From: [email-masked]
To: [email-masked]
Date: Mon, 29 Sep 2025 16:07:56 +0000

Version: 126-2devuan2

Source package policykit-1 (126-2devuan2) added to Devuan suite unstable.

This closes bug report 911.

Thanks

DAK managing the Devuan archive

Format: 1.8
Date: Mon, 29 Sep 2025 15:22:55 +0100
Source: policykit-1
Architecture: source
Version: 126-2devuan2
Distribution: unstable
Urgency: medium
Maintainer: Devuan Dev Team <[email-masked]>
Changed-By: Mark Hindley <[email-masked]>
Closes: 911
Changes:
 policykit-1 (126-2devuan2) unstable; urgency=medium
 .
   [ Mark Hindley ]
   * d/rules: reduce unnecessary delta with Debian.
 .
   [ Plasma (David Paul) ]
   * d/rules: Fix override_dh_install target. (Closes: #911)
Checksums-Sha1:
 0604665a219468045bf27358d700e04433e5a90b 3098 policykit-1_126-2devuan2.dsc
 bd95db35c65cd7a002ba51f5e15544811f3d6c1a 33248 policykit-1_126-2devuan2.debian.tar.xz
 2ae138057876f3925d5cfdad4b13cc9cd94d5229 5605 policykit-1_126-2devuan2_source.buildinfo
Checksums-Sha256:
 f127374232886bb08375be80eef6da54bfdd84bb0011c7727719c886d9296f93 3098 policykit-1_126-2devuan2.dsc
 b54f18cd7301c33dad854c1ebc89310db81f06c136a98d302520a3c56920cb6e 33248 policykit-1_126-2devuan2.debian.tar.xz
 ccc970d867b4960ddd6f525523e4dc28ae45cc9b72c1e6e3ea8404325d6b488e 5605 policykit-1_126-2devuan2_source.buildinfo
Files:
 62a5a0a662cddff5e127ef165c7ce60f 3098 admin optional policykit-1_126-2devuan2.dsc
 d43afa04d5b2622dd9b6dbc2cf598e2e 33248 admin optional policykit-1_126-2devuan2.debian.tar.xz
 9e261c77119a4acdee1e0038d1517219 5605 admin optional policykit-1_126-2devuan2_source.buildinfo

Subject: libpolkit-gobject-consolekit-1-0: Ships the elogind variant of the library
From: "Plasma (David Paul)" <[email-masked]>
To: Devuan Bug Tracking System <[email-masked]>
Date: Fri, 26 Sep 2025 19:57:42 -0500

Dear Maintainer,

# Fix

# Explanation

-- 
Plasma

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Fri, 10 Oct 2025 19:46:03 +0000

Subject: #911: fixed in src:policykit-1 version 126-2devuan1+excalibur1
From: [email-masked]
To: [email-masked]
Date: Fri, 10 Oct 2025 19:44:26 +0000

Version: 126-2devuan1+excalibur1

Source package policykit-1 (126-2devuan1+excalibur1) added to Devuan suite excalibur-proposed-updates.

Thanks

Format: 1.8
Date: Fri, 10 Oct 2025 20:18:39 +0100
Source: policykit-1
Architecture: source
Version: 126-2devuan1+excalibur1
Distribution: excalibur-proposed-updates
Urgency: medium
Maintainer: Devuan Dev Team <[email-masked]>
Changed-By: Mark Hindley <[email-masked]>
Closes: 911
Changes:
 policykit-1 (126-2devuan1+excalibur1) excalibur-proposed-updates; urgency=medium
 .
   [ Mark Hindley ]
   * d/rules: reduce unnecessary delta with Debian.
 .
   [ Plasma (David Paul) ]
   * d/rules: Fix override_dh_install target. (Closes: #911)
Checksums-Sha1:
 35e210482efdca4e468253dc0f8c9dce3d233700 3142 policykit-1_126-2devuan1+excalibur1.dsc
 d0b5ba7a7dd86ffe6de2315fc268deb17639c7f8 33272 policykit-1_126-2devuan1+excalibur1.debian.tar.xz
 7fbb59e9ed4c7f1b0136c77aaf1866e103788efc 5649 policykit-1_126-2devuan1+excalibur1_source.buildinfo
Checksums-Sha256:
 d167f824ac5c85c1064ae99d1a0a7a2a8e6b1c6419c4008a641c1685d00e716d 3142 policykit-1_126-2devuan1+excalibur1.dsc
 8e910afb9aa0cf2743194933b71e215a9e2b8aa5b9314855fe52ef8822f3519e 33272 policykit-1_126-2devuan1+excalibur1.debian.tar.xz
 d68317b5522ae9637d833812cbfe9d7b6a63f2ba7fbe9f4ec345d17dbc5efd87 5649 policykit-1_126-2devuan1+excalibur1_source.buildinfo
Files:
 9f901ab68cc3471a71027a88e0f5b4c5 3142 admin optional policykit-1_126-2devuan1+excalibur1.dsc
 e805a7a566ecc59ee69c6f7b03abab32 33272 admin optional policykit-1_126-2devuan1+excalibur1.debian.tar.xz
 8a6f1c42be9b856809874afabc9c0e54 5649 admin optional policykit-1_126-2devuan1+excalibur1_source.buildinfo

Dear Maintainer,

# Fix

# Explanation

-- 
Plasma

---

From: "Devuan bug Tracking System" <[email-masked]>
Date: Sun, 12 Oct 2025 14:50:03 +0000

Subject: #911: fixed in src:policykit-1 version 122-3devuan3
From: [email-masked]
To: [email-masked]
Date: Sun, 12 Oct 2025 14:49:15 +0000

Version: 122-3devuan3

Source package policykit-1 (122-3devuan3) added to Devuan suite daedalus-proposed-updates.

Thanks

Format: 1.8
Date: Sun, 12 Oct 2025 14:45:03 +0100
Source: policykit-1
Architecture: source
Version: 122-3devuan3
Distribution: daedalus-proposed-updates
Urgency: medium
Maintainer: Devuan Dev Team <[email-masked]>
Changed-By: Mark Hindley <[email-masked]>
Closes: 911
Changes:
 policykit-1 (122-3devuan3) daedalus-proposed-updates; urgency=medium
 .
   * d/rules: backport Plasma's libpolkit-gobject-consolekit-1-0 fix from #911.
     (Closes: #911)
Checksums-Sha1:
 4e7062a2bb7689771a483d04475fbd3a0b843c38 3539 policykit-1_122-3devuan3.dsc
 dd74423455b50cb4db67fc3ca28fda3153a9f9e5 48208 policykit-1_122-3devuan3.debian.tar.xz
 971e934a6d17cf690ffe9f023693ce24d299e77f 5605 policykit-1_122-3devuan3_source.buildinfo
Checksums-Sha256:
 cd1fd2e2b8501cc5901bc20ba7ad1e09e8927911b32e9f0ef6c3cf1a748721bf 3539 policykit-1_122-3devuan3.dsc
 cc747521becb09a1a96eb441f910e3ec8c219071a8bb0dbd782155cb0014eece 48208 policykit-1_122-3devuan3.debian.tar.xz
 59c90aaf10a4a7f3fd3fd1c44fab8384204ebce96f3c6110a7bb7bd1bd05af1d 5605 policykit-1_122-3devuan3_source.buildinfo
Files:
 1ecff7579b029a8ffa8607ac43a2c318 3539 admin optional policykit-1_122-3devuan3.dsc
 2f5906bce7e3b6e5db0c65da325609c1 48208 admin optional policykit-1_122-3devuan3.debian.tar.xz
 5bf19d934ba49ce685c9664817eb7883 5605 admin optional policykit-1_122-3devuan3_source.buildinfo

Dear Maintainer,

# Fix

# Explanation

-- 
Plasma