From owner-svn-ports-all@FreeBSD.ORG Wed Apr 24 22:38:09 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3481DE3D for ; Wed, 24 Apr 2013 22:38:09 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 0951211C5 for ; Wed, 24 Apr 2013 22:38:08 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id tp5so2854171ieb.12 for ; Wed, 24 Apr 2013 15:38:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=kwRQLulWBfEur0vzCCuzh+4Gej+TqTpAwYXZVyEVGtU=; b=QISSMbr1/jeT+PsCyaxFapgwL5yZZGt51JE22X1MyKA6GzIQKGwMyg4R17U65+EIlm Ev7H3gxqRmUXLjmCuqwbXZ15KxQPBFhmDBwXfi2Z9ptZzdSSgNygRyShECH4BNaeimuk n+enD/ozXRyk7QNdyxaMUxuWHzSq17X+bBVUoRnLir5V50i3uqZxrC15utsQBH3ySiE3 VV4F6q5mp5foxDJnBdQDjiKMm531rJ9PDfYWarMp9Wkg+tq2xulkeV4qcKFP7m2fsRBe 7WzEHT6jA1Vy69yBQbXEk/847HO/hKazVUYXpV55/XJIe9y6Q471w5SHW0tUO3hwqBzj n58w== MIME-Version: 1.0 X-Received: by 10.50.115.42 with SMTP id jl10mr16145859igb.71.1366843088447; Wed, 24 Apr 2013 15:38:08 -0700 (PDT) Received: by 10.50.16.227 with HTTP; Wed, 24 Apr 2013 15:38:08 -0700 (PDT) X-Originating-IP: [68.101.40.130] In-Reply-To: <201304241654.r3OGsNNh022705@svn.freebsd.org> References: <201304241654.r3OGsNNh022705@svn.freebsd.org> Date: Wed, 24 Apr 2013 22:38:08 +0000 Message-ID: Subject: Re: svn commit: r316453 - head/Tools/scripts From: "Philip M. Gollucci" To: Emanuel Haupt X-Gm-Message-State: ALoCoQnRobOs1i5Ub+cYGdUggeL3WxY/NAtJVtUuDvrXkQsPxEndCwS+BKhuPXjup1kmzXroah+O Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2013 22:38:09 -0000 pgollucci += committers too On Wed, Apr 24, 2013 at 4:54 PM, Emanuel Haupt wrote: > Author: ehaupt > Date: Wed Apr 24 16:54:22 2013 > New Revision: 316453 > URL: http://svnweb.freebsd.org/changeset/ports/316453 > > Log: > - Rework 'nice people' handling > - Properly handle non-default $MCom RCS strings > > Modified: > head/Tools/scripts/convert-makefile-header.pl > > Modified: head/Tools/scripts/convert-makefile-header.pl > > ============================================================================== > --- head/Tools/scripts/convert-makefile-header.pl Wed Apr 24 > 16:53:54 2013 (r316452) > +++ head/Tools/scripts/convert-makefile-header.pl Wed Apr 24 > 16:54:22 2013 (r316453) > @@ -28,7 +28,51 @@ Usage: $bn [OPTION] PORT > _ENOUSAGE > } > > -my > $nicepeople="((\\s|<|^)(araujo|az|avilla|bapt|bdrewery|beat|brooks|crees|eadler|flo|flz|garga|kuriyama|linimon|makc|rm|tabthorpe|wxs)\@ > freebsd.org|cvs-src\@yandex\.ru|makc\@issp\.ac\.ru|villa\.alberto@ > |pgollucci\@p6m7g8\.com|bsdkaffee@|baptiste\.daroussin\@gmail.com)"; > +# You may add yourself to the following list if you agree to waive on the > +# "Created by" attribution > +sub get_nice_people() { > + my $committers=[ > + 'araujo', > + 'az', > + 'avilla', > + 'bapt', > + 'bdrewery', > + 'beat', > + 'brooks', > + 'crees', > + 'ehaupt', > + 'eadler', > + 'flo', > + 'flz', > + 'garga', > + 'kuriyama', > + 'linimon', > + 'makc', > + 'rm', > + 'tabthorpe', > + 'wxs' > + ]; > + > + # append FreeBSD.org domain to the list of committers > + map ($_ .= '\@FreeBSD\.org', @$committers); > + > + my $maintainers=[ > + 'cvs-src\@yandex\.ru', > + 'makc\@issp\.ac\.ru', > + 'villa\.alberto\@', > + 'pgollucci\@p6m7g8\.com', > + 'bsdkaffee\@', > + 'baptiste\.daroussin\@gmail\.com' > + ]; > + > + # merge committer and maintainer addresses > + my @nice_people=(@$committers, @$maintainers); > + > + # prepend regex > + map ($_ = '(\\s|<|^)' . $_, @nice_people); > + > + return \@nice_people; > +} > > sub get_creator($) { > my $header=shift; > @@ -43,20 +87,10 @@ sub get_creator($) { > return $creator; > } > > -sub get_mcom($) { > - my $header=shift; > - my $mcom; > - for my $line (@$header) { > - if ($line=~m'\$MCom:'i) { > - return $line; > - } > - } > - return ""; > -} > - > MAIN: { > # get options > my $opt={}; > + my $nice_people=get_nice_people(); > GetOptions($opt, 'help|h', 'rcsonly|r', 'createdby|c', > 'nowrite|n'); > > if(defined($opt->{help})) { > @@ -71,6 +105,7 @@ MAIN: { > for my $arg (@ARGV) { > my @header; > my @makefile; > + my @header_exception; > my $in_header=1; > if(-f "$arg/Makefile") { > my $mf=$arg . "/Makefile"; > @@ -83,6 +118,11 @@ MAIN: { > $in_header=0; > push(@makefile, $line); > } > + > + # tolerate $MCom RCS tags > + if($line=~m'\$MCom') { > + push(@header_exception, $line); > + } > } > close(F); > > @@ -99,16 +139,24 @@ MAIN: { > print $outh "# \$FreeBSD\$\n"; > } elsif(defined($opt->{createdby}) || > !defined($opt->{rcsonly})) { > my $creator=get_creator(\@header); > - my $mcom=get_mcom(\@header); > if(defined($creator)) { > - if ($creator!~m"$nicepeople"i) { > - print $outh "# Created by: > $creator\n"; > + my $is_nice=0; > + for my $c (@$nice_people) { > + if($creator=~m"${c}") { > + $is_nice=1; > + last; > + } > } > + print $outh "# Created by: > $creator\n" if(!$is_nice); > } else { > print STDERR "$mf creator not > found. Reverting to RCS string only.\n"; > } > print $outh "# \$FreeBSD\$\n"; > - print $outh $mcom; > + > + # append header exceptions > + for my $h (@header_exception) { > + print $outh $h . "\n"; > + } > } > > for my $line (@makefile) { > -- --------------------------------------------------------------------------------------------- 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Director Operations, Ridecharge Inc. Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.