Skip to contentSkip to conversation

tigervnc: Fix do_rootfs Error

PATCH Superseded Liu Yiding 2 participants 7 messages Feb 14 – Feb 25 2 messages not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Liu Yiding

author
#0 lore raw

PATCH 1/1 tigervnc: Fix do_rootfs Error

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} ().

---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -0
index a5413a9108..12854632d5 100644
@@ -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)"
Signature · 1 line
2.43.0
#1 lore raw
Quoted 3 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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?

Quoted 26 lines
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -1
index a5413a9108..12854632d5 100644
@@ -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 (#124400): https://lists.openembedded.org/g/openembedded-devel/message/124400
Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

reply: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Hi Gyorgy

I use following setting to reproduce this error.
INIT_MANAGER:forcevariable = "systemd" VIRTUAL-RUNTIME_init_manager = "systemd" IMAGE_INSTALL:append = " tigervnc"

________________________________
发件人: Gyorgy Sarvari <[email protected]>
发送时间: 2026年2月16日 04:03
收件人: Liu, Yiding/刘 乙丁 <[email protected]>; [email protected] <[email protected]> 主题: Re: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Quoted 3 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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?

Quoted 26 lines
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -1
index a5413a9108..12854632d5 100644
@@ -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 (#124400): https://lists.openembedded.org/g/openembedded-devel/message/124400
Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Re: reply: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Quoted 7 lines · Yiding Liu (Fujitsu)

Hi Gyorgy

    I  use following setting to reproduce this error. INIT_MANAGER:forcevariable = "systemd" VIRTUAL-RUNTIME_init_manager = "systemd" IMAGE_INSTALL:append = " tigervnc"

Thanks - a bit after I sent my initial email, I noticed that it was my user error, and was able to reproduce it.
Did you have a chance to check my last mail about this?

https://lists.openembedded.org/g/openembedded-devel/message/124440

Quoted 57 lines

------------------------------------------------------------------------
*发件人:* Gyorgy Sarvari <[email protected]> *发送时间:* 2026年2月16日 04:03
*收件人:* Liu, Yiding/刘 乙丁 <[email protected]>; [email protected] <[email protected]>
*主题:* Re: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Quoted 2 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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,

Quoted 1 line

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?

Review

Quoted 6 lines

---
  meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +

  1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb

Quoted 10 lines

index a5413a9108..12854632d5 100644

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +0 -0
@@ -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)"

Quoted 1 line

  CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is

not present in the used xserver version (21.1.18)"

Quoted 4 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#124400):

https://lists.openembedded.org/g/openembedded-devel/message/124400
<https://lists.openembedded.org/g/openembedded-devel/message/124400>

Quoted 1 line

Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445

<https://lists.openembedded.org/mt/117803450/6084445>

Quoted 2 lines

Group Owner: [email protected] Unsubscribe:

https://lists.openembedded.org/g/openembedded-devel/unsub
<https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

Re: reply: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Hi Gyorgy
I read and understand your mail.
I will set weak assignment to "SYSTEMD_SERVICE:${PN}" and add comments for it like
# If user want to enable service of vncserver, vncserver@:<display>.service is needed and further steps are listed in unit file itself.

Then I will send v2 patch.

Liu
________________________________
发件人: Gyorgy Sarvari <[email protected]>
发送时间: 2026年2月25日 03:46
收件人: Liu, Yiding/刘 乙丁 <[email protected]>; [email protected] <[email protected]> 主题: Re: reply: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Quoted 7 lines · Yiding Liu (Fujitsu)

Hi Gyorgy

I use following setting to reproduce this error.
INIT_MANAGER:forcevariable = "systemd" VIRTUAL-RUNTIME_init_manager = "systemd" IMAGE_INSTALL:append = " tigervnc"

Thanks - a bit after I sent my initial email, I noticed that it was my user error, and was able to reproduce it.
Did you have a chance to check my last mail about this?

https://lists.openembedded.org/g/openembedded-devel/message/124440

Quoted 57 lines

------------------------------------------------------------------------
*发件人:* Gyorgy Sarvari <[email protected]> *发送时间:* 2026年2月16日 04:03
*收件人:* Liu, Yiding/刘 乙丁 <[email protected]>; [email protected] <[email protected]>
*主题:* Re: [oe][meta-oe][PATCH] tigervnc: Fix do_rootfs Error

Quoted 2 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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,

Quoted 1 line

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?

Review

Quoted 6 lines
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb FILES:${PN} += " \ · line 100

Quoted 10 lines

index a5413a9108..12854632d5 100644

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -0
@@ -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)"

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb FILES:${PN} += " \ · line 101

Quoted 1 line
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +0 -0
 CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is

not present in the used xserver version (21.1.18)"

Quoted 4 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#124400):

https://lists.openembedded.org/g/openembedded-devel/message/124400
<https://lists.openembedded.org/g/openembedded-devel/message/124400>

Quoted 1 line

Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445

<https://lists.openembedded.org/mt/117803450/6084445>

Quoted 2 lines

Group Owner: [email protected] Unsubscribe:

https://lists.openembedded.org/g/openembedded-devel/unsub
<https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 10 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 3 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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).

Quoted 29 lines
Quoted 13 lines
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +0 -0
index a5413a9108..12854632d5 100644

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb FILES:${PN} += " \ · line 101

Quoted 7 lines
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -0
@@ -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 (#124406): https://lists.openembedded.org/g/openembedded-devel/message/124406
Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 21 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 10 lines · Gyorgy Sarvari via lists.openembedded.org
Quoted 3 lines · Yiding Liu (Fujitsu) via lists.openembedded.org

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"

Quoted 8 lines

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?

Quoted 31 lines
Quoted 12 lines
Quoted 12 lines
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +0 -0
index a5413a9108..12854632d5 100644
@@ -95,6 +95,7 @@ FILES:${PN} += " \
 "
 
Quoted 10 lines

meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb FILES:${PN} += " \ · line 101

Quoted 8 lines
meta-oe/recipes-graphics/tigervnc/tigervnc_1.16.0.bb +1 -0
 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 (#124430): https://lists.openembedded.org/g/openembedded-devel/message/124430
Mute This Topic: https://lists.openembedded.org/mt/117803450/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-