From 48f2c78a7de2bc44e44ab0079fe49993c53a5d27 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 13 Oct 2019 11:12:28 +0100 Subject: [PATCH] Update versioning to support appropriate version checks. --- volatility/cli/__init__.py | 2 +- volatility/cli/volshell/__init__.py | 2 +- volatility/framework/__init__.py | 7 +------ volatility/framework/constants/__init__.py | 8 +++++++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/volatility/cli/__init__.py b/volatility/cli/__init__.py index 38c91b58b..957cfd47d 100644 --- a/volatility/cli/__init__.py +++ b/volatility/cli/__init__.py @@ -76,7 +76,7 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): def run(self): """Executes the command line module, taking the system arguments, determining the plugin to run and then running it.""" - sys.stdout.write("Volatility Framework {}\n".format(constants.PACKAGE_VERSION)) + sys.stdout.write("Volatility 3 Framework {}\n".format(constants.PACKAGE_VERSION)) volatility.framework.require_interface_version(0, 0, 0) diff --git a/volatility/cli/volshell/__init__.py b/volatility/cli/volshell/__init__.py index ca502eeda..55f10e472 100644 --- a/volatility/cli/volshell/__init__.py +++ b/volatility/cli/volshell/__init__.py @@ -40,7 +40,7 @@ class VolShell(cli.CommandLine): def run(self): """Executes the command line module, taking the system arguments, determining the plugin to run and then running it.""" - sys.stdout.write("Volshell (Volatility Framework) {}\n".format(constants.PACKAGE_VERSION)) + sys.stdout.write("Volshell (Volatility 3 Framework) {}\n".format(constants.PACKAGE_VERSION)) framework.require_interface_version(0, 0, 0) diff --git a/volatility/framework/__init__.py b/volatility/framework/__init__.py index 73d3ca301..62002946d 100644 --- a/volatility/framework/__init__.py +++ b/volatility/framework/__init__.py @@ -21,15 +21,10 @@ from volatility.framework import constants, interfaces # MINOR version when you add functionality in a backwards compatible manner, and # PATCH version when you make backwards compatible bug fixes. -# We use the SemVer 2.0.0 versioning scheme -MAJOR = 0 # Number of releases of the library with a breaking change -MINOR = 0 # Number of changes that only add to the interface -PATCH = 0 # Number of changes that do not change the interface - def interface_version(): """Provides the so version number of the library.""" - return MAJOR, MINOR, PATCH + return constants.VERSION_MAJOR, constants.VERSION_MINOR, constants.VERSION_PATCH vollog = logging.getLogger(__name__) diff --git a/volatility/framework/constants/__init__.py b/volatility/framework/constants/__init__.py index e63b0b6bb..9d84f8918 100644 --- a/volatility/framework/constants/__init__.py +++ b/volatility/framework/constants/__init__.py @@ -34,7 +34,13 @@ if hasattr(sys, 'frozen') and sys.frozen: BANG = "!" """Constant used to delimit table names from type names when referring to a symbol""" -PACKAGE_VERSION = "3.0.0_alpha1" +# We use the SemVer 2.0.0 versioning scheme +VERSION_MAJOR = 0 # Number of releases of the library with a breaking change +VERSION_MINOR = 0 # Number of changes that only add to the interface +VERSION_PATCH = 0 # Number of changes that do not change the interface +VERSION_SUFFIX = "-beta.1" + +PACKAGE_VERSION = ".".join([str(x) for x in [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH]]) + VERSION_SUFFIX """The canonical version of the volatility package""" AUTOMAGIC_CONFIG_PATH = 'automagic'