[PATCH] maint: don't distribute an empty AUTHORS file

Jim Meyering jim at meyering.net
Wed Nov 9 20:44:00 UTC 2011


FYI, this addresses a minor warning from rpmlint: our AUTHORS
file was empty.  Now, it might actually be useful.
I've added a syntax-check rule to ensure that we keep it up to date.
This new .mailmap file is git's way of allowing to canonicalize names
and email addresses that appear in commit logs.

>From 787661cb6bdf98883ea3ec00166dc888ad4f7c8b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Wed, 9 Nov 2011 16:30:48 +0100
Subject: [PATCH] maint: don't distribute an empty AUTHORS file

* AUTHORS: Give it some content.
* cfg.mk (sc_check_author_list): Add a syntax-check rule (from libvirt)
to ensure that we keep the AUTHORS file up to date.
* .mailmap: New file.
---
 .mailmap |    5 +++++
 AUTHORS  |   14 ++++++++++++++
 cfg.mk   |   14 ++++++++++++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 .mailmap

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..d06e9b2
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,5 @@
+<meyering at redhat.com> <jim at meyering.net>
+<jdarcy at redhat.com> <jdarcy at jdarcy-dt.usersys.redhat.com>
+<zaitcev at redhat.com> <zaitcev at kotori.zaitcev.us>
+<zaitcev at redhat.com> <zaitcev at yahoo.com>
+<zaitcev at redhat.com> <root at fserver-1.virtual>
diff --git a/AUTHORS b/AUTHORS
index e69de29..d43d1a5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -0,0 +1,14 @@
+iwhd contributors:
+
+iwhd was initially created by Jeff Darcy <jdarcy at redhat.com>
+
+The primary maintainers and people with commit access:
+
+  Jeff Darcy <jdarcy at redhat.com>
+  Jim Meyering <meyering at redhat.com>
+  Pete Zaitcev <zaitcev at redhat.com>
+
+Patches have also been contributed by:
+
+  Chris Lalancette <clalance at redhat.com>
+  Mark McLoughlin <markmc at redhat.com>
diff --git a/cfg.mk b/cfg.mk
index df73c8c..66801b3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -57,6 +57,20 @@ sc_prohibit_emacs__indent_tabs_mode__setting:
 	halt='use of emacs indent-tabs-mode: setting'			\
 	  $(_sc_search_regexp)

+# Give credit where due:
+# Ensure that each commit author email address (possibly mapped via
+# git log's .mailmap) appears in our AUTHORS file.
+sc_check_author_list:
+	@fail=0;							\
+	for i in $$(git log --pretty=format:%aE%n|sort -u|grep -v '^$$'); do \
+	  sanitized=$$(echo "$$i"|LC_ALL=C sed 's/\([^a-zA-Z0-9_ at -]\)/\\\1/g'); \
+	  grep -iq "<$$sanitized>" $(srcdir)/AUTHORS			\
+	    || { printf '%s\n' "$$i" >&2; fail=1; };			\
+	done;								\
+	test $$fail = 1							\
+	  && echo '$(ME): committer(s) not listed in AUTHORS' >&2;	\
+	test $$fail = 0
+
 odt = ^doc/image_repo\.odt$
 exclude_file_name_regexp--sc_trailing_blank = $(odt)
 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = $(odt)
--
1.7.8.rc0.61.g8a042


More information about the iwhd-devel mailing list