diff --git a/tests/inventory/test_macos_build_parser.py b/tests/inventory/test_macos_build_parser.py index e3bc16eec..db8ae1162 100644 --- a/tests/inventory/test_macos_build_parser.py +++ b/tests/inventory/test_macos_build_parser.py @@ -93,6 +93,9 @@ def test_ok(self): ("22G513", ("macOS", 13, 6, 4, None), "macOS 13.6.4 (22G513)"), ("22G621", ("macOS", 13, 6, 5, None), "macOS 13.6.5 (22G621)"), ("22G820", ("macOS", 13, 6, 8, None), "macOS 13.6.8 (22G820)"), + ("22G830", ("macOS", 13, 6, 9, None), "macOS 13.6.9 (22G830)"), + ("22H123", ("macOS", 13, 7, 0, None), "macOS 13.7 (22H123)"), + ("22H221", ("macOS", 13, 7, 1, None), "macOS 13.7.1 (22H221)"), ("23A344", ("macOS", 14, 0, 0, None), "macOS 14.0 (23A344)"), ("23B5056e", ("macOS", 14, 1, 0, None), "macOS 14.1 (23B5056e)"), ("23B81", ("macOS", 14, 1, 1, None), "macOS 14.1.1 (23B81)"), @@ -105,8 +108,10 @@ def test_ok(self): ("23E214", ("macOS", 14, 4, 0, None), "macOS 14.4 (23E214)"), ("23G93", ("macOS", 14, 6, 1, None), "macOS 14.6.1 (23G93)"), ("23H124", ("macOS", 14, 7, 0, None), "macOS 14.7 (23H124)"), + ("23H222", ("macOS", 14, 7, 1, None), "macOS 14.7.1 (23H222)"), ("24A335", ("macOS", 15, 0, 0, None), "macOS 15.0 (24A335)"), ("24A348", ("macOS", 15, 0, 1, None), "macOS 15.0.1 (24A348)"), + ("24B91", ("macOS", 15, 1, 1, None), "macOS 15.1.1 (24B91)"), ): expected_version_d = { "name": name, diff --git a/zentral/contrib/inventory/conf.py b/zentral/contrib/inventory/conf.py index 98fa1381f..a70102e7c 100644 --- a/zentral/contrib/inventory/conf.py +++ b/zentral/contrib/inventory/conf.py @@ -246,9 +246,9 @@ def macos_version_from_build(build): minor = patch if build in ("21A558", "21A559", "21D62", "21E258", "21G83", "21G217", "21G920", "22A400", "22D68", "22E261", "22E772610a", "22F82", "22F770820b", "22F770820d", - "22G90", "22G313", - "23B81", "23B2082", "23C71", "23D60", "23G93", - "24A348"): + "22G90", "22G313", "22H221", + "23B81", "23B2082", "23C71", "23D60", "23G93", "23H222", + "24A348", "24B91"): patch = 1 elif build in ("21G309", "21G320", "21G1974", "22G91", "22G320", @@ -266,15 +266,15 @@ def macos_version_from_build(build): patch = 7 elif build in ("21G725", "22G820"): patch = 8 - elif build == "21G726": + elif build in ("21G726", "22G830"): patch = 9 else: patch = 0 if patch_letter >= "G" and major == 12 and patch_number >= 816: minor = 7 - elif patch_letter >= "G" and major in (12, 13) and patch_number >= 115: + elif patch_letter == "G" and major in (12, 13) and patch_number >= 115: minor = 6 - elif minor > 0 and major < 14: + elif patch_letter < "H" and minor > 0 and major < 14: minor -= 1 elif minor == 16: major = 11