[1/5] Add a git-publish configuration file

Message ID 20180213173429.19501-2-stefanha@redhat.com
State New
Headers show
Series
  • [1/5] Add a git-publish configuration file
Related show

Commit Message

Stefan Hajnoczi Feb. 13, 2018, 5:34 p.m.
From: Fam Zheng <famz@redhat.com>

git-publish [1] is a convenient tool to send patches and has been
popular among QEMU developers.  Recently it has been made available in
Fedora official repo thanks to Stefan's work.

One nice feature of the tool is a per-project configuration with
profiles, especially in which the cccmd option is a handy method to
create the Cc list.

[1]: https://github.com/stefanha/git-publish

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180205054725.25634-2-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 .gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 .gitpublish

Comments

Daniel P. Berrangé Feb. 13, 2018, 6:09 p.m. | #1
On Tue, Feb 13, 2018 at 05:34:25PM +0000, Stefan Hajnoczi wrote:
> From: Fam Zheng <famz@redhat.com>
> 
> git-publish [1] is a convenient tool to send patches and has been
> popular among QEMU developers.  Recently it has been made available in
> Fedora official repo thanks to Stefan's work.
> 
> One nice feature of the tool is a per-project configuration with
> profiles, especially in which the cccmd option is a handy method to
> create the Cc list.
> 
> [1]: https://github.com/stefanha/git-publish
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Message-id: 20180205054725.25634-2-famz@redhat.com
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  .gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 .gitpublish
> 
> diff --git a/.gitpublish b/.gitpublish
> new file mode 100644
> index 0000000000..ed48f6e52c
> --- /dev/null
> +++ b/.gitpublish
> @@ -0,0 +1,58 @@
> +#
> +# Common git-publish profiles that can be used to send patches to QEMU upstream.
> +#
> +# See https://github.com/stefanha/git-publish for more information
> +#
> +[gitpublishprofile "default"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "rfc"]
> +base = master
> +prefix = RFC PATCH
> +to = qemu-devel@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "stable"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-stable@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "trivial"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-trivial@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "block"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-block@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null

Why is a custom entry needed for block here (and other things
below).   Won't running get_maintainer.pl already correctly
report when a patch needs cc'ing to qemu-block@nongnu.org
based on MAINTAINER rules ?


Regards,
Daniel
Fam Zheng Feb. 14, 2018, 1:01 a.m. | #2
On Tue, 02/13 18:09, Daniel P. Berrangé wrote:
> On Tue, Feb 13, 2018 at 05:34:25PM +0000, Stefan Hajnoczi wrote:
> > From: Fam Zheng <famz@redhat.com>
> > 
> > git-publish [1] is a convenient tool to send patches and has been
> > popular among QEMU developers.  Recently it has been made available in
> > Fedora official repo thanks to Stefan's work.
> > 
> > One nice feature of the tool is a per-project configuration with
> > profiles, especially in which the cccmd option is a handy method to
> > create the Cc list.
> > 
> > [1]: https://github.com/stefanha/git-publish
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Message-id: 20180205054725.25634-2-famz@redhat.com
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  .gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 58 insertions(+)
> >  create mode 100644 .gitpublish
> > 
> > diff --git a/.gitpublish b/.gitpublish
> > new file mode 100644
> > index 0000000000..ed48f6e52c
> > --- /dev/null
> > +++ b/.gitpublish
> > @@ -0,0 +1,58 @@
> > +#
> > +# Common git-publish profiles that can be used to send patches to QEMU upstream.
> > +#
> > +# See https://github.com/stefanha/git-publish for more information
> > +#
> > +[gitpublishprofile "default"]
> > +base = master
> > +prefix = PATCH
> > +to = qemu-devel@nongnu.org
> > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> > +
> > +[gitpublishprofile "rfc"]
> > +base = master
> > +prefix = RFC PATCH
> > +to = qemu-devel@nongnu.org
> > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> > +
> > +[gitpublishprofile "stable"]
> > +base = master
> > +prefix = PATCH
> > +to = qemu-devel@nongnu.org
> > +cc = qemu-stable@nongnu.org
> > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> > +
> > +[gitpublishprofile "trivial"]
> > +base = master
> > +prefix = PATCH
> > +to = qemu-devel@nongnu.org
> > +cc = qemu-trivial@nongnu.org
> > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> > +
> > +[gitpublishprofile "block"]
> > +base = master
> > +prefix = PATCH
> > +to = qemu-devel@nongnu.org
> > +cc = qemu-block@nongnu.org
> > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> 
> Why is a custom entry needed for block here (and other things
> below).   Won't running get_maintainer.pl already correctly
> report when a patch needs cc'ing to qemu-block@nongnu.org
> based on MAINTAINER rules ?

Yeah, dropping them should be fine. What do you think, Stefan?

Fam
Stefan Hajnoczi Feb. 14, 2018, 1:34 p.m. | #3
On Wed, Feb 14, 2018 at 09:01:11AM +0800, Fam Zheng wrote:
> On Tue, 02/13 18:09, Daniel P. Berrangé wrote:
> > On Tue, Feb 13, 2018 at 05:34:25PM +0000, Stefan Hajnoczi wrote:
> > > +[gitpublishprofile "block"]
> > > +base = master
> > > +prefix = PATCH
> > > +to = qemu-devel@nongnu.org
> > > +cc = qemu-block@nongnu.org
> > > +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> > 
> > Why is a custom entry needed for block here (and other things
> > below).   Won't running get_maintainer.pl already correctly
> > report when a patch needs cc'ing to qemu-block@nongnu.org
> > based on MAINTAINER rules ?
> 
> Yeah, dropping them should be fine. What do you think, Stefan?

scripts/get_maintainer.pl only works when patches touch files associated
with qemu-block@nongnu.org in MAINTAINERS.  It would be
counter-intuitive for --profile block to not include
qemu-block@nongnu.org, so I think these entries do serve a purpose.

On the other hand, I personally just use --cc qemu-block instead of a
profile for this.  I'll probably only use the default profile.

Fam, if you want it dropped, let me know.  Otherwise, we can leave it
in if there is no further discussion.

Stefan
Fam Zheng Feb. 14, 2018, 1:45 p.m. | #4
On Wed, Feb 14, 2018 at 9:34 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Wed, Feb 14, 2018 at 09:01:11AM +0800, Fam Zheng wrote:
> Fam, if you want it dropped, let me know.  Otherwise, we can leave it
> in if there is no further discussion.

Yeah, I think we can drop block/arm/s390/ppc and rely on get_maintainer.pl here.

Fam
Paolo Bonzini Feb. 14, 2018, 2:08 p.m. | #5
On 13/02/2018 19:09, Daniel P. Berrangé wrote:
> Why is a custom entry needed for block here (and other things
> below).   Won't running get_maintainer.pl already correctly
> report when a patch needs cc'ing to qemu-block@nongnu.org
> based on MAINTAINER rules ?

Sometimes you want to CC block people even on a non-block patch, for
example if you want their opinion about using the API.

We should probably add at least arm and ppc profiles, too.

> --nogit --nogit-fallback

QEMU's getmaintainer (unlike the Linux version!) already tries to avoid
falling back to git if a maintainer is listed.  Are these options necessary?

Paolo
Paolo Bonzini Feb. 14, 2018, 2:27 p.m. | #6
On 14/02/2018 15:08, Paolo Bonzini wrote:
> On 13/02/2018 19:09, Daniel P. Berrangé wrote:
>> Why is a custom entry needed for block here (and other things
>> below).   Won't running get_maintainer.pl already correctly
>> report when a patch needs cc'ing to qemu-block@nongnu.org
>> based on MAINTAINER rules ?
> 
> Sometimes you want to CC block people even on a non-block patch, for
> example if you want their opinion about using the API.
> 
> We should probably add at least arm and ppc profiles, too.

Nevermind, they were there below qemu-block.

Paolo

>> --nogit --nogit-fallback
> 
> QEMU's getmaintainer (unlike the Linux version!) already tries to avoid
> falling back to git if a maintainer is listed.  Are these options necessary?
> 
> Paolo
>
Eric Blake Feb. 14, 2018, 3:21 p.m. | #7
On 02/14/2018 07:34 AM, Stefan Hajnoczi wrote:
> On Wed, Feb 14, 2018 at 09:01:11AM +0800, Fam Zheng wrote:
>> On Tue, 02/13 18:09, Daniel P. Berrangé wrote:
>>> On Tue, Feb 13, 2018 at 05:34:25PM +0000, Stefan Hajnoczi wrote:
>>>> +[gitpublishprofile "block"]
>>>> +base = master
>>>> +prefix = PATCH
>>>> +to = qemu-devel@nongnu.org
>>>> +cc = qemu-block@nongnu.org
>>>> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
>>>
>>> Why is a custom entry needed for block here (and other things
>>> below).   Won't running get_maintainer.pl already correctly
>>> report when a patch needs cc'ing to qemu-block@nongnu.org
>>> based on MAINTAINER rules ?
>>
>> Yeah, dropping them should be fine. What do you think, Stefan?
> 
> scripts/get_maintainer.pl only works when patches touch files associated
> with qemu-block@nongnu.org in MAINTAINERS.  It would be
> counter-intuitive for --profile block to not include
> qemu-block@nongnu.org, so I think these entries do serve a purpose.

More precisely, the cover letter does not touch any files, and git 
doesn't know how to automatically cc the cover letter to any recipient 
of any of the rest of the series.  Having these entries ensures that the 
cover letter goes to the right list (on the other hand, git publish 
itself could be taught to be smarter about cc'ing the cover letter to 
every email scraped from later in the series, even if git send-email 
can't do that yet).

> 
> On the other hand, I personally just use --cc qemu-block instead of a
> profile for this.  I'll probably only use the default profile.
> 
> Fam, if you want it dropped, let me know.  Otherwise, we can leave it
> in if there is no further discussion.
> 
> Stefan
>
Philippe Mathieu-Daudé Feb. 14, 2018, 5:37 p.m. | #8
On 02/13/2018 02:34 PM, Stefan Hajnoczi wrote:
> From: Fam Zheng <famz@redhat.com>
> 
> git-publish [1] is a convenient tool to send patches and has been
> popular among QEMU developers.  Recently it has been made available in
> Fedora official repo thanks to Stefan's work.

Also Debian:
https://packages.debian.org/sid/git-publish

> 
> One nice feature of the tool is a per-project configuration with
> profiles, especially in which the cccmd option is a handy method to
> create the Cc list.
> 
> [1]: https://github.com/stefanha/git-publish
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Message-id: 20180205054725.25634-2-famz@redhat.com
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  .gitpublish | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 .gitpublish
> 
> diff --git a/.gitpublish b/.gitpublish
> new file mode 100644
> index 0000000000..ed48f6e52c
> --- /dev/null
> +++ b/.gitpublish
> @@ -0,0 +1,58 @@
> +#
> +# Common git-publish profiles that can be used to send patches to QEMU upstream.
> +#
> +# See https://github.com/stefanha/git-publish for more information
> +#
> +[gitpublishprofile "default"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "rfc"]
> +base = master
> +prefix = RFC PATCH
> +to = qemu-devel@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "stable"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-stable@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "trivial"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-trivial@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "block"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-block@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "arm"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-arm@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "s390"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-s390@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
> +
> +[gitpublishprofile "ppc"]
> +base = master
> +prefix = PATCH
> +to = qemu-devel@nongnu.org
> +cc = qemu-ppc@nongnu.org
> +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
>
Fam Zheng Feb. 25, 2018, 6:04 a.m. | #9
On Wed, 02/14 15:08, Paolo Bonzini wrote:
> On 13/02/2018 19:09, Daniel P. Berrangé wrote:
> > Why is a custom entry needed for block here (and other things
> > below).   Won't running get_maintainer.pl already correctly
> > report when a patch needs cc'ing to qemu-block@nongnu.org
> > based on MAINTAINER rules ?
> 
> Sometimes you want to CC block people even on a non-block patch, for
> example if you want their opinion about using the API.
> 
> We should probably add at least arm and ppc profiles, too.
> 
> > --nogit --nogit-fallback
> 
> QEMU's getmaintainer (unlike the Linux version!) already tries to avoid
> falling back to git if a maintainer is listed.  Are these options necessary?
> 

Falling back to git is usually more noisy than useful even when a maintainer is
not listed, in my past experience. That's why I don't use it myself and propose
such here. But I'm open to different opinions.

Fam
Fam Zheng Feb. 25, 2018, 6:05 a.m. | #10
On Wed, 02/14 14:37, Philippe Mathieu-Daudé wrote:
> On 02/13/2018 02:34 PM, Stefan Hajnoczi wrote:
> > From: Fam Zheng <famz@redhat.com>
> > 
> > git-publish [1] is a convenient tool to send patches and has been
> > popular among QEMU developers.  Recently it has been made available in
> > Fedora official repo thanks to Stefan's work.
> 
> Also Debian:
> https://packages.debian.org/sid/git-publish

Thank you for doing that! I will add the pointer.

Fam

Patch

diff --git a/.gitpublish b/.gitpublish
new file mode 100644
index 0000000000..ed48f6e52c
--- /dev/null
+++ b/.gitpublish
@@ -0,0 +1,58 @@ 
+#
+# Common git-publish profiles that can be used to send patches to QEMU upstream.
+#
+# See https://github.com/stefanha/git-publish for more information
+#
+[gitpublishprofile "default"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "rfc"]
+base = master
+prefix = RFC PATCH
+to = qemu-devel@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "stable"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-stable@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "trivial"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-trivial@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "block"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-block@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "arm"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-arm@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "s390"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-s390@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null
+
+[gitpublishprofile "ppc"]
+base = master
+prefix = PATCH
+to = qemu-devel@nongnu.org
+cc = qemu-ppc@nongnu.org
+cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null