libvirt/libvirt-sync_qemu_models_i386-Update-meson.build.patch

69 lines
2.2 KiB
Diff
Raw Normal View History

libvirt-10.10.0-2.el10 - util: Fix typo in virNetDevOpenvswitchInterfaceSetQos (RHEL-69840) - qemu: tpm: do not update profile name for transient domains (RHEL-69774) - qemu: Enable I/O APIC if needed (RHEL-71414) - cpu_map: Sort data files in meson.build (RHEL-70129) - sync_qemu_models_i386: Update meson.build (RHEL-70129) - sync_qemu_models_i386: Generate missing -v1 variants (RHEL-70129) - cpu_map: Add 486-v1 CPU model (RHEL-70129) - cpu_map: Add pentium-v1 CPU model (RHEL-70129) - cpu_map: Add pentium2-v1 CPU model (RHEL-70129) - cpu_map: Add pentium3-v1 CPU model (RHEL-70129) - cpu_map: Add coreduo-v1 CPU model (RHEL-70129) - cpu_map: Add n270-v1 CPU model (RHEL-70129) - cpu_map: Add core2duo-v1 CPU model (RHEL-70129) - cpu_map: Add qemu32-v1 CPU model (RHEL-70129) - cpu_map: Add kvm32-v1 CPU model (RHEL-70129) - cpu_map: Add qemu64-v1 CPU model (RHEL-70129) - cpu_map: Add kvm64-v1 CPU model (RHEL-70129) - cpu_map: Add Conroe-v1 CPU model (RHEL-70129) - cpu_map: Add Penryn-v1 CPU model (RHEL-70129) - cpu_map: Add KnightsMill-v1 CPU model (RHEL-70129) - cpu_map: Add athlon-v1 CPU model (RHEL-70129) - cpu_map: Add phenom-v1 CPU model (RHEL-70129) - cpu_map: Add Opteron_G1-v1 CPU model (RHEL-70129) - cpu_map: Add Opteron_G2-v1 CPU model (RHEL-70129) - cpu_map: Add Opteron_G3-v1 CPU model (RHEL-70129) - cpu_map: Add Opteron_G4-v1 CPU model (RHEL-70129) - cpu_map: Add Opteron_G5-v1 CPU model (RHEL-70129) - cpu_map: Add EPYC-Genoa-v1 CPU model (RHEL-70129) Resolves: RHEL-69774, RHEL-69840, RHEL-70129, RHEL-71414
2024-12-17 09:59:14 +00:00
From 776af781ab3a673c8fab906d7f0d2de064528f0f Mon Sep 17 00:00:00 2001
Message-ID: <776af781ab3a673c8fab906d7f0d2de064528f0f.1734429553.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Thu, 28 Nov 2024 13:39:29 +0100
Subject: [PATCH] sync_qemu_models_i386: Update meson.build
When adding new CPU models to CPU map it's easy (and very common) to
forget to add the new files to meson.build. We already update index.xml
with the new models so updating meson.build too makes sense.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 19b56603c4d961fc21bfb7516b6ba011dd49f9b2)
https://issues.redhat.com/browse/RHEL-70129
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/cpu_map/sync_qemu_models_i386.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map/sync_qemu_models_i386.py
index 798d767f4d..11fe1f7435 100755
--- a/src/cpu_map/sync_qemu_models_i386.py
+++ b/src/cpu_map/sync_qemu_models_i386.py
@@ -596,6 +596,32 @@ def update_index(outdir, models):
f.write("\n")
+def update_meson(outdir, models):
+ meson = os.path.join(outdir, "meson.build")
+
+ with open(meson, "r") as f:
+ lines = f.readlines()
+
+ start = None
+ end = None
+ for i in range(len(lines)):
+ if start is None and lines[i].startswith("cpumap_data ="):
+ start = i + 1
+
+ if start is not None and lines[i] == "]\n":
+ end = i
+ break
+
+ xmls = lines[start:end]
+ for files in models.values():
+ xmls.extend([f" '{file}',\n" for file in files])
+
+ with open(meson, "w") as f:
+ f.writelines(lines[:start])
+ f.writelines(sorted(xmls, key=str.lower))
+ f.writelines(lines[end:])
+
+
def main():
parser = argparse.ArgumentParser(
description="Synchronize x86 cpu models from QEMU i386 target.")
@@ -658,6 +684,7 @@ def main():
output_model(f, extra, model)
update_index(args.outdir, files)
+ update_meson(args.outdir, files)
features = set()
for model in models:
--
2.47.1