* [PATCH 00/22] MAINTAINER updates and get_maintainer.py
@ 2026-11-20 20:04 Alex Bennée
2026-11-20 20:04 ` [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing Alex Bennée
` (22 more replies)
0 siblings, 23 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
I continued to update my port of get_maintainers.py and it grew a few
new options which I used in my recent talk. These are:
--validate
--list-maintainers
--list-absent-maintainers-since
I also added the git and roles flags for compatibility with the way
the perl script is invoked by the git's cccmd.
There is now an ancillary script to plot maintainer experience so we
can see the distribution of experience in our maintainer pool.
On the way I found more inconsistencies in MAINTAINERS so I cleaned
those up while I was at it.
Alex.
Alex Bennée (22):
scripts/get_maintainer.py: minimal argument parsing
scripts/get_maintainer.py: resolve the source path
scripts/get_maintainer.py: initial parsing of MAINTAINERS
scripts/get_maintainer.py: add support for -f
scripts/get_maintainer.py: add support reading patch files
scripts/get_maintainer.py: add keyword (K:) support
scripts/get_maintainer.py: implement basic git fallback support
scripts/get_maintainer.py: add --list-[maintained|reviewed]-by
scripts/get_maintainer.py: add --file-summary option
scripts/get_maintainer.py: optimise glob matching with Paths
scripts/get_maintainer.py: add support for gitlab handles
scripts/get_maintainer.py: implement --noroles/--norolestats
scripts/get_maintainer.py: expand --validate output to CSV summary
scripts/get_maintainer.py: add --list-maintainers
scripts/get_maintainer.py: add --list-absent-maintainers-since
scripts/maintainer: add plot-maintainer-experience.py
gitlab: add a check-maintainers task
MAINTAINERS: update Daniel's entries to be consistent
MAINTAINERS: make Collin's entries consistent with .mailmap
MAINTAINERS: make LIU's entries consistent
MAINTAINERS: use consistent capitalisation for Alistair
MAINTAINERS: update security reporting links
MAINTAINERS | 48 +-
.gitlab-ci.d/static_checks.yml | 9 +
.mailmap | 1 +
scripts/get_maintainer.py | 886 ++++++++++++++++++
.../maintainers/plot-maintainer-experience.py | 163 ++++
5 files changed, 1082 insertions(+), 25 deletions(-)
create mode 100755 scripts/get_maintainer.py
create mode 100755 scripts/maintainers/plot-maintainer-experience.py
--
2.47.3
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-23 10:00 ` Daniel P. Berrangé
2026-11-20 20:04 ` [PATCH 02/22] scripts/get_maintainer.py: resolve the source path Alex Bennée
` (21 subsequent siblings)
22 siblings, 1 reply; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- treat dir as valid as well (as git ls-files lists it)
- move arg parse into own function (parse_args)
- set files nargs as + for more flexibility
- use python3
---
scripts/get_maintainer.py | 49 +++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100755 scripts/get_maintainer.py
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
new file mode 100755
index 00000000000..47673a5013f
--- /dev/null
+++ b/scripts/get_maintainer.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+#
+# get_maintainer.py: Print selected MAINTAINERS information
+#
+# usage: scripts/get_maintainer.py [OPTIONS] <patch>
+# scripts/get_maintainer.py [OPTIONS] -f <file>
+#
+# (c) 2025, Alex Bennée <alex.bennee@linaro.org>
+# based on get_maintainers.pl
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from argparse import ArgumentParser, ArgumentTypeError
+from os import path
+from pathlib import Path
+
+
+def valid_file_path(arg):
+ """
+ Checks if arg exists and is a regular file or raises ArgumentTypeError.
+ """
+ if not path.exists(arg):
+ raise ArgumentTypeError(f"File '{arg}' does not exist.")
+ if not path.isfile(arg) and not path.isdir(arg):
+ raise ArgumentTypeError(f"Path '{arg}' is not a regular file.")
+ return Path(path.abspath(arg))
+
+
+def parse_args():
+ """
+ Create and parse the arguments.
+ """
+ parser = ArgumentParser(description='Extract maintainer information. ')
+
+ # We can either specify patches or an individual file
+ group = parser.add_mutually_exclusive_group()
+ group.add_argument('patch', nargs='*', type=valid_file_path,
+ help='path to patch file')
+ group.add_argument('-f', '--file', type=valid_file_path, nargs = "+",
+ help='path to source file(s)')
+
+ return parser.parse_args()
+
+def main():
+
+ args = parse_args()
+
+if __name__ == '__main__':
+ main()
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 02/22] scripts/get_maintainer.py: resolve the source path
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
2026-11-20 20:04 ` [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 03/22] scripts/get_maintainer.py: initial parsing of MAINTAINERS Alex Bennée
` (20 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
We will need this to automagically find MAINTAINERS. Use the same
logic as the perl script by looking for expected files and
directories.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- don't hack add_argument twice just to display default
- whitespace fix
- don't default to required
v3
- fix conflicts from parse_args()
- return src in a Path()
---
scripts/get_maintainer.py | 71 +++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 47673a5013f..794e96d4ae8 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -15,6 +15,60 @@
from pathlib import Path
+#
+# Helper functions for dealing with the source path
+#
+
+
+def is_qemu_src_root(directory):
+ """
+ Checks if the given path appears to be the root of a QEMU source tree,
+ based on the presence of key files and directories.
+ """
+ if not path.isdir(directory):
+ return False
+
+ required_files = ['COPYING', 'MAINTAINERS', 'Makefile', 'VERSION']
+ required_dirs = ['docs', 'linux-user', 'system']
+
+ for f in required_files:
+ if not path.isfile(path.join(directory, f)):
+ return False
+ for d in required_dirs:
+ if not path.isdir(path.join(directory, d)):
+ return False
+ return True
+
+
+def find_src_root():
+ """
+ Walks up the directory tree from the script's location
+ to find the QEMU source root.
+ Returns the absolute path of the root directory if found, or None.
+ """
+ script_dir = path.dirname(path.abspath(__file__)) # FIXME, breaks python-send-buffer
+ current_dir = script_dir
+
+ while True:
+ if is_qemu_src_root(current_dir):
+ return current_dir
+
+ # Move up to the parent directory
+ parent_dir = path.dirname(current_dir)
+
+ # If we reached the filesystem root and haven't found it, stop
+ if parent_dir == current_dir:
+ break
+
+ current_dir = parent_dir
+
+ return None
+
+#
+# Argument validation
+#
+
+
def valid_file_path(arg):
"""
Checks if arg exists and is a regular file or raises ArgumentTypeError.
@@ -26,6 +80,16 @@ def valid_file_path(arg):
return Path(path.abspath(arg))
+def valid_src_root(arg):
+ """
+ Checks if arg is a valid QEMU source root or raise ArgumentTypeError.
+ """
+ abs_path = path.abspath(arg)
+ if not is_qemu_src_root(abs_path):
+ raise ArgumentTypeError(f"Path '{arg}' is not a valid QEMU source tree")
+ return Path(abs_path)
+
+
def parse_args():
"""
Create and parse the arguments.
@@ -39,8 +103,15 @@ def parse_args():
group.add_argument('-f', '--file', type=valid_file_path, nargs = "+",
help='path to source file(s)')
+ # We need to know or be told where the root of the source tree is
+ src = find_src_root()
+
+ parser.add_argument('--src', type=valid_src_root, default=src,
+ help=f'Root of QEMU source tree{" (default: " + src + ")" if src else ""}')
+
return parser.parse_args()
+
def main():
args = parse_args()
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 03/22] scripts/get_maintainer.py: initial parsing of MAINTAINERS
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
2026-11-20 20:04 ` [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing Alex Bennée
2026-11-20 20:04 ` [PATCH 02/22] scripts/get_maintainer.py: resolve the source path Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 04/22] scripts/get_maintainer.py: add support for -f Alex Bennée
` (19 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Add the basic infrastructure to parse MAINTAINERS and generate a list
of MaintainerSection objects we can use later.
Add a --validate argument so we can use the script to ensure
MAINTAINERS is always parse-able in our CI.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- use sys.exit in preference
- properly skip preamble
- clean up some pylint warnings
v2
- add __str__ function for formatting Person
---
scripts/get_maintainer.py | 175 +++++++++++++++++++++++++++++++++++++-
1 file changed, 174 insertions(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 794e96d4ae8..dcf132856cc 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -10,9 +10,166 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
-from argparse import ArgumentParser, ArgumentTypeError
+import sys
+from argparse import ArgumentParser, ArgumentTypeError, BooleanOptionalAction
from os import path
from pathlib import Path
+from enum import StrEnum, auto
+from re import compile as re_compile
+
+#
+# Subsystem MAINTAINER entries
+#
+# The MAINTAINERS file is an unstructured text file where the
+# important information is in lines that follow the form:
+#
+# X: some data
+#
+# where X is a documented tag and the data is variously an email,
+# path, regex or link. Other lines should be ignored except the
+# preceding non-blank or underlined line which represents the name of
+# the "subsystem" or general area of the project.
+#
+# A blank line denominates the end of a section.
+#
+
+tag_re = re_compile(r"^([A-Z]):")
+
+
+class UnhandledTag(Exception):
+ "Exception for unhandled tags"
+
+
+class BadStatus(Exception):
+ "Exception for unknown status"
+
+
+class Status(StrEnum):
+ "Maintenance status"
+
+ UNKNOWN = auto()
+ SUPPORTED = 'Supported'
+ MAINTAINED = 'Maintained'
+ ODD_FIXES = 'Odd Fixes'
+ ORPHAN = 'Orphan'
+ OBSOLETE = 'Obsolete'
+
+ @classmethod
+ def _missing_(cls, value):
+ # _missing_ is only invoked by the enum machinery if 'value'
+ # does not match any existing enum member's value. So, if we
+ # reach this point, 'value' is inherently invalid for this
+ # enum.
+ raise BadStatus(f"'{value}' is not a valid maintenance status.")
+
+
+person_re = re_compile(r"^(?P<name>[^<]+?)\s*<(?P<email>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>$")
+
+
+class BadPerson(Exception):
+ "Exception for un-parsable person"
+
+
+class Person:
+ "Class representing a maintainer or reviewer and their details"
+
+ def __init__(self, info):
+ match = person_re.search(info)
+
+ if match is None:
+ raise BadPerson(f"Failed to parse {info}")
+
+ self.name = match.group('name')
+ self.email = match.group('email')
+
+ def __str__(self):
+ return f"{self.name} <{self.email}>"
+
+
+class MaintainerSection:
+ "Class representing a section of MAINTAINERS"
+
+ def _expand(self, pattern):
+ if pattern.endswith("/"):
+ return f"{pattern}*"
+ return pattern
+
+ def __init__(self, section, entries):
+ self.section = section
+ self.status = Status.UNKNOWN
+ self.maintainers = []
+ self.reviewers = []
+ self.files = []
+ self.files_exclude = []
+ self.trees = []
+ self.lists = []
+ self.web = []
+ self.keywords = []
+
+ for e in entries:
+ (tag, data) = e.split(": ", 2)
+
+ if tag == "M":
+ person = Person(data)
+ self.maintainers.append(person)
+ elif tag == "R":
+ person = Person(data)
+ self.reviewers.append(person)
+ elif tag == "S":
+ self.status = Status(data)
+ elif tag == "L":
+ self.lists.append(data)
+ elif tag == 'F':
+ pat = self._expand(data)
+ self.files.append(pat)
+ elif tag == 'W':
+ self.web.append(data)
+ elif tag == 'K':
+ self.keywords.append(data)
+ elif tag == 'T':
+ self.trees.append(data)
+ elif tag == 'X':
+ pat = self._expand(data)
+ self.files_exclude.append(pat)
+ else:
+ raise UnhandledTag(f"'{tag}' is not understood.")
+
+
+
+
+def read_maintainers(src):
+ """
+ Read the MAINTAINERS file, return a list of MaintainerSection objects.
+ """
+
+ mfile = path.join(src, 'MAINTAINERS')
+ entries = []
+
+ section = None
+ fields = []
+
+ with open(mfile, 'r', encoding='utf-8') as f:
+ for line in f:
+ if not line.strip(): # Blank line found, potential end of a section
+ if section and fields:
+ new_section = MaintainerSection(section, fields)
+ entries.append(new_section)
+ # reset for next section
+ section = None
+ fields = []
+ elif tag_re.match(line):
+ fields.append(line.strip())
+ else:
+ if line.startswith("-") or line.startswith("="):
+ continue
+
+ section = line.strip()
+
+ if section and fields:
+ new_section = MaintainerSection(section, fields)
+ entries.append(new_section)
+
+ return entries
#
@@ -103,6 +260,12 @@ def parse_args():
group.add_argument('-f', '--file', type=valid_file_path, nargs = "+",
help='path to source file(s)')
+ # Validate MAINTAINERS
+ parser.add_argument('--validate',
+ action=BooleanOptionalAction,
+ default=None,
+ help="Just validate MAINTAINERS file")
+
# We need to know or be told where the root of the source tree is
src = find_src_root()
@@ -111,6 +274,16 @@ def parse_args():
return parser.parse_args()
+ try:
+ # Now we start by reading the MAINTAINERS file
+ maint_sections = read_maintainers(args.src)
+ except Exception as e:
+ print(f"Error: {e}")
+ sys.exit(-1)
+
+ if args.validate:
+ print(f"loaded {len(maint_sections)} from MAINTAINERS")
+ sys.exit(0)
def main():
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 04/22] scripts/get_maintainer.py: add support for -f
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (2 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 03/22] scripts/get_maintainer.py: initial parsing of MAINTAINERS Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 05/22] scripts/get_maintainer.py: add support reading patch files Alex Bennée
` (18 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Now we have our sections we can add support for checking each file
against the maintainer list and gathering the ones we want. Finally we
can print the list out.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- Path and match are expensive checks
---
scripts/get_maintainer.py | 45 +++++++++++++++++++++++++++++++++++++--
1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index dcf132856cc..8a018042952 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -134,6 +134,32 @@ def __init__(self, section, entries):
else:
raise UnhandledTag(f"'{tag}' is not understood.")
+ def __str__(self) -> str:
+ entries = []
+
+ for m in self.maintainers:
+ entries.append(f"{m.name} <{m.email}> (maintainer: {self.section})")
+
+ for r in self.reviewers:
+ entries.append(f"{r.name} <{r.email}> (reviewer: {self.section})")
+
+ for l in self.lists:
+ entries.append(f"{l} (open list: {self.section})")
+
+ return "\n".join(entries)
+
+ def is_file_covered(self, filename):
+ "Is filename covered by this maintainer section"
+
+ for fx in self.files_exclude:
+ if filename.match(fx):
+ return False
+
+ for f in self.files:
+ if filename.match(f):
+ return True
+
+ return False
@@ -274,6 +300,11 @@ def parse_args():
return parser.parse_args()
+
+def main():
+
+ args = parse_args()
+
try:
# Now we start by reading the MAINTAINERS file
maint_sections = read_maintainers(args.src)
@@ -285,9 +316,19 @@ def parse_args():
print(f"loaded {len(maint_sections)} from MAINTAINERS")
sys.exit(0)
-def main():
+ files = []
+
+ if args.file:
+ files.extend(args.file)
+
+ for f in files:
+ rf = f.relative_to(Path(args.src))
+ relevent_maintainers = [ms for ms in maint_sections if
+ ms.is_file_covered(rf)]
+
+ for rm in relevent_maintainers:
+ print(f"{rf}, {rm.section}")
- args = parse_args()
if __name__ == '__main__':
main()
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 05/22] scripts/get_maintainer.py: add support reading patch files
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (3 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 04/22] scripts/get_maintainer.py: add support for -f Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 06/22] scripts/get_maintainer.py: add keyword (K:) support Alex Bennée
` (17 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Not so different from individual files, we just need to parse the
patch looking for the files and add them to the list. As we can parse
multiple patches we also need to ensure the final list of sections is
unique so we don't repeat ourselves.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 41 +++++++++++++++++++++++++++++++++++----
1 file changed, 37 insertions(+), 4 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 8a018042952..597db64ea16 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -16,6 +16,7 @@
from pathlib import Path
from enum import StrEnum, auto
from re import compile as re_compile
+from re import sub as re_sub
#
# Subsystem MAINTAINER entries
@@ -197,6 +198,29 @@ def read_maintainers(src):
return entries
+#
+# Helper functions for dealing with patch files
+#
+patchfile_re = re_compile(r"\+\+\+\s+(\S+)")
+
+#TODO: also return a list of keyword hits for K:?
+def extract_filenames_from_patch(patchfile):
+ """
+ Read a patchfile and return a list of files which are modified by
+ the patch.
+ """
+ file_list = []
+
+ with open(patchfile, 'r', encoding='utf-8') as f:
+ for line in f:
+ m = patchfile_re.match(line)
+ if m:
+ # strip leading [ab]/
+ stripped = re_sub(r'^[^/]*/', '', m.group(1))
+ as_path = Path(path.abspath(stripped))
+ file_list.append(as_path)
+
+ return file_list
#
# Helper functions for dealing with the source path
@@ -321,13 +345,22 @@ def main():
if args.file:
files.extend(args.file)
+ if args.patch:
+ for p in args.patch:
+ pfiles = extract_filenames_from_patch(p)
+ files.extend(pfiles)
+
+ # unique set of maintainer sections
+ maintained: set[MaintainerSection] = set()
+
for f in files:
rf = f.relative_to(Path(args.src))
- relevent_maintainers = [ms for ms in maint_sections if
- ms.is_file_covered(rf)]
+ fmaint = [ms for ms in maint_sections if ms.is_file_covered(rf)]
+ for m in fmaint:
+ maintained.add(m)
- for rm in relevent_maintainers:
- print(f"{rf}, {rm.section}")
+ for rm in maintained:
+ print(f"{rm}")
if __name__ == '__main__':
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 06/22] scripts/get_maintainer.py: add keyword (K:) support
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (4 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 05/22] scripts/get_maintainer.py: add support reading patch files Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 07/22] scripts/get_maintainer.py: implement basic git fallback support Alex Bennée
` (16 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
We use the regex module to stay compatible with the Perl compatible
regex used in the MAINTAINERS file.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 38 ++++++++++++++++++++++++++++----------
1 file changed, 28 insertions(+), 10 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 597db64ea16..443fbf8e875 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -17,6 +17,7 @@
from enum import StrEnum, auto
from re import compile as re_compile
from re import sub as re_sub
+from regex import compile as prec_compile
#
# Subsystem MAINTAINER entries
@@ -126,7 +127,8 @@ def __init__(self, section, entries):
elif tag == 'W':
self.web.append(data)
elif tag == 'K':
- self.keywords.append(data)
+ match = prec_compile(data)
+ self.keywords.append(match)
elif tag == 'T':
self.trees.append(data)
elif tag == 'X':
@@ -162,6 +164,15 @@ def is_file_covered(self, filename):
return False
+ def patch_contains_keyword(self, patch_lines):
+ "Does patch contain keyword covered by this maintainer section"
+
+ for l in patch_lines:
+ for k in self.keywords:
+ if k.findall(l):
+ return True
+
+ return False
def read_maintainers(src):
@@ -201,18 +212,22 @@ def read_maintainers(src):
#
# Helper functions for dealing with patch files
#
+
+
patchfile_re = re_compile(r"\+\+\+\s+(\S+)")
-#TODO: also return a list of keyword hits for K:?
-def extract_filenames_from_patch(patchfile):
+
+def process_patch_file(patchfile):
"""
- Read a patchfile and return a list of files which are modified by
- the patch.
+ Read a patchfile and return the message as a string and a list
+ of files which are modified by the patch.
"""
file_list = []
+ msg = []
with open(patchfile, 'r', encoding='utf-8') as f:
for line in f:
+ msg.append(line)
m = patchfile_re.match(line)
if m:
# strip leading [ab]/
@@ -220,7 +235,7 @@ def extract_filenames_from_patch(patchfile):
as_path = Path(path.abspath(stripped))
file_list.append(as_path)
- return file_list
+ return (msg, file_list)
#
# Helper functions for dealing with the source path
@@ -345,13 +360,16 @@ def main():
if args.file:
files.extend(args.file)
+ # unique set of maintainer sections
+ maintained: set[MaintainerSection] = set()
+
if args.patch:
for p in args.patch:
- pfiles = extract_filenames_from_patch(p)
+ (msg, pfiles) = process_patch_file(p)
files.extend(pfiles)
-
- # unique set of maintainer sections
- maintained: set[MaintainerSection] = set()
+ kmaint = [ms for ms in maint_sections if ms.patch_contains_keyword(msg)]
+ for m in kmaint:
+ maintained.add(m)
for f in files:
rf = f.relative_to(Path(args.src))
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 07/22] scripts/get_maintainer.py: implement basic git fallback support
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (5 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 06/22] scripts/get_maintainer.py: add keyword (K:) support Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 08/22] scripts/get_maintainer.py: add --list-[maintained|reviewed]-by Alex Bennée
` (15 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Implement the basic --git fallback support which also needs
--git-since and the various knobs to control the minimum and maximum
signatures to look for.
As the default inverted options are slightly different in python
ArgParse I've added alias options to maintain compatibility with the
perl script.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 132 +++++++++++++++++++++++++++++++++++++-
1 file changed, 131 insertions(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 443fbf8e875..ae97c755de2 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -12,12 +12,16 @@
import sys
from argparse import ArgumentParser, ArgumentTypeError, BooleanOptionalAction
+from dataclasses import dataclass
from os import path
from pathlib import Path
from enum import StrEnum, auto
from re import compile as re_compile
from re import sub as re_sub
+from re import IGNORECASE
from regex import compile as prec_compile
+from git import Repo
+from collections import Counter
#
# Subsystem MAINTAINER entries
@@ -237,6 +241,96 @@ def process_patch_file(patchfile):
return (msg, file_list)
+#
+# Helpers for querying git
+#
+
+
+@dataclass
+class GitOptions:
+ repo: Repo
+ singers: bool
+ since: str
+ min_sig: int
+ max_maint: int
+ min_percent: int
+
+
+def rank_signers(git_opts, all_signers, total_commits):
+ """
+ Counts signer occurrences and returns a list of (Person, count, percent).
+ """
+ if total_commits == 0:
+ return []
+
+ # Count by email to handle duplicates/mailmap issues
+ counts = Counter(s.email for s in all_signers)
+
+ # Keep a map of email -> Person object for the most recent name used
+ email_to_person = {p.email: p for p in all_signers}
+
+ ranked_results = []
+
+ # Sort by count descending, then take the top N
+ for email, count in counts.most_common(git_opts.max_maint):
+ percent = min(100.0, (count / total_commits) * 100)
+ if percent >= git_opts.min_percent:
+ person = email_to_person[email]
+ ranked_results.append((person, count, percent))
+
+ return ranked_results
+
+
+# regex to extract name/email from *-by: tags
+sig_line_re = re_compile(r"^\s*[\w-]+-by:\s*(?P<person_info>.*)", IGNORECASE)
+
+
+def extract_signers(commit_message):
+ """
+ Return a list of Persons found in commit.
+ """
+ signers = []
+ for line in commit_message.splitlines():
+ match = sig_line_re.match(line)
+ if match:
+ try:
+ p = Person(match.group('person_info'))
+ signers.append(p)
+ except BadPerson:
+ continue
+ return signers
+
+
+def extract_from_git(git_opts, src_file):
+ """
+ Extract 'maintainers' from examining the git history of a file.
+ Return an array of Person/role tuples.
+ """
+ repo = git_opts.repo
+
+ # use the porcelain to fetch the log
+ hashes = repo.git.log('--follow', f"--since={git_opts.since}",
+ "--format=%H", '--', src_file).splitlines()
+
+ if len(hashes) <= 0:
+ return []
+
+ commits = [repo.commit(h) for h in hashes]
+
+ all_signers = []
+
+ for c in commits:
+ all_signers.extend(extract_signers(f"{c.message}"))
+
+ ranked = rank_signers(git_opts, all_signers, len(commits))
+ results = []
+
+ for person, count, percent in ranked:
+ role = f"commit_signer: {count}/{len(commits)}={percent:.0f}%"
+ results.append((person, role))
+
+ return results
+
#
# Helper functions for dealing with the source path
#
@@ -337,6 +431,27 @@ def parse_args():
parser.add_argument('--src', type=valid_src_root, default=src,
help=f'Root of QEMU source tree{" (default: " + src + ")" if src else ""}')
+ # Git Options
+ parser.add_argument('--git', action=BooleanOptionalAction,
+ default=False,
+ help="Include recent git *-by: signers (default: don't)")
+ parser.add_argument('--nogit', dest='git', action='store_false',
+ help="Disable git signers (alias for --no-git)")
+ parser.add_argument('--git-since', default="1-year-ago",
+ help='git history to use when falling back (default: 1-year-ago)')
+ parser.add_argument('--git-fallback',
+ action=BooleanOptionalAction, default=True,
+ help='use git when no exact MAINTAINERS pattern (default: fallback)')
+ parser.add_argument('--nogit-fallback', dest='git_fallback',
+ action='store_false',
+ help="Do not fallback to git (alias)")
+ parser.add_argument('--git-min-signatures', default=1,
+ help='number of signatures required (default: 1)')
+ parser.add_argument('--git-max-maintainers', default=5,
+ help='maximum number of git derived maintainers to add (default: 5)')
+ parser.add_argument('--git-min-percent', default=5,
+ help='minimum percentage of commits to tagged as a maintainer (default: 5)')
+
return parser.parse_args()
@@ -372,7 +487,7 @@ def main():
maintained.add(m)
for f in files:
- rf = f.relative_to(Path(args.src))
+ rf = f.relative_to(args.src)
fmaint = [ms for ms in maint_sections if ms.is_file_covered(rf)]
for m in fmaint:
maintained.add(m)
@@ -380,6 +495,21 @@ def main():
for rm in maintained:
print(f"{rm}")
+ # Git fallback
+ if args.git or (args.git_fallback and len(maintained) == 0):
+ repo = Repo(args.src)
+ git_opts = GitOptions(repo=repo, singers=args.git,
+ since=args.git_since,
+ min_sig=args.git_min_signatures,
+ max_maint=args.git_max_maintainers,
+ min_percent=args.git_min_percent)
+
+ for f in files:
+ gmaint = extract_from_git(git_opts, f)
+
+ for (person, role) in gmaint:
+ print(f"{person} ({role})")
+
if __name__ == '__main__':
main()
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 08/22] scripts/get_maintainer.py: add --list-[maintained|reviewed]-by
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (6 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 07/22] scripts/get_maintainer.py: implement basic git fallback support Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 09/22] scripts/get_maintainer.py: add --file-summary option Alex Bennée
` (14 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
This is a simple quality of life feature to list the sections
maintained by a particular person or group. For example:
./scripts/get_maintainer.py --list-maintained-by "Alex Bennée"
to list all the sections of MAINTAINERS where I have a M: line.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index ae97c755de2..aff2ea8282f 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -425,6 +425,12 @@ def parse_args():
default=None,
help="Just validate MAINTAINERS file")
+ # List sections matching regex
+ parser.add_argument('--list-maintained-by', metavar='REGEX',
+ help='List sections where maintainer matches REGEX')
+ parser.add_argument('--list-reviewed-by', metavar='REGEX',
+ help='List sections where reviewer matches REGEX')
+
# We need to know or be told where the root of the source tree is
src = find_src_root()
@@ -470,6 +476,21 @@ def main():
print(f"loaded {len(maint_sections)} from MAINTAINERS")
sys.exit(0)
+ # Build array of Path objects representing the files
+ if args.list_maintained_by or args.list_reviewed_by:
+ if args.list_maintained_by:
+ pattern = re_compile(args.list_maintained_by, IGNORECASE)
+ for m in maint_sections:
+ if any(pattern.search(str(p)) for p in m.maintainers):
+ print(m.section)
+ if args.list_reviewed_by:
+ pattern = re_compile(args.list_reviewed_by, IGNORECASE)
+ for m in maint_sections:
+ if any(pattern.search(str(p)) for p in m.reviewers):
+ print(m.section)
+ sys.exit(0)
+
+ # Build array of Path objects representing the files
files = []
if args.file:
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 09/22] scripts/get_maintainer.py: add --file-summary option
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (7 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 08/22] scripts/get_maintainer.py: add --list-[maintained|reviewed]-by Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 10/22] scripts/get_maintainer.py: optimise glob matching with Paths Alex Bennée
` (13 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
This allows us to process a list of file names and dump the support
details for each file.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index aff2ea8282f..fc155028cf4 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -11,7 +11,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
import sys
-from argparse import ArgumentParser, ArgumentTypeError, BooleanOptionalAction
+from argparse import Action, ArgumentParser, ArgumentTypeError, BooleanOptionalAction
from dataclasses import dataclass
from os import path
from pathlib import Path
@@ -22,6 +22,7 @@
from regex import compile as prec_compile
from git import Repo
from collections import Counter
+from csv import writer as csv_writer
#
# Subsystem MAINTAINER entries
@@ -458,6 +459,17 @@ def parse_args():
parser.add_argument('--git-min-percent', default=5,
help='minimum percentage of commits to tagged as a maintainer (default: 5)')
+ # Output options
+ class SetFileSummary(Action):
+ def __call__(self, parser, namespace, values, option_string=None):
+ setattr(namespace, self.dest, True)
+ # don't fallback to git
+ setattr(namespace, "git_fallback", False)
+
+ parser.add_argument('--file-summary', action=SetFileSummary, nargs=0,
+ default=False,
+ help="Summarise file maintenance status")
+
return parser.parse_args()
@@ -507,14 +519,34 @@ def main():
for m in kmaint:
maintained.add(m)
+ writer = csv_writer(sys.stdout)
+ if args.file_summary and files:
+ writer.writerow(["File", "Subsystem", "Status",
+ "Num Maintainers", "Num Reviewers", "Num Lists"])
+
for f in files:
rf = f.relative_to(args.src)
fmaint = [ms for ms in maint_sections if ms.is_file_covered(rf)]
for m in fmaint:
maintained.add(m)
- for rm in maintained:
- print(f"{rm}")
+ if args.file_summary:
+ valid_ms = [ms for ms in fmaint if ms.status != Status.UNKNOWN]
+ if valid_ms:
+ for ms in valid_ms:
+ writer.writerow([rf, ms.section, str(ms.status),
+ len(ms.maintainers),
+ len(ms.reviewers),len(ms.lists)])
+ else:
+ writer.writerow([rf, "unmaintained", Status.UNKNOWN,
+ 0, 0, 0])
+ else:
+ for m in fmaint:
+ maintained.add(m)
+
+ if not args.file_summary:
+ for rm in maintained:
+ print(f"{rm}")
# Git fallback
if args.git or (args.git_fallback and len(maintained) == 0):
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 10/22] scripts/get_maintainer.py: optimise glob matching with Paths
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (8 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 09/22] scripts/get_maintainer.py: add --file-summary option Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 11/22] scripts/get_maintainer.py: add support for gitlab handles Alex Bennée
` (12 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Using the built-in Path.match() method essentially ends up
re-compiling the glob pattern every time we compare a path to a
maintainer line. This really slows things down so skip that and
pre-compile the glob pattern ourselves.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index fc155028cf4..63983064013 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -16,6 +16,7 @@
from os import path
from pathlib import Path
from enum import StrEnum, auto
+from fnmatch import translate as fn_translate
from re import compile as re_compile
from re import sub as re_sub
from re import IGNORECASE
@@ -98,8 +99,8 @@ class MaintainerSection:
def _expand(self, pattern):
if pattern.endswith("/"):
- return f"{pattern}*"
- return pattern
+ pattern = f"{pattern}*"
+ return re_compile(fn_translate(pattern))
def __init__(self, section, entries):
self.section = section
@@ -159,12 +160,14 @@ def __str__(self) -> str:
def is_file_covered(self, filename):
"Is filename covered by this maintainer section"
+ fn = str(filename)
+
for fx in self.files_exclude:
- if filename.match(fx):
+ if fx.match(fn):
return False
for f in self.files:
- if filename.match(f):
+ if f.match(fn):
return True
return False
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 11/22] scripts/get_maintainer.py: add support for gitlab handles
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (9 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 10/22] scripts/get_maintainer.py: optimise glob matching with Paths Alex Bennée
@ 2026-11-20 20:04 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 12/22] scripts/get_maintainer.py: implement --noroles/--norolestats Alex Bennée
` (11 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:04 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Since the last posting of this series we now have added a mapping for
names to gitlab handles. Mirror the perl scripts support by adding a
mapping function and using it.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 81 +++++++++++++++++++++++++++++++--------
1 file changed, 64 insertions(+), 17 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 63983064013..e56a9238ec2 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -71,6 +71,39 @@ def _missing_(cls, value):
raise BadStatus(f"'{value}' is not a valid maintenance status.")
+#
+# Helpers for GitLab handles
+#
+
+
+def load_gitlab_handles(src):
+ """
+ Load GitLab handle to name mappings from .gitlab-map-auto and
+ .gitlab-map-manual. Returns a dictionary mapping name to handle.
+ """
+ name_to_handle = {}
+ for mapfile in ['.gitlab-map-auto', '.gitlab-map-manual']:
+ p = path.join(src, mapfile)
+ if path.exists(p):
+ with open(p, 'r', encoding='utf-8') as f:
+ for line in f:
+ if not line.startswith('#'):
+ parts = line.rstrip('\r\n').split('\t', 1)
+ if len(parts) == 2:
+ name_to_handle[parts[1]] = parts[0]
+ return name_to_handle
+
+
+def map_gitlab_handle(name, gitlab_map):
+ """
+ Lookup GitLab handle for a real name, stripping quotes.
+ """
+ if not gitlab_map or not name:
+ return None
+ clean_name = name.replace('"', '')
+ return gitlab_map.get(clean_name)
+
+
person_re = re_compile(r"^(?P<name>[^<]+?)\s*<(?P<email>[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})>$")
@@ -81,7 +114,7 @@ class BadPerson(Exception):
class Person:
"Class representing a maintainer or reviewer and their details"
- def __init__(self, info):
+ def __init__(self, info, gitlab_map=None):
match = person_re.search(info)
if match is None:
@@ -89,10 +122,19 @@ def __init__(self, info):
self.name = match.group('name')
self.email = match.group('email')
+ if gitlab_map is not None:
+ self.handle = map_gitlab_handle(self.name, gitlab_map)
+ else:
+ self.handle = None
def __str__(self):
return f"{self.name} <{self.email}>"
+ def format_role(self, role: str) -> str:
+ if self.handle:
+ return f"{role}, gitlab:@{self.handle}"
+ return role
+
class MaintainerSection:
"Class representing a section of MAINTAINERS"
@@ -102,7 +144,7 @@ def _expand(self, pattern):
pattern = f"{pattern}*"
return re_compile(fn_translate(pattern))
- def __init__(self, section, entries):
+ def __init__(self, section, entries, gitlab_map=None):
self.section = section
self.status = Status.UNKNOWN
self.maintainers = []
@@ -118,10 +160,10 @@ def __init__(self, section, entries):
(tag, data) = e.split(": ", 2)
if tag == "M":
- person = Person(data)
+ person = Person(data, gitlab_map=gitlab_map)
self.maintainers.append(person)
elif tag == "R":
- person = Person(data)
+ person = Person(data, gitlab_map=gitlab_map)
self.reviewers.append(person)
elif tag == "S":
self.status = Status(data)
@@ -147,10 +189,12 @@ def __str__(self) -> str:
entries = []
for m in self.maintainers:
- entries.append(f"{m.name} <{m.email}> (maintainer: {self.section})")
+ role = m.format_role(f"maintainer: {self.section}")
+ entries.append(f"{m} ({role})")
for r in self.reviewers:
- entries.append(f"{r.name} <{r.email}> (reviewer: {self.section})")
+ role = r.format_role(f"reviewer: {self.section}")
+ entries.append(f"{r} ({role})")
for l in self.lists:
entries.append(f"{l} (open list: {self.section})")
@@ -183,11 +227,10 @@ def patch_contains_keyword(self, patch_lines):
return False
-def read_maintainers(src):
+def read_maintainers(src, gitlab_map=None):
"""
Read the MAINTAINERS file, return a list of MaintainerSection objects.
"""
-
mfile = path.join(src, 'MAINTAINERS')
entries = []
@@ -198,7 +241,7 @@ def read_maintainers(src):
for line in f:
if not line.strip(): # Blank line found, potential end of a section
if section and fields:
- new_section = MaintainerSection(section, fields)
+ new_section = MaintainerSection(section, fields, gitlab_map)
entries.append(new_section)
# reset for next section
section = None
@@ -212,7 +255,7 @@ def read_maintainers(src):
section = line.strip()
if section and fields:
- new_section = MaintainerSection(section, fields)
+ new_section = MaintainerSection(section, fields, gitlab_map)
entries.append(new_section)
return entries
@@ -258,6 +301,7 @@ class GitOptions:
min_sig: int
max_maint: int
min_percent: int
+ gitlab_map: dict = None
def rank_signers(git_opts, all_signers, total_commits):
@@ -289,7 +333,7 @@ def rank_signers(git_opts, all_signers, total_commits):
sig_line_re = re_compile(r"^\s*[\w-]+-by:\s*(?P<person_info>.*)", IGNORECASE)
-def extract_signers(commit_message):
+def extract_signers(commit_message, gitlab_map=None):
"""
Return a list of Persons found in commit.
"""
@@ -298,7 +342,7 @@ def extract_signers(commit_message):
match = sig_line_re.match(line)
if match:
try:
- p = Person(match.group('person_info'))
+ p = Person(match.group('person_info'), gitlab_map=gitlab_map)
signers.append(p)
except BadPerson:
continue
@@ -324,7 +368,8 @@ def extract_from_git(git_opts, src_file):
all_signers = []
for c in commits:
- all_signers.extend(extract_signers(f"{c.message}"))
+ all_signers.extend(extract_signers(f"{c.message}",
+ git_opts.gitlab_map))
ranked = rank_signers(git_opts, all_signers, len(commits))
results = []
@@ -481,8 +526,9 @@ def main():
args = parse_args()
try:
- # Now we start by reading the MAINTAINERS file
- maint_sections = read_maintainers(args.src)
+ # We need the gitlab map before we read the MAINTAINERS file
+ gitlab_map = load_gitlab_handles(args.src)
+ maint_sections = read_maintainers(args.src, gitlab_map)
except Exception as e:
print(f"Error: {e}")
sys.exit(-1)
@@ -558,13 +604,14 @@ def main():
since=args.git_since,
min_sig=args.git_min_signatures,
max_maint=args.git_max_maintainers,
- min_percent=args.git_min_percent)
+ min_percent=args.git_min_percent,
+ gitlab_map=gitlab_map)
for f in files:
gmaint = extract_from_git(git_opts, f)
for (person, role) in gmaint:
- print(f"{person} ({role})")
+ print(f"{person} ({person.format_role(role)})")
if __name__ == '__main__':
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 12/22] scripts/get_maintainer.py: implement --noroles/--norolestats
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (10 preceding siblings ...)
2026-11-20 20:04 ` [PATCH 11/22] scripts/get_maintainer.py: add support for gitlab handles Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 13/22] scripts/get_maintainer.py: expand --validate output to CSV summary Alex Bennée
` (10 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
The main purpose of this is for the git cc script invocation to get a
clean list of email addresses. The handling is slightly different as
we don't force roles to True if rolestats is specified. It
doesn't matter as --noroles doesn't attempt to display stats anyway.
As the default inverted options are slightly different in python
ArgParse I've again added alias options to maintain compatibility with
the perl script.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index e56a9238ec2..a3f64a4b2a0 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -376,7 +376,7 @@ def extract_from_git(git_opts, src_file):
for person, count, percent in ranked:
role = f"commit_signer: {count}/{len(commits)}={percent:.0f}%"
- results.append((person, role))
+ results.append((person, role, count, percent, len(commits)))
return results
@@ -507,6 +507,18 @@ def parse_args():
parser.add_argument('--git-min-percent', default=5,
help='minimum percentage of commits to tagged as a maintainer (default: 5)')
+ # Roles and Statistics options
+ parser.add_argument('--roles', action=BooleanOptionalAction,
+ default=True,
+ help="Show roles (default: roles on)")
+ parser.add_argument('--noroles', dest='roles', action='store_false',
+ help="Do not show roles (alias for --no-roles)")
+ parser.add_argument('--rolestats', action=BooleanOptionalAction,
+ default=True,
+ help="Show statistics in git roles (default: stats on)")
+ parser.add_argument('--norolestats', dest='rolestats', action='store_false',
+ help="Do not show stats in git roles (alias)")
+
# Output options
class SetFileSummary(Action):
def __call__(self, parser, namespace, values, option_string=None):
@@ -593,9 +605,16 @@ def main():
for m in fmaint:
maintained.add(m)
+ recipients = {}
if not args.file_summary:
for rm in maintained:
- print(f"{rm}")
+ if args.roles:
+ print(f"{rm}")
+ else:
+ for p in rm.maintainers + rm.reviewers:
+ recipients.setdefault(p.email, p)
+ for l in rm.lists:
+ recipients.setdefault(l, l)
# Git fallback
if args.git or (args.git_fallback and len(maintained) == 0):
@@ -610,8 +629,17 @@ def main():
for f in files:
gmaint = extract_from_git(git_opts, f)
- for (person, role) in gmaint:
- print(f"{person} ({person.format_role(role)})")
+ for (person, role, count, percent, total) in gmaint:
+ if not args.roles:
+ recipients.setdefault(person.email, person)
+ else:
+ if not args.rolestats:
+ role = "commit_signer"
+ print(f"{person} ({person.format_role(role)})")
+
+ if not args.roles and not args.file_summary:
+ for r in recipients.values():
+ print(f"{r}")
if __name__ == '__main__':
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 13/22] scripts/get_maintainer.py: expand --validate output to CSV summary
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (11 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 12/22] scripts/get_maintainer.py: implement --noroles/--norolestats Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 14/22] scripts/get_maintainer.py: add --list-maintainers Alex Bennée
` (9 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Instead of merely printing the count of parsed maintainer sections,
have --validate dump a CSV table of all sections including their
maintenance status, maintainer/reviewer/list counts, and counts of
matching file patterns, keywords, and trees.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index a3f64a4b2a0..154f2650f72 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -546,7 +546,14 @@ def main():
sys.exit(-1)
if args.validate:
- print(f"loaded {len(maint_sections)} from MAINTAINERS")
+ writer = csv_writer(sys.stdout)
+ writer.writerow(["Section", "Status",
+ "Num Maintainers", "Num Reviewers", "Num Lists",
+ "Num Matches", "Num Keywords", "Num Trees"])
+ for ms in maint_sections:
+ writer.writerow([ms.section, str(ms.status),
+ len(ms.maintainers), len(ms.reviewers), len(ms.lists),
+ len(ms.files), len(ms.keywords), len(ms.trees)])
sys.exit(0)
# Build array of Path objects representing the files
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 14/22] scripts/get_maintainer.py: add --list-maintainers
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (12 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 13/22] scripts/get_maintainer.py: expand --validate output to CSV summary Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 15/22] scripts/get_maintainer.py: add --list-absent-maintainers-since Alex Bennée
` (8 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
This option will dump a list of maintainers in a CSV format together
with some useful information including:
- Name
- gitlab handle
- the date they first became a maintainer
- the date they first become a reviewer
- the date of their first contribution (commit or on list)
- the date of the last contribution
- how many sub-systems they maintain
The idea being we can feed this information into a graphing tool to
get an idea of the demographics of our maintainers.
The last contribution date will hopefully replace custom scripts when
we are cleaning up the MAINTAINERS file for those no longer active in
development.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 155 +++++++++++++++++++++++++++++++++++++-
1 file changed, 154 insertions(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index 154f2650f72..f164e2c5c55 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -22,7 +22,7 @@
from re import IGNORECASE
from regex import compile as prec_compile
from git import Repo
-from collections import Counter
+from collections import Counter, defaultdict
from csv import writer as csv_writer
#
@@ -429,6 +429,149 @@ def find_src_root():
return None
+#
+# Helpers for maintainer statistics
+#
+# We assume the current state of MAINTAINERS as parsed from the
+# working tree is the authoritative source for who is currently a
+# maintainer, as well as their canonical name spelling and primary
+# email address. Historical commits or older MAINTAINERS revisions
+# with alternate name transliterations or older email addresses are
+# mapped back onto these current canonical maintainer names.
+#
+
+
+def get_maintainer_since(repo, maintainers, email_to_maint):
+ """
+ Scan git history of MAINTAINERS to determine the earliest date
+ each maintainer was added as a maintainer (M:) or reviewer (R:).
+ Returns (maintainer_since, reviewer_since) dictionaries.
+ """
+ maintainer_since = {}
+ reviewer_since = {}
+ current_date = None
+
+ tag_re = re_compile(r'^\+\s*([MR]):\s*([^<]+?)\s*<([^>]+)>')
+
+ log_output = repo.git.log('-p', '--format=COMMIT %as', '--', 'MAINTAINERS')
+ for line in log_output.splitlines():
+ if line.startswith('COMMIT '):
+ current_date = line[7:17]
+ elif line.startswith('+') and not line.startswith('+++'):
+ m = tag_re.match(line)
+ if m:
+ tag, name, email = m.group(1), m.group(2), m.group(3)
+ target = (name if name in maintainers
+ else email_to_maint.get(email))
+ if target:
+ since_dict = (maintainer_since if tag == 'M'
+ else reviewer_since)
+ if (target not in since_dict or
+ current_date < since_dict[target]):
+ since_dict[target] = current_date
+ return maintainer_since, reviewer_since
+
+
+def get_contributor_dates(repo, maintainers, email_to_maint):
+ """
+ Scan git history for author and committer dates, as well as review/ack
+ trailers, to determine the first and last contribution dates for
+ maintainers.
+
+ Trailers are dated by the author date, as are MAINTAINERS entries in
+ get_maintainer_since(), so a patch adding its own maintainer lines
+ doesn't appear to predate the maintainer's involvement.
+
+ Returns (first_contrib, last_contrib) dictionaries mapping maintainer
+ canonical names to ISO date strings.
+ """
+ trailer_keys = [
+ 'Signed-off-by',
+ 'Co-developed-by',
+ 'Reviewed-by',
+ 'Tested-by',
+ 'Acked-by',
+ ]
+ trailer_args = ','.join(f'key={k}' for k in trailer_keys)
+ log_format = (
+ '%as|%aN|%aE|%cs|%cN|%cE|'
+ f'%(trailers:{trailer_args},valueonly,unfold,separator=|)'
+ )
+
+ first_contrib = {}
+ last_contrib = {}
+
+ def record_date(name, email, date):
+ target = name if name in maintainers else email_to_maint.get(email)
+ if target:
+ first_contrib[target] = min(first_contrib.get(target, date), date)
+ last_contrib[target] = max(last_contrib.get(target, date), date)
+
+ for line in repo.git.log(f'--format={log_format}').splitlines():
+ if not line:
+ continue
+ parts = line.split('|')
+ a_date, a_name, a_email, c_date, c_name, c_email = parts[:6]
+
+ record_date(a_name, a_email, a_date)
+ record_date(c_name, c_email, c_date)
+
+ for trailer in parts[6:]:
+ m = person_re.match(trailer.strip())
+ if m:
+ record_date(m.group('name'), m.group('email'), a_date)
+
+ return first_contrib, last_contrib
+
+
+def dump_maintainers_csv(src, maint_sections):
+ """
+ Dump a CSV summary of maintainer statistics to stdout.
+ """
+ maintainers = defaultdict(lambda: {'subsystems': 0, 'emails': set()})
+ for s in maint_sections:
+ if s.status not in (Status.ORPHAN, Status.OBSOLETE):
+ for m in s.maintainers:
+ maintainers[m.name]['subsystems'] += 1
+ maintainers[m.name]['emails'].add(m.email)
+
+ email_to_maint = {}
+ for name, data in maintainers.items():
+ for email in data['emails']:
+ email_to_maint[email] = name
+
+ name_to_handle = load_gitlab_handles(src)
+ repo = Repo(src)
+
+ maintainer_since, reviewer_since = get_maintainer_since(
+ repo, maintainers, email_to_maint
+ )
+ first_contrib, last_contrib = get_contributor_dates(
+ repo, maintainers, email_to_maint
+ )
+
+ writer = csv_writer(sys.stdout)
+ headers = [
+ "Maintainer Name",
+ "gitlab handle",
+ "Subsystems Maintained",
+ "Maintainer Since",
+ "Reviewer Since",
+ "Contributor Since",
+ "Date of last contribution",
+ ]
+ writer.writerow(headers)
+ for name in sorted(maintainers.keys()):
+ writer.writerow([
+ name,
+ name_to_handle.get(name, ""),
+ maintainers[name]["subsystems"],
+ maintainer_since.get(name, ""),
+ reviewer_since.get(name, ""),
+ first_contrib.get(name, ""),
+ last_contrib.get(name, ""),
+ ])
+
#
# Argument validation
#
@@ -480,6 +623,12 @@ def parse_args():
parser.add_argument('--list-reviewed-by', metavar='REGEX',
help='List sections where reviewer matches REGEX')
+ # List maintainers
+ parser.add_argument('--list-maintainers',
+ action=BooleanOptionalAction,
+ default=False,
+ help="Dump maintainers summary as CSV")
+
# We need to know or be told where the root of the source tree is
src = find_src_root()
@@ -556,6 +705,10 @@ def main():
len(ms.files), len(ms.keywords), len(ms.trees)])
sys.exit(0)
+ if args.list_maintainers:
+ dump_maintainers_csv(args.src, maint_sections)
+ sys.exit(0)
+
# Build array of Path objects representing the files
if args.list_maintained_by or args.list_reviewed_by:
if args.list_maintained_by:
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 15/22] scripts/get_maintainer.py: add --list-absent-maintainers-since
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (13 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 14/22] scripts/get_maintainer.py: add --list-maintainers Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 16/22] scripts/maintainer: add plot-maintainer-experience.py Alex Bennée
` (7 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Previously people had their own scripts for cleaning up MAINTAINERS so
we might as well bake the functionality into it here.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/get_maintainer.py | 80 +++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
index f164e2c5c55..55f961c857a 100755
--- a/scripts/get_maintainer.py
+++ b/scripts/get_maintainer.py
@@ -24,6 +24,7 @@
from git import Repo
from collections import Counter, defaultdict
from csv import writer as csv_writer
+from datetime import datetime, timezone
#
# Subsystem MAINTAINER entries
@@ -572,6 +573,77 @@ def dump_maintainers_csv(src, maint_sections):
last_contrib.get(name, ""),
])
+
+def list_absent_maintainers(src, maint_sections, since_str):
+ """
+ Pretty print a list of maintainers and reviewers whose last
+ contribution was prior to since_str, or who have never contributed.
+ """
+ people = defaultdict(lambda: {'subsystems': [], 'emails': set()})
+ for s in maint_sections:
+ if s.status not in (Status.ORPHAN, Status.OBSOLETE):
+ for p in s.maintainers + s.reviewers:
+ if s.section not in people[p.name]['subsystems']:
+ people[p.name]['subsystems'].append(s.section)
+ people[p.name]['emails'].add(p.email)
+
+ email_to_maint = {}
+ for name, data in people.items():
+ for email in data['emails']:
+ email_to_maint[email] = name
+
+ repo = Repo(src)
+ try:
+ out = repo.git.rev_parse(f'--since={since_str}')
+ ts = int(out.split('=')[1])
+ cutoff_date = datetime.fromtimestamp(
+ ts, tz=timezone.utc
+ ).strftime('%Y-%m-%d')
+ except Exception as e:
+ print(f"Error: failed to parse date '{since_str}': {e}",
+ file=sys.stderr)
+ sys.exit(1)
+
+ _first, last_contrib = get_contributor_dates(
+ repo, people, email_to_maint
+ )
+
+ rows = []
+ for name, data in people.items():
+ last = last_contrib.get(name)
+ if last is None:
+ rows.append((name, 'Never', ', '.join(sorted(data['emails'])),
+ ', '.join(data['subsystems'])))
+ elif last < cutoff_date:
+ rows.append((name, last, ', '.join(sorted(data['emails'])),
+ ', '.join(data['subsystems'])))
+
+ # Sort most stale first (Never first, then earliest date, then by name)
+ rows.sort(key=lambda x: (1 if x[1] != 'Never' else 0, x[1], x[0]))
+
+ if not rows:
+ print(f"No maintainers absent since {cutoff_date} ({since_str}).")
+ return
+
+ max_name = max([len(r[0]) for r in rows] + [len('Maintainer')])
+ max_date = max([len(r[1]) for r in rows] + [len('Last Seen')])
+ max_email = max([len(r[2]) for r in rows] + [len('Email(s)')])
+
+ header = (f"{'Maintainer':<{max_name}} "
+ f"{'Last Seen':<{max_date}} "
+ f"{'Email(s)':<{max_email}} "
+ f"Subsystems")
+ sep_len = max_name + 2 + max_date + 2 + max_email + 2 + len('Subsystems')
+ separator = '-' * sep_len
+
+ print(header)
+ print(separator)
+ for r in rows:
+ print(f"{r[0]:<{max_name}} "
+ f"{r[1]:<{max_date}} "
+ f"{r[2]:<{max_email}} "
+ f"{r[3]}")
+
#
# Argument validation
#
@@ -628,6 +700,9 @@ def parse_args():
action=BooleanOptionalAction,
default=False,
help="Dump maintainers summary as CSV")
+ parser.add_argument(
+ '--list-absent-maintainers-since', metavar='DATE',
+ help="List maintainers with no contributions since DATE")
# We need to know or be told where the root of the source tree is
src = find_src_root()
@@ -709,6 +784,11 @@ def main():
dump_maintainers_csv(args.src, maint_sections)
sys.exit(0)
+ if args.list_absent_maintainers_since:
+ list_absent_maintainers(args.src, maint_sections,
+ args.list_absent_maintainers_since)
+ sys.exit(0)
+
# Build array of Path objects representing the files
if args.list_maintained_by or args.list_reviewed_by:
if args.list_maintained_by:
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 16/22] scripts/maintainer: add plot-maintainer-experience.py
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (14 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 15/22] scripts/get_maintainer.py: add --list-absent-maintainers-since Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 17/22] gitlab: add a check-maintainers task Alex Bennée
` (6 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
This is a script to plot the experience of maintainers and when they
started contributing to the project (either with review or commits).
We also handle the case when they become maintainers with the code the
submit.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.../maintainers/plot-maintainer-experience.py | 163 ++++++++++++++++++
1 file changed, 163 insertions(+)
create mode 100755 scripts/maintainers/plot-maintainer-experience.py
diff --git a/scripts/maintainers/plot-maintainer-experience.py b/scripts/maintainers/plot-maintainer-experience.py
new file mode 100755
index 00000000000..1db2863a667
--- /dev/null
+++ b/scripts/maintainers/plot-maintainer-experience.py
@@ -0,0 +1,163 @@
+#!/usr/bin/env python3
+#
+# plot-maintainer-experience.py: plot the experience of the current
+# maintainer pool
+#
+# Copyright (C) 2026 Linaro, Ltd.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+"""
+Plot the distribution of experience across the current maintainers,
+using the CSV from get_maintainer.py --list-maintainers:
+
+ years as a maintainer now - Maintainer Since
+ experience when appointed Maintainer Since - Contributor Since
+
+"Contributor Since" is the first commit authored or committed, or the
+first Signed-off-by, Co-developed-by, Reviewed-by, Tested-by or Acked-by
+trailer. Maintainers added within ARRIVED_DAYS of that usually came with
+their own code (a new board, device or port) and are shaded apart.
+Individuals are not labelled; those left out are listed on stdout.
+"""
+
+import argparse
+import os
+import sys
+
+import matplotlib
+if not (os.environ.get("DISPLAY") or os.environ.get("WAYLAND_DISPLAY")):
+ matplotlib.use("Agg")
+import matplotlib.pyplot as plt
+import numpy as np
+import pandas as pd
+
+REQUIRED_COLUMNS = {"Maintainer Name", "Contributor Since",
+ "Maintainer Since"}
+# added to MAINTAINERS this soon after first involvement: arrived with
+# their code rather than being appointed after contributing
+ARRIVED_DAYS = 30
+COLOR = "#2a78d6"
+ARRIVED_COLOR = "#a9c9f0"
+
+
+def years_between(start, end):
+ return ((end - start).dt.days / 365.25).dropna()
+
+
+def plot_panel(ax, years, title, xlabel, bins, color, arrived=None):
+ if arrived is None:
+ ax.hist(years, bins=bins, color=color, edgecolor="white",
+ linewidth=1.5)
+ else:
+ # all the arrivals fall in the first bin, stacked under the rest
+ ax.hist([years[arrived], years[~arrived]], bins=bins, stacked=True,
+ color=[ARRIVED_COLOR, color], edgecolor="white",
+ linewidth=1.5,
+ label=[f"Arrived with their code "
+ f"(within {ARRIVED_DAYS} days): {arrived.sum()}",
+ "Appointed after contributing"])
+ ax.legend(frameon=False, fontsize=9, loc="upper right")
+
+ median = years.median()
+ ax.axvline(median, color="0.2", linewidth=1)
+ ax.annotate(f"median {median:.1f}", (median, 1), xycoords=("data",
+ "axes fraction"), xytext=(4, -4), textcoords="offset points",
+ ha="left", va="top", fontsize=9, color="0.2")
+
+ title = (f"{title} (n={len(years)}, mean {years.mean():.1f}, "
+ f"skew {years.skew():+.2f})")
+ ax.set_title(title, fontsize=11, loc="left")
+ ax.set_xlabel(xlabel, fontsize=10)
+ ax.set_ylabel("Maintainers", fontsize=10)
+ ax.grid(axis="y", linestyle="--", alpha=0.5)
+ ax.set_axisbelow(True)
+ for side in ("top", "right"):
+ ax.spines[side].set_visible(False)
+
+
+def plot_experience(df, now, title):
+ contributor = pd.to_datetime(df["Contributor Since"])
+ maintainer = pd.to_datetime(df["Maintainer Since"])
+
+ tenure = years_between(maintainer, pd.Series(now, index=df.index))
+ before = years_between(contributor, maintainer)
+ # no involvement at all, or a maintainer entry before it: someone
+ # else's patch added them, or MAINTAINERS doesn't match git
+ left_out = df.loc[~df.index.isin(before[before >= 0].index)]
+ if not left_out.empty:
+ print(f"Left out of the experience panel ({len(left_out)}): "
+ "no matching involvement, or in MAINTAINERS before it")
+ for _, row in left_out.iterrows():
+ first = row["Contributor Since"]
+ print(f" {row['Maintainer Name']}: maintainer "
+ f"{row['Maintainer Since']}, first involvement "
+ f"{first if pd.notna(first) else 'none'}")
+ before = before[before >= 0]
+ arrived = (maintainer - contributor).dt.days[before.index] <= ARRIVED_DAYS
+
+ top = int(np.ceil(max(tenure.max(), before.max())))
+ bins = np.arange(0, top + 1)
+
+ fig, (upper, lower) = plt.subplots(2, 1, figsize=(10, 7.5), sharex=True)
+ plot_panel(upper, tenure, "Years as a maintainer",
+ f"Years before {now:%Y-%m-%d}", bins, "#eb6834")
+ plot_panel(lower, before, "Experience when becoming a maintainer",
+ "Years from first involvement (commit or trailer) to "
+ "entering MAINTAINERS", bins, COLOR, arrived)
+ # sharex hides the upper tick labels, but its xlabel still applies
+ upper.tick_params(labelbottom=True)
+ lower.set_xlim(0, top)
+ lower.set_xticks(bins[::2])
+
+ fig.suptitle(title or "Experience of the Current QEMU Maintainers",
+ fontsize=14, fontweight="bold")
+ fig.tight_layout()
+ return fig
+
+
+def build_parser():
+ parser = argparse.ArgumentParser(
+ description="Plot the experience distribution of current maintainers.",
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ epilog="""\
+examples:
+ scripts/get_maintainer.py --list-maintainers > maintainers.csv
+ %(prog)s -i maintainers.csv -o maintainer-experience.png
+""",
+ )
+ parser.add_argument("-i", "--input", required=True,
+ help="CSV from get_maintainer.py --list-maintainers")
+ parser.add_argument("-o", "--output", default=None,
+ help="Output image file. If not specified, "
+ "displays interactively.")
+ parser.add_argument("--title", default=None, help="Plot title")
+ return parser
+
+
+def main():
+ args = build_parser().parse_args()
+
+ try:
+ df = pd.read_csv(args.input)
+ except (OSError, pd.errors.ParserError) as e:
+ print(f"Error reading '{args.input}': {e}", file=sys.stderr)
+ sys.exit(1)
+
+ missing = REQUIRED_COLUMNS - set(df.columns)
+ if missing:
+ print(f"Error: '{args.input}' lacks columns: {', '.join(missing)}",
+ file=sys.stderr)
+ sys.exit(1)
+
+ now = pd.Timestamp.now().normalize()
+ fig = plot_experience(df, now, args.title)
+ if args.output:
+ fig.savefig(args.output, dpi=300)
+ print(f"Plot saved to {args.output}")
+ else:
+ plt.show()
+
+
+if __name__ == "__main__":
+ main()
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 17/22] gitlab: add a check-maintainers task
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (15 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 16/22] scripts/maintainer: add plot-maintainer-experience.py Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 18/22] MAINTAINERS: update Daniel's entries to be consistent Alex Bennée
` (5 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
Now we have a more flexible get_maintainer script we can use it to
validate MAINTAINERS.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/static_checks.yml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index 568e56e1204..f72bd79e14e 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -23,6 +23,15 @@ check-dco:
before_script:
- apk -U add git
+check-maintainers:
+ extends: .base_job_template
+ stage: build
+ image: python:3.10-alpine
+ needs: []
+ script: scripts/get_maintainer.py --validate
+ variables:
+ GIT_DEPTH: 1
+
check-python-minreqs:
extends: .base_job_template
stage: test
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 18/22] MAINTAINERS: update Daniel's entries to be consistent
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (16 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 17/22] gitlab: add a check-maintainers task Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 19/22] MAINTAINERS: make Collin's entries consistent with .mailmap Alex Bennée
` (4 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
When testing my get_maintainers.py I was shocked to see:
➜ ./scripts/get_maintainer.py --list-absent-maintainers-since "2 years ago"
Maintainer Last Seen Email(s) Subsystems
------------------------------------------------------------------------------
...
Daniel P. Berrange 2024-06-10 berrange@redhat.com QOM, QDev, Seccomp, Cryptography, Buffers, I/O Channels, User authorization, Sockets, File monitor, Functional testing framework, Build system architecture, Meson, GIT submodules
Which is of course incorrect but tripped up by the fact we have been
utf-8 clean for some time. There are some entries that are correct so
fix up the rest in solidarity with my fellow utf-8 using hackers ;-)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
MAINTAINERS | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index e2bd501f18e..031183706a5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3748,7 +3748,7 @@ T: git https://github.com/kostyanf14/qemu.git qga-win32
QOM
M: Paolo Bonzini <pbonzini@redhat.com>
-R: Daniel P. Berrange <berrange@redhat.com>
+R: Daniel P. Berrangé <berrange@redhat.com>
S: Supported
F: docs/devel/qom.rst
F: include/qom/
@@ -3763,7 +3763,7 @@ F: tests/qtest/qom-test.c
QDev
M: Paolo Bonzini <pbonzini@redhat.com>
-R: Daniel P. Berrange <berrange@redhat.com>
+R: Daniel P. Berrangé <berrange@redhat.com>
S: Supported
F: docs/qdev-device-use.txt
F: hw/core/qdev*
@@ -3996,14 +3996,14 @@ F: tests/qtest/dbus*
F: scripts/xml-preprocess*
Seccomp
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: system/qemu-seccomp.c
F: include/system/seccomp.h
F: tests/unit/test-seccomp.c
Cryptography
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Maintained
F: crypto/
F: include/crypto/
@@ -4024,20 +4024,20 @@ F: include/qemu/coroutine*
F: tests/unit/test-coroutine.c
Buffers
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: util/buffer.c
F: include/qemu/buffer.h
I/O Channels
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Maintained
F: io/
F: include/io/
F: tests/unit/test-io-*
User authorization
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Maintained
F: authz/
F: qapi/authz.json
@@ -4045,14 +4045,14 @@ F: include/authz/
F: tests/unit/test-authz-*
Sockets
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Maintained
F: include/qemu/sockets.h
F: util/qemu-sockets.c
F: qapi/sockets.json
File monitor
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: util/filemonitor*.c
F: include/qemu/filemonitor.h
@@ -4190,7 +4190,7 @@ F: docs/specs/fsi.rst
F: tests/qtest/aspeed_fsi-test.c
Firmware schema specifications
-R: Daniel P. Berrange <berrange@redhat.com>
+R: Daniel P. Berrangé <berrange@redhat.com>
R: Kashyap Chamarthy <kchamart@redhat.com>
S: Orphan
F: docs/interop/firmware.json
@@ -4691,7 +4691,7 @@ F: tests/vm/freebsd
Functional testing framework
M: Thomas Huth <th.huth+qemu@posteo.eu>
R: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
-R: Daniel P. Berrange <berrange@redhat.com>
+R: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/testing/functional.rst
F: scripts/clean_functional_cache.py
@@ -4723,7 +4723,7 @@ F: .gitlab-ci.d/custom-runners/debian-13-ppc64le.yml
Documentation
-------------
Build system architecture
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/build-system.rst
@@ -4753,7 +4753,7 @@ Build System
Meson
M: Paolo Bonzini <pbonzini@redhat.com>
R: Marc-André Lureau <marcandre.lureau@redhat.com>
-R: Daniel P. Berrange <berrange@redhat.com>
+R: Daniel P. Berrangé <berrange@redhat.com>
R: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
S: Maintained
F: meson.build
@@ -4785,7 +4785,7 @@ F: hw/*/Kconfig*
F: target/*/Kconfig*
GIT submodules
-M: Daniel P. Berrange <berrange@redhat.com>
+M: Daniel P. Berrangé <berrange@redhat.com>
S: Odd Fixes
F: scripts/git-submodule.sh
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 19/22] MAINTAINERS: make Collin's entries consistent with .mailmap
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (17 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 18/22] MAINTAINERS: update Daniel's entries to be consistent Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-20 20:05 ` [PATCH 20/22] MAINTAINERS: make LIU's entries consistent Alex Bennée
` (3 subsequent siblings)
22 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa,
Collin L. Walling
We should use the same form everywhere to keep the scripts happy.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Collin L. Walling <walling@linux.ibm.com>
---
MAINTAINERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 031183706a5..c5d0b07aad3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3140,7 +3140,7 @@ F: include/hw/timer/mips_gictimer.h
S390 3270 device
M: Halil Pasic <pasic@linux.ibm.com>
M: Christian Borntraeger <borntraeger@linux.ibm.com>
-R: Collin Walling <walling@linux.ibm.com>
+R: Collin L. Walling <walling@linux.ibm.com>
S: Odd Fixes
F: include/hw/s390x/3270-ccw.h
F: hw/char/terminal3270.c
@@ -3150,7 +3150,7 @@ L: qemu-s390x@nongnu.org
S390 diag 288 watchdog
M: Halil Pasic <pasic@linux.ibm.com>
M: Christian Borntraeger <borntraeger@linux.ibm.com>
-R: Collin Walling <walling@linux.ibm.com>
+R: Collin L. Walling <walling@linux.ibm.com>
S: Supported
F: hw/watchdog/wdt_diag288.c
F: include/hw/watchdog/wdt_diag288.h
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 20/22] MAINTAINERS: make LIU's entries consistent
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (18 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 19/22] MAINTAINERS: make Collin's entries consistent with .mailmap Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-21 7:40 ` LIU Zhiwei
2026-11-20 20:05 ` [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair Alex Bennée
` (2 subsequent siblings)
22 siblings, 1 reply; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa,
LIU Zhiwei
All the commits and s-o-b's use capitalised entries.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index c5d0b07aad3..5d1444ff661 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -367,7 +367,7 @@ M: Palmer Dabbelt <palmer@dabbelt.com>
M: Alistair Francis <alistair.francis@wdc.com>
R: Weiwei Li <liwei1518@gmail.com>
R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
-R: Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
+R: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
R: Chao Liu <chao.liu@processmission.com>
L: qemu-riscv@nongnu.org
S: Supported
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (19 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 20/22] MAINTAINERS: make LIU's entries consistent Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-22 17:34 ` Philippe Mathieu-Daudé
2026-11-23 1:05 ` Alistair Francis
2026-11-20 20:05 ` [PATCH 22/22] MAINTAINERS: update security reporting links Alex Bennée
2026-11-23 17:31 ` [PATCH 00/22] MAINTAINER updates and get_maintainer.py Pierrick Bouvier
22 siblings, 2 replies; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel
Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa,
Alistair Francis
The last emails with capitalisation where in 2019, make it consistent.
We can also tweak .mailmap so this sticks in history as well.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Alistair Francis <alistair.francis@wdc.com>
---
MAINTAINERS | 10 +++++-----
.mailmap | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 5d1444ff661..456d835ce70 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -878,7 +878,7 @@ F: tests/functional/arm/test_canona1100.py
F: docs/system/arm/digic.rst
Goldfish RTC
-M: Alistair Francis <Alistair.Francis@wdc.com>
+M: Alistair Francis <alistair.francis@wdc.com>
L: qemu-riscv@nongnu.org
S: Maintained
F: hw/rtc/goldfish_rtc.c
@@ -1806,7 +1806,7 @@ F: tests/functional/ppc64/test_fadump.py
RISC-V Machines
---------------
OpenTitan
-M: Alistair Francis <Alistair.Francis@wdc.com>
+M: Alistair Francis <alistair.francis@wdc.com>
L: qemu-riscv@nongnu.org
S: Supported
F: hw/riscv/opentitan.c
@@ -1844,7 +1844,7 @@ F: include/hw/riscv/shakti_c.h
F: include/hw/char/shakti_uart.h
SiFive Machines
-M: Alistair Francis <Alistair.Francis@wdc.com>
+M: Alistair Francis <alistair.francis@wdc.com>
M: Palmer Dabbelt <palmer@dabbelt.com>
L: qemu-riscv@nongnu.org
S: Supported
@@ -4240,7 +4240,7 @@ F: hw/i386/amd_iommu*
F: tests/qtest/amd-iommu-test.c
OpenSBI Firmware
-M: Alistair Francis <Alistair.Francis@wdc.com>
+M: Alistair Francis <alistair.francis@wdc.com>
R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
L: qemu-riscv@nongnu.org
S: Supported
@@ -4341,7 +4341,7 @@ F: tcg/ppc64/
RISC-V TCG target
M: Palmer Dabbelt <palmer@dabbelt.com>
-M: Alistair Francis <Alistair.Francis@wdc.com>
+M: Alistair Francis <alistair.francis@wdc.com>
R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
L: qemu-riscv@nongnu.org
S: Maintained
diff --git a/.mailmap b/.mailmap
index bd8bf07feb7..c44990fd3d6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -80,6 +80,7 @@ Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> <arikalo@wavecomp.com>
Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> <aleksandar.rikalo@rt-rk.com>
Alex Williamson <alex@shazbot.org> <alex.williamson@redhat.com>
Alexander Graf <agraf@csgraf.de> <agraf@suse.de>
+Alistair Francis <alistair.francis@wdc.com> <Alistair.Francis@wdc.com>
Andrew Jones <andrew.jones@oss.qualcomm.com> <ajones@ventanamicro.com>
Andrew Jones <andrew.jones@oss.qualcomm.com> <drjones@redhat.com>
Ani Sinha <anisinha@redhat.com> <ani@anisinha.ca>
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 22/22] MAINTAINERS: update security reporting links
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (20 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair Alex Bennée
@ 2026-11-20 20:05 ` Alex Bennée
2026-11-23 9:50 ` Daniel P. Berrangé
2026-11-23 17:31 ` [PATCH 00/22] MAINTAINER updates and get_maintainer.py Pierrick Bouvier
22 siblings, 1 reply; 30+ messages in thread
From: Alex Bennée @ 2026-11-20 20:05 UTC (permalink / raw)
To: qemu-devel; +Cc: John Snow, Pierrick Bouvier, Alex Bennée, Cleber Rosa
We've updated the online pages but we should make sure MAINTAINERS
doesn't point people to the wrong place.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
MAINTAINERS | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 456d835ce70..c10cb0f2a0c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -82,9 +82,7 @@ F: docs/glossary.rst
Responsible Disclosure, Reporting Security Issues
-------------------------------------------------
-W: https://wiki.qemu.org/SecurityProcess
-M: Michael S. Tsirkin <mst@redhat.com>
-L: qemu-security@nongnu.org
+W: https://www.qemu.org/contribute/security-process/
Trivial patches
---------------
--
2.47.3
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 20/22] MAINTAINERS: make LIU's entries consistent
2026-11-20 20:05 ` [PATCH 20/22] MAINTAINERS: make LIU's entries consistent Alex Bennée
@ 2026-11-21 7:40 ` LIU Zhiwei
0 siblings, 0 replies; 30+ messages in thread
From: LIU Zhiwei @ 2026-11-21 7:40 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: John Snow, Pierrick Bouvier, Cleber Rosa
Hi Alex,
On 11/21/26 4:05 AM, Alex Bennée wrote:
> All the commits and s-o-b's use capitalised entries.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Thanks for fixing this!
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
> Cc: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
> ---
> MAINTAINERS | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c5d0b07aad3..5d1444ff661 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -367,7 +367,7 @@ M: Palmer Dabbelt <palmer@dabbelt.com>
> M: Alistair Francis <alistair.francis@wdc.com>
> R: Weiwei Li <liwei1518@gmail.com>
> R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
> -R: Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
> +R: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
> R: Chao Liu <chao.liu@processmission.com>
> L: qemu-riscv@nongnu.org
> S: Supported
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair
2026-11-20 20:05 ` [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair Alex Bennée
@ 2026-11-22 17:34 ` Philippe Mathieu-Daudé
2026-11-23 1:05 ` Alistair Francis
1 sibling, 0 replies; 30+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-11-22 17:34 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: John Snow, Pierrick Bouvier, Cleber Rosa, Alistair Francis
On 2026-11-20 21:05, Alex Bennée wrote:
> The last emails with capitalisation where in 2019, make it consistent.
> We can also tweak .mailmap so this sticks in history as well.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Alistair Francis <alistair.francis@wdc.com>
> ---
> MAINTAINERS | 10 +++++-----
> .mailmap | 1 +
> 2 files changed, 6 insertions(+), 5 deletions(-)
https://lore.kernel.org/qemu-devel/CAKmqyKPSewTC3dkzCaZRu26f0qoZhvnr_RXPNuH9SfgxNuVcLQ@mail.gmail.com/
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair
2026-11-20 20:05 ` [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair Alex Bennée
2026-11-22 17:34 ` Philippe Mathieu-Daudé
@ 2026-11-23 1:05 ` Alistair Francis
1 sibling, 0 replies; 30+ messages in thread
From: Alistair Francis @ 2026-11-23 1:05 UTC (permalink / raw)
To: alex.bennee@linaro.org, qemu-devel@nongnu.org
Cc: jsnow@redhat.com, pierrick.bouvier@oss.qualcomm.com,
crosa@redhat.com
On Fri, 2026-11-20 at 20:05 +0000, Alex Bennée wrote:
> The last emails with capitalisation where in 2019, make it
> consistent.
> We can also tweak .mailmap so this sticks in history as well.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> MAINTAINERS | 10 +++++-----
> .mailmap | 1 +
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 5d1444ff661..456d835ce70 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -878,7 +878,7 @@ F: tests/functional/arm/test_canona1100.py
> F: docs/system/arm/digic.rst
>
> Goldfish RTC
> -M: Alistair Francis <Alistair.Francis@wdc.com>
> +M: Alistair Francis <alistair.francis@wdc.com>
> L: qemu-riscv@nongnu.org
> S: Maintained
> F: hw/rtc/goldfish_rtc.c
> @@ -1806,7 +1806,7 @@ F: tests/functional/ppc64/test_fadump.py
> RISC-V Machines
> ---------------
> OpenTitan
> -M: Alistair Francis <Alistair.Francis@wdc.com>
> +M: Alistair Francis <alistair.francis@wdc.com>
> L: qemu-riscv@nongnu.org
> S: Supported
> F: hw/riscv/opentitan.c
> @@ -1844,7 +1844,7 @@ F: include/hw/riscv/shakti_c.h
> F: include/hw/char/shakti_uart.h
>
> SiFive Machines
> -M: Alistair Francis <Alistair.Francis@wdc.com>
> +M: Alistair Francis <alistair.francis@wdc.com>
> M: Palmer Dabbelt <palmer@dabbelt.com>
> L: qemu-riscv@nongnu.org
> S: Supported
> @@ -4240,7 +4240,7 @@ F: hw/i386/amd_iommu*
> F: tests/qtest/amd-iommu-test.c
>
> OpenSBI Firmware
> -M: Alistair Francis <Alistair.Francis@wdc.com>
> +M: Alistair Francis <alistair.francis@wdc.com>
> R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
> L: qemu-riscv@nongnu.org
> S: Supported
> @@ -4341,7 +4341,7 @@ F: tcg/ppc64/
>
> RISC-V TCG target
> M: Palmer Dabbelt <palmer@dabbelt.com>
> -M: Alistair Francis <Alistair.Francis@wdc.com>
> +M: Alistair Francis <alistair.francis@wdc.com>
> R: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
> L: qemu-riscv@nongnu.org
> S: Maintained
> diff --git a/.mailmap b/.mailmap
> index bd8bf07feb7..c44990fd3d6 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -80,6 +80,7 @@ Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
> <arikalo@wavecomp.com>
> Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
> <aleksandar.rikalo@rt-rk.com>
> Alex Williamson <alex@shazbot.org> <alex.williamson@redhat.com>
> Alexander Graf <agraf@csgraf.de> <agraf@suse.de>
> +Alistair Francis <alistair.francis@wdc.com>
> <Alistair.Francis@wdc.com>
> Andrew Jones <andrew.jones@oss.qualcomm.com>
> <ajones@ventanamicro.com>
> Andrew Jones <andrew.jones@oss.qualcomm.com> <drjones@redhat.com>
> Ani Sinha <anisinha@redhat.com> <ani@anisinha.ca>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 22/22] MAINTAINERS: update security reporting links
2026-11-20 20:05 ` [PATCH 22/22] MAINTAINERS: update security reporting links Alex Bennée
@ 2026-11-23 9:50 ` Daniel P. Berrangé
0 siblings, 0 replies; 30+ messages in thread
From: Daniel P. Berrangé @ 2026-11-23 9:50 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel, John Snow, Pierrick Bouvier, Cleber Rosa
On Fri, Nov 20, 2026 at 08:05:10PM +0000, Alex Bennée wrote:
> We've updated the online pages but we should make sure MAINTAINERS
> doesn't point people to the wrong place.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> MAINTAINERS | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
We should merge this one now, regardless of the rest of the status
of the rest series.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing
2026-11-20 20:04 ` [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing Alex Bennée
@ 2026-11-23 10:00 ` Daniel P. Berrangé
2026-12-01 14:05 ` Alex Bennée
0 siblings, 1 reply; 30+ messages in thread
From: Daniel P. Berrangé @ 2026-11-23 10:00 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel, John Snow, Pierrick Bouvier, Cleber Rosa
On Fri, Nov 20, 2026 at 08:04:49PM +0000, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v3
> - treat dir as valid as well (as git ls-files lists it)
> - move arg parse into own function (parse_args)
> - set files nargs as + for more flexibility
> - use python3
> ---
> scripts/get_maintainer.py | 49 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100755 scripts/get_maintainer.py
>
> diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
> new file mode 100755
> index 00000000000..47673a5013f
> --- /dev/null
> +++ b/scripts/get_maintainer.py
> @@ -0,0 +1,49 @@
> +#!/usr/bin/env python3
> +#
> +# get_maintainer.py: Print selected MAINTAINERS information
> +#
> +# usage: scripts/get_maintainer.py [OPTIONS] <patch>
> +# scripts/get_maintainer.py [OPTIONS] -f <file>
> +#
> +# (c) 2025, Alex Bennée <alex.bennee@linaro.org>
> +# based on get_maintainers.pl
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +from argparse import ArgumentParser, ArgumentTypeError
> +from os import path
This shouldn't be needed if you're intending to use pathlib.
> +from pathlib import Path
> +
> +
> +def valid_file_path(arg):
> + """
> + Checks if arg exists and is a regular file or raises ArgumentTypeError.
> + """
IIUC, if you add add "type=Path" to the group.add_argument() call in
parse_args, then you can assume 'arg' is a pathlib.Path and so....
> + if not path.exists(arg):
arg.exists()
> + raise ArgumentTypeError(f"File '{arg}' does not exist.")
> + if not path.isfile(arg) and not path.isdir(arg):
not arg.is_file() and not arg.is_dir()
> + raise ArgumentTypeError(f"Path '{arg}' is not a regular file.")
> + return Path(path.abspath(arg))
return arg.absolute()
> +
> +
> +def parse_args():
> + """
> + Create and parse the arguments.
> + """
> + parser = ArgumentParser(description='Extract maintainer information. ')
> +
> + # We can either specify patches or an individual file
> + group = parser.add_mutually_exclusive_group()
> + group.add_argument('patch', nargs='*', type=valid_file_path,
> + help='path to patch file')
Personally, I'd put the final positional args after all the option args
but that's a bit bikeshedding.
> + group.add_argument('-f', '--file', type=valid_file_path, nargs = "+",
> + help='path to source file(s)')
> + return parser.parse_args()
> +
> +def main():
> +
> + args = parse_args()
> +
> +if __name__ == '__main__':
> + main()
> --
> 2.47.3
>
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/22] MAINTAINER updates and get_maintainer.py
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
` (21 preceding siblings ...)
2026-11-20 20:05 ` [PATCH 22/22] MAINTAINERS: update security reporting links Alex Bennée
@ 2026-11-23 17:31 ` Pierrick Bouvier
22 siblings, 0 replies; 30+ messages in thread
From: Pierrick Bouvier @ 2026-11-23 17:31 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: John Snow, Cleber Rosa
On 11/20/2026 12:04 PM, Alex Bennée wrote:
> I continued to update my port of get_maintainers.py and it grew a few
> new options which I used in my recent talk. These are:
>
> --validate
> --list-maintainers
> --list-absent-maintainers-since
>
> I also added the git and roles flags for compatibility with the way
> the perl script is invoked by the git's cccmd.
>
> There is now an ancillary script to plot maintainer experience so we
> can see the distribution of experience in our maintainer pool.
>
> On the way I found more inconsistencies in MAINTAINERS so I cleaned
> those up while I was at it.
>
> Alex.
>
> Alex Bennée (22):
> scripts/get_maintainer.py: minimal argument parsing
> scripts/get_maintainer.py: resolve the source path
> scripts/get_maintainer.py: initial parsing of MAINTAINERS
> scripts/get_maintainer.py: add support for -f
> scripts/get_maintainer.py: add support reading patch files
> scripts/get_maintainer.py: add keyword (K:) support
> scripts/get_maintainer.py: implement basic git fallback support
> scripts/get_maintainer.py: add --list-[maintained|reviewed]-by
> scripts/get_maintainer.py: add --file-summary option
> scripts/get_maintainer.py: optimise glob matching with Paths
> scripts/get_maintainer.py: add support for gitlab handles
> scripts/get_maintainer.py: implement --noroles/--norolestats
> scripts/get_maintainer.py: expand --validate output to CSV summary
> scripts/get_maintainer.py: add --list-maintainers
> scripts/get_maintainer.py: add --list-absent-maintainers-since
> scripts/maintainer: add plot-maintainer-experience.py
> gitlab: add a check-maintainers task
> MAINTAINERS: update Daniel's entries to be consistent
> MAINTAINERS: make Collin's entries consistent with .mailmap
> MAINTAINERS: make LIU's entries consistent
> MAINTAINERS: use consistent capitalisation for Alistair
> MAINTAINERS: update security reporting links
>
> MAINTAINERS | 48 +-
> .gitlab-ci.d/static_checks.yml | 9 +
> .mailmap | 1 +
> scripts/get_maintainer.py | 886 ++++++++++++++++++
> .../maintainers/plot-maintainer-experience.py | 163 ++++
> 5 files changed, 1082 insertions(+), 25 deletions(-)
> create mode 100755 scripts/get_maintainer.py
> create mode 100755 scripts/maintainers/plot-maintainer-experience.py
>
Overall it looks like a nice addition.
I didn't go through all the details of each option, not sure it matters
too much as it's new code anyway.
At least the fixes on Maintainers should ideally be fixed on this
release cycle.
Regards,
Pierrick
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing
2026-11-23 10:00 ` Daniel P. Berrangé
@ 2026-12-01 14:05 ` Alex Bennée
0 siblings, 0 replies; 30+ messages in thread
From: Alex Bennée @ 2026-12-01 14:05 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: qemu-devel, John Snow, Pierrick Bouvier, Cleber Rosa
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Fri, Nov 20, 2026 at 08:04:49PM +0000, Alex Bennée wrote:
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>
>> ---
>> v3
>> - treat dir as valid as well (as git ls-files lists it)
>> - move arg parse into own function (parse_args)
>> - set files nargs as + for more flexibility
>> - use python3
>> ---
>> scripts/get_maintainer.py | 49 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 49 insertions(+)
>> create mode 100755 scripts/get_maintainer.py
>>
>> diff --git a/scripts/get_maintainer.py b/scripts/get_maintainer.py
>> new file mode 100755
>> index 00000000000..47673a5013f
>> --- /dev/null
>> +++ b/scripts/get_maintainer.py
>> @@ -0,0 +1,49 @@
>> +#!/usr/bin/env python3
>> +#
>> +# get_maintainer.py: Print selected MAINTAINERS information
>> +#
>> +# usage: scripts/get_maintainer.py [OPTIONS] <patch>
>> +# scripts/get_maintainer.py [OPTIONS] -f <file>
>> +#
>> +# (c) 2025, Alex Bennée <alex.bennee@linaro.org>
>> +# based on get_maintainers.pl
>> +#
>> +# SPDX-License-Identifier: GPL-2.0-or-later
>> +
>> +from argparse import ArgumentParser, ArgumentTypeError
>> +from os import path
>
> This shouldn't be needed if you're intending to use pathlib.
>
>> +from pathlib import Path
>> +
>> +
>> +def valid_file_path(arg):
>> + """
>> + Checks if arg exists and is a regular file or raises ArgumentTypeError.
>> + """
>
> IIUC, if you add add "type=Path" to the group.add_argument() call in
> parse_args, then you can assume 'arg' is a pathlib.Path and so....
ahh but then I can't validate it with the function ;-)
I was kinda hoping that type=Path would automatically fail at arg
parsing so I didn't need to be defensive later on in the code. However I
couldn't figure it out hence the valid_file_path hack.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2026-12-01 14:05 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 20:04 [PATCH 00/22] MAINTAINER updates and get_maintainer.py Alex Bennée
2026-11-20 20:04 ` [PATCH 01/22] scripts/get_maintainer.py: minimal argument parsing Alex Bennée
2026-11-23 10:00 ` Daniel P. Berrangé
2026-12-01 14:05 ` Alex Bennée
2026-11-20 20:04 ` [PATCH 02/22] scripts/get_maintainer.py: resolve the source path Alex Bennée
2026-11-20 20:04 ` [PATCH 03/22] scripts/get_maintainer.py: initial parsing of MAINTAINERS Alex Bennée
2026-11-20 20:04 ` [PATCH 04/22] scripts/get_maintainer.py: add support for -f Alex Bennée
2026-11-20 20:04 ` [PATCH 05/22] scripts/get_maintainer.py: add support reading patch files Alex Bennée
2026-11-20 20:04 ` [PATCH 06/22] scripts/get_maintainer.py: add keyword (K:) support Alex Bennée
2026-11-20 20:04 ` [PATCH 07/22] scripts/get_maintainer.py: implement basic git fallback support Alex Bennée
2026-11-20 20:04 ` [PATCH 08/22] scripts/get_maintainer.py: add --list-[maintained|reviewed]-by Alex Bennée
2026-11-20 20:04 ` [PATCH 09/22] scripts/get_maintainer.py: add --file-summary option Alex Bennée
2026-11-20 20:04 ` [PATCH 10/22] scripts/get_maintainer.py: optimise glob matching with Paths Alex Bennée
2026-11-20 20:04 ` [PATCH 11/22] scripts/get_maintainer.py: add support for gitlab handles Alex Bennée
2026-11-20 20:05 ` [PATCH 12/22] scripts/get_maintainer.py: implement --noroles/--norolestats Alex Bennée
2026-11-20 20:05 ` [PATCH 13/22] scripts/get_maintainer.py: expand --validate output to CSV summary Alex Bennée
2026-11-20 20:05 ` [PATCH 14/22] scripts/get_maintainer.py: add --list-maintainers Alex Bennée
2026-11-20 20:05 ` [PATCH 15/22] scripts/get_maintainer.py: add --list-absent-maintainers-since Alex Bennée
2026-11-20 20:05 ` [PATCH 16/22] scripts/maintainer: add plot-maintainer-experience.py Alex Bennée
2026-11-20 20:05 ` [PATCH 17/22] gitlab: add a check-maintainers task Alex Bennée
2026-11-20 20:05 ` [PATCH 18/22] MAINTAINERS: update Daniel's entries to be consistent Alex Bennée
2026-11-20 20:05 ` [PATCH 19/22] MAINTAINERS: make Collin's entries consistent with .mailmap Alex Bennée
2026-11-20 20:05 ` [PATCH 20/22] MAINTAINERS: make LIU's entries consistent Alex Bennée
2026-11-21 7:40 ` LIU Zhiwei
2026-11-20 20:05 ` [PATCH 21/22] MAINTAINERS: use consistent capitalisation for Alistair Alex Bennée
2026-11-22 17:34 ` Philippe Mathieu-Daudé
2026-11-23 1:05 ` Alistair Francis
2026-11-20 20:05 ` [PATCH 22/22] MAINTAINERS: update security reporting links Alex Bennée
2026-11-23 9:50 ` Daniel P. Berrangé
2026-11-23 17:31 ` [PATCH 00/22] MAINTAINER updates and get_maintainer.py Pierrick Bouvier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.