On 2/16/26 18:25, Gyorgy Sarvari via lists.openembedded.org wrote:
> On 2/15/26 21:03, Gyorgy Sarvari via lists.openembedded.org wrote:
>> On 2/14/26 02:35, Yiding Liu (Fujitsu) via lists.openembedded.org wrote:
>>> Fix the following error:
>>> ERROR: core-image-minimal-1.0-r0 do_rootfs: Postinstall scriptlets of
>>> ['tigervnc'] have failed. If the intention is to defer them to first boot,
>>> then please place them into pkg_postinst_ontarget:${PN} ().
>> How could I reproduce this?
>> I added tigervnc to IMAGE_INSTALL, and built it once with systemd as
>> INIT_MANAGER and once with sysvinit (also added systemd/sysvinit to
>> DISTRO_FEATURES), but the build succeeded in both cases.
>> Am I missing some config step?
>>
> Yes, I was missing an important step: I wasn't trying it correctly :)
>
> I could reproduce it... but I'm not sure if this patch is how it should
> be solved.
> Currently it looks that systemd integration is broken for this recipe.
> systemd is complaining during rootfs generation:
> "Failed to enable unit: Refusing to operate on template unit
> [email protected] when destination unit multi-user.target is a
> non-template unit"
>
> It says the same during runtime too, when I try to enable the script
> with systemctl.
>
> Not really sure what this error means in English, if it's only a problem
> with the script name or something more. Will try to mine it from the
> systemd docs (if someone knows the answer already, please feel free post
> it).
>
I think managed to figure it out. Most of it is also present in the unit
file, as a comment. I suspect this has been always broken...
Now I think disabling the init script as you did makes sense, but I
believe the recipe could use some extra changes.
The issue is that the init script needs a target also to start: though
the script is called vncserver@, it needs to be started as
vncserver@TARGET (where TARGET is a display number associated with a user).
Due to this I think "SYSTEMD_SERVICE:${PN}" should be weak assignment
(?=), so users override it easily to set it correctly.
Maybe it could also have a valid value, like "[email protected]",
thought I guess it's debatable if it's better than the original.
I think the recipe could also use comments how to enable the service
(most likely it's enough just to mention that further steps are listed
in the unit file itself)
What do you think?
>>> Signed-off-by: Liu Yiding <[email protected]>
>>> ---
>>> meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb
>>> b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb
>>> index a5413a9108..12854632d5 100644
>>> --- a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb
>>> +++ b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb
>>> @@ -95,6 +95,7 @@ FILES:${PN} += " \
>>> "
>>>
>>> SYSTEMD_SERVICE:${PN} = "[email protected]"
>>> +SYSTEMD_AUTO_ENABLE:${PN} = "disable"
>>>
>>> CVE_STATUS[CVE-2014-8241] = "fixed-version: The vulnerable code is not
>>> present in the used version (1.15.0)"
>>> CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is not
>>> present in the used xserver version (21.1.18)"
>>>
>>>
>>>
>>
>>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#124440):
https://lists.openembedded.org/g/openembedded-devel/message/124440
Mute This Topic: https://lists.openembedded.org/mt/117803450/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-