It is highly desirable that patches are created with "make makepatch" which results in headers like this:
--- lib/krb5/ccache/cc_file.c.orig 2014-10-15 23:55:10 UTC
@@ -136,6 +136,7 @@ get_size(krb5_context context, krb5_ccac
Unfortunately, a lot of people still use diff, even reverting the "good" format above, resulting in something like this:
--- lib/krb5/ccache/cc_file.c.orig 2014-10-15 16:55:10.000000000 -0700
+++ lib/krb5/ccache/cc_file.c 2015-02-12 13:00:31.967166267 -0800
@@ -136,6 +136,7 @@
Notice the desired "-p" option is lost as well.
I think it would be a good idea to check the "--- " line of each patch to make sure it ends in "UTC" and give an appropriate warning and recommendation to use "make makepatch" instead. Since there can be more than one "--- " line per patch, each matching line should be checked IMO.
Auto-assigned to maintainer marcus@FreeBSD.org
danfe will probably be interested in this, CC him.
I definitely agree with John that this is a problem that should be fixed. I'd happily review/test proposed patches (or might cook one myself when time permits).
Have a look at http://www.marcuscom.com/cgi-bin/cvsweb.cgi/portlint/portlint.pl.diff?r1=1.350&r2=1.351 . This is my proposed patch.
I suggest changing "``make patch''
The perl code looks ok but I didn't test it.
(In reply to Joe Marcus Clarke from comment #4)
I won't have time to test it right now, but it looks almost fine overall. Two nits: 1) the make(1) target is "makepatch", not just "patch", so the full command should be "make makepatch"; and 2) I might be wrong, but I don't see the need for $pline local variable. Won't combined /UTC\s+$/ work?
A commit references this bug:
Date: Mon Apr 13 04:53:26 UTC 2015
New revision: 383894
Update to 2.16.3.
* Check the patches to make sure they were generated using ``make patch'' 
* Do not throw a bunch of Perl errors if the makefile is bad 
Fixed in 2.16.3.