patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [scripts] 3-backport: use get-maintainer.sh to CC subtree maintainers
@ 2021-02-11 13:59 luca.boccassi
  2021-02-22 16:26 ` Christian Ehrhardt
  0 siblings, 1 reply; 2+ messages in thread
From: luca.boccassi @ 2021-02-11 13:59 UTC (permalink / raw)
  To: stable; +Cc: Luca Boccassi

From: Luca Boccassi <luca.boccassi@microsoft.com>

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
 3-request-backport | 8 +++++++-
 README             | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/3-request-backport b/3-request-backport
index d123531..a1725e5 100755
--- a/3-request-backport
+++ b/3-request-backport
@@ -2,6 +2,8 @@
 
 source ./lib.sh
 
+set -e
+
 list=""
 if [ $# -lt 1 ] && [ "$GIT_AM_PAUSE_ON_FAIL" = "yes" ]
 then
@@ -13,7 +15,7 @@ then
 	for _file in $list
 	do
 		_sub=$(grep Subject $_file | cut -d\  -f3-)
-		echo "$_applied" | grep -qF "$_sub" || (head -n1 $_file | awk '{print $2}' >> /tmp/.list-$$)
+		echo "$_applied" | grep -qF "$_sub" || (head -n1 $_file | awk -v _file=$_file '{print $2" "_file}' >> /tmp/.list-$$)
 	done
 	popd &>/dev/null
 else
@@ -33,6 +35,10 @@ get_cc_list()
 
 	> $cc_list
 	while read commit patch; do
+		# Has to be used from git repository directory
+		pushd $STABLE_DIR &>/dev/null
+		$STABLE_DIR/devtools/get-maintainer.sh $patch >> $cc_list
+		popd &>/dev/null
 		$GIT show $commit | grep -h '^.*: .*<.*@.*\..*>' |
 			sed 's/[^:]*: //' >> $cc_list
 	done < $list
diff --git a/README b/README
index 6489379..cc5f6bf 100644
--- a/README
+++ b/README
@@ -120,6 +120,10 @@ should keep an accumulated list for the stable tree and send out this
 request multiple times with the accumulated list of failed patches. This
 list will also be used by "6-announce-release".
 
+The 'devtools/get-maintainer.sh' tool from the DPDK repository is used to
+compile the list of maintainers to CC for each patch. A configuration file
+needs to be set up first, see the script itself for instructions.
+
 4-final-review
 ==============
 
-- 
2.29.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [scripts] 3-backport: use get-maintainer.sh to CC subtree maintainers
  2021-02-11 13:59 [dpdk-stable] [scripts] 3-backport: use get-maintainer.sh to CC subtree maintainers luca.boccassi
@ 2021-02-22 16:26 ` Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2021-02-22 16:26 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable, Luca Boccassi

On Thu, Feb 11, 2021 at 2:59 PM <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <luca.boccassi@microsoft.com>
>
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
>  3-request-backport | 8 +++++++-
>  README             | 4 ++++
>  2 files changed, 11 insertions(+), 1 deletion(-)

I haven't tested but from review this LGTM and we have together
expressed that we'd want this feature.
So Ack to it and if it exposes issues we can fix them up later.

Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

> diff --git a/3-request-backport b/3-request-backport
> index d123531..a1725e5 100755
> --- a/3-request-backport
> +++ b/3-request-backport
> @@ -2,6 +2,8 @@
>
>  source ./lib.sh
>
> +set -e
> +
>  list=""
>  if [ $# -lt 1 ] && [ "$GIT_AM_PAUSE_ON_FAIL" = "yes" ]
>  then
> @@ -13,7 +15,7 @@ then
>         for _file in $list
>         do
>                 _sub=$(grep Subject $_file | cut -d\  -f3-)
> -               echo "$_applied" | grep -qF "$_sub" || (head -n1 $_file | awk '{print $2}' >> /tmp/.list-$$)
> +               echo "$_applied" | grep -qF "$_sub" || (head -n1 $_file | awk -v _file=$_file '{print $2" "_file}' >> /tmp/.list-$$)
>         done
>         popd &>/dev/null
>  else
> @@ -33,6 +35,10 @@ get_cc_list()
>
>         > $cc_list
>         while read commit patch; do
> +               # Has to be used from git repository directory
> +               pushd $STABLE_DIR &>/dev/null
> +               $STABLE_DIR/devtools/get-maintainer.sh $patch >> $cc_list
> +               popd &>/dev/null
>                 $GIT show $commit | grep -h '^.*: .*<.*@.*\..*>' |
>                         sed 's/[^:]*: //' >> $cc_list
>         done < $list
> diff --git a/README b/README
> index 6489379..cc5f6bf 100644
> --- a/README
> +++ b/README
> @@ -120,6 +120,10 @@ should keep an accumulated list for the stable tree and send out this
>  request multiple times with the accumulated list of failed patches. This
>  list will also be used by "6-announce-release".
>
> +The 'devtools/get-maintainer.sh' tool from the DPDK repository is used to
> +compile the list of maintainers to CC for each patch. A configuration file
> +needs to be set up first, see the script itself for instructions.
> +
>  4-final-review
>  ==============
>
> --
> 2.29.2
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-22 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 13:59 [dpdk-stable] [scripts] 3-backport: use get-maintainer.sh to CC subtree maintainers luca.boccassi
2021-02-22 16:26 ` Christian Ehrhardt

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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