From ae8ac80c50c2d50e3e17cf5ab35083d2da106235 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Tue, 25 Feb 2025 19:39:12 +0000 Subject: docs/about/deprecated: auto-generate a note for versioned machine types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We deprecate versioned machine types on a fixed schedule. This allows us to auto-generate a paragraph in the deprecated.rst document that always has accurate version info. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/conf.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 7b5712e122..60dcf2a541 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -117,6 +117,27 @@ finally: else: version = release = "unknown version" +bits = version.split(".") + +major = int(bits[0]) +minor = int(bits[1]) +micro = int(bits[2]) + +# Check for a dev snapshot, so we can adjust to next +# predicted release version. +# +# This assumes we do 3 releases per year, so must bump +# major if minor == 2 +if micro >= 50: + micro = 0 + if minor == 2: + major += 1 + minor = 0 + else: + minor += 1 + +ver_machine_deprecation_version = "%d.%d.0" % (major - 3, minor) + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -145,7 +166,17 @@ suppress_warnings = ["ref.option"] # environment variable is not set is for the benefit of readthedocs # style document building; our Makefile always sets the variable. confdir = os.getenv('CONFDIR', "/etc/qemu") -rst_epilog = ".. |CONFDIR| replace:: ``" + confdir + "``\n" + +vars = { + "CONFDIR": confdir, + "VER_MACHINE_DEPRECATION_VERSION": ver_machine_deprecation_version, +} + +rst_epilog = "".join([ + ".. |" + key + "| replace:: ``" + vars[key] + "``\n" + for key in vars.keys() +]) + # We slurp in the defs.rst.inc and literally include it into rst_epilog, # because Sphinx's include:: directive doesn't work with absolute paths # and there isn't any one single relative path that will work for all -- cgit 1.4.1 From 83e256c0df7433c05d28b11690323fba7ad9dbf0 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Tue, 25 Feb 2025 19:39:12 +0000 Subject: docs/about/removed-features: auto-generate a note for versioned machine types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We remove versioned machine types on a fixed schedule. This allows us to auto-generate a paragraph in the removed-features.rst document that always has accurate version info. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/about/removed-features.rst | 10 ++++++---- docs/conf.py | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 790a5e481c..063284d4f8 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -981,10 +981,12 @@ from Linux in 2021, and is not supported anymore by QEMU either. System emulator machines ------------------------ -Note: Versioned machine types that have been introduced in a QEMU version -that has initially been released more than 6 years before are considered -obsolete and will be removed without further notice in this document. -Please use newer machine types instead. +Versioned machine types (aarch64, arm, i386, m68k, ppc64, s390x, x86_64) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +In accordance with our versioned machine type deprecation policy, all machine +types with version |VER_MACHINE_DELETION_VERSION|, or older, have been +removed. ``s390-virtio`` (removed in 2.6) '''''''''''''''''''''''''''''''' diff --git a/docs/conf.py b/docs/conf.py index 60dcf2a541..248ff8cf5d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -137,6 +137,7 @@ if micro >= 50: minor += 1 ver_machine_deprecation_version = "%d.%d.0" % (major - 3, minor) +ver_machine_deletion_version = "%d.%d.0" % (major - 6, minor) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -170,6 +171,7 @@ confdir = os.getenv('CONFDIR', "/etc/qemu") vars = { "CONFDIR": confdir, "VER_MACHINE_DEPRECATION_VERSION": ver_machine_deprecation_version, + "VER_MACHINE_DELETION_VERSION": ver_machine_deletion_version, } rst_epilog = "".join([ -- cgit 1.4.1 From 3fbb0a1397a9acea523f3c8062df8c6f8032788d Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrangé" Date: Tue, 25 Feb 2025 19:41:16 +0000 Subject: include/hw/boards: add warning about changing deprecation logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we change the deprecation logic in include/hw/boards.h, we must make a corresponding change to docs/conf.py and docs/about/deprecated.rst. Add comments to these files as a warning to future maintainers to keep these files in sync. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/conf.py | 4 ++++ include/hw/boards.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 248ff8cf5d..f892a6e1da 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -136,6 +136,10 @@ if micro >= 50: else: minor += 1 +# These thresholds must match the constants +# MACHINE_VER_DELETION_MAJOR & MACHINE_VER_DEPRECATION_MAJOR +# defined in include/hw/boards.h and the introductory text in +# docs/about/deprecated.rst ver_machine_deprecation_version = "%d.%d.0" % (major - 3, minor) ver_machine_deletion_version = "%d.%d.0" % (major - 6, minor) diff --git a/include/hw/boards.h b/include/hw/boards.h index a6784fe984..a7b1fcffae 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -636,7 +636,11 @@ struct MachineState { /* * How many years/major releases for each phase * of the life cycle. Assumes use of versioning - * scheme where major is bumped each year + * scheme where major is bumped each year. + * + * These values must match the ver_machine_deprecation_version + * and ver_machine_deletion_version logic in docs/conf.py and + * the text in docs/about/deprecated.rst */ #define MACHINE_VER_DELETION_MAJOR 6 #define MACHINE_VER_DEPRECATION_MAJOR 3 -- cgit 1.4.1