libvirt: fix postinstall scriptlets failure
PATCH 1/1 libvirt: fix postinstall scriptlets failure
From: Xiangyu Chen <[email protected]>
libvirt upstream has added all sockets for a service being enabled when a single one of them is[1], it likes serviceA enable serviceB, serviceB enable serviceA, that cause our systemctl script[2] trap into a dead loop in postinstall stage, the error message as below:
Traceback (most recent call last):
File "/usr/lib/python3.8/pathlib.py", line 722, in __str__
return self._str
AttributeError: _str
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
SystemdUnit(self.root, also).enable(unit)
File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
SystemdUnit(self.root, also).enable(unit)
File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable
SystemdUnit(self.root, also).enable(unit)
[Previous line repeated 988 more times]
......
RecursionError: maximum recursion depth exceeded while calling a Python object
Since we are using systemctl script to process the dependency, so revert that commit from upstream.
[1] https://github.com/libvirt/libvirt/commit/826931e95a38af8322f8ad069dc89117c6404a00
[2] https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd-systemctl/systemctl
--- ...ert-systemd-Add-Also-between-sockets.patch | 143 ++++++++++++++++++ recipes-extended/libvirt/libvirt_10.0.0.bb | 1 + 2 files changed, 144 insertions(+) create mode 100644 recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch
recipes-extended/libvirt/libvirt/0001-Revert-systemd-Add-Also-between-sockets.patch new file +143 -0
@@ -0,0 +1,143 @@ +From 66aa101abb639c64f71a2867424fb58a39a3bd21 Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <[email protected]> +Date: Tue, 6 Feb 2024 18:45:53 +0800 +Subject: [PATCH] Revert "systemd: Add Also between sockets" + +This reverts commit 826931e95a38af8322f8ad069dc89117c6404a00. + +We have systemctl script to process the service dependency, this cause our oe-core systemctl script +trap into a dead loop. + +Error as below: +Traceback (most recent call last): + File "/usr/lib/python3.8/pathlib.py", line 722, in __str__ + return self._str +AttributeError: _str + +During handling of the above exception, another exception occurred: +Traceback (most recent call last): + File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable + SystemdUnit(self.root, also).enable(unit) + File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable + SystemdUnit(self.root, also).enable(unit) + File "recipe-sysroot-native/usr/bin/systemctl", line 255, in enable + SystemdUnit(self.root, also).enable(unit) + [Previous line repeated 988 more times] +...... +RecursionError: maximum recursion depth exceeded while calling a Python object + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Xiangyu Chen <[email protected]> +--- + src/locking/virtlockd-admin.socket.in | 1 - + src/locking/virtlockd.socket.in | 1 - + src/logging/virtlogd-admin.socket.in | 1 - + src/logging/virtlogd.socket.in | 1 - + src/remote/libvirtd-admin.socket.in | 2 -- + src/remote/libvirtd-ro.socket.in | 2 -- + src/remote/libvirtd.socket.in | 2 -- + src/virtd-admin.socket.in | 2 -- + src/virtd-ro.socket.in | 2 -- + src/virtd.socket.in | 2 -- + 10 files changed, 16 deletions(-) + +diff --git a/src/locking/virtlockd-admin.socket.in b/src/locking/virtlockd-admin.socket.in +index ed5b94edba..8902ae4225 100644 +--- a/src/locking/virtlockd-admin.socket.in ++++ b/src/locking/virtlockd-admin.socket.in +@@ -11,4 +11,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=virtlockd.socket +diff --git a/src/locking/virtlockd.socket.in b/src/locking/virtlockd.socket.in +index 4eec90a95e..afd42d124e 100644 +--- a/src/locking/virtlockd.socket.in ++++ b/src/locking/virtlockd.socket.in +@@ -9,4 +9,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=virtlockd-admin.socket +diff --git a/src/logging/virtlogd-admin.socket.in b/src/logging/virtlogd-admin.socket.in +index 7207878008..a634af8942 100644 +--- a/src/logging/virtlogd-admin.socket.in ++++ b/src/logging/virtlogd-admin.socket.in +@@ -11,4 +11,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=virtlogd.socket +diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in +index e1d6e30e4d..7c14d03ce4 100644 +--- a/src/logging/virtlogd.socket.in ++++ b/src/logging/virtlogd.socket.in +@@ -9,4 +9,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=virtlogd-admin.socket +diff --git a/src/remote/libvirtd-admin.socket.in b/src/remote/libvirtd-admin.socket.in +index 37efc11357..5cbb83deaa 100644 +--- a/src/remote/libvirtd-admin.socket.in ++++ b/src/remote/libvirtd-admin.socket.in +@@ -11,5 +11,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=libvirtd.socket +-Also=libvirtd-ro.socket +diff --git a/src/remote/libvirtd-ro.socket.in b/src/remote/libvirtd-ro.socket.in +index 6e1fad2272..7e25498728 100644 +--- a/src/remote/libvirtd-ro.socket.in ++++ b/src/remote/libvirtd-ro.socket.in +@@ -11,5 +11,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=libvirtd.socket +-Also=libvirtd-admin.socket +diff --git a/src/remote/libvirtd.socket.in b/src/remote/libvirtd.socket.in +index 9cd37dc766..919b874acd 100644 +--- a/src/remote/libvirtd.socket.in ++++ b/src/remote/libvirtd.socket.in +@@ -9,5 +9,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=libvirtd-ro.socket +-Also=libvirtd-admin.socket +diff --git a/src/virtd-admin.socket.in b/src/virtd-admin.socket.in +index 63eabd70f8..d3b260e5b1 100644 +--- a/src/virtd-admin.socket.in ++++ b/src/virtd-admin.socket.in +@@ -13,5 +13,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=@[email protected] +-Also=@[email protected] +diff --git a/src/virtd-ro.socket.in b/src/virtd-ro.socket.in +index 3284af5a4a..2f701c8adb 100644 +--- a/src/virtd-ro.socket.in ++++ b/src/virtd-ro.socket.in +@@ -13,5 +13,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=@[email protected] +-Also=@[email protected] +diff --git a/src/virtd.socket.in b/src/virtd.socket.in +index 502c792e7d..3605b0103e 100644 +--- a/src/virtd.socket.in ++++ b/src/virtd.socket.in +@@ -11,5 +11,3 @@ RemoveOnStop=yes + + [Install] + WantedBy=sockets.target +-Also=@[email protected] +-Also=@[email protected] +-- +2.25.1 +
recipes-extended/libvirt/libvirt_10.0.0.bb +1 -0
@@ -32,6 +32,7 @@ SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ file://gnutls-helper.py \ file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ + file://0001-Revert-systemd-Add-Also-between-sockets.patch \ " SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a"
Signature · 1 line
2.25.1