public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] Fix the name of the qemu-system-* executable
@ 2022-09-23  9:56 Dario Faggioli
  2022-09-23  9:56 ` Dario Faggioli
  2022-09-23 23:18 ` Stefano Brivio
  0 siblings, 2 replies; 4+ messages in thread
From: Dario Faggioli @ 2022-09-23  9:56 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Hello everyone!

So, while playing with out passt package for openSUSE, my colleague
Vasiliy found out an issue in how passt assumes the qemu binary to be
called.

In fact, in openSUSE, while we have a package that allows people to
launch qemu by invoking `qemu-kvm`, we don't install it by default, and
we therefore only have the standard upstream names in the filesystem,
which have the ARCH part in lowercase.

This patch, which we're currently carrying as a downstream one in our
package, should fix the problem.

Thanks and Regards,
Dario
---
Vasiliy Ulyanov (1):
      Fix the name of the qemu-system-* executable

 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)


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

* [PATCH] Fix the name of the qemu-system-* executable
  2022-09-23  9:56 [PATCH] Fix the name of the qemu-system-* executable Dario Faggioli
@ 2022-09-23  9:56 ` Dario Faggioli
  2022-09-24 12:47   ` Stefano Brivio
  2022-09-23 23:18 ` Stefano Brivio
  1 sibling, 1 reply; 4+ messages in thread
From: Dario Faggioli @ 2022-09-23  9:56 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

From: Vasiliy Ulyanov <vulyanov(a)suse.de>

Define the target machine architecture in lowercase.

The name of the executable qemu-system-* is defined from the build flags
and should be in lowercase:

    ( "qemu-system-" ARCH ),

I.e. qemu-system-x86_64 instead of qemu-system-X86_64. Otherwise, the
exec call will fail.

Signed-off-by: Vasiliy Ulyanov <vulyanov(a)suse.de>
Signed-off-by: Dario Faggioli <dfaggioli(a)suse.com>
---
 Makefile |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index c47a5f6..4ccca67 100644
--- a/Makefile
+++ b/Makefile
@@ -15,10 +15,10 @@ RLIMIT_STACK_VAL := 1024
 endif
 
 # Get 'uname -m'-like architecture description for target
-TARGET_ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d- | tr [a-z] [A-Z])
-TARGET_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/POWERPC/PPC/')
+TARGET_ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d- | tr [A-Z] [a-z])
+TARGET_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/powerpc/ppc/')
 
-AUDIT_ARCH := $(shell echo $(TARGET_ARCH) | sed 's/^ARM.*/ARM/')
+AUDIT_ARCH := $(shell echo $(TARGET_ARCH) | tr [a-z] [A-Z] | sed 's/^ARM.*/ARM/')
 AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/I[456]86/I386/')
 AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPC64/PPC/')
 AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPCLE/PPC64LE/')
@@ -90,7 +90,7 @@ docdir		?= $(datarootdir)/doc/passt
 mandir		?= $(datarootdir)/man
 man1dir		?= $(mandir)/man1
 
-ifeq ($(TARGET_ARCH),X86_64)
+ifeq ($(TARGET_ARCH),x86_64)
 BIN := passt passt.avx2 pasta pasta.avx2 qrap
 else
 BIN := passt pasta qrap



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

* Re: [PATCH] Fix the name of the qemu-system-* executable
  2022-09-23  9:56 [PATCH] Fix the name of the qemu-system-* executable Dario Faggioli
  2022-09-23  9:56 ` Dario Faggioli
@ 2022-09-23 23:18 ` Stefano Brivio
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Brivio @ 2022-09-23 23:18 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

On Fri, 23 Sep 2022 11:56:23 +0200
Dario Faggioli <dfaggioli(a)suse.com> wrote:

> Hello everyone!
> 
> So, while playing with out passt package for openSUSE, my colleague
> Vasiliy found out an issue in how passt assumes the qemu binary to be
> called.
> 
> In fact, in openSUSE, while we have a package that allows people to
> launch qemu by invoking `qemu-kvm`, we don't install it by default, and
> we therefore only have the standard upstream names in the filesystem,
> which have the ARCH part in lowercase.

Ah, right. I never noticed because 'kvm' or 'qemu-kvm' were always
there in the environments I use, and the openSUSE test script in the CI:

  https://passt.top/passt/tree/test/distro/opensuse

explicitly passes the path to the qemu binary to qrap.

By the way, for context, as the name might suggest: I'm quite eager to
get rid of qrap, and it looks like we're close. Once native AF_UNIX
support lands in qemu with (further revisions of) Laurent's patchset:

  https://patchwork.kernel.org/project/qemu-devel/list/?series=676445

we can simply tell qemu to connect to passt, without starting it with a
wrapper.

> This patch, which we're currently carrying as a downstream one in our
> package, should fix the problem.
> 
> Thanks and Regards,
> Dario
> ---
> Vasiliy Ulyanov (1):
>       Fix the name of the qemu-system-* executable

For that patch,

Reviewed-by: Stefano Brivio <sbrivio(a)redhat.com>

And while at it: you might want to subscribe to this list:

  https://lists.passt.top/

if you're interested. Right now I'm approving your postings manually as
you're not subscribed, so they are always a bit delayed.

-- 
Stefano


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

* Re: [PATCH] Fix the name of the qemu-system-* executable
  2022-09-23  9:56 ` Dario Faggioli
@ 2022-09-24 12:47   ` Stefano Brivio
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Brivio @ 2022-09-24 12:47 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On Fri, 23 Sep 2022 11:56:30 +0200
Dario Faggioli <dfaggioli(a)suse.com> wrote:

> From: Vasiliy Ulyanov <vulyanov(a)suse.de>
> 
> Define the target machine architecture in lowercase.
> 
> The name of the executable qemu-system-* is defined from the build flags
> and should be in lowercase:
> 
>     ( "qemu-system-" ARCH ),
> 
> I.e. qemu-system-x86_64 instead of qemu-system-X86_64. Otherwise, the
> exec call will fail.
> 
> Signed-off-by: Vasiliy Ulyanov <vulyanov(a)suse.de>
> Signed-off-by: Dario Faggioli <dfaggioli(a)suse.com>

Applied, thanks, and welcome to the git log!

-- 
Stefano


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

end of thread, other threads:[~2022-09-24 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23  9:56 [PATCH] Fix the name of the qemu-system-* executable Dario Faggioli
2022-09-23  9:56 ` Dario Faggioli
2022-09-24 12:47   ` Stefano Brivio
2022-09-23 23:18 ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).