All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization] QEMU vmsep/virtfs setting
@ 2023-02-02 20:51 Mark Hatle
  2023-02-03 14:43 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Hatle @ 2023-02-02 20:51 UTC (permalink / raw)
  To: meta-virtualization

I've encountered an issue.  When I build nativesdk-qemu for mingw32 target I'm 
getting a failure.  Below is my attempt to figure out what is going wrong.

nativesdk-qemu is depending on libcap-ng for some reason, which does not compile 
for mingw32.  Looking into how this dependency is coming about what appears to 
be happening is "virtfs" support is being enabled which triggers the dependency.

Looking at the bitbake -e output, what I see is:

https://git.yoctoproject.org/meta-virtualization/tree/recipes-devtools/qemu/qemu-package-split.inc#n46

This is running for me in both the target and nativesdk configurations.  Trying 
to understand why it's enable, go back to the caller:

https://git.yoctoproject.org/meta-virtualization/tree/recipes-devtools/qemu/qemu_%25.bbappend

It SHOULD only be loading that file if 'vmsep' is enabled, but I believe due to 
the way bitbake, oe-core and BBCLASSEXTEND works, the nativesdk file includes 
work the same way for both target and nativesdk.  Looking at my DISTRO_FEATURES, 
my target does include 'vmsep', but my nativesdk does not.

So hopefully this explains the failure, the target has vmsep, so the require 
always kicks in, which causes 'virtfs' to always be added to the configuration.

I see two possible solutions to this:

1) Make the virtfs class-target specific.  This would match the prior lines and 
how they are arranged.  However, it's unclear to me if this was intended to be 
target specific or also alter and SDKs configuration.

2) Only enable virtfs for a Linux system (target or nativesdk), I think this can 
be done using an override one way or another.

So for #1 the change would be something like:

-PACKAGECONFIG:append = " virtfs"
+PACKAGECONFIG:append:class-target = " virtfs"


So for #2 the change would be something like:

-PACKAGECONFIG:append = " virtfs"
+ENABLE_VIRTFS = " virtfs"
+ENABLE_VRITFS:sdkmingw32 = ""
+
+PACKAGECONFIG:append = "${ENABLE_VIRTFS}"


I'm happy to submit a proper pull request, but I'm not sure what direction to go 
to fix this.

Thanks!
--Mark


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

* Re: [meta-virtualization] QEMU vmsep/virtfs setting
  2023-02-02 20:51 [meta-virtualization] QEMU vmsep/virtfs setting Mark Hatle
@ 2023-02-03 14:43 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2023-02-03 14:43 UTC (permalink / raw)
  To: Mark Hatle; +Cc: meta-virtualization

On Thu, Feb 2, 2023 at 3:51 PM Mark Hatle
<mark.hatle@kernel.crashing.org> wrote:
>
> I've encountered an issue.  When I build nativesdk-qemu for mingw32 target I'm
> getting a failure.  Below is my attempt to figure out what is going wrong.
>
> nativesdk-qemu is depending on libcap-ng for some reason, which does not compile
> for mingw32.  Looking into how this dependency is coming about what appears to
> be happening is "virtfs" support is being enabled which triggers the dependency.
>
> Looking at the bitbake -e output, what I see is:
>
> https://git.yoctoproject.org/meta-virtualization/tree/recipes-devtools/qemu/qemu-package-split.inc#n46
>
> This is running for me in both the target and nativesdk configurations.  Trying
> to understand why it's enable, go back to the caller:
>
> https://git.yoctoproject.org/meta-virtualization/tree/recipes-devtools/qemu/qemu_%25.bbappend
>
> It SHOULD only be loading that file if 'vmsep' is enabled, but I believe due to
> the way bitbake, oe-core and BBCLASSEXTEND works, the nativesdk file includes
> work the same way for both target and nativesdk.  Looking at my DISTRO_FEATURES,
> my target does include 'vmsep', but my nativesdk does not.
>
> So hopefully this explains the failure, the target has vmsep, so the require
> always kicks in, which causes 'virtfs' to always be added to the configuration.
>
> I see two possible solutions to this:
>
> 1) Make the virtfs class-target specific.  This would match the prior lines and
> how they are arranged.  However, it's unclear to me if this was intended to be
> target specific or also alter and SDKs configuration.
>
> 2) Only enable virtfs for a Linux system (target or nativesdk), I think this can
> be done using an override one way or another.
>
> So for #1 the change would be something like:
>
> -PACKAGECONFIG:append = " virtfs"
> +PACKAGECONFIG:append:class-target = " virtfs"
>

The intention is that we require virtfs for a vmseparated target. i.e.
the target is the host running vmseparated containers.

So from the point of view of the build, restricting it to class-target is fine.

Bruce

>
> So for #2 the change would be something like:
>
> -PACKAGECONFIG:append = " virtfs"
> +ENABLE_VIRTFS = " virtfs"
> +ENABLE_VRITFS:sdkmingw32 = ""
> +
> +PACKAGECONFIG:append = "${ENABLE_VIRTFS}"
>
>
> I'm happy to submit a proper pull request, but I'm not sure what direction to go
> to fix this.
>
> Thanks!
> --Mark
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7842): https://lists.yoctoproject.org/g/meta-virtualization/message/7842
> Mute This Topic: https://lists.yoctoproject.org/mt/96709289/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] 2+ messages in thread

end of thread, other threads:[~2023-02-03 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 20:51 [meta-virtualization] QEMU vmsep/virtfs setting Mark Hatle
2023-02-03 14:43 ` Bruce Ashfield

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.