Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Lars Kurth <lars.kurth@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Felipe Huici <felipe.huici@neclab.eu>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim \(Xen.org\)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Florian Schmidt <florian.schmidt@neclab.eu>,
	Jan Beulich <jbeulich@suse.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Simon Kuenzer <simon.kuenzer@neclab.eu>
Subject: Re: [Xen-devel] [PATCH] get_maintainers.pl: Enable running the script on unikraft repos
Date: Fri, 16 Aug 2019 14:22:30 +0100
Message-ID: <24a3619c-0677-5f96-bf0d-ffbf41c8d3a5@arm.com> (raw)
In-Reply-To: <65A5E02B-8141-4047-BEA0-946F344D8E44@citrix.com>



On 16/08/2019 12:41, Lars Kurth wrote:
> Hi Julien,

Hi Lars,

> 
> On 16/08/2019, 11:55, "Julien Grall" <julien.grall@arm.com> wrote:
> 
>      Hi Lars,
>      
>      On 16/08/2019 11:42, Lars Kurth wrote:
>      > Unikraft repos follow the same syntax as xen.git with the
>      > following exceptions:
>      > * MAINTAINERS files are called MAINTAINERS.md
>      > * M: ... etc blocks are preceded by whitespaces for rendering as
>      >    markup files
>      
>      There is an other difference. The "fallback" category is "UNIKRAFT GENERAL" and
>      not "THE REST".
> 
> That is right. But currently get_maintainers.pl: totally ignores the headlines.
> It just reads
> M: ...
> R: ...
> Etc.

Not really, get_maintainer_role() will return the headline. This is for instance 
used to avoid CC "THE REST" when there are other maintainers:

             # Check the role, if it is not "THE REST" then the file is not
             # only maintained by "THE REST".
             if ( get_maintainer_role($line) ne "supporter:THE REST" ) {
                     $file_maintained_by_the_rest = 0;
             }

 From my understanding "UNIKRAFT GENERAL" behaves exactly the same way.

The roles can also be printed with the option --roles.

> 
> What is different is that "UNIKRAFT GENERAL" does not contain
> F: entries, which have to be added, otherwise no e-mail addresses
> from the section are added. So I was going to send a patch to fix this.
>      
>      > This change will
>      > - load MAINTAINERS.md if MAINTAINERS is not present
>      > - deal with indented M: ... blocks
>      
>      One process question. Does it mean Unikraft folks will have to checkout Xen in
>      order to use {add, get}_maintainers.pl? If so, would it make sense to have
>      add_maintainers.pl and script_maintainers.pl in a separate repo that can be
>      added as submodule?
> 
> The way how the code is written they would either have to check out the
> repo or just get the two scripts and put them in the same directory somewhere
> on the path.
> 
> For things like mini-os, xtf, osstest, ... you would always have a xen.git somewhere
> In the unikraft case that is different. We could break it out, but maybe we can do this
> at a later point in time.

Fair point.

> 
>      > Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
>      > ---
>      > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>      > Cc: George Dunlap <George.Dunlap@eu.citrix.com>
>      > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>      > Cc: Jan Beulich <jbeulich@suse.com>
>      > Cc: Julien Grall <julien.grall@arm.com>
>      > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>      > Cc: Stefano Stabellini <sstabellini@kernel.org>
>      > Cc: Tim Deegan <tim@xen.org>
>      > Cc: Wei Liu <wl@xen.org>
>      >
>      > CC: Simon Kuenzer <simon.kuenzer@neclab.eu>
>      > CC: Florian Schmidt <florian.schmidt@neclab.eu>
>      > CC: Felipe Huici <felipe.huici@neclab.eu>
>      > ---
>      >   scripts/get_maintainer.pl | 14 ++++++++++----
>      >   1 file changed, 10 insertions(+), 4 deletions(-)
>      >
>      > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
>      > index f1e9c904ee..bdb09f8f65 100755
>      > --- a/scripts/get_maintainer.pl
>      > +++ b/scripts/get_maintainer.pl
>      > @@ -284,12 +284,18 @@ if (!top_of_tree($xen_path)) {
>      >   my @typevalue = ();
>      >   my %keyword_hash;
>      >
>      > -open (my $maint, '<', "${xen_path}MAINTAINERS")
>      > -    or die "$P: Can't open MAINTAINERS: $!\n";
>      > +my $maint;
>      > +my $maintainers_file = "MAINTAINERS";
>      > +if (! open ($maint, '<', ${xen_path}.$maintainers_file)) {
>      > +    $maintainers_file = "MAINTAINERS.md";
>      > +    open ($maint, '<', ${xen_path}.$maintainers_file)
>      > +        or die "$P: Can't open MAINTAINERS or MAINTAINERS.md: $!\n";
>      > +}
>      > +
>      >   while (<$maint>) {
>      >       my $line = $_;
>      >
>      > -    if ($line =~ m/^([A-Z]):\s*(.*)/) {
>      > +    if ($line =~ m/^\s*([A-Z]):\s*(.*)/) {
>      
>      As you allow space before the blocks M:, would not this catch the example at the
>      beginning of the file?
>      
>      	M: Mail patches to: FullName <address@domain>
>      	R: Designated reviewer: FullName <address@domain>
> 
> Good point. When I tested it (I sent the last few patches with the change in it),
> it didn't pick up the e-mail addresses. However, when I check with regex101.com
> it is picked up.
> 
> Which means that the values are pushed to @typevalue, aka
> { "R",  "Designated reviewer: FullName <address@domain>" }
> Etc.
> 
> @typevalue seem to be processed by find_first_section(),
> find_starting_index(), find_ending_index()
> 
> And then basically the entries are not processed because the
> block in the example is not consistent and fails the validation
> further down the line
> 
> For example:
> ./scripts/get_maintainer.pl --email --git -f .
> Etc.
> 
> Don't list the e-mail addresses in the examples
>      
> So, what I proposed is probably far too fragile to make sense.
> And doing something which is more accurate will probably
> require major surgery to the scripts.
> 
> I can look at this in a bit more detail and see whether there
> is a way to handle this.
> 
> But I don't want to invest the time to do this really as this
> is probably rather complex.
> 
> @Simon, @Florian, @Felipe: would you be willing to
> change the MAINTAINERS files in your repos such that
> we don't have to implement lots of magic to make the
> patch sending helper scripts work for you?

Modifying MAINTAINERS file in Unikraft looks the safest and less intrusive to to 
do. Let see what the maintainers think :).

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 10:42 Lars Kurth
2019-08-16 10:55 ` Julien Grall
2019-08-16 11:17   ` Anthony PERARD
2019-08-16 12:05     ` Lars Kurth
2019-08-16 12:09       ` Paul Durrant
2019-08-16 12:20         ` Lars Kurth
2019-08-16 12:28           ` Paul Durrant
2019-08-16 11:41   ` Lars Kurth
2019-08-16 13:22     ` Julien Grall [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24a3619c-0677-5f96-bf0d-ffbf41c8d3a5@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=felipe.huici@neclab.eu \
    --cc=florian.schmidt@neclab.eu \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lars.kurth@citrix.com \
    --cc=simon.kuenzer@neclab.eu \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox