Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

get_maintainer: add --substatus for reporting subsystem status

Patch series "get_maintainer: report subsystem status separately", v2.

The subsystem status (S: field) can inform a patch submitter if the
subsystem is well maintained or e.g. maintainers are missing. In
get_maintainer, it is currently reported with --role(stats) by adjusting
the maintainer role for any status different from Maintained. This has
two downsides:

- if a subsystem has only reviewers or mailing lists and no maintainers,
the status is not reported. For example Orphan subsystems typically
have no maintainers so there's nobody to report as orphan minder.

- the Supported status means that someone is paid for maintaining, but
it is reported as "supporter" for all the maintainers, which can be
incorrect (only some of them may be paid). People (including myself)
have been also confused about what "supporter" means.

The second point has been brought up in 2022 and the discussion in the end
resulted in adjusting documentation only [1]. I however agree with Ted's
points that it's misleading to take the subsystem status and apply it to
all maintainers [2].

The attempt to modify get_maintainer output was retracted after Joe
objected that the status becomes not reported at all [3]. This series
addresses that concern by reporting the status (unless it's the most
common Maintained one) on separate lines that follow the reported emails,
using a new --substatus parameter. Care is taken to reduce the noise to
minimum by not reporting the most common Maintained status, by default
require no opt-in that would need the users to discover the new parameter,
and at the same time not to break existing git --cc-cmd usage.

[1] https://lore.kernel.org/all/20221006162413.858527-1-bryan.odonoghue@linaro.org/
[2] https://lore.kernel.org/all/Yzen4X1Na0MKXHs9@mit.edu/
[3] https://lore.kernel.org/all/30776fe75061951777da8fa6618ae89bea7a8ce4.camel@perches.com/


This patch (of 2):

The subsystem status is currently reported with --role(stats) by adjusting
the maintainer role for any status different from Maintained. This has
two downsides:

- if a subsystem has only reviewers or mailing lists and no maintainers,
the status is not reported (i.e. typically, Orphan subsystems have no
maintainers)

- the Supported status means that someone is paid for maintaining, but
it is reported as "supporter" for all the maintainers, which can be
incorrect. People have been also confused about what "supporter"
means.

This patch introduces a new --substatus option and functionality aimed to
report the subsystem status separately, without adjusting the reported
maintainer role. After the e-mails are output, the status of subsystems
will follow, for example:

...
linux-kernel@vger.kernel.org (open list:LIBRARY CODE)
LIBRARY CODE status: Supported

In order to allow replacing the role rewriting seamlessly, the new
option works as follows:

- it is automatically enabled when --email and --role are enabled
(the defaults include --email and --rolestats which implies --role)

- usages with --norolestats e.g. for git's --cc-cmd will thus need no
adjustments

- the most common Maintained status is not reported at all, to reduce
unnecessary noise

- THE REST catch-all section (contains lkml) status is not reported

- the existing --subsystem and --status options are unaffected so their
users will need no adjustments

[vbabka@suse.cz: require that script output goes to a terminal]
Link: https://lkml.kernel.org/r/66c2bf7a-9119-4850-b6b8-ac8f426966e1@suse.cz
Link: https://lkml.kernel.org/r/20250203-b4-get_maintainer-v2-0-83ba008b491f@suse.cz
Link: https://lkml.kernel.org/r/20250203-b4-get_maintainer-v2-1-83ba008b491f@suse.cz
Fixes: c1565b6f7b53 ("get_maintainer: add --substatus for reporting subsystem status")
Closes: https://lore.kernel.org/all/7aodxv46lj6rthjo4i5zhhx2lybrhb4uknpej2dyz3e7im5w3w@w23bz6fx3jnn/
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Uwe Kleine-K=F6nig <u.kleine-koenig@baylibre.com>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Joe Perches <joe@perches.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Thorsten Leemhuis <linux@leemhuis.info>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Vlastimil Babka and committed by
Andrew Morton
9ad18c85 e3185ee4

+25 -3
+25 -3
scripts/get_maintainer.pl
··· 50 50 my $output_separator = ", "; 51 51 my $output_roles = 0; 52 52 my $output_rolestats = 1; 53 + my $output_substatus = undef; 53 54 my $output_section_maxlen = 50; 54 55 my $scm = 0; 55 56 my $tree = 1; ··· 270 269 'separator=s' => \$output_separator, 271 270 'subsystem!' => \$subsystem, 272 271 'status!' => \$status, 272 + 'substatus!' => \$output_substatus, 273 273 'scm!' => \$scm, 274 274 'tree!' => \$tree, 275 275 'web!' => \$web, ··· 315 313 $output_multiline = 0 if ($output_separator ne ", "); 316 314 $output_rolestats = 1 if ($interactive); 317 315 $output_roles = 1 if ($output_rolestats); 316 + 317 + if (!defined $output_substatus) { 318 + $output_substatus = $email && $output_roles && -t STDOUT; 319 + } 318 320 319 321 if ($sections || $letters ne "") { 320 322 $sections = 1; ··· 643 637 my @bug = (); 644 638 my @subsystem = (); 645 639 my @status = (); 640 + my @substatus = (); 646 641 my %deduplicate_name_hash = (); 647 642 my %deduplicate_address_hash = (); 648 643 ··· 656 649 if ($scm) { 657 650 @scm = uniq(@scm); 658 651 output(@scm); 652 + } 653 + 654 + if ($output_substatus) { 655 + @substatus = uniq(@substatus); 656 + output(@substatus); 659 657 } 660 658 661 659 if ($status) { ··· 871 859 @bug = (); 872 860 @subsystem = (); 873 861 @status = (); 862 + @substatus = (); 874 863 %deduplicate_name_hash = (); 875 864 %deduplicate_address_hash = (); 876 865 if ($email_git_all_signature_types) { ··· 1086 1073 --remove-duplicates => minimize duplicate email names/addresses 1087 1074 --roles => show roles (status:subsystem, git-signer, list, etc...) 1088 1075 --rolestats => show roles and statistics (commits/total_commits, %) 1076 + --substatus => show subsystem status if not Maintained (default: match --roles when output is tty)" 1089 1077 --file-emails => add email addresses found in -f file (default: 0 (off)) 1090 1078 --fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on)) 1091 1079 --scm => print SCM tree(s) if any ··· 1349 1335 my $start = find_starting_index($index); 1350 1336 my $end = find_ending_index($index); 1351 1337 1352 - push(@subsystem, $typevalue[$start]); 1338 + my $subsystem = $typevalue[$start]; 1339 + push(@subsystem, $subsystem); 1340 + my $status = "Unknown"; 1353 1341 1354 1342 for ($i = $start + 1; $i < $end; $i++) { 1355 1343 my $tv = $typevalue[$i]; ··· 1402 1386 } 1403 1387 } elsif ($ptype eq "R") { 1404 1388 if ($email_reviewer) { 1405 - my $subsystem = get_subsystem_name($i); 1406 - push_email_addresses($pvalue, "reviewer:$subsystem" . $suffix); 1389 + my $subs = get_subsystem_name($i); 1390 + push_email_addresses($pvalue, "reviewer:$subs" . $suffix); 1407 1391 } 1408 1392 } elsif ($ptype eq "T") { 1409 1393 push(@scm, $pvalue . $suffix); ··· 1413 1397 push(@bug, $pvalue . $suffix); 1414 1398 } elsif ($ptype eq "S") { 1415 1399 push(@status, $pvalue . $suffix); 1400 + $status = $pvalue; 1416 1401 } 1417 1402 } 1403 + } 1404 + 1405 + if ($subsystem ne "THE REST" and $status ne "Maintained") { 1406 + push(@substatus, $subsystem . " status: " . $status . $suffix) 1418 1407 } 1419 1408 } 1420 1409 ··· 1924 1903 $done = 1; 1925 1904 $output_rolestats = 0; 1926 1905 $output_roles = 0; 1906 + $output_substatus = 0; 1927 1907 last; 1928 1908 } elsif ($nr =~ /^\d+$/ && $nr > 0 && $nr <= $count) { 1929 1909 $selected{$nr - 1} = !$selected{$nr - 1};