From 2ad8b66cccf882c214ad9dab87fc3cd61440231d Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 3 Jul 2019 23:01:56 +0200 Subject: [PATCH] Fix case sensitivity: Qemu => QEMU (!1800) --- README.md | 2 +- pmb/build/init.py | 2 +- pmb/build/qemu_workaround_aarch64.py | 2 +- pmb/config/init.py | 6 +++--- pmb/parse/arguments.py | 2 +- pmb/qemu/run.py | 10 +++++----- test/test_qemu_running_processes.py | 10 +++++----- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 79104b7f..72a2c402 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Update existing installation on SD card: $ pmbootstrap install --sdcard=/dev/mmcblk0 --rsync ``` -Run the image in Qemu: +Run the image in QEMU: ``` $ pmbootstrap qemu --image-size=1G ``` diff --git a/pmb/build/init.py b/pmb/build/init.py index 55401f07..82d2d799 100644 --- a/pmb/build/init.py +++ b/pmb/build/init.py @@ -92,7 +92,7 @@ def init(args, suffix="native"): "s/^ERROR_CLEANUP=.*/ERROR_CLEANUP=''/", "/etc/abuild.conf"], suffix) - # Qemu workaround (aarch64 only) + # QEMU workaround (aarch64 only) arch = pmb.parse.arch.from_chroot_suffix(args, suffix) emulate = pmb.parse.arch.cpu_emulation_required(args, arch) if emulate and arch == "aarch64": diff --git a/pmb/build/qemu_workaround_aarch64.py b/pmb/build/qemu_workaround_aarch64.py index b0858b1f..14541947 100644 --- a/pmb/build/qemu_workaround_aarch64.py +++ b/pmb/build/qemu_workaround_aarch64.py @@ -22,7 +22,7 @@ import pmb.chroot.apk def qemu_workaround_aarch64(args, suffix="buildroot_aarch64"): """ - Qemu has a bug in aarch64 emulation, that causes abuild-tar to omit files + QEMU has a bug in aarch64 emulation, that causes abuild-tar to omit files from the archives it generates in some cases. We build a patched abuild-tar, which avoids the bug. diff --git a/pmb/config/init.py b/pmb/config/init.py index 1c4c2186..e3e92be1 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -248,12 +248,12 @@ def ask_for_device(args): def ask_for_qemu_native_mesa_driver(args, device, arch_native): - # Native Qemu device selected? (e.g. qemu-amd64 on x86_64) + # Native QEMU device selected? (e.g. qemu-amd64 on x86_64) if not pmb.parse.arch.qemu_check_device(device, arch_native): return None drivers = pmb.config.qemu_native_mesa_drivers - logging.info("Which mesa driver do you prefer for your native Qemu device?" + logging.info("Which mesa driver do you prefer for your native QEMU device?" " Only select something other than the default if you are" " having graphical problems (such as glitches).") while True: @@ -333,7 +333,7 @@ def frontend(args): cfg["pmbootstrap"]["nonfree_firmware"] = str(nonfree["firmware"]) cfg["pmbootstrap"]["nonfree_userland"] = str(nonfree["userland"]) - # Qemu mesa driver + # QEMU mesa driver if cfg["pmbootstrap"]["device"].startswith("qemu-"): driver = ask_for_qemu_native_mesa_driver(args, device, args.arch_native) if driver: diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 4154a8d2..dd873d61 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -144,7 +144,7 @@ def arguments_qemu(subparser): help="use SPICE for 2D acceleration (default port:" " 8077)") display.add_argument("--display", dest="qemu_display", const="sdl,gl=on", - help="Qemu's display parameter (default: sdl,gl=on)", + help="QEMU's display parameter (default: sdl,gl=on)", default="sdl,gl=on", nargs="?") ret.add_argument("--host-qemu", dest="host_qemu", action='store_true', diff --git a/pmb/qemu/run.py b/pmb/qemu/run.py index 42eeaa25..4a1ce5ba 100644 --- a/pmb/qemu/run.py +++ b/pmb/qemu/run.py @@ -223,7 +223,7 @@ def command_qemu(args, arch, device, img_path, spice_enabled): if native and os.path.exists("/dev/kvm"): command += ["-enable-kvm"] else: - logging.info("WARNING: Qemu is not using KVM and will run slower!") + logging.info("WARNING: QEMU is not using KVM and will run slower!") # 2D acceleration support via QXL/SPICE or virtio if spice_enabled: @@ -278,7 +278,7 @@ def resize_image(args, img_size_new, img_path): def sigterm_handler(number, frame): raise RuntimeError("pmbootstrap was terminated by another process," - " and killed the Qemu VM it was running.") + " and killed the QEMU VM it was running.") def install_depends(args, arch): @@ -306,12 +306,12 @@ def run(args): install_depends(args, arch) logging.info("Running postmarketOS in QEMU VM (" + arch + ")") - # Get the Qemu and spice commands + # Get the QEMU and spice commands spice = command_spice(args) spice_enabled = True if spice else False qemu, env = command_qemu(args, arch, device, img_path, spice_enabled) - # Workaround: Qemu runs as local user and needs write permissions in the + # Workaround: QEMU runs as local user and needs write permissions in the # rootfs, which is owned by root if not os.access(img_path, os.W_OK): pmb.helpers.run.root(args, ["chmod", "666", img_path]) @@ -329,7 +329,7 @@ def run(args): logging.info("* (ssh) ssh -p {port} {user}@localhost".format(**vars(args))) logging.info("* (telnet) telnet localhost " + str(args.port + 1)) - # Run Qemu (or Qemu + SPICE) and kill it together with pmbootstrap + # Run QEMU (or QEMU + SPICE) and kill it together with pmbootstrap process = None try: signal.signal(signal.SIGTERM, sigterm_handler) diff --git a/test/test_qemu_running_processes.py b/test/test_qemu_running_processes.py index a2606ef2..f263830d 100644 --- a/test/test_qemu_running_processes.py +++ b/test/test_qemu_running_processes.py @@ -18,7 +18,7 @@ along with pmbootstrap. If not, see . """ """ -This file runs various installations and boots into them with Qemu, then checks +This file runs various installations and boots into them with QEMU, then checks via SSH if expected processes are running. We use an extra config file (based on ~/.config/pmbootstrap.cfg), because we @@ -83,7 +83,7 @@ def pmbootstrap_yes(args, config, parameters): working_dir=pmb_src) -class Qemu(object): +class QEMU(object): def __init__(self, request): self.process = None request.addfinalizer(self.terminate) @@ -92,7 +92,7 @@ class Qemu(object): if self.process: self.process.terminate() else: - print("WARNING: The Qemu process wasn't set, so it could not be" + print("WARNING: The QEMU process wasn't set, so it could not be" " terminated.") def run(self, args, tmpdir, ui="none"): @@ -119,12 +119,12 @@ class Qemu(object): @pytest.fixture def qemu(request): - return Qemu(request) + return QEMU(request) def ssh_run(args, command): """ - Run a command in the Qemu VM on localhost via SSH. + Run a command in the QEMU VM on localhost via SSH. :param command: flat string of the command to execute, e.g. "ps au" :returns: the result from the SSH server