Skip to contentSkip to conversation

xen-tools: Fix xen-tools-xencommons do_package

PATCH Bruce Ashfield 2 participants 9 messages Apr 19, 2022 – Apr 22, 2022 4 messages not in the archive

lore
Share & tools
lore

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

#1 lore raw

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools do_package, now I'm getting the following error on do_rootfs:

```
  Installing       : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.   429/483 
  Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.   429/483 
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): scriptlet start
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable var-lib-xenstored.mount
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xen-qemu-dom0-disk-backend.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xenconsoled.service
ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xenconsoled.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xen-init-dom0.service
ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xen-init-dom0.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xenstored.service
ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xenstored.service
+ [ -z /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs -o ! -d /run/systemd/system ]
+ type update-rc.d
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ OPT=-r /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs
+ update-rc.d -r /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs xencommons defaults 80
update-rc.d: /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a) scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
  Installing       : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r   430/483 
  Running scriptlet: xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r   430/483
```

I guess that the "xen: only package xencommon systemd components if systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs. Also, I never had the issue , at least using system, reported in the commit message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 77 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package: QA

Issue:
xen-tools: Files/directories were installed but not shipped in any package:
/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the DISTRO_FEATURES.

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
recipes-extended/xen/xen- renamed from recipes-extended/xen/xen-tools.inc +0 -0

tools.inc
index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -3
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >> ${D}${sysconfdir}/tmpfiles.d/xen.conf
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -1
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
 
-    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \

recipes-extended/xen/xen-tools.inc +2 -1
-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

#2 lore raw
Quoted 40 lines · Diego Sueiro

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools do_package, now I'm getting the following error on do_rootfs:

```
  Installing       : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.   429/483
  Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.   429/483
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): scriptlet start
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable var-lib-xenstored.mount
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xen-qemu-dom0-disk-backend.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xenconsoled.service
ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xenconsoled.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xen-init-dom0.service
ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xen-init-dom0.service
+ systemctl --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs enable xenstored.service
ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xenstored.service
+ [ -z /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs -o ! -d /run/systemd/system ]
+ type update-rc.d
+ [ -n /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs ]
+ OPT=-r /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs
+ update-rc.d -r /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs xencommons defaults 80
update-rc.d: /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualization-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist
%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a): waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a) scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
  Installing       : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r   430/483
  Running scriptlet: xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r   430/483
```
Quoted 3 lines

I guess that the "xen: only package xencommon systemd components if systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs. Also, I never had the issue , at least using system, reported in the commit message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime / login errors.

Bruce

Quoted 92 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 75 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package: QA

Issue:
xen-tools: Files/directories were installed but not shipped in any package:
/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the DISTRO_FEATURES.

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
recipes-extended/xen/xen- renamed from recipes-extended/xen/xen-tools.inc +0 -0

tools.inc
index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -3
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >> ${D}${sysconfdir}/tmpfiles.d/xen.conf
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -1
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
 
-    if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \

recipes-extended/xen/xen-tools.inc +2 -1
-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

Quoted 2 lines

--
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7195): https://lists.yoctoproject.org/g/meta-virtualization/message/7195
Mute This Topic: https://lists.yoctoproject.org/mt/90568380/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

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

#4 lore raw
Quoted 142 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 12 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <[email protected]>

Quoted 106 lines · wrote:
Quoted 5 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 68 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/e
+ w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable proc-xen.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable var-lib-xenstored.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiz a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/x e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiz a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/x e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiz a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/x e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-
+ v irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiz a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/x e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual
+ i zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual
+ i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual
+ i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtual

Quoted 8 lines

+ i zation-image/1.0-r0/rootfs xencommons defaults 80 update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiz a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 1 line

Running scriptlet: xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 5 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

Quoted 9 lines

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde03ddaa7097bdb2f5d9a5

I started a build, lets see how it goes.

I'm just curious to see how will be the behaviour on the kirkstone branch.

--
Diego

Quoted 99 lines
Quoted 19 lines
Quoted 19 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package: QA

Issue:
xen-tools: Files/directories were installed but not shipped in any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#5 lore raw

--
Diego Sueiro
Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)

Quoted 175 lines

-----Original Message-----
From: Diego Sueiro <[email protected]>
Sent: 19 April 2022 20:41
To: Diego Sueiro <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 155 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 12 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <[email protected]>

Quoted 119 lines · wrote:
Quoted 5 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 80 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/
+ e w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ var-lib-xenstored.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs xencommons defaults 80

Quoted 8 lines

update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 2 lines

Running scriptlet:
xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 6 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

Quoted 9 lines

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

Quoted 5 lines

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde03ddaa
7097bdb2f5d9a5

I started a build, lets see how it goes.

I can confirm that by having INIT_MANAGER = "system" there are no issues for do_package and do_rootfs. I'm sorry for the false alarm.

--
Diego

Quoted 107 lines

I'm just curious to see how will be the behaviour on the kirkstone branch.

--
Diego

Quoted 101 lines
Quoted 19 lines
Quoted 19 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package:

QA
Issue:
xen-tools: Files/directories were installed but not shipped in
any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#6 lore raw
Quoted 182 lines · Diego Sueiro

--
Diego Sueiro
Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)

Quoted 175 lines

-----Original Message-----
From: Diego Sueiro <[email protected]>
Sent: 19 April 2022 20:41
To: Diego Sueiro <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 164 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 12 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <[email protected]>

Quoted 119 lines · wrote:
Quoted 5 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 80 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/
+ e w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ var-lib-xenstored.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs xencommons defaults 80

Quoted 8 lines

update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 2 lines

Running scriptlet:
xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 6 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

Quoted 8 lines
Quoted 5 lines

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde03ddaa
7097bdb2f5d9a5

I started a build, lets see how it goes.

I can confirm that by having INIT_MANAGER = "system" there are no issues for do_package and do_rootfs. I'm sorry for the false alarm.

Hmmm. It should be packaged regardless. I have a build running, and will see if I can trigger the issue.

Bruce

Quoted 111 lines

--
Diego

Quoted 107 lines

I'm just curious to see how will be the behaviour on the kirkstone branch.

--
Diego

Quoted 101 lines
Quoted 19 lines
Quoted 19 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package:

QA
Issue:
xen-tools: Files/directories were installed but not shipped in
any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

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

#8 lore raw
Quoted 188 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 186 lines · Diego Sueiro

--
Diego Sueiro
Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)

Quoted 179 lines

-----Original Message-----
From: Diego Sueiro <[email protected]>
Sent: 19 April 2022 20:41
To: Diego Sueiro <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 155 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 12 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <[email protected]>

Quoted 119 lines · wrote:
Quoted 5 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 80 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/
+ e w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ var-lib-xenstored.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs xencommons defaults 80

Quoted 8 lines

update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 2 lines

Running scriptlet:
xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 6 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

Quoted 9 lines

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde03ddaa
7097bdb2f5d9a5

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I started a build, lets see how it goes.

I can confirm that by having INIT_MANAGER = "system" there are no issues for do_package and do_rootfs. I'm sorry for the false alarm.

Hmmm. It should be packaged regardless. I have a build running, and will see if I can trigger the issue.

Looking at ti more closely, I do think there's an issue lurking in some configurations.

My suggestion to fix things up is this:

https://git.yoctoproject.org/meta-virtualization/commit/?h=master-next&id=51e404af981ab18391ca44d121fba71946abcc17

Where we just remove the init system files that we don't want .. which matches the conditional packaging of xencommons

Bruce

Quoted 130 lines

Bruce

Quoted 111 lines

--
Diego

Quoted 107 lines

I'm just curious to see how will be the behaviour on the kirkstone branch.

--
Diego

Quoted 101 lines
Quoted 19 lines
Quoted 19 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package:

QA
Issue:
xen-tools: Files/directories were installed but not shipped in
any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7200): https://lists.yoctoproject.org/g/meta-virtualization/message/7200
Mute This Topic: https://lists.yoctoproject.org/mt/90568380/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

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

#10 lore raw
Quoted 203 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 188 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 186 lines · Diego Sueiro

--
Diego Sueiro
Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)

Quoted 179 lines

-----Original Message-----
From: Diego Sueiro <[email protected]>
Sent: 19 April 2022 20:41
To: Diego Sueiro <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 155 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 12 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <[email protected]>

Quoted 119 lines · wrote:
Quoted 5 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 80 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/
+ e w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ var-lib-xenstored.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/ x
e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtua
+ l i zation-image/1.0-r0/rootfs xencommons defaults 80

Quoted 8 lines

update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali z
a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 2 lines

Running scriptlet:
xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 6 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

Quoted 9 lines

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde03ddaa
7097bdb2f5d9a5

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I started a build, lets see how it goes.

I can confirm that by having INIT_MANAGER = "system" there are no issues for do_package and do_rootfs. I'm sorry for the false alarm.

Hmmm. It should be packaged regardless. I have a build running, and will see if I can trigger the issue.

Looking at ti more closely, I do think there's an issue lurking in some configurations.

Quoted 6 lines

My suggestion to fix things up is this:

https://git.yoctoproject.org/meta-virtualization/commit/?h=master-next&id=51e404af981ab18391ca44d121fba71946abcc17

Where we just remove the init system files that we don't want .. which matches the conditional packaging of xencommons

I ran into yet another issue with this during rootfs assembly. I've pushed another fixup patch to master-next.

Everything is building here, but then again, I wasn't seeing some of the other issues.

I'm interested to hear if anyone sees any runtime issues with the init.d/xencommons no longer active for systemd init based systems. If it causes issues, and with the amount of patches I've had to do to fix things, I'll just revert the original patch and wait for reports of duplicate initialization to resurface.

Bruce

Quoted 143 lines

Bruce

Quoted 117 lines

Bruce

Quoted 111 lines

--
Diego

Quoted 107 lines

I'm just curious to see how will be the behaviour on the kirkstone branch.

--
Diego

Quoted 101 lines
Quoted 19 lines
Quoted 19 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package:

QA
Issue:
xen-tools: Files/directories were installed but not shipped in
any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7201): https://lists.yoctoproject.org/g/meta-virtualization/message/7201
Mute This Topic: https://lists.yoctoproject.org/mt/90568380/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#11 lore raw
Quoted 261 lines

-----Original Message-----
From: Bruce Ashfield <[email protected]>
Sent: 21 April 2022 17:04
To: Bruce Ashfield <[email protected]>
Cc: Diego Sueiro <[email protected]>; meta- [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 6 lines · Bruce Ashfield via lists.yoctoproject.org
Quoted 2 lines · Bruce Ashfield via lists.yoctoproject.org

On Tue, Apr 19, 2022 at 4:38 PM Diego Sueiro <[email protected]>

Quoted 46 lines · wrote:
Quoted 46 lines
Quoted 46 lines

--
Diego Sueiro
Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)

Quoted 38 lines

-----Original Message-----
From: Diego Sueiro <[email protected]>
Sent: 19 April 2022 20:41
To: Diego Sueiro <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 28 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 20:28
To: [email protected]
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Hi Bruce,

Quoted 13 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro
<[email protected]>

Quoted 1 line · wrote:
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-

4.15+stable0+84fa99099b-r0.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

429/483

Quoted 1 line

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a):

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a):

Quoted 97 lines
Quoted 97 lines
Quoted 97 lines
Quoted 97 lines
Quoted 97 lines
Quoted 97 lines
Quoted 97 lines

execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky
+ -linux/ e w aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable proc-xen.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ var-lib-xenstored.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v irtuali
z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target .wants/
x
e
n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xenconsoled.service
ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v irtuali
z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target .wants/
x
e
nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xen-init-dom0.service
ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v irtuali
z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target .wants/
x
e
n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linu
+ x/ewaol
+ - v irtualization-image/1.0-r0/rootfs enable
+ xenstored.service
ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v irtuali
z
a tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target .wants/
x
e
nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua
+ l
+ i
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua l i zation-image/1.0-r0/rootfs -o ! -d
+ /run/systemd/system ] type update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua l i zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua l i zation-image/1.0-r0/rootfs update-rc.d -r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol
+ -virtua l i zation-image/1.0-r0/rootfs xencommons defaults
+ 80

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v irtuali
z
a
tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a):

Quoted 44 lines
Quoted 44 lines
Quoted 44 lines
Quoted 44 lines
Quoted 43 lines
Quoted 23 lines
Quoted 2 lines

waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 2 lines

Running scriptlet:
xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 4 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 2 lines

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 6 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime /

login errors.

Quoted 2 lines

Bruce

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd" VIRTUAL-RUNTIME_initscripts="initscripts" DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd" DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc
x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

I guess I'll have to set the INIT_MANAGER variable to systemd instead:
https://git.yoctoproject.org/poky/commit/?id=a6ebbe3a10ff76386dde
03ddaa
7097bdb2f5d9a5

I started a build, lets see how it goes.

I can confirm that by having INIT_MANAGER = "system" there are no

issues for do_package and do_rootfs.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

I'm sorry for the false alarm.

Hmmm. It should be packaged regardless. I have a build running, and will see if I can trigger the issue.

Looking at ti more closely, I do think there's an issue lurking in some configurations.

Quoted 7 lines

My suggestion to fix things up is this:

https://git.yoctoproject.org/meta-virtualization/commit/?h=master-next
&id=51e404af981ab18391ca44d121fba71946abcc17

Where we just remove the init system files that we don't want .. which matches the conditional packaging of xencommons

I ran into yet another issue with this during rootfs assembly. I've pushed another fixup patch to master-next.

Quoted 8 lines

Everything is building here, but then again, I wasn't seeing some of the other issues.

I'm interested to hear if anyone sees any runtime issues with the init.d/xencommons no longer active for systemd init based systems. If it causes issues, and with the amount of patches I've had to do to fix things, I'll just revert the original patch and wait for reports of duplicate initialization to resurface.

The only issues that we had were at build time, as I reported before. Setting INIT_MANAGER="systemd" fixed them.
I've just built the master-next, and both build and runtime (booting/rebooting and "xl console" to DomU) were successful.

--
Diego

Quoted 163 lines

Bruce

Quoted 13 lines

Bruce

Quoted 9 lines

Bruce

Quoted 6 lines

--
Diego

Quoted 2 lines

I'm just curious to see how will be the behaviour on the kirkstone

branch.

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

--
Diego

Quoted 20 lines
Quoted 20 lines
Quoted 20 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions
(CE-OSS)

Quoted 11 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error

is displayed:

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0

do_package:

Quoted 99 lines
Quoted 85 lines
Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

QA
Issue:
xen-tools: Files/directories were installed but not
shipped in any

package:

Quoted 73 lines
Quoted 4 lines
Quoted 4 lines

/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 13 lines
Quoted 13 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20
++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 8 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 8 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 21 lines
Quoted 21 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk- backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk- backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 7 lines

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Quoted 11 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#7201):
https://lists.yoctoproject.org/g/meta-virtualization/message/7201
Mute This Topic: https://lists.yoctoproject.org/mt/90568380/1050810
Group Owner: [email protected] Unsubscribe:
https://lists.yoctoproject.org/g/meta-virtualization/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#12 lore raw
In reply to Bruce Ashfield

Hi Bruce,

Quoted 105 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Bruce Ashfield via lists.yoctoproject.org
Sent: 19 April 2022 20:17
To: Diego Sueiro <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools- xencommons do_package

Quoted 4 lines · Diego Sueiro

Hi Bruce and Christopher,

I'm not sure if this is the best solution, since after fixing the xen-tools

do_package, now I'm getting the following error on do_rootfs:

Quoted 2 lines

```
Installing : xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 1 line

Running scriptlet: xen-tools-xencommons-4.15+stable0+84fa99099b-r0.

429/483

Quoted 57 lines

%post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
scriptlet start %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
execv(/bin/sh) pid 5408
+ set -e
+ systemctl
+ OPTS=
+ [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs ]
+ OPTS=--root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ew
+ aol-virtualization-image/1.0-r0/rootfs
+ [ enable = enable ]
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable proc-xen.mount systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable var-lib-xenstored.mount
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable
+ xen-qemu-dom0-disk-backend.service
ln -s /lib/systemd/system/xen-qemu-dom0-disk-backend.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiza tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xe n-qemu-dom0-disk-backend.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable xenconsoled.service ln -s /lib/systemd/system/xenconsoled.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiza tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xe nconsoled.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable xen-init-dom0.service ln -s /lib/systemd/system/xen-init-dom0.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiza tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xe n-init-dom0.service
+ systemctl
+ --root=/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-v
+ irtualization-image/1.0-r0/rootfs enable xenstored.service ln -s /lib/systemd/system/xenstored.service /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiza tion-image/1.0-r0/rootfs/etc/systemd/system/multi-user.target.wants/xe nstored.service
+ [ -z
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs ] [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs -o ! -d /run/systemd/system ] type
+ update-rc.d [ -n
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs ] OPT=-r
+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs update-rc.d -r

Quoted 8 lines

+ /[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtuali
+ zation-image/1.0-r0/rootfs xencommons defaults 80 update-rc.d:
/[...]/build/tmp_virtualization/work/n1sdp-poky-linux/ewaol-virtualiza tion-image/1.0-r0/rootfs/etc/init.d/xencommons: file does not exist %post(xen-tools-xencommons-4.15+stable0+84fa99099b-r0.armv8a):
waitpid(5408) rc 5408 status 100
warning: %post(xen-tools-xencommons-4.15+stable0+84fa99099b-

r0.armv8a)

Quoted 4 lines

scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package xen-tools-xencommons
Installing : xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 1 line

Running scriptlet: xen-tools-xen-watchdog-4.15+stable0+84fa99099b-r

430/483

Quoted 3 lines

```

I guess that the "xen: only package xencommon systemd components if

systemd is enabled" (c9554c6) patch introduced the issues for do_package as well as do_rootfs.

Quoted 1 line

Also, I never had the issue , at least using system, reported in the commit

message. And as far as I understand systemd is capable of ignoring sysvinit scripts.

Quoted 1 line
Quoted 7 lines

Are you building sysvinit when you see the errors you are trying to fix ? I've never seen them in either configuration here.

I can confirm that it isn't ignoring them by default, and I had multiple reports of the serial port being setup twice, and causing runtime / login errors.

Bruce

These are my current settings:
VIRTUAL-RUNTIME_init_manager="systemd"
VIRTUAL-RUNTIME_initscripts="initscripts"
DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit systemd"
DISTRO_FEATURES="acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp largefile opengl ptest multiarch wayland vulkan virtualization ipv6 systemd seccomp k3s sysvinit xen ptest"

--
Diego

Quoted 97 lines
Quoted 28 lines

--
Diego Sueiro
Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)

Quoted 21 lines

-----Original Message-----
From: [email protected] <meta- [email protected]> On Behalf Of Diego Sueiro via lists.yoctoproject.org
Sent: 19 April 2022 19:32
To: [email protected]
Cc: [email protected]; nd <[email protected]>; Diego Sueiro <[email protected]>
Subject: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package

With the patch "xen: only package xencommon systemd components if systemd is enabled" (c9554c6), the following error is displayed:

   ERROR: xen-tools-4.15+stableAUTOINC+84fa99099b-r0 do_package: QA

Issue:
xen-tools: Files/directories were installed but not shipped in any package:
/etc/init.d/xencommons

To fix this, we need to conditionally include/exclude files in do_install depending on whether or not systemd is in the

DISTRO_FEATURES.

Quoted 12 lines
Quoted 12 lines

Also, take the opportunity to have the relevant extra sed processing in these conditionals.

Change since v1:
* Added missing ${D} when removing unnecessary files.
---
recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------

1 file changed, 14 insertions(+), 6 deletions(-)
Quoted 7 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 806

Quoted 7 lines
(quoted diff) +0 -0

b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644

recipes-extended/xen/xen-tools.inc +0 -0
@@ -805,14 +805,22 @@ do_install() {
        for i in $VOLATILE_DIRS; do
            echo "d $i 0755 root root - -"  >>

${D}${sysconfdir}/tmpfiles.d/xen.conf

Quoted 5 lines

recipes-extended/xen/xen-tools.inc do_install() { · line 811

Quoted 5 lines
recipes-extended/xen/xen-tools.inc +0 -3
        done
-    fi
 
-    # fixup default path to qemu-system-i386
-    sed -i 's#\(test -z "$QEMU_XEN" &&

QEMU_XEN=\).*$#\1"/usr/bin/qemu-

Quoted 19 lines
Quoted 19 lines

system-i386"#' ${D}/etc/init.d/xencommons
+ if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
+ sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
+ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service

recipes-extended/xen/xen-tools.inc +11 -0
+        fi
+
+        # remove sysvinit specific file:
+        rm -rf ${D}${sysconfdir}/init.d/xencommons
+
+    # sysvinit
+    else
+        # fixup default path to qemu-system-i386
+        sed -i 's#\(test -z "$QEMU_XEN" &&
+ QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#'
+ ${D}/etc/init.d/xencommons
Quoted 5 lines
Quoted 5 lines

- if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
backend.service ]; then
- sed -i 's#ExecStart=.*qemu-system-
i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
- ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-

backend.service

Quoted 11 lines
Quoted 7 lines
recipes-extended/xen/xen-tools.inc +2 -0
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
    fi

}

--
2.35.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II