* [Xen-devel] [PATCH v4 0/3] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git
@ 2019-09-04 11:30 Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl Lars Kurth
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Lars Kurth @ 2019-09-04 11:30 UTC (permalink / raw)
To: xen-devel
Cc: Lars Kurth, Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Julien Grall, Jan Beulich
Use-case: Allow using both scripts on xen repositories such as
mini-os.git, osstest.git,
Assumptions: the repository contains a MAINTAINERS file that
follows the same conventions as the file in xen.git
A suggested template for sister repositories of Xen
========================================================
This file follows the same conventions as outlined in
xen.git:MAINTAINERS. Please refer to the file in xen.git
for more information.
THE REST
M: MAINTAINER1 <maintainer1@email.com>
M: MAINTAINER2 <maintainer2@email.com>
L: xen-devel@lists.xenproject.org
S: Supported
F: *
F: */
V: xen-maintainers-1
========================================================
Changes in v2:
* Remove debug message
Changes in v3:
* Split patch
* add_maintainers.pl: do not issue a warning
* add_maintainers.pl: introduce processing logic for V: tag
* MAINTAINERS: Add V: tag to file
Changes in v4:
* Removed tabs and fixed typo
* Removed unused variable
Lars Kurth (3):
Remove hardcoding from scripts/add_maintainers.pl
Add V section entry to allow identification of Xen MAINTAINERS file
Add logic to use V section entry in THE REST for identifying xen trees
MAINTAINERS | 4 +++-
scripts/add_maintainers.pl | 4 +--
scripts/get_maintainer.pl | 57 +++++++++++++++++++++++----------------
3 files changed, 41 insertions(+), 24 deletions(-)
base-commit: 6c9639a72f0ca3a9430ef75f375877182281fdef
--
git-series 0.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl
2019-09-04 11:30 [Xen-devel] [PATCH v4 0/3] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git Lars Kurth
@ 2019-09-04 11:30 ` Lars Kurth
2019-09-10 15:17 ` Julien Grall
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees Lars Kurth
2 siblings, 1 reply; 10+ messages in thread
From: Lars Kurth @ 2019-09-04 11:30 UTC (permalink / raw)
To: xen-devel
Cc: Lars Kurth, Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Julien Grall, Jan Beulich
Instead of using a hardcoded location, inherit the
location from $0
Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
---
scripts/add_maintainers.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/add_maintainers.pl b/scripts/add_maintainers.pl
index 09e9f66..5a6d0f6 100755
--- a/scripts/add_maintainers.pl
+++ b/scripts/add_maintainers.pl
@@ -26,9 +26,9 @@ sub insert ($$$$);
sub hastag ($$);
# Tool Variables
-my $get_maintainer = "./scripts/get_maintainer.pl";
-
my $tool = $0;
+my $get_maintainer = $tool;
+$get_maintainer =~ s/add_maintainers/get_maintainer/;
my $usage = <<EOT;
OPTIONS:
--------
--
git-series 0.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file
2019-09-04 11:30 [Xen-devel] [PATCH v4 0/3] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl Lars Kurth
@ 2019-09-04 11:30 ` Lars Kurth
2019-09-10 15:18 ` Julien Grall
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees Lars Kurth
2 siblings, 1 reply; 10+ messages in thread
From: Lars Kurth @ 2019-09-04 11:30 UTC (permalink / raw)
To: xen-devel
Cc: Lars Kurth, Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Julien Grall, Jan Beulich
This change provides sufficient information to allow get_maintainer.pl /
add_maintainers.pl scripts to be run on xen sister repositories such as
mini-os.git, osstest.git, etc
A suggested template for sister repositories of Xen is
========================================================
This file follows the same conventions as outlined in
xen.git:MAINTAINERS. Please refer to the file in xen.git
for more information.
THE REST
M: MAINTAINER1 <maintainer1@email.com>
M: MAINTAINER2 <maintainer2@email.com>
L: xen-devel@lists.xenproject.org
S: Supported
F: *
F: */
V: xen-maintainers-1
========================================================
Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
MAINTAINERS | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 77413e0..bb3da43 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -97,6 +97,9 @@ Descriptions of section entries:
matches patches or files that contain one or more of the words
printk, pr_info or pr_err
One regex pattern per line. Multiple K: lines acceptable.
+ V: Version identifier that must be under THE REST and follows
+ the format:
+ xen-maintainers-<version format number of this file>
The meaning of nesting:
@@ -541,3 +544,4 @@ L: xen-devel@lists.xenproject.org
S: Supported
F: *
F: */
+V: xen-maintainers-1
--
git-series 0.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees
2019-09-04 11:30 [Xen-devel] [PATCH v4 0/3] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file Lars Kurth
@ 2019-09-04 11:30 ` Lars Kurth
2019-09-11 15:41 ` Ian Jackson
2 siblings, 1 reply; 10+ messages in thread
From: Lars Kurth @ 2019-09-04 11:30 UTC (permalink / raw)
To: xen-devel
Cc: Lars Kurth, Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Julien Grall, Jan Beulich
Specifically:
* Move check until after the MAINTAINERS file has been read
* Add get_xen_maintainers_file_version() for check
* Remove top_of_tree as not needed any more
* Fail with extended error message when used out of tree
Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
---
scripts/get_maintainer.pl | 57 ++++++++++++++++++++++++----------------
1 file changed, 35 insertions(+), 22 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 174dfb7..2e661f4 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -265,11 +265,6 @@ if ($email &&
die "$P: Please select at least 1 email option\n";
}
-if (!top_of_tree($xen_path)) {
- die "$P: The current directory does not appear to be "
- . "a Xen source tree.\n";
-}
-
## Read MAINTAINERS for type/value pairs
my @typevalue = ();
@@ -311,6 +306,16 @@ while (<$maint>) {
}
close($maint);
+# Check whether we have a V entry under the REST
+# and use it to get the file's version number
+my $maintainers_file_version = get_xen_maintainers_file_version();
+if (!$maintainers_file_version) {
+ die "$P: the MAINTAINERS file ".
+ "in the current directory does not appear to be from ".
+ "the xen.git source tree or a sister tree.\n\n".
+ "A 'V: xen-maintainers-<version>' entry under THE REST ".
+ "is needed to identify a Xen MAINTAINERS file.\n\n";
+}
#
# Read mail address map
@@ -564,6 +569,31 @@ sub range_has_maintainer {
return 0;
}
+sub get_xen_maintainers_file_version {
+ my $tvi = find_first_section();
+
+ while ($tvi < @typevalue) {
+ my $start = find_starting_index($tvi);
+ my $end = find_ending_index($tvi);
+ my $i;
+
+ for ($i = $start; $i < $end; $i++) {
+ my $line = $typevalue[$i];
+ if ($line =~ m/^V:\s*(.*)/) {
+ # Note that get_maintainer_role() requires processing
+ # of more of the file. So do it directly
+ if ($typevalue[$start] eq "THE REST") {
+ if ($line =~ m/xen-maintainers-(.*)/) {
+ return $1;
+ }
+ }
+ }
+ }
+ $tvi = $end + 1;
+ }
+ return 0;
+}
+
sub get_maintainers {
%email_hash_name = ();
%email_hash_address = ();
@@ -867,23 +897,6 @@ Notes:
EOT
}
-sub top_of_tree {
- my ($xen_path) = @_;
-
- if ($xen_path ne "" && substr($xen_path,length($xen_path)-1,1) ne "/") {
- $xen_path .= "/";
- }
- if ( (-f "${xen_path}COPYING")
- && (-f "${xen_path}MAINTAINERS")
- && (-f "${xen_path}Makefile")
- && (-d "${xen_path}docs")
- && (-f "${xen_path}CODING_STYLE")
- && (-d "${xen_path}xen")) {
- return 1;
- }
- return 0;
-}
-
sub parse_email {
my ($formatted_email) = @_;
--
git-series 0.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl Lars Kurth
@ 2019-09-10 15:17 ` Julien Grall
0 siblings, 0 replies; 10+ messages in thread
From: Julien Grall @ 2019-09-10 15:17 UTC (permalink / raw)
To: Lars Kurth, xen-devel
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Jan Beulich
Hi Lars,
On 9/4/19 12:30 PM, Lars Kurth wrote:
> Instead of using a hardcoded location, inherit the
> location from $0
>
> Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file Lars Kurth
@ 2019-09-10 15:18 ` Julien Grall
2019-09-10 15:31 ` Julien Grall
0 siblings, 1 reply; 10+ messages in thread
From: Julien Grall @ 2019-09-10 15:18 UTC (permalink / raw)
To: Lars Kurth, xen-devel
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Jan Beulich
Hi Lars,
On 9/4/19 12:30 PM, Lars Kurth wrote:
> This change provides sufficient information to allow get_maintainer.pl /
> add_maintainers.pl scripts to be run on xen sister repositories such as
> mini-os.git, osstest.git, etc
>
> A suggested template for sister repositories of Xen is
>
> ========================================================
> This file follows the same conventions as outlined in
> xen.git:MAINTAINERS. Please refer to the file in xen.git
> for more information.
>
> THE REST
> M: MAINTAINER1 <maintainer1@email.com>
> M: MAINTAINER2 <maintainer2@email.com>
> L: xen-devel@lists.xenproject.org
> S: Supported
> F: *
> F: */
> V: xen-maintainers-1
> ========================================================
>
> Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file
2019-09-10 15:18 ` Julien Grall
@ 2019-09-10 15:31 ` Julien Grall
2019-09-10 15:35 ` Lars Kurth
0 siblings, 1 reply; 10+ messages in thread
From: Julien Grall @ 2019-09-10 15:31 UTC (permalink / raw)
To: Lars Kurth, xen-devel
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
Jan Beulich
Hi,
Actually, I have one question about the template (my ack still stands).
On 9/10/19 4:18 PM, Julien Grall wrote:
> Hi Lars,
>
> On 9/4/19 12:30 PM, Lars Kurth wrote:
>> This change provides sufficient information to allow get_maintainer.pl /
>> add_maintainers.pl scripts to be run on xen sister repositories such as
>> mini-os.git, osstest.git, etc
>>
>> A suggested template for sister repositories of Xen is
>>
>> ========================================================
>> This file follows the same conventions as outlined in
>> xen.git:MAINTAINERS. Please refer to the file in xen.git
>> for more information.
>>
>> THE REST
>> M: MAINTAINER1 <maintainer1@email.com>
>> M: MAINTAINER2 <maintainer2@email.com>
>> L: xen-devel@lists.xenproject.org
I was under the impression that the scripts would be used for Unikraft.
If so, do we expect them to CC xen-devel everytime?
If the answer is no, then we will probably want to add_maintainers.pl.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file
2019-09-10 15:31 ` Julien Grall
@ 2019-09-10 15:35 ` Lars Kurth
2019-09-10 16:01 ` Julien Grall
0 siblings, 1 reply; 10+ messages in thread
From: Lars Kurth @ 2019-09-10 15:35 UTC (permalink / raw)
To: Julien Grall, xen-devel
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
Andrew Cooper, Tim (Xen.org),
George Dunlap, Jan Beulich, Ian Jackson
On 10/09/2019, 16:31, "Julien Grall" <julien.grall@arm.com> wrote:
Hi,
Actually, I have one question about the template (my ack still stands).
On 9/10/19 4:18 PM, Julien Grall wrote:
> Hi Lars,
>
> On 9/4/19 12:30 PM, Lars Kurth wrote:
>> This change provides sufficient information to allow get_maintainer.pl /
>> add_maintainers.pl scripts to be run on xen sister repositories such as
>> mini-os.git, osstest.git, etc
>>
>> A suggested template for sister repositories of Xen is
>>
>> ========================================================
>> This file follows the same conventions as outlined in
>> xen.git:MAINTAINERS. Please refer to the file in xen.git
>> for more information.
>>
>> THE REST
>> M: MAINTAINER1 <maintainer1@email.com>
>> M: MAINTAINER2 <maintainer2@email.com>
>> L: xen-devel@lists.xenproject.org
I was under the impression that the scripts would be used for Unikraft.
If so, do we expect them to CC xen-devel everytime?
In that case, the template has to be adapted. I was mainly thinking of
XTF, OSSTEST, livepatch-build-tools. If it were used say for minios
(which I think it should) the L: field would obviously need changing
Once this series is through, I will submit maintainer files for all those
projects making sure that they have the right L: field.
If the answer is no, then we will probably want to add_maintainers.pl.
I basically dropped the original patch for Unikraft as nobody has responded.
I was not planning to pick this up, unless someone from Unikraft runs with it
Regards
Lars
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file
2019-09-10 15:35 ` Lars Kurth
@ 2019-09-10 16:01 ` Julien Grall
0 siblings, 0 replies; 10+ messages in thread
From: Julien Grall @ 2019-09-10 16:01 UTC (permalink / raw)
To: Lars Kurth, xen-devel
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
Andrew Cooper, Tim (Xen.org),
George Dunlap, Jan Beulich, Ian Jackson
Hi Lars,
On 9/10/19 4:35 PM, Lars Kurth wrote:
>
> On 10/09/2019, 16:31, "Julien Grall" <julien.grall@arm.com> wrote:
>
> Hi,
>
> Actually, I have one question about the template (my ack still stands).
>
> On 9/10/19 4:18 PM, Julien Grall wrote:
> > Hi Lars,
> >
> > On 9/4/19 12:30 PM, Lars Kurth wrote:
> >> This change provides sufficient information to allow get_maintainer.pl /
> >> add_maintainers.pl scripts to be run on xen sister repositories such as
> >> mini-os.git, osstest.git, etc
> >>
> >> A suggested template for sister repositories of Xen is
> >>
> >> ========================================================
> >> This file follows the same conventions as outlined in
> >> xen.git:MAINTAINERS. Please refer to the file in xen.git
> >> for more information.
> >>
> >> THE REST
> >> M: MAINTAINER1 <maintainer1@email.com>
> >> M: MAINTAINER2 <maintainer2@email.com>
> >> L: xen-devel@lists.xenproject.org
>
> I was under the impression that the scripts would be used for Unikraft.
> If so, do we expect them to CC xen-devel everytime?
>
> In that case, the template has to be adapted. I was mainly thinking of
> XTF, OSSTEST, livepatch-build-tools. If it were used say for minios
> (which I think it should) the L: field would obviously need changing
>
> Once this series is through, I will submit maintainer files for all those
> projects making sure that they have the right L: field.
>
> If the answer is no, then we will probably want to add_maintainers.pl.
>
> I basically dropped the original patch for Unikraft as nobody has responded.
> I was not planning to pick this up, unless someone from Unikraft runs with it
It makes sense. Thank you for the explanation!
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees Lars Kurth
@ 2019-09-11 15:41 ` Ian Jackson
0 siblings, 0 replies; 10+ messages in thread
From: Ian Jackson @ 2019-09-11 15:41 UTC (permalink / raw)
To: Lars Kurth
Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
George Dunlap, Andrew Cooper, Tim Deegan, Julien Grall,
Jan Beulich, xen-devel
Lars Kurth writes ("[Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees"):
> Specifically:
> * Move check until after the MAINTAINERS file has been read
> * Add get_xen_maintainers_file_version() for check
> * Remove top_of_tree as not needed any more
> * Fail with extended error message when used out of tree
>
> Signed-off-by: Lars Kurth <lars.kurth@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-09-11 15:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 11:30 [Xen-devel] [PATCH v4 0/3] Allow get_maintainer.pl / add_maintainers.pl scripts to be called outside of xen.git Lars Kurth
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 1/3] Remove hardcoding from scripts/add_maintainers.pl Lars Kurth
2019-09-10 15:17 ` Julien Grall
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 2/3] Add V section entry to allow identification of Xen MAINTAINERS file Lars Kurth
2019-09-10 15:18 ` Julien Grall
2019-09-10 15:31 ` Julien Grall
2019-09-10 15:35 ` Lars Kurth
2019-09-10 16:01 ` Julien Grall
2019-09-04 11:30 ` [Xen-devel] [PATCH v4 3/3] Add logic to use V section entry in THE REST for identifying xen trees Lars Kurth
2019-09-11 15:41 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.