Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4289064imm; Mon, 30 Jul 2018 11:50:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfgSvxshqIBaKL/a+qY4FSWAxsQr70RITq5jcP5PSZGeGpMBLI7nSQxrTZ6n+t52MxRSbHw X-Received: by 2002:a62:6a01:: with SMTP id f1-v6mr19092973pfc.156.1532976612795; Mon, 30 Jul 2018 11:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532976612; cv=none; d=google.com; s=arc-20160816; b=oznqAcb84Wrb6tifwDg7k9QhifnVw8YN27DkQ9JXDKHIlNJNxkR7IJ7zizVYfPBuIL gt7AX3IT1tW1fkQKOhU8AFvhZF+0VE6E6qksDX9PPXz6jrGHCzwNlRHsBVcJ3C3uCBWu IxkXlutJYE+LVf9724P7KJCvmN2HJmvU/q81S6X2Z9A0Qzbk82n8lHUXKQsxIm7LnVNN 5vMkxgDIr6wnq1hhtV8p8DZ2ItQ+Zv++fj7ScwaOgWtgNApbZfQm/ON93/PFGQgs+PMM IDMJHKXrjznkVfs4nrmfMGS+t/WRLtr4GGIkpG9sJDUM1b2Kk7EAvoTpB8M+w/uwPYq5 Gk6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=SYNp040bkLhZNHqvYVrp0ZsoKdQ1QYjgfTw5i9YA6c0=; b=CCLAC8OyrrQ9UaomAkKoxUN8P6pcUhiKm7CUTUss9zrv6ekC1VBUPa7SUDzWBTs+d1 HuWlOvM2XgrLfZTqQRa1cbVCU+YW2EjiSMmTJO7oSx0uyHLe/14Rqe8ISKLOt5GUeQfF +eiPbPR/bPt9eZ6RhUsWWZw0P4TQ+TPF/ecFgzD0NWN5nP2jRkoq4VNoa/semXf4ZDiG qr/ZDPrCVUOFCAbB75ba30vALbv6YQqxpi0terIrMJmTYQkoz7sW5Fi2+ZhYDY8lzWwM oR9HNdyHsOrYs08GLjGt7PrqW/anTIJrVEbf8gqIT12lIksDr5k2QgN6f3pQyBtXWPNg j7tA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si10592893ply.354.2018.07.30.11.49.58; Mon, 30 Jul 2018 11:50:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731728AbeG3UZI (ORCPT + 99 others); Mon, 30 Jul 2018 16:25:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49480 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728746AbeG3UZH (ORCPT ); Mon, 30 Jul 2018 16:25:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F2B240216FE; Mon, 30 Jul 2018 18:48:48 +0000 (UTC) Received: from redhat.com (ovpn-123-16.rdu2.redhat.com [10.10.123.16]) by smtp.corp.redhat.com (Postfix) with SMTP id 5BEE9111AF0C; Mon, 30 Jul 2018 18:48:48 +0000 (UTC) Date: Mon, 30 Jul 2018 14:48:48 -0400 From: Don Zickus To: Joe Perches Cc: Prarit Bhargava , linux-kernel@vger.kernel.org, jtoppins@redhat.com Subject: Re: [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override Message-ID: <20180730184848.uooedven2od666hs@redhat.com> References: <20180706184411.ilzbt7fxuje2nhx6@redhat.com> <716eb88d-31ac-c488-f799-dec9c9afb5af@redhat.com> <948af2d06623e8fcca6f0c0fd300a65bbfd1c6fa.camel@perches.com> <20180706215851.sqpibusyqukbh55g@redhat.com> <5ebb181efcdd2cdb3c1ee8eac9bba26f5759a0ea.camel@perches.com> <9efeba75a47e9b0c40d5b9e5078598ff4a31f196.camel@perches.com> <20180713185109.hanjstgdvl2fw4ry@redhat.com> <751491f9b9d7ce18f048ba44fbdb17d8c699e674.camel@perches.com> <20180716212019.sjxyxqeltgdcuqqr@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180716212019.sjxyxqeltgdcuqqr@redhat.com> User-Agent: NeoMutt/20180622 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 30 Jul 2018 18:48:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 30 Jul 2018 18:48:48 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dzickus@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 16, 2018 at 05:20:19PM -0400, Don Zickus wrote: > On Fri, Jul 13, 2018 at 05:11:58PM -0700, Joe Perches wrote: > > On Fri, 2018-07-13 at 14:51 -0400, Don Zickus wrote: > > > On Fri, Jul 06, 2018 at 03:14:28PM -0700, Joe Perches wrote: > > > > On Fri, 2018-07-06 at 15:09 -0700, Joe Perches wrote: > > > > > On Fri, 2018-07-06 at 17:58 -0400, Don Zickus wrote: > > > > > > We have an internal use case of multiple MAINTAINER files, some folks have > > > > > > more rights to patches than others so they are not allowed to be cc'd (think > > > > > > embargoed stuff). > > > > > > > > How about: > > > > > > Hi Joe, > > > > > > You are probably busy with stuff, but wanted to softly poke you to see what > > > is going on with this patch and if there is anything we can help with? > > > > Hey Don. No worries. > > > > Tell me again if the --find-maintainer-files= should > > be exclusive or should it also read any existing MAINTAINERS file? > > Hi Joe, > > We were looking for it to be exclusive. If we backport a patch, we want our > internal maintainers to be cc'd not the upstream maintainers. I don't think > upstream needs any more spam. :-) Hi Joe, ping? Any feedback here? Cheers, Don > > > > > What if anything is wrong with what I suggested? > > You posted multiple versions of a similar patch, each needed some > tweaks. But were pretty close to working. > > If I had a with a MAINTAINERS directory beneath it with files behind > that, I just wanted to run: > > get_maintainers.pl --find-maintainer-files / # find /MAINTAINERS/ > get_maintainers.pl --find-maintainer-files /MAINTAINER/ # restricted list > > That's it. I attached a patch you provided that worked for me. I added a > > + push(@mfiles, "${path}") if -f "${path}"; > > to your last version of the patch to get things working for me. You may > want a different solution there. > > Cheers, > Don > > --- > scripts/get_maintainer.pl | 39 +++++++++++++++++++++------------------ > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl > index c87fa734e3e1..f7a7d46340a8 100755 > --- a/scripts/get_maintainer.pl > +++ b/scripts/get_maintainer.pl > @@ -60,7 +60,7 @@ my $pattern_depth = 0; > my $self_test = undef; > my $version = 0; > my $help = 0; > -my $find_maintainer_files = 0; > +my $find_maintainer_files; > > my $vcs_used = 0; > > @@ -262,7 +262,7 @@ if (!GetOptions( > 'sections!' => \$sections, > 'fe|file-emails!' => \$file_emails, > 'f|file' => \$from_filename, > - 'find-maintainer-files' => \$find_maintainer_files, > + 'find-maintainer-files:s' => \$find_maintainer_files, > 'self-test:s' => \$self_test, > 'v|version' => \$version, > 'h|help|usage' => \$help, > @@ -384,26 +384,30 @@ sub find_ignore_git { > read_all_maintainer_files(); > > sub read_all_maintainer_files { > - if (-d "${lk_path}MAINTAINERS") { > - opendir(DIR, "${lk_path}MAINTAINERS") or die $!; > - my @files = readdir(DIR); > - closedir(DIR); > - foreach my $file (@files) { > - push(@mfiles, "${lk_path}MAINTAINERS/$file") if ($file !~ /^\./); > - } > - } > - > - if ($find_maintainer_files) { > - find( { wanted => \&find_is_maintainer_file, > - preprocess => \&find_ignore_git, > - no_chdir => 1, > - }, "${lk_path}"); > + my $path = defined $find_maintainer_files && $find_maintainer_files ne "" > + ? $find_maintainer_files : $lk_path; > + if (-d "${path}MAINTAINERS") { > + opendir(DIR, "${path}MAINTAINERS") or die $!; > + my @files = readdir(DIR); > + closedir(DIR); > + foreach my $file (@files) { > + push(@mfiles, "${path}MAINTAINERS/$file") if ($file !~ /^\./); > + } > + } > + > + if (defined $find_maintainer_files && (-d $find_maintainer_files)) { > + find( { wanted => \&find_is_maintainer_file, > + preprocess => \&find_ignore_git, > + no_chdir => 1, > + }, "${path}"); > } else { > - push(@mfiles, "${lk_path}MAINTAINERS") if -f "${lk_path}MAINTAINERS"; > + push(@mfiles, "${path}MAINTAINERS") if -f "${path}MAINTAINERS"; > + push(@mfiles, "${path}") if -f "${path}"; > } > > + die "$P: No MAINTAINER files found in $path\n" if (scalar(@mfiles) == 0); > foreach my $file (@mfiles) { > - read_maintainer_file("$file"); > + read_maintainer_file("$file"); > } > } >