diff mbox series

systemd: Remove permission/owner changes of /u/s/polkit-1/rules.d

Message ID 585c1f3ec08294dda665cb130d63e6ae4f8a84ce.1725024087.git.joerg.sommer@navimatix.de
State New
Headers show
Series systemd: Remove permission/owner changes of /u/s/polkit-1/rules.d | expand

Commit Message

Jörg Sommer Aug. 30, 2024, 1:21 p.m. UTC
From: Jörg Sommer <joerg.sommer@navimatix.de>

This reverts "systemd: Fix rootfs transaction error when PACKAGECONFIG has
polkit" [1], because the opposite situation came true. When building with

```
INIT_MANAGER = "systemd"
DISTRO_FEATURES:append = " polkit usrmerge"
IMAGE_INSTALL:append = " polkit"
```

the build fails with

```
Error: Transaction test error:
  file /usr/share/polkit-1/rules.d conflicts between attempted installs of polkit-125-r0.core2_64 and systemd-1:256.5-r0.core2_64
```

Looking at the rpms you can see the mismatch:

```
% rpm2archive - <build/tmp/deploy/rpm/core2_64/systemd-256.5-r0.core2_64.rpm |tar vtz ./usr/share/polkit-1/rules.d
drwx------ polkitd/root      0 2024-08-15 22:46 ./usr/share/polkit-1/rules.d/
-rw-r--r-- root/root       527 2024-08-15 22:46 ./usr/share/polkit-1/rules.d/systemd-networkd.rules
% rpm2archive - <build/tmp/deploy/rpm/core2_64/polkit-125-r0.core2_64.rpm |tar vtz ./usr/share/polkit-1/rules.d
drwxr-xr-x root/root         0 2024-08-08 15:12 ./usr/share/polkit-1/rules.d/
-rw-r--r-- root/root       326 2024-08-08 15:12 ./usr/share/polkit-1/rules.d/50-default.rules
```

[1] 086ef2e5959ba3b6032a0c704e079f7eeadd1f25.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/systemd/systemd_256.5.bb | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd_256.5.bb b/meta/recipes-core/systemd/systemd_256.5.bb
index 1485614c71..9d2b06472c 100644
--- a/meta/recipes-core/systemd/systemd_256.5.bb
+++ b/meta/recipes-core/systemd/systemd_256.5.bb
@@ -368,14 +368,6 @@  do_install() {
 		rm -r ${D}${sysconfdir}/X11
 	fi
 
-	# If polkit is setup fixup permissions and ownership
-	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
-		if [ -d ${D}${datadir}/polkit-1/rules.d ]; then
-			chmod 700 ${D}${datadir}/polkit-1/rules.d
-			chown polkitd:root ${D}${datadir}/polkit-1/rules.d
-		fi
-	fi
-
 	# If polkit is not available and a fallback was requested, install a drop-in that allows networkd to
 	# request hostname changes via DBUS without elevating its privileges
 	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then