[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maint.mk and NEWS footer
From: |
Eric Blake |
Subject: |
Re: maint.mk and NEWS footer |
Date: |
Wed, 06 Jan 2010 20:53:54 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to Eric Blake on 1/6/2010 2:00 PM:
> Jim Meyering <jim <at> meyering.net> writes:
>> Then I realized that the patch above would probably be enough.
>> The GFDL version number will not be changing often.
>
> Fair enough. So, do we apply your patch, or should I try testing/tweaking it
> further?
After more tweaking and a test that this change does not affect the hash
of a single-line copyright (as in coreutils/NEWS), here's what I'm
pushing. Also, I figured out how to automate the syntax-check, and
verified that it catches all the problems in coreutils and m4 that I
noticed earlier today without any false positives.
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
From c4b45631bce0034e4433a9f421cf16fe803c51f3 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Wed, 6 Jan 2010 10:03:34 -0700
Subject: [PATCH 1/2] maint.mk: ignore multi-line copyright in NEWS
The old algorithm did not work for projects like m4 that used
long-hand copyright years that wrapped lines. Meanwhile, this
change has no impact to single-line copyrights, like coreutils.
Changing the rest of the footer, such as bumping from GFDL 1.2
to GFDL 1.3, will still require the developer to rerun
'make update-NEWS-hash' to get the hash back in sync, but that
is probably less frequent.
* top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
top/maint.mk | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 715826f..d9e6c44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-06 Jim Meyering <address@hidden>
+ and Eric Blake <address@hidden>
+
+ maint.mk: ignore multi-line copyright in NEWS
+ * top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
+
2010-01-06 Eric Blake <address@hidden>
select: add missing dependency
diff --git a/top/maint.mk b/top/maint.mk
index 40f306e..084a177 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -550,7 +550,8 @@ sc_const_long_option:
NEWS_hash = \
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
$(srcdir)/NEWS \
- | grep -v '^Copyright .*Free Software' \
+ | perl -0777 -pe \
+ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \
| md5sum -
\
| sed 's/ .*//')
--
1.6.4.2
From cb361c968d771304ab68ed5cb8016a6b0c1b8cf2 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Wed, 6 Jan 2010 20:47:08 -0700
Subject: [PATCH 2/2] maint.mk: detect incorrect GFDL usage
Similar to the existing sc_GPL_version. Fortunately, the two licenses
have enough distinction in wording so that neither regexp is a false
positive for the other license. This won't catch files that line wrap
differently than expected; as it was, the GFDL needed two regexp to
handle the use of GFDL in the m4 project.
* top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 5 +++++
top/maint.mk | 7 +++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d9e6c44..92973cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-06 Eric Blake <address@hidden>
+
+ maint.mk: detect incorrect GFDL usage
+ * top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
+
2010-01-06 Jim Meyering <address@hidden>
and Eric Blake <address@hidden>
diff --git a/top/maint.mk b/top/maint.mk
index 084a177..d1f0ccd 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -495,6 +495,13 @@ sc_GPL_version:
@re='either ''version [^3]' msg='GPL vN, N!=3' \
$(_prohibit_regexp)
+# Require the latest GFDL. Two regexp, since some .texi files end up
+# line wrapping between 'Free Documentation License,' and 'Version'.
+_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
+sc_GFDL_version:
+ @re='$(_GFDL_regexp)' msg='GFDL vN, N!=3' \
+ $(_prohibit_regexp)
+
cvs_keywords = \
Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
--
1.6.4.2
signature.asc
Description: OpenPGP digital signature