[PATCHSCRIPT] MAINTAINERS: sort and merge P and M fields

Previous thread: [GIT]: Networking by David Miller on Monday, September 8, 2008 - 2:32 pm. (1 message)

Next thread: Scsi Disk - Removable media problems by Mark Hounschell on Monday, September 8, 2008 - 3:12 pm. (1 message)
From: Uwe
Date: Monday, September 8, 2008 - 3:11 pm

Hello Linus,

some time ago I sent two patch scripts to LKML that changed the
MAINTAINERS file.  One fixed the alphabetic ordering and another merged
the P and M fields to ease copy'n'paste.

See
	http://thread.gmane.org/gmane.linux.kernel/702194
for the details.

I still like both changes, but I think it's not sensible to send you the
resulting patches because MAINTAINERS changes frequently.

If you like these two changes, too, I would be happy if you run the
attached script in your working copy.  It simply wraps the two scripts
and commits the changes.

Note that you need to apply the patch below before the scripts will
work.  And note further that the script expects a clean working copy to
start with, because it uses git commit -a.

Best regards
Uwe

---->8----
From: Uwe Kleine-K
From: Randy Dunlap
Date: Monday, September 8, 2008 - 3:19 pm

I like it.  Thanks.

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
--

From: Uwe
Date: Tuesday, September 9, 2008 - 12:49 pm

Hello Linus,

I see you applied this patch but not the two patches from my script.
Does this mean you consider this is not the right time for the latter
two patches?  If so should I trigger you again later?  When?  Or didn't
you find time to look at the script?

thanks and best regards
Uwe
--

From: Paul Bolle
Date: Tuesday, September 9, 2008 - 4:37 pm

If the MAINTAINERS file in the repository mentioned in that thread
(http://www.modarm9.com/git/people/ukleinek/linux-2.6.git?a=shortlog;h=refs/heads/maint...) is the result of the current script, you need to clean up some of the results of merging the P and M fields (false positives not removed):
$ grep "P:.*," MAINTAINERS 
P:	Cirrus Logic Corporation (kernel 2.2 driver) <Cirrus Logic
Corporation, Thomas Woller <twoller@crystal.cirrus.com>>
P:	Hans Verkuil, Andy Walls <hverkuil@xs4all.nl, awalls@radix.net>
P:	Digi International, Inc <Eng.Linux@digi.com>
P:	Mike Halcrow, Phillip Hellewell <mhalcrow@us.ibm.com,
phillip@hellewell.homeip.net>
P:	Christopher Hoover <ch@murgatroid.com, ch@hpl.hp.com>
P:	Stephen Tweedie, Andrew Morton <sct@redhat.com,
akpm@linux-foundation.org, adilger@sun.com>
P:	Stephen Tweedie, Andrew Morton <sct@redhat.com,
akpm@linux-foundation.org, adilger@sun.com>
P:	Kristian Hoegsberg, Stefan Richter <krh@redhat.com,
stefanr@s5r6.in-berlin.de>
P:	Jean Delvare (PC drivers, core) <khali@linux-fr.org>
P:	Stephen Tweedie, Andrew Morton <sct@redhat.com,
akpm@linux-foundation.org>
P:	Wong Hoi Sing, Edison <hswong3i@gmail.com>
P:	Hung Hing Lun, Mike <hlhung3i@gmail.com>
P:	Carlos Aguiar, Anderson Briglia and Syed Khasim
<linux-omap-open-source@linux.omap.com (subscribers only)>

Regards,


Paul Bolle

--

From: Uwe
Date: Wednesday, September 10, 2008 - 12:32 pm

Hi Paul,

No, it's not current, but your concerns are valid anyhow.

I updated my script to handle some of these entries, and I fixed the
others (and some more) by extra patches.

Now the URL above shows the current result again.

I will post the extra patches as a reply to this mail.

Thanks,
Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=12+divided+by+3
--

From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

replace the (anyhow obvious) company name by Thomas' realname and remove
Nils' realname from his M field which is already in the corresponding P
field.

The old entry broke my script to merge the P and M fields.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: Thomas Woller <twoller@crystal.cirrus.com>
Cc: Nils Faerber <nils@kernelconcepts.de>
---
 MAINTAINERS |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 186be3b..fdea0d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1113,10 +1113,10 @@ L:	alsa-devel@alsa-project.org
 S:	Supported
 
 CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
-P:	Cirrus Logic Corporation (kernel 2.2 driver)
-M:	Cirrus Logic Corporation, Thomas Woller <twoller@crystal.cirrus.com>
+P:	Thomas Woller (kernel 2.2 driver)
+M:	twoller@crystal.cirrus.com
 P:	Nils Faerber (port to kernel 2.4)
-M:	Nils Faerber <nils@kernelconcepts.de>
+M:	nils@kernelconcepts.de
 S:	Maintained
 
 CODA FILE SYSTEM
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

Without it my script to merge the P and M fields fails to assign the two
realnames to the three email addresses.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: Andreas Dilger <adilger@sun.com>
---
 MAINTAINERS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index fdea0d3..6b2ea6e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1635,13 +1635,13 @@ L:	linux-ext4@vger.kernel.org
 S:	Maintained
 
 EXT3 FILE SYSTEM
-P:	Stephen Tweedie, Andrew Morton
+P:	Stephen Tweedie, Andrew Morton, Andreas Dilger
 M:	sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
 L:	linux-ext4@vger.kernel.org
 S:	Maintained
 
 EXT4 FILE SYSTEM
-P:	Stephen Tweedie, Andrew Morton
+P:	Stephen Tweedie, Andrew Morton, Andreas Dilger
 M:	sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
 L:	linux-ext4@vger.kernel.org
 S:	Maintained
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

One of the next commit merges P and M fields.  So the real name is only
needed once.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
 MAINTAINERS |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6b2ea6e..19fa2d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -335,7 +335,7 @@ S:	Maintained
 
 AHA152X SCSI DRIVER
 P:	Juergen E. Fischer
-M:	Juergen Fischer <fischer@norbit.de>
+M:	fischer@norbit.de
 L:	linux-scsi@vger.kernel.org
 S:	Maintained
 
@@ -2064,14 +2064,14 @@ S:	Maintained
 
 IDE/ATAPI FLOPPY DRIVERS
 P:	Paul Bristow
-M:	Paul Bristow <paul@paulbristow.net>
+M:	paul@paulbristow.net
 W:	http://paulbristow.net/linux/idefloppy.html
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
 IDE/ATAPI TAPE DRIVERS
 P:	Gadi Oxman
-M:	Gadi Oxman <gadio@netvision.net.il>
+M:	gadio@netvision.net.il
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

... otherwise my script to merge P and M fields has not chance to do its
job.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
 MAINTAINERS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 19fa2d5..5ad6e50 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1510,8 +1510,8 @@ S:	Supported
 
 EDAC-E752X
 P:	Mark Gross
-P:	Doug Thompson
 M:	mark.gross@intel.com
+P:	Doug Thompson
 M:	dougthompson@xmission.com
 L:	bluesmoke-devel@lists.sourceforge.net
 W:	bluesmoke.sourceforge.net
@@ -1547,8 +1547,8 @@ S:	Maintained
 
 EDAC-I82975X
 P:	Ranganathan Desikan
-P:	Arvind R.
 M:	rdesikan@jetzbroadband.com
+P:	Arvind R.
 M:	arvind@acarlab.com
 L:	bluesmoke-devel@lists.sourceforge.net
 W:	bluesmoke.sourceforge.net
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

This change was done using the following Python script:

	#! /usr/bin/env python

	import locale
	import re
	import sys
	import tempfile

	locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')

	re_start = re.compile('P:')
	re_topic = re.compile('[0-9a-zA-Z][^:]')
	# F is undefined but used
	re_field = re.compile('[PMLWTSF]:')
	re_empty = re.compile('\s*$')

	prologue = True
	current_topic = None
	topic = dict()
	fixed_maintainers = tempfile.TemporaryFile()

	for line in open('MAINTAINERS'):
	    if prologue:
	        print >> fixed_maintainers, line,
	        mo = re_start.match(line)
	        if mo:
	            prologue = False

	        continue

	    mo = re_topic.match(line)
	    if mo:
	        current_topic = line
	        if topic.has_key(current_topic):
	            sys.exit(1)
	        topic[current_topic] = list()
	        continue

	    elif current_topic is None:
	        # rest of prologue
	        print >> fixed_maintainers, line,

	        continue

	    assert not current_topic is None

	    mo = re_field.match(line)
	    if mo:
	        topic[current_topic].append(line)

	    else:
	        mo = re_empty.match(line)
	        if not mo:
	            print >> sys.stderr, 'tralala', current_topic, repr(line)
	            sys.exit(1)

	first = True

	the_rest = 'THE REST\n'
	have_the_rest = False

	# sort case insensitive
	for t, body in sorted(topic.iteritems(), key=lambda i: i[0].upper()):
	    if t == the_rest:
	        have_the_rest = True
	        continue

	    if first:
	        first = False
	    else:
	        print >> fixed_maintainers

	    print >> fixed_maintainers, t,
	    for line in body:
	        print >> fixed_maintainers, line,

	if have_the_rest:
	    print >> fixed_maintainers

	    print >> fixed_maintainers, the_rest,
	    for line in topic[the_rest]:
	        print >> fixed_maintainers, line,

	fixed_maintainers.seek(0)

	maintainers = open('MAINTAINERS', 'w')
	for line in ...
From: Uwe Kleine-König
Date: Wednesday, September 10, 2008 - 12:51 pm

This was suggested by Sam Ravnborg and done using the following
Python script:

	#! /usr/bin/env python

	import locale
	import re
	import sys
	import tempfile

	locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')

	re_person = re.compile(r'P:(\s*)(.*)')
	re_mail = re.compile(r'M:\s*(.*)')

	fixed_maintainers = tempfile.TemporaryFile()

	current_persons = None
	current_persons_used = False

	for lineno, line in enumerate(open('MAINTAINERS')):
	    mo = re_person.match(line)
	    if mo:
	        if current_persons and not current_persons_used:
	            print >> fixed_maintainers, 'P:%s%s' % (current_persons_intend, ', '.join(current_persons))

	        current_persons = re.split(r',\s*', mo.group(2))
	        current_persons_intend = mo.group(1)
	        current_persons_used = False
	        continue

	    mo = re_mail.match(line)
	    if mo:
	        if current_persons is None:
	            print 'mail without person at line %d' % (lineno + 1)
	            sys.exit(1)

	        mail = re.split(r',\s*', mo.group(1))

	        if mail == ['Mail patches to']:
	            mail = ['p.e@rs.on']

	        if len(mail) != len(current_persons):
	            if len(mail) == 1:
	                current_persons = ['%s' % ', '.join(current_persons)]
	            elif len(current_persons) == 1:
	                current_persons = len(mail) * current_persons
	            else:
	                print 'number of persons doesn\'t match number of mail addresses at line %d' % (lineno + 1)
	                sys.exit(1)

	        print >> fixed_maintainers, 'P:%s' % current_persons_intend + ', '.join('%s <%s>' % pm for pm in zip(current_persons, mail))
	        current_persons_used = True

	    else:
	        if current_persons and not current_persons_used:
	            # either there is no mail address or the entry is already correct
	            print >> fixed_maintainers, 'P:%s%s' % (current_persons_intend, ', '.join(current_persons))

	        current_persons = None
	   ...
From: Uwe
Date: Wednesday, September 10, 2008 - 12:57 pm

Hello,

Note, for Thomas' address I get a "permanent fatal error":

	reason: 550 5.0.0 <twoller@crystal.cirrus.com>... Mailbox disabled for this username

The entry looks outdated anyhow ("kernel 2.2 driver").  Should I simply
delete it.  The other hunk can/should move to the patch "MAINTAINERS:
remove real names from M fields" anyhow ...

Best regards
Uwe

-- 
Uwe Kleine-König

http://www.google.com/search?q=speed+of+light%3D
--

From: Nils Faerber
Date: Wednesday, September 10, 2008 - 2:10 pm

Hi!
Thanks, I am fine with this change too.

Cheers
  nils




-- 
kernel concepts GbR      Tel: +49-271-771091-12
Sieghuetter Hauptweg 48  Fax: +49-271-771091-19
D-57072 Siegen           Mob: +49-176-21024535
http://www.kernelconcepts.de
--

From: Uwe
Date: Friday, September 12, 2008 - 2:58 am

Hello,

here comes a new version of my MAINTAINERS cleanup series.

I made the following changes since last time:

 - remove one P/M entry for CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
   that refers to kernel 2.2 and has a failing email address.

 - move the removing of Nils' realname to the commit where the same
   change is done for some other people.

The resulting shortlog and diffstat are below.

I updated my branch at

	git://www.modarm9.com/gitsrc/pub/people/ukleinek/linux-2.6.git maintainers

with the current patches and will send them as a reply to this mail.

On top of these fixing the alphabetical ordering and merging P and M
fields with my script is possible.  (The branch above has the change,
but I will not send the resulting patches because they are too big.)

Best regards
Uwe

Uwe Kleine-König (4):
      MAINTAINERS: Remove a stale entry refering to kernel 2.2
      MAINTAINERS: add a realname for adilger@sun.com
      MAINTAINERS: remove real names from M fields
      MAINTAINERS: put corresponding realnames and mail addresses together

 MAINTAINERS |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

-- 
Uwe Kleine-König

dd if=/proc/self/exe bs=1 skip=1 count=3 2>/dev/null
--

From: Uwe Kleine-König
Date: Friday, September 12, 2008 - 3:00 am

Moreover sending an email to twoller@crystal.cirrus.com results in a
"permanent fatal error" (reason: 550 5.0.0
<twoller@crystal.cirrus.com>... Mailbox disabled for this username)

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
 MAINTAINERS |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 186be3b..dc4107a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1113,8 +1113,6 @@ L:	alsa-devel@alsa-project.org
 S:	Supported
 
 CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
-P:	Cirrus Logic Corporation (kernel 2.2 driver)
-M:	Cirrus Logic Corporation, Thomas Woller <twoller@crystal.cirrus.com>
 P:	Nils Faerber (port to kernel 2.4)
 M:	Nils Faerber <nils@kernelconcepts.de>
 S:	Maintained
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Friday, September 12, 2008 - 3:00 am

Without it my script to merge the P and M fields fails to assign the two
realnames to the three email addresses.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: Andreas Dilger <adilger@sun.com>
---
 MAINTAINERS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index dc4107a..cd46667 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1633,13 +1633,13 @@ L:	linux-ext4@vger.kernel.org
 S:	Maintained
 
 EXT3 FILE SYSTEM
-P:	Stephen Tweedie, Andrew Morton
+P:	Stephen Tweedie, Andrew Morton, Andreas Dilger
 M:	sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
 L:	linux-ext4@vger.kernel.org
 S:	Maintained
 
 EXT4 FILE SYSTEM
-P:	Stephen Tweedie, Andrew Morton
+P:	Stephen Tweedie, Andrew Morton, Andreas Dilger
 M:	sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
 L:	linux-ext4@vger.kernel.org
 S:	Maintained
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Friday, September 12, 2008 - 3:00 am

One of the next commit merges P and M fields.  So the real name is only
needed once.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
 MAINTAINERS |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index cd46667..a4932fd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -335,7 +335,7 @@ S:	Maintained
 
 AHA152X SCSI DRIVER
 P:	Juergen E. Fischer
-M:	Juergen Fischer <fischer@norbit.de>
+M:	fischer@norbit.de
 L:	linux-scsi@vger.kernel.org
 S:	Maintained
 
@@ -1114,7 +1114,7 @@ S:	Supported
 
 CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
 P:	Nils Faerber (port to kernel 2.4)
-M:	Nils Faerber <nils@kernelconcepts.de>
+M:	nils@kernelconcepts.de
 S:	Maintained
 
 CODA FILE SYSTEM
@@ -2062,14 +2062,14 @@ S:	Maintained
 
 IDE/ATAPI FLOPPY DRIVERS
 P:	Paul Bristow
-M:	Paul Bristow <paul@paulbristow.net>
+M:	paul@paulbristow.net
 W:	http://paulbristow.net/linux/idefloppy.html
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
 IDE/ATAPI TAPE DRIVERS
 P:	Gadi Oxman
-M:	Gadi Oxman <gadio@netvision.net.il>
+M:	gadio@netvision.net.il
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
-- 
1.5.6.5

--

From: Uwe Kleine-König
Date: Friday, September 12, 2008 - 3:00 am

... otherwise my script to merge P and M fields has not chance to do its
job.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
---
 MAINTAINERS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index a4932fd..29f77fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1508,8 +1508,8 @@ S:	Supported
 
 EDAC-E752X
 P:	Mark Gross
-P:	Doug Thompson
 M:	mark.gross@intel.com
+P:	Doug Thompson
 M:	dougthompson@xmission.com
 L:	bluesmoke-devel@lists.sourceforge.net
 W:	bluesmoke.sourceforge.net
@@ -1545,8 +1545,8 @@ S:	Maintained
 
 EDAC-I82975X
 P:	Ranganathan Desikan
-P:	Arvind R.
 M:	rdesikan@jetzbroadband.com
+P:	Arvind R.
 M:	arvind@acarlab.com
 L:	bluesmoke-devel@lists.sourceforge.net
 W:	bluesmoke.sourceforge.net
-- 
1.5.6.5

--

From: Uwe
Date: Monday, September 22, 2008 - 2:39 am

Hello,

I resend the last version of my MAINTAINERS cleanup series because I
didn't get any feedback last time but still consider it valuable.

It it freshly rebased on top of v2.6.27-rc7 and available on

	git://git.breakpoint.cc/ukleinek/linux-2.6 maintainers

an has the following changes listed below.  The first four commits were
done to allow merging P and M fields with the help of a script (i.e. the
sixth commit).  The remaining patch restores the alphabetic ordering in
the file (scripted).

If you fear merge conflicts or simply that new entries that don't follow the
new format, I can do a MAINTAINERS maintainership and sort out the
conflicts.

Best regards
Uwe

Uwe Kleine-König (6):
      MAINTAINERS: Remove a stale entry refering to kernel 2.2
      MAINTAINERS: add a realname for adilger@sun.com
      MAINTAINERS: remove real names from M fields
      MAINTAINERS: put corresponding realnames and mail addresses together
      MAINTAINERS: fix alphabetic ordering
      MAINTAINERS: merge P and M fields to ease copy'n'paste

 MAINTAINERS | 3130 ++++++++++++++++++++++-------------------------------------
 1 files changed, 1176 insertions(+), 1954 deletions(-)
--

Previous thread: [GIT]: Networking by David Miller on Monday, September 8, 2008 - 2:32 pm. (1 message)

Next thread: Scsi Disk - Removable media problems by Mark Hounschell on Monday, September 8, 2008 - 3:12 pm. (1 message)