#!/usr/bin/perl $ENV{LC_ALL} = 'C'; use strict; use sort 'stable'; my @rpms = @ARGV ? @ARGV : <>; foreach my $f (@rpms) { chomp $f; ($f) = <$f*>; -e $f or next; my $changelog = `rpm -qp --changelog $f`; my $pkg = `rpm -qp --qf '%{NAME}' $f`; my @lines = split /[\r\n]+/, $changelog; my %maintainers; foreach my $line (@lines) { $line =~ /^\*\s+\w+\s+\w+\s+\d+\s+\d+\s+.*?<([\w-.]+).*alt/ and $maintainers{$1}++; } print "$pkg - " . join(", " => map {"$_ ($maintainers{$_})"} reverse sort {$maintainers{$a} <=> $maintainers{$b}} reverse sort keys %maintainers) . "\n"; }