|Summary:||ports-mgmt/portlint : request to warn on patches that don't have UTC in "---" line|
|Product:||Ports & Packages||Reporter:||John Marino <marino>|
|Component:||Individual Port(s)||Assignee:||Joe Marcus Clarke <marcus>|
|Severity:||Affects Only Me||CC:||danfe|
Description John Marino 2015-02-16 21:13:41 UTC
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 +++ lib/krb5/ccache/cc_file.c @@ -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.
Comment 1 Bugzilla Automation 2015-02-16 21:13:41 UTC
Auto-assigned to maintainer marcus@FreeBSD.org
Comment 2 John Marino 2015-02-16 21:14:22 UTC
danfe will probably be interested in this, CC him.
Comment 3 Alexey Dokuchaev 2015-03-22 12:15:51 UTC
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).
Comment 4 Joe Marcus Clarke 2015-03-22 16:32:18 UTC
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.
Comment 5 John Marino 2015-03-22 16:38:06 UTC
I suggest changing "``make patch'' to "``make makepatch''. The perl code looks ok but I didn't test it.
Comment 6 Alexey Dokuchaev 2015-03-22 16:39:13 UTC
(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?
Comment 7 Joe Marcus Clarke 2015-03-22 16:42:52 UTC
Comment 8 commit-hook 2015-04-13 04:53:35 UTC
A commit references this bug: Author: marcus Date: Mon Apr 13 04:53:26 UTC 2015 New revision: 383894 URL: https://svnweb.freebsd.org/changeset/ports/383894 Log: 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  PR: 197747 198887 Changes: head/ports-mgmt/portlint/Makefile head/ports-mgmt/portlint/src/portlint.pl
Comment 9 Joe Marcus Clarke 2015-04-13 04:55:04 UTC
Fixed in 2.16.3.