qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Victor Toso <victortoso@redhat.com>,
	qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>,
	John Snow <jsnow@redhat.com>,
	Andrea Bolognani <abologna@redhat.com>
Subject: Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface
Date: Thu, 7 Nov 2024 13:35:45 +0000	[thread overview]
Message-ID: <ZyzCMVYHM2F72oMa@redhat.com> (raw)
In-Reply-To: <Zyy7XGTRuCS0yGgI@redhat.com>

On Thu, Nov 07, 2024 at 01:06:36PM +0000, Daniel P. Berrangé wrote:
> On Thu, Nov 07, 2024 at 01:36:49PM +0100, Markus Armbruster wrote:
> > Daniel P. Berrangé <berrange@redhat.com> writes:
> > 
> > > Bringing this thread back from the dead, since I had an in-person
> > > discussion on a key question below at KVM Forum this year and want
> > > to record it here.
> > 
> > [...]
> > 
> > > To recap the situation
> > >
> > >  * The license of the code generator itself does not determine the
> > >    license of the output generated code
> > 
> > For instance, GNU Bison is GPLv3+, but the parts the generator emits
> > (the parser skeleton) come with a special exception.
> > 
> > Such exceptions need to be granted by the copyright holder.  As long as
> > the code generating Go is not a derived work, the copyright holder
> > situation should be simple enough to make this practical.
> > 
> > >  * The license of the inputs to the code generator, may or may
> > >    not, determine the license of the output generated code depending
> > >    on use context
> > >
> > > The primary input to the code generator is the QAPI schema, which is part
> > > of QEMU and thus licensed GPL-2.0-or-later.
> > >
> > > The QAPI schema includes both the API definitions AND the API documentation
> > > text.
> > >
> > > We can make the case that as the QEMU public interface, consuming the
> > > API definitions in the QAPI schema for the purpose of generating code
> > > is "fair use", and thus the output generated code does NOT need to
> > > match the GPL-2.0-or-later license of the QAPI schema. We can choose
> > > the code license, and a maximally permissive license looks appropriate.
> > 
> > Having this argument confirmed by an actual expert seems advisable.
> 
> IANAL, but .... :-)

> My proposition is that, in most cases, comments are not used by
> the "compilation", or "code generation" phase. They are seen by
> the "parsing" phase only and thus dont contribute to the contents
> of the output binary code.


> None the less, we have raised this position/viewpoint with experts
> for a second opinion.

Another thought or two...

From a QEMU community POV we have no license problem no matter what,
so from a legal POV this risk free for us.

The licensing question is purely one for application developers consuming
our work who want to avoid GPL for some reason.

Lets say my interpretation is wrong, or even that it is right, but the
app developers disagree, or are none the less unhappy in some way. What
impact would this have for QEMU ?

Code generation is practically free once the generator is written, so we
just run it twice, storing the output in git on different branches with
parallel tags, once with comments and once without. eg

The "main" branch (and associated versioned vX.Y.Z tags) in qemu-go-qapi.git
provide the full QAPI go source + copied QAPI comments under MIT-0 AND
GPL-2.0-or-later

The "minimal" branch (and associated vX.Y.Z-minimal tags) in qemu-go-qapi.git
provide only the  QAPI go source, without any comments under MIT-0 only.



With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-11-07 13:36 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 12:19 [RFC PATCH v2 0/8] qapi: add generator for Golang interface Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 1/8] qapi: golang: Generate qapi's enum types in Go Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate " Victor Toso
2022-07-05 15:45   ` Andrea Bolognani
2022-08-17 14:04     ` Victor Toso
2022-08-19 16:27       ` Andrea Bolognani
2022-08-22  6:59         ` Victor Toso
2022-08-29 11:27           ` Markus Armbruster
2022-08-29 13:31             ` Victor Toso
2022-09-02 14:49   ` Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct " Victor Toso
2022-06-17 14:41   ` Daniel P. Berrangé
2022-06-17 15:23     ` Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union " Victor Toso
2022-07-05 15:45   ` Andrea Bolognani
2022-07-05 16:35     ` Daniel P. Berrangé
2022-07-06  9:28       ` Andrea Bolognani
2022-07-06  9:37         ` Daniel P. Berrangé
2022-07-06  9:48           ` Daniel P. Berrangé
2022-07-06 12:20             ` Andrea Bolognani
2022-08-17 16:25             ` Victor Toso
2022-08-19  7:20               ` Victor Toso
2022-08-19 15:25                 ` Andrea Bolognani
2022-08-22  6:33                   ` Victor Toso
2022-08-17 16:06         ` Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event " Victor Toso
2022-07-05 15:45   ` Andrea Bolognani
2022-07-05 16:47     ` Daniel P. Berrangé
2022-07-06 14:53       ` Andrea Bolognani
2022-07-06 15:07         ` Daniel P. Berrangé
2022-07-06 16:22           ` Andrea Bolognani
2022-08-18  7:55       ` Victor Toso
2022-08-18  7:47     ` Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 6/8] qapi: golang: Generate qapi's command " Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go Victor Toso
2022-07-05 15:46   ` Andrea Bolognani
2022-07-05 16:49     ` Daniel P. Berrangé
2022-08-17 15:00       ` Victor Toso
2022-06-17 12:19 ` [RFC PATCH v2 8/8] qapi: golang: document skip function visit_array_types Victor Toso
2022-06-27  7:15 ` [RFC PATCH v2 0/8] qapi: add generator for Golang interface Markus Armbruster
2022-06-27 12:48   ` Victor Toso
2022-06-27 15:29     ` Markus Armbruster
2022-08-18  8:04       ` Victor Toso
2022-07-05 15:46 ` Andrea Bolognani
2022-08-17 14:24   ` Victor Toso
2022-08-29 11:53     ` Markus Armbruster
2022-08-29 14:05       ` Victor Toso
2024-11-07 10:43 ` Daniel P. Berrangé
2024-11-07 12:36   ` Markus Armbruster
2024-11-07 13:06     ` Daniel P. Berrangé
2024-11-07 13:35       ` Daniel P. Berrangé [this message]
2024-11-07 14:18       ` Markus Armbruster
2024-11-08  9:43   ` Victor Toso

Reply instructions:

You may reply publicly 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=ZyzCMVYHM2F72oMa@redhat.com \
    --to=berrange@redhat.com \
    --cc=abologna@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=victortoso@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).