Re: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded
[Edited Message Follows] Hi Oleksiy, I've submitted https://lists.openembedded.org/g/openembedded-core/topic/81600237 which should supersede this I did not send it as v3 because it is a different solution. I've also ran 'bitbake -c testimage core-image-sato' with the new solution and it is passing. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149925): https://lists.openembedded.org/g/openembedded-core/message/149925 Mute This Topic: https://lists.openembedded.org/mt/81522036/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded
Hi Oleksiy, I've submitted https://lists.openembedded.org/g/openembedded-core/topic/81600237 which should supersede this I did not send it as v3 because it is a different solution. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149925): https://lists.openembedded.org/g/openembedded-core/message/149925 Mute This Topic: https://lists.openembedded.org/mt/81522036/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded
Could you please look into logs. Seems that path cause failures. https://autobuilder.yoctoproject.org/typhoon/#/builders/101/builds/2114/steps/13/logs/stdio *** Central error: 2021-03-23T02:03:58+ ERROR Error in POSTIN scriptlet in rpm package run-postinsts *** + systemctl + OPTS= + '[' -n '' ']' + '[' enable = enable ']' + for service in run-postinsts.service + systemctl enable run-postinsts.service Failed to enable unit: Unit file /etc/systemd/system/run-postinsts.service is masked. %post(run-postinsts-1.0-r10.noarch): waitpid(11256) rc 11256 status 100 warning: %post(run-postinsts-1.0-r10.noarch) scriptlet failed, exit status 1 Regards, Oleksiy From: openembedded-core@lists.openembedded.org on behalf of Awais Belal Sent: Monday, March 22, 2021 14:00 To: openembedded-core@lists.openembedded.org Subject: [OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded The service is unnecessarily run even when it is unneeded. This was handled correctly for sysV systems however the service still runs on the systemd systems as it is not disabled/masked when not needed. Signed-off-by: Awais Belal --- meta/lib/oe/rootfs.py | 4 1 file changed, 4 insertions(+) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 249c685dcf..fe35ce5b70 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -257,6 +257,10 @@ class Rootfs(object, metaclass=ABCMeta): self._exec_shell_cmd(["update-rc.d", "-f", "-r", self.d.getVar('IMAGE_ROOTFS'), "run-postinsts", "remove"]) +if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")): +self._exec_shell_cmd(["systemctl", +"--root", self.d.getVar('IMAGE_ROOTFS'), +"mask", "run-postinsts.service"]) image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", True, False, self.d) -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149822): https://lists.openembedded.org/g/openembedded-core/message/149822 Mute This Topic: https://lists.openembedded.org/mt/81522036/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] [PATCH v2] rootfs.py: mask run-postinsts systemd service when unneeded
The service is unnecessarily run even when it is unneeded. This was handled correctly for sysV systems however the service still runs on the systemd systems as it is not disabled/masked when not needed. Signed-off-by: Awais Belal --- meta/lib/oe/rootfs.py | 4 1 file changed, 4 insertions(+) diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 249c685dcf..fe35ce5b70 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -257,6 +257,10 @@ class Rootfs(object, metaclass=ABCMeta): self._exec_shell_cmd(["update-rc.d", "-f", "-r", self.d.getVar('IMAGE_ROOTFS'), "run-postinsts", "remove"]) +if os.path.exists(self.d.expand("${IMAGE_ROOTFS}${systemd_unitdir}/system/run-postinsts.service")): +self._exec_shell_cmd(["systemctl", +"--root", self.d.getVar('IMAGE_ROOTFS'), +"mask", "run-postinsts.service"]) image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", True, False, self.d) -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149777): https://lists.openembedded.org/g/openembedded-core/message/149777 Mute This Topic: https://lists.openembedded.org/mt/81522036/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-