On Tue, Apr 19, 2022 at 3:07 PM Diego Sueiro <diego.sue...@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-
> >virtualizat...@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.cl...@gmail.com; nd <n...@arm.com>; Diego Sueiro
> ><diego.sue...@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.sue...@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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7196): 
https://lists.yoctoproject.org/g/meta-virtualization/message/7196
Mute This Topic: https://lists.yoctoproject.org/mt/90568380/21656
Group Owner: meta-virtualization+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to