Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703034 - app-emulation/qemu-4.0.0-r50[python]: qmp-shell: python3 support broken
Summary: app-emulation/qemu-4.0.0-r50[python]: qmp-shell: python3 support broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on: 703028
Blocks:
  Show dependency tree
 
Reported: 2019-12-15 19:47 UTC by Andrey Volkov
Modified: 2020-03-13 17:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Volkov 2019-12-15 19:47:04 UTC
Upstream qemu-4.0.0 python script qmp-shell does not have python3 support

It was fixed upstream since qemu-4.2.0
https://github.com/qemu/qemu/commit/08aa87f5e78270c3b225eb5c89c069aa9f49f5c1

Please backport this patch to the current stable ebuild app-emulation/qemu-4.0.0-r50
It is both python2 and python3 compatible

Reproducible: Always

Steps to Reproduce:
1. emerge current stable =app-emulation/qemu-4.0.0-r50

2. run QEMU with control socket:
qemu-system-x86_64 -chardev socket,id=ctrl,path=qemu-control.sock,server,nowait -mon chardev=ctrl,mode=control

3. Connect to the qemu control socket via qmp-shell:
qmp-shell qemu-control.sock
Actual Results:  
Welcome to the QMP low-level shell!
Connected to QEMU 4.0.0

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.7/qmp-shell", line 460, in <module>
    main()
  File "/usr/lib/python-exec/python3.7/qmp-shell", line 455, in main
    while qemu.read_exec_command(qemu.get_prompt()):
  File "/usr/lib/python-exec/python3.7/qmp-shell", line 311, in read_exec_command
    cmdline = raw_input(prompt)
NameError: name 'raw_input' is not defined

Expected Results:  
Welcome to the QMP low-level shell!
Connected to QEMU 4.0.0

(QEMU)
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-19 22:46:27 UTC
Does recently added 4.2.0 work as-is for you? I'd rather stabilize next version.
Meanwhile you can drop
    https://github.com/qemu/qemu/commit/08aa87f5e78270c3b225eb5c89c069aa9f49f5c1.patch
into
    /etc/portage/patches/app-emulation/qemu
for emerge to pick up a patch locally.
Comment 2 Andrey Volkov 2019-12-20 15:10:05 UTC
No modifications are required for 4.2.0 sources. But this bug depends on #703028. It should be fixed for recently added 4.2.0.ebuild to work "as-is".
Comment 3 Matthias Maier gentoo-dev 2020-03-13 17:08:48 UTC
qemu-4.2.0 is stable now, closing.