All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
@ 2022-04-19 18:31 Diego Sueiro
  0 siblings, 0 replies; 10+ messages in thread
From: Diego Sueiro @ 2022-04-19 18:31 UTC (permalink / raw)
  To: meta-virtualization; +Cc: christopher.w.clark, nd, Diego Sueiro

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.

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>

Change since v1:
 * Added missing ${D} when removing unnecessary files.
---
 recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc
index 6bbc8cd..4acf054 100644
--- a/recipes-extended/xen/xen-tools.inc
+++ b/recipes-extended/xen/xen-tools.inc
@@ -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
+        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#' \
-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
+        # remove systemd specific files
+        rm -rf ${D}${systemd_unitdir}
     fi
 }
 
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
  2022-04-21 16:03               ` Bruce Ashfield
@ 2022-04-22  7:19                 ` Diego Sueiro
  0 siblings, 0 replies; 10+ messages in thread
From: Diego Sueiro @ 2022-04-22  7:19 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization, christopher.w.clark, nd


>-----Original Message-----
>From: Bruce Ashfield <bruce.ashfield@gmail.com>
>Sent: 21 April 2022 17:04
>To: Bruce Ashfield <bruce.ashfield@gmail.com>
>Cc: Diego Sueiro <Diego.Sueiro@arm.com>; meta-
>virtualization@lists.yoctoproject.org; christopher.w.clark@gmail.com; nd
><nd@arm.com>
>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
>xencommons do_package
>
>On Tue, Apr 19, 2022 at 8:15 PM Bruce Ashfield via lists.yoctoproject.org
><bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
>>
>> On Tue, Apr 19, 2022 at 6:01 PM Bruce Ashfield via
>> lists.yoctoproject.org
>> <bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
>> >
>> > On Tue, Apr 19, 2022 at 4:38 PM Diego Sueiro <Diego.Sueiro@arm.com>
>wrote:
>> > >
>> > >
>> > >
>> > > --
>> > > Diego Sueiro
>> > > Staff Software Developer – Automotive and Industrial Solutions
>> > > (CE-OSS)
>> > >
>> > > >-----Original Message-----
>> > > >From: Diego Sueiro <Diego.Sueiro@arm.com>
>> > > >Sent: 19 April 2022 20:41
>> > > >To: Diego Sueiro <Diego.Sueiro@arm.com>; bruce.ashfield@gmail.com
>> > > >Cc: meta-virtualization@lists.yoctoproject.org;
>> > > >christopher.w.clark@gmail.com; nd <nd@arm.com>
>> > > >Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix
>> > > >xen-tools- xencommons do_package
>> > > >
>> > > >
>> > > >>-----Original Message-----
>> > > >>From: meta-virtualization@lists.yoctoproject.org <meta-
>> > > >>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro
>> > > >>via lists.yoctoproject.org
>> > > >>Sent: 19 April 2022 20:28
>> > > >>To: bruce.ashfield@gmail.com
>> > > >>Cc: meta-virtualization@lists.yoctoproject.org;
>> > > >>christopher.w.clark@gmail.com; nd <nd@arm.com>
>> > > >>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix
>> > > >>xen-tools- xencommons do_package
>> > > >>
>> > > >>Hi Bruce,
>> > > >>
>> > > >>>-----Original Message-----
>> > > >>>From: meta-virtualization@lists.yoctoproject.org <meta-
>> > > >>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce
>> > > >>>Ashfield via lists.yoctoproject.org
>> > > >>>Sent: 19 April 2022 20:17
>> > > >>>To: Diego Sueiro <Diego.Sueiro@arm.com>
>> > > >>>Cc: meta-virtualization@lists.yoctoproject.org;
>> > > >>>christopher.w.clark@gmail.com; nd <nd@arm.com>
>> > > >>>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
>> > > >>><diego.sueiro@arm.com>
>> > > >>wrote:
>> > > >>>>
>> > > >>>> 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
>> > > >>>> + -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
>> > > >>>> 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):
>> > > >>>> 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.
>> > > >>>>
>> > > >>>
>> > > >>>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"
>> > > >>
>> > > >
>> > > >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.
>> > > 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
>
>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.

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

>
>Bruce
>
>>
>> Bruce
>>
>>
>> >
>> > Bruce
>> >
>> > >
>> > > --
>> > > Diego
>> > >
>> > > >
>> > > >I'm just curious to see how will be the behaviour on the kirkstone
>branch.
>> > > >
>> > > >--
>> > > >Diego
>> > > >
>> > > >>
>> > > >>>
>> > > >>>>
>> > > >>>> --
>> > > >>>> Diego Sueiro
>> > > >>>> Staff Software Developer - Automotive and Industrial
>> > > >>>> Solutions
>> > > >>>> (CE-OSS)
>> > > >>>>
>> > > >>>> >-----Original Message-----
>> > > >>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
>> > > >>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego
>> > > >>>> >Sueiro via lists.yoctoproject.org
>> > > >>>> >Sent: 19 April 2022 19:32
>> > > >>>> >To: meta-virtualization@lists.yoctoproject.org
>> > > >>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego
>> > > >>>> >Sueiro <Diego.Sueiro@arm.com>
>> > > >>>> >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.
>> > > >>>> >
>> > > >>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>> > > >>>> >
>> > > >>>> >Change since v1:
>> > > >>>> > * Added missing ${D} when removing unnecessary files.
>> > > >>>> >---
>> > > >>>> > recipes-extended/xen/xen-tools.inc | 20
>> > > >>>> >++++++++++++++------
>> > > >>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
>> > > >>>> >
>> > > >>>> >diff --git a/recipes-extended/xen/xen-tools.inc
>> > > >>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054
>> > > >>>> >100644
>> > > >>>> >--- a/recipes-extended/xen/xen-tools.inc
>> > > >>>> >+++ b/recipes-extended/xen/xen-tools.inc
>> > > >>>> >@@ -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
>> > > >>>> >+        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#' \
>> > > >>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
>> > > >>>backend.service
>> > > >>>> >+        # 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
>> >
>> >
>> >
>>
>>
>> --
>> - 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: meta-virtualization+owner@lists.yoctoproject.org
>> Unsubscribe:
>> https://lists.yoctoproject.org/g/meta-virtualization/unsub
>> [bruce.ashfield@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
>
>--
>- Thou shalt not follow the NULL pointer, for chaos and madness await thee at
>its end
>- "Use the force Harry" - Gandalf, Star Trek II

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
       [not found]             ` <16E7728C69F8F83F.10736@lists.yoctoproject.org>
@ 2022-04-21 16:03               ` Bruce Ashfield
  2022-04-22  7:19                 ` Diego Sueiro
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Ashfield @ 2022-04-21 16:03 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Diego Sueiro, meta-virtualization, christopher.w.clark, nd

On Tue, Apr 19, 2022 at 8:15 PM Bruce Ashfield via
lists.yoctoproject.org
<bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
>
> On Tue, Apr 19, 2022 at 6:01 PM Bruce Ashfield via
> lists.yoctoproject.org
> <bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
> >
> > On Tue, Apr 19, 2022 at 4:38 PM Diego Sueiro <Diego.Sueiro@arm.com> wrote:
> > >
> > >
> > >
> > > --
> > > Diego Sueiro
> > > Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)
> > >
> > > >-----Original Message-----
> > > >From: Diego Sueiro <Diego.Sueiro@arm.com>
> > > >Sent: 19 April 2022 20:41
> > > >To: Diego Sueiro <Diego.Sueiro@arm.com>; bruce.ashfield@gmail.com
> > > >Cc: meta-virtualization@lists.yoctoproject.org;
> > > >christopher.w.clark@gmail.com; nd <nd@arm.com>
> > > >Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> > > >xencommons do_package
> > > >
> > > >
> > > >>-----Original Message-----
> > > >>From: meta-virtualization@lists.yoctoproject.org <meta-
> > > >>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
> > > >>lists.yoctoproject.org
> > > >>Sent: 19 April 2022 20:28
> > > >>To: bruce.ashfield@gmail.com
> > > >>Cc: meta-virtualization@lists.yoctoproject.org;
> > > >>christopher.w.clark@gmail.com; nd <nd@arm.com>
> > > >>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> > > >>xencommons do_package
> > > >>
> > > >>Hi Bruce,
> > > >>
> > > >>>-----Original Message-----
> > > >>>From: meta-virtualization@lists.yoctoproject.org <meta-
> > > >>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
> > > >>>lists.yoctoproject.org
> > > >>>Sent: 19 April 2022 20:17
> > > >>>To: Diego Sueiro <Diego.Sueiro@arm.com>
> > > >>>Cc: meta-virtualization@lists.yoctoproject.org;
> > > >>>christopher.w.clark@gmail.com; nd <nd@arm.com>
> > > >>>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 <diego.sueiro@arm.com>
> > > >>wrote:
> > > >>>>
> > > >>>> 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-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
> > > >>>> 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)
> > > >>>> 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.
> > > >>>>
> > > >>>
> > > >>>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"
> > > >>
> > > >
> > > >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.
>
> 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

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

>
> Bruce
>
>
> >
> > Bruce
> >
> > >
> > > --
> > > Diego
> > >
> > > >
> > > >I'm just curious to see how will be the behaviour on the kirkstone branch.
> > > >
> > > >--
> > > >Diego
> > > >
> > > >>
> > > >>>
> > > >>>>
> > > >>>> --
> > > >>>> Diego Sueiro
> > > >>>> Staff Software Developer - Automotive and Industrial Solutions
> > > >>>> (CE-OSS)
> > > >>>>
> > > >>>> >-----Original Message-----
> > > >>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
> > > >>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro
> > > >>>> >via lists.yoctoproject.org
> > > >>>> >Sent: 19 April 2022 19:32
> > > >>>> >To: meta-virtualization@lists.yoctoproject.org
> > > >>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
> > > >>>> ><Diego.Sueiro@arm.com>
> > > >>>> >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.
> > > >>>> >
> > > >>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > > >>>> >
> > > >>>> >Change since v1:
> > > >>>> > * Added missing ${D} when removing unnecessary files.
> > > >>>> >---
> > > >>>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
> > > >>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
> > > >>>> >
> > > >>>> >diff --git a/recipes-extended/xen/xen-tools.inc
> > > >>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
> > > >>>> >--- a/recipes-extended/xen/xen-tools.inc
> > > >>>> >+++ b/recipes-extended/xen/xen-tools.inc
> > > >>>> >@@ -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
> > > >>>> >+        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#' \
> > > >>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
> > > >>>backend.service
> > > >>>> >+        # 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
> >
> >
> >
>
>
> --
> - 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: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
       [not found]           ` <16E76B3B75796758.23693@lists.yoctoproject.org>
@ 2022-04-20  0:15             ` Bruce Ashfield
       [not found]             ` <16E7728C69F8F83F.10736@lists.yoctoproject.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-04-20  0:15 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Diego Sueiro, meta-virtualization, christopher.w.clark, nd

On Tue, Apr 19, 2022 at 6:01 PM Bruce Ashfield via
lists.yoctoproject.org
<bruce.ashfield=gmail.com@lists.yoctoproject.org> wrote:
>
> On Tue, Apr 19, 2022 at 4:38 PM Diego Sueiro <Diego.Sueiro@arm.com> wrote:
> >
> >
> >
> > --
> > Diego Sueiro
> > Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)
> >
> > >-----Original Message-----
> > >From: Diego Sueiro <Diego.Sueiro@arm.com>
> > >Sent: 19 April 2022 20:41
> > >To: Diego Sueiro <Diego.Sueiro@arm.com>; bruce.ashfield@gmail.com
> > >Cc: meta-virtualization@lists.yoctoproject.org;
> > >christopher.w.clark@gmail.com; nd <nd@arm.com>
> > >Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> > >xencommons do_package
> > >
> > >
> > >>-----Original Message-----
> > >>From: meta-virtualization@lists.yoctoproject.org <meta-
> > >>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
> > >>lists.yoctoproject.org
> > >>Sent: 19 April 2022 20:28
> > >>To: bruce.ashfield@gmail.com
> > >>Cc: meta-virtualization@lists.yoctoproject.org;
> > >>christopher.w.clark@gmail.com; nd <nd@arm.com>
> > >>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> > >>xencommons do_package
> > >>
> > >>Hi Bruce,
> > >>
> > >>>-----Original Message-----
> > >>>From: meta-virtualization@lists.yoctoproject.org <meta-
> > >>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
> > >>>lists.yoctoproject.org
> > >>>Sent: 19 April 2022 20:17
> > >>>To: Diego Sueiro <Diego.Sueiro@arm.com>
> > >>>Cc: meta-virtualization@lists.yoctoproject.org;
> > >>>christopher.w.clark@gmail.com; nd <nd@arm.com>
> > >>>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 <diego.sueiro@arm.com>
> > >>wrote:
> > >>>>
> > >>>> 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-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
> > >>>> 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)
> > >>>> 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.
> > >>>>
> > >>>
> > >>>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"
> > >>
> > >
> > >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.

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


>
> Bruce
>
> >
> > --
> > Diego
> >
> > >
> > >I'm just curious to see how will be the behaviour on the kirkstone branch.
> > >
> > >--
> > >Diego
> > >
> > >>
> > >>>
> > >>>>
> > >>>> --
> > >>>> Diego Sueiro
> > >>>> Staff Software Developer - Automotive and Industrial Solutions
> > >>>> (CE-OSS)
> > >>>>
> > >>>> >-----Original Message-----
> > >>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
> > >>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro
> > >>>> >via lists.yoctoproject.org
> > >>>> >Sent: 19 April 2022 19:32
> > >>>> >To: meta-virtualization@lists.yoctoproject.org
> > >>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
> > >>>> ><Diego.Sueiro@arm.com>
> > >>>> >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.
> > >>>> >
> > >>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > >>>> >
> > >>>> >Change since v1:
> > >>>> > * Added missing ${D} when removing unnecessary files.
> > >>>> >---
> > >>>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
> > >>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
> > >>>> >
> > >>>> >diff --git a/recipes-extended/xen/xen-tools.inc
> > >>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
> > >>>> >--- a/recipes-extended/xen/xen-tools.inc
> > >>>> >+++ b/recipes-extended/xen/xen-tools.inc
> > >>>> >@@ -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
> > >>>> >+        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#' \
> > >>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
> > >>>backend.service
> > >>>> >+        # 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: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
  2022-04-19 20:38         ` Diego Sueiro
@ 2022-04-19 22:01           ` Bruce Ashfield
       [not found]           ` <16E76B3B75796758.23693@lists.yoctoproject.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-04-19 22:01 UTC (permalink / raw)
  To: Diego Sueiro; +Cc: meta-virtualization, christopher.w.clark, nd

On Tue, Apr 19, 2022 at 4:38 PM Diego Sueiro <Diego.Sueiro@arm.com> wrote:
>
>
>
> --
> Diego Sueiro
> Staff Software Developer – Automotive and Industrial Solutions (CE-OSS)
>
> >-----Original Message-----
> >From: Diego Sueiro <Diego.Sueiro@arm.com>
> >Sent: 19 April 2022 20:41
> >To: Diego Sueiro <Diego.Sueiro@arm.com>; bruce.ashfield@gmail.com
> >Cc: meta-virtualization@lists.yoctoproject.org;
> >christopher.w.clark@gmail.com; nd <nd@arm.com>
> >Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> >xencommons do_package
> >
> >
> >>-----Original Message-----
> >>From: meta-virtualization@lists.yoctoproject.org <meta-
> >>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
> >>lists.yoctoproject.org
> >>Sent: 19 April 2022 20:28
> >>To: bruce.ashfield@gmail.com
> >>Cc: meta-virtualization@lists.yoctoproject.org;
> >>christopher.w.clark@gmail.com; nd <nd@arm.com>
> >>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
> >>xencommons do_package
> >>
> >>Hi Bruce,
> >>
> >>>-----Original Message-----
> >>>From: meta-virtualization@lists.yoctoproject.org <meta-
> >>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
> >>>lists.yoctoproject.org
> >>>Sent: 19 April 2022 20:17
> >>>To: Diego Sueiro <Diego.Sueiro@arm.com>
> >>>Cc: meta-virtualization@lists.yoctoproject.org;
> >>>christopher.w.clark@gmail.com; nd <nd@arm.com>
> >>>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 <diego.sueiro@arm.com>
> >>wrote:
> >>>>
> >>>> 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-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
> >>>> 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)
> >>>> 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.
> >>>>
> >>>
> >>>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"
> >>
> >
> >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

>
> --
> Diego
>
> >
> >I'm just curious to see how will be the behaviour on the kirkstone branch.
> >
> >--
> >Diego
> >
> >>
> >>>
> >>>>
> >>>> --
> >>>> Diego Sueiro
> >>>> Staff Software Developer - Automotive and Industrial Solutions
> >>>> (CE-OSS)
> >>>>
> >>>> >-----Original Message-----
> >>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
> >>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro
> >>>> >via lists.yoctoproject.org
> >>>> >Sent: 19 April 2022 19:32
> >>>> >To: meta-virtualization@lists.yoctoproject.org
> >>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
> >>>> ><Diego.Sueiro@arm.com>
> >>>> >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.
> >>>> >
> >>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> >>>> >
> >>>> >Change since v1:
> >>>> > * Added missing ${D} when removing unnecessary files.
> >>>> >---
> >>>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
> >>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
> >>>> >
> >>>> >diff --git a/recipes-extended/xen/xen-tools.inc
> >>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
> >>>> >--- a/recipes-extended/xen/xen-tools.inc
> >>>> >+++ b/recipes-extended/xen/xen-tools.inc
> >>>> >@@ -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
> >>>> >+        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#' \
> >>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
> >>>backend.service
> >>>> >+        # 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
  2022-04-19 19:41       ` Diego Sueiro
@ 2022-04-19 20:38         ` Diego Sueiro
  2022-04-19 22:01           ` Bruce Ashfield
       [not found]           ` <16E76B3B75796758.23693@lists.yoctoproject.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Diego Sueiro @ 2022-04-19 20:38 UTC (permalink / raw)
  To: bruce.ashfield; +Cc: meta-virtualization, christopher.w.clark, nd



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

>-----Original Message-----
>From: Diego Sueiro <Diego.Sueiro@arm.com>
>Sent: 19 April 2022 20:41
>To: Diego Sueiro <Diego.Sueiro@arm.com>; bruce.ashfield@gmail.com
>Cc: meta-virtualization@lists.yoctoproject.org;
>christopher.w.clark@gmail.com; nd <nd@arm.com>
>Subject: RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
>xencommons do_package
>
>
>>-----Original Message-----
>>From: meta-virtualization@lists.yoctoproject.org <meta-
>>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
>>lists.yoctoproject.org
>>Sent: 19 April 2022 20:28
>>To: bruce.ashfield@gmail.com
>>Cc: meta-virtualization@lists.yoctoproject.org;
>>christopher.w.clark@gmail.com; nd <nd@arm.com>
>>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
>>xencommons do_package
>>
>>Hi Bruce,
>>
>>>-----Original Message-----
>>>From: meta-virtualization@lists.yoctoproject.org <meta-
>>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
>>>lists.yoctoproject.org
>>>Sent: 19 April 2022 20:17
>>>To: Diego Sueiro <Diego.Sueiro@arm.com>
>>>Cc: meta-virtualization@lists.yoctoproject.org;
>>>christopher.w.clark@gmail.com; nd <nd@arm.com>
>>>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 <diego.sueiro@arm.com>
>>wrote:
>>>>
>>>> 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-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
>>>> 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)
>>>> 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.
>>>>
>>>
>>>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"
>>
>
>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

>
>I'm just curious to see how will be the behaviour on the kirkstone branch.
>
>--
>Diego
>
>>
>>>
>>>>
>>>> --
>>>> Diego Sueiro
>>>> Staff Software Developer - Automotive and Industrial Solutions
>>>> (CE-OSS)
>>>>
>>>> >-----Original Message-----
>>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
>>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro
>>>> >via lists.yoctoproject.org
>>>> >Sent: 19 April 2022 19:32
>>>> >To: meta-virtualization@lists.yoctoproject.org
>>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
>>>> ><Diego.Sueiro@arm.com>
>>>> >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.
>>>> >
>>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>>>> >
>>>> >Change since v1:
>>>> > * Added missing ${D} when removing unnecessary files.
>>>> >---
>>>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
>>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
>>>> >
>>>> >diff --git a/recipes-extended/xen/xen-tools.inc
>>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
>>>> >--- a/recipes-extended/xen/xen-tools.inc
>>>> >+++ b/recipes-extended/xen/xen-tools.inc
>>>> >@@ -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
>>>> >+        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#' \
>>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
>>>backend.service
>>>> >+        # 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
       [not found]     ` <16E762DD856665D2.8966@lists.yoctoproject.org>
@ 2022-04-19 19:41       ` Diego Sueiro
  2022-04-19 20:38         ` Diego Sueiro
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Sueiro @ 2022-04-19 19:41 UTC (permalink / raw)
  To: Diego Sueiro, bruce.ashfield; +Cc: meta-virtualization, christopher.w.clark, nd


>-----Original Message-----
>From: meta-virtualization@lists.yoctoproject.org <meta-
>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
>lists.yoctoproject.org
>Sent: 19 April 2022 20:28
>To: bruce.ashfield@gmail.com
>Cc: meta-virtualization@lists.yoctoproject.org;
>christopher.w.clark@gmail.com; nd <nd@arm.com>
>Subject: Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-
>xencommons do_package
>
>Hi Bruce,
>
>>-----Original Message-----
>>From: meta-virtualization@lists.yoctoproject.org <meta-
>>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
>>lists.yoctoproject.org
>>Sent: 19 April 2022 20:17
>>To: Diego Sueiro <Diego.Sueiro@arm.com>
>>Cc: meta-virtualization@lists.yoctoproject.org;
>>christopher.w.clark@gmail.com; nd <nd@arm.com>
>>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 <diego.sueiro@arm.com>
>wrote:
>>>
>>> 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-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
>>> + 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)
>>> 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.
>>>
>>
>>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"
>

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

>
>>
>>>
>>> --
>>> Diego Sueiro
>>> Staff Software Developer - Automotive and Industrial Solutions
>>> (CE-OSS)
>>>
>>> >-----Original Message-----
>>> >From: meta-virtualization@lists.yoctoproject.org <meta-
>>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
>>> >lists.yoctoproject.org
>>> >Sent: 19 April 2022 19:32
>>> >To: meta-virtualization@lists.yoctoproject.org
>>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
>>> ><Diego.Sueiro@arm.com>
>>> >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.
>>> >
>>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>>> >
>>> >Change since v1:
>>> > * Added missing ${D} when removing unnecessary files.
>>> >---
>>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
>>> > 1 file changed, 14 insertions(+), 6 deletions(-)
>>> >
>>> >diff --git a/recipes-extended/xen/xen-tools.inc
>>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
>>> >--- a/recipes-extended/xen/xen-tools.inc
>>> >+++ b/recipes-extended/xen/xen-tools.inc
>>> >@@ -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
>>> >+        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#' \
>>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
>>backend.service
>>> >+        # 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
  2022-04-19 19:17   ` Bruce Ashfield
@ 2022-04-19 19:27     ` Diego Sueiro
       [not found]     ` <16E762DD856665D2.8966@lists.yoctoproject.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Diego Sueiro @ 2022-04-19 19:27 UTC (permalink / raw)
  To: bruce.ashfield; +Cc: meta-virtualization, christopher.w.clark, nd

Hi Bruce,

>-----Original Message-----
>From: meta-virtualization@lists.yoctoproject.org <meta-
>virtualization@lists.yoctoproject.org> On Behalf Of Bruce Ashfield via
>lists.yoctoproject.org
>Sent: 19 April 2022 20:17
>To: Diego Sueiro <Diego.Sueiro@arm.com>
>Cc: meta-virtualization@lists.yoctoproject.org;
>christopher.w.clark@gmail.com; nd <nd@arm.com>
>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 <diego.sueiro@arm.com> wrote:
>>
>> 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-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
>> + /[...]/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)
>> 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.
>>
>
>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

>
>>
>> --
>> Diego Sueiro
>> Staff Software Developer - Automotive and Industrial Solutions
>> (CE-OSS)
>>
>> >-----Original Message-----
>> >From: meta-virtualization@lists.yoctoproject.org <meta-
>> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
>> >lists.yoctoproject.org
>> >Sent: 19 April 2022 19:32
>> >To: meta-virtualization@lists.yoctoproject.org
>> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
>> ><Diego.Sueiro@arm.com>
>> >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.
>> >
>> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>> >
>> >Change since v1:
>> > * Added missing ${D} when removing unnecessary files.
>> >---
>> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
>> > 1 file changed, 14 insertions(+), 6 deletions(-)
>> >
>> >diff --git a/recipes-extended/xen/xen-tools.inc
>> >b/recipes-extended/xen/xen- tools.inc index 6bbc8cd..4acf054 100644
>> >--- a/recipes-extended/xen/xen-tools.inc
>> >+++ b/recipes-extended/xen/xen-tools.inc
>> >@@ -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
>> >+        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#' \
>> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-
>backend.service
>> >+        # 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
  2022-04-19 19:06 ` Diego Sueiro
@ 2022-04-19 19:17   ` Bruce Ashfield
  2022-04-19 19:27     ` Diego Sueiro
       [not found]     ` <16E762DD856665D2.8966@lists.yoctoproject.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Ashfield @ 2022-04-19 19:17 UTC (permalink / raw)
  To: Diego Sueiro; +Cc: meta-virtualization, christopher.w.clark, nd

On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <diego.sueiro@arm.com> wrote:
>
> 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.
>

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

>
> --
> Diego Sueiro
> Staff Software Developer - Automotive and Industrial Solutions (CE-OSS)
>
> >-----Original Message-----
> >From: meta-virtualization@lists.yoctoproject.org <meta-
> >virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
> >lists.yoctoproject.org
> >Sent: 19 April 2022 19:32
> >To: meta-virtualization@lists.yoctoproject.org
> >Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
> ><Diego.Sueiro@arm.com>
> >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.
> >
> >Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> >
> >Change since v1:
> > * Added missing ${D} when removing unnecessary files.
> >---
> > recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
> > 1 file changed, 14 insertions(+), 6 deletions(-)
> >
> >diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-
> >tools.inc
> >index 6bbc8cd..4acf054 100644
> >--- a/recipes-extended/xen/xen-tools.inc
> >+++ b/recipes-extended/xen/xen-tools.inc
> >@@ -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
> >+        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#' \
> >-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
> >+        # remove systemd specific files
> >+        rm -rf ${D}${systemd_unitdir}
> >     fi
> > }
> >
> >--
> >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: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package
       [not found] <16E75FCC13F8DB9E.24908@lists.yoctoproject.org>
@ 2022-04-19 19:06 ` Diego Sueiro
  2022-04-19 19:17   ` Bruce Ashfield
  0 siblings, 1 reply; 10+ messages in thread
From: Diego Sueiro @ 2022-04-19 19:06 UTC (permalink / raw)
  To: Diego Sueiro, meta-virtualization; +Cc: christopher.w.clark, nd, Bruce Ashfield

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)

>-----Original Message-----
>From: meta-virtualization@lists.yoctoproject.org <meta-
>virtualization@lists.yoctoproject.org> On Behalf Of Diego Sueiro via
>lists.yoctoproject.org
>Sent: 19 April 2022 19:32
>To: meta-virtualization@lists.yoctoproject.org
>Cc: christopher.w.clark@gmail.com; nd <nd@arm.com>; Diego Sueiro
><Diego.Sueiro@arm.com>
>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.
>
>Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>
>Change since v1:
> * Added missing ${D} when removing unnecessary files.
>---
> recipes-extended/xen/xen-tools.inc | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
>diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-
>tools.inc
>index 6bbc8cd..4acf054 100644
>--- a/recipes-extended/xen/xen-tools.inc
>+++ b/recipes-extended/xen/xen-tools.inc
>@@ -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
>+        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#' \
>-            ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
>+        # remove systemd specific files
>+        rm -rf ${D}${systemd_unitdir}
>     fi
> }
>
>--
>2.35.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-22 16:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 18:31 [meta-virtualization][PATCH v2] xen-tools: Fix xen-tools-xencommons do_package Diego Sueiro
     [not found] <16E75FCC13F8DB9E.24908@lists.yoctoproject.org>
2022-04-19 19:06 ` Diego Sueiro
2022-04-19 19:17   ` Bruce Ashfield
2022-04-19 19:27     ` Diego Sueiro
     [not found]     ` <16E762DD856665D2.8966@lists.yoctoproject.org>
2022-04-19 19:41       ` Diego Sueiro
2022-04-19 20:38         ` Diego Sueiro
2022-04-19 22:01           ` Bruce Ashfield
     [not found]           ` <16E76B3B75796758.23693@lists.yoctoproject.org>
2022-04-20  0:15             ` Bruce Ashfield
     [not found]             ` <16E7728C69F8F83F.10736@lists.yoctoproject.org>
2022-04-21 16:03               ` Bruce Ashfield
2022-04-22  7:19                 ` Diego Sueiro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.