Skip to contentSkip to conversation

smolkit: Add low-footprint drop-in replacement for polkit

PATCH Superseded Tillmann Severin 2 participants 3 messages Sep 14 – Sep 17

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smolkit: Add low-footprint drop-in replacement for polkit

smolkit is a drop-in replacement for a subset of polkit's interface, which is low-footprint in the sense of not needing to have a javascript engine available to do its job. polkit has this disadvantage and even with a small javascript engine like duktape, it is not worth to have turing-complete configuration where you could also use static JSON on some embedded devices.

---
 meta-oe/recipes-extended/smolkit/smolkit.bb | 27 +++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta-oe/recipes-extended/smolkit/smolkit.bb
meta-oe/recipes-extended/smolkit/smolkit.bb new file +27 -0
new file mode 100644
index 0000000000..4bd5f8d03f
@@ -0,0 +1,27 @@
+SUMMARY = "low-footprint drop-in polkit replacement"
+HOMEPAGE = "https://github.com/bmwcarit/smolkit"
+DESCRIPTION = "\
+  Service that implements a subset of polkit's D-Bus interface with a static configuration language. \
+"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+inherit cmake features_check pkgconfig
+
+DEPENDS = "\
+  rapidjson \
+  sdbus-c++ \
+"
+
+CONFLICT_DISTRO_FEATURES = "polkit"
+REQUIRED_DISTRO_FEATURES = "smolkit"
+
+PV = "0.2+git"
+
+SRC_URI = "\
+    git://github.com/bmwcarit/${BPN}.git;protocol=https;branch=main \
+"
+SRCREV = "46bbfd5c922a8d03a534398ee129ded822dfcafe"
+
+S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}"
Signature · 1 line
2.43.0
#1 lore raw

meta-oe/recipes-extended/smolkit/smolkit.bb line 18

Quoted 2 lines · On 14 Sep 2026, at 13:29, Severin Tillmann, DE-862 via lists.openembedded.org…
meta-oe/recipes-extended/smolkit/smolkit.bb new file +2 -0
+CONFLICT_DISTRO_FEATURES = "polkit"
+REQUIRED_DISTRO_FEATURES = "smolkit"

This makes the claim of “drop-in replacement” suspicious, because it would mean every recipe that currently depends on polkit and respects the polkit DISTRO_FEATURE needs to be modified.

Could smolkit not PROVIDE polkit, so the distro can just switch the preferred provider and everything just works?

meta-oe/recipes-extended/smolkit/smolkit.bb line 25

Quoted 6 lines
meta-oe/recipes-extended/smolkit/smolkit.bb new file +6 -0
+PV = "0.2+git"
+
+SRC_URI = "\
+    git://github.com/bmwcarit/${BPN}.git;protocol=https;branch=main \
+"
+SRCREV = "46bbfd5c922a8d03a534398ee129ded822dfcafe"

I notice a lack of tags upstream…

Quoted 1 line

+S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}"

You can drop this line.

Finally, I absolutely love the name.

Ross

#2 lore raw

Hi Ross,

thanks a lot for your feedback!

Quoted 12 lines · Ross Burton

meta-oe/recipes-extended/smolkit/smolkit.bb line 18

Quoted 2 lines · On 14 Sep 2026, at 13:29, Severin Tillmann, DE-862 via lists.openembedded.org…
meta-oe/recipes-extended/smolkit/smolkit.bb new file +2 -0
+CONFLICT_DISTRO_FEATURES = "polkit"
+REQUIRED_DISTRO_FEATURES = "smolkit"

This makes the claim of “drop-in replacement” suspicious, because it would mean every recipe that currently depends on polkit and respects the polkit DISTRO_FEATURE needs to be modified.

Quoted 2 lines

Could smolkit not PROVIDE polkit, so the distro can just switch the preferred provider and everything just works?

You are of course right, smolkit is not a complete drop-in replacement (yet), it is only a drop-in replacement for a certain subset of polkit's interface, I will try to rephrase that in the next version of the patch. smolkit does not provide any helper tools like e.g. pkexec and also does not implement the whole featureset that polkit has. This might lead to issues if other recipes expect tools, libraries or other features polkit provides, but smolkit does not provide. Do you think it nevertheless makes sense to switch to a PROVIDES based approach here? I have checked that the build succeeds also with PROVIDES and PREFERRED_PROVIDER_polkit = "smolkit", so it should not make a big difference, I am just worried regarding expectations from other recipes. I would send a patch v2 once it is decided which way to go.

Quoted 11 lines

meta-oe/recipes-extended/smolkit/smolkit.bb line 25

Quoted 9 lines
meta-oe/recipes-extended/smolkit/smolkit.bb new file +6 -0
+PV = "0.2+git"
+
+SRC_URI = "\
+ git://github.com/bmwcarit/${BPN}.git;protocol=https;branch=main \
+"
+SRCREV = "46bbfd5c922a8d03a534398ee129ded822dfcafe"

I notice a lack of tags upstream…

Tags are now present on the upstream repository.

Quoted 9 lines
Quoted 3 lines

+S = "${UNPACKDIR}/${BB_GIT_DEFAULT_DESTSUFFIX}"

You can drop this line.

Finally, I absolutely love the name.

Ross

I will drop the line in the next version and am happy that you like the name ;-)

Best regards,
Tillmann