What is the license of generated code?

I’m trying to figure out what the software license would be for code
(scaffolds, etc) generated by Rails.

Basically, if I set up a Rails project, can or should I be able to claim
copyright (and therefore have the ability to license under e.g. GPL)
over the files generated by :-

  • The “rails” command that creates the initial tree of files
  • The output of “generate scaffold”
  • The output of the third-party “generate ajax_scaffold”

In other words, how should I distribute all the files that constitute my
software?

In practice, just checking everything into svn whether it was
auto-generated or not seems to be the norm, and while I’m happy to do
that, it’s not clear to me what licenses apply to such code.

If anyone has really thought about this, please share your experiences!

-jim

On Tuesday, May 09, 2006, at 11:41 PM, Jim C. wrote:


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

My guess is that all generated code would have the same license as rails
itself, which is MIT IIRC.

_Kevin

My guess is that all generated code would have the same license as rails
itself, which is MIT IIRC.

_Kevin

This may be true it may not be, I wouldn’t make any assumptions about
this.

The pregenerated code is nothing more than the output of a program based
on your input. The output of a program is generally considered to be
owned by user not the application developer.

I’d be very interested in seeing more discussion on this…

Basically, if I set up a Rails project, can or should I be able to claim
copyright (and therefore have the ability to license under e.g. GPL)
over the files generated by :-

-jim

I usually prefer the GPL but I don’t see any problem with using the MIT
license for scripted web applications.

The primary thing the GPL brings over the MIT is a guarantee the end
user will get the source code.

In the case of a rails app it’s a bit hard to not give them the source.

It’s a lot easier to just use the MIT license.

There’s the added benifit that if you actually do write a useful chunk
of code it’s more likely that the Rails community would be able to
re-use it.

Jim C. wrote:

I’m trying to figure out what the software license would be for code
(scaffolds, etc) generated by Rails.

Basically, if I set up a Rails project, can or should I be able to claim
copyright (and therefore have the ability to license under e.g. GPL)
over the files generated by :-

I usually prefer the GPL but I don’t see any problem with using the MIT
license for scripted web applications.

The primary thing the GPL brings over the MIT is a guarantee the end
user will get the source code.

In the case of a rails app it’s a bit hard to not give them the source.

It’s a lot easier to just use the MIT license.

There’s the added benifit that if you actually do write a useful chunk
of code it’s more likely that the Rails community would be able to
re-use it.

On Tuesday, May 09, 2006, at 8:07 PM, Jeremy K. wrote:

  • The “rails” command that creates the initial tree of files

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

So following that links logic, a substantial portion of the generated
code is ‘copied’ into the scaffold files. For the most part scaffolds
just substitute variables into text templates within the code. It could
be construed to suggest that the generated code is subject to the
original licsense.

_Kevin

On May 9, 2006, at 6:14 PM, Kevin O. wrote:

  • The output of “generate scaffold”
    If anyone has really thought about this, please share your
    experiences!

My guess is that all generated code would have the same license as
rails
itself, which is MIT IIRC.

http://www.gnu.org/licenses/gpl-faq.html#GPLOutput

jeremy

On Wed, May 10, 2006 at 03:34:07AM -0000, Kevin O. wrote:

be construed to suggest that the generated code is subject to the
original licsense.

Yes; that is the sort of situation I see as being possible. In the GPL
FAQ example, the output of ‘ls’ cannot be controlled by the author of
‘ls’, but the ouput of ‘bison’ might be.

Closer to Rails, my example would be the AjaxScaffold – the app itself
is under the MIT license, so I can modify and use the app for my own
purposes, including commercially. That’s fine, as far as it goes; but I
don’t intend to modify AjaxScaffold itself, as I don’t actually need
that freedom. I just want to use it’s output.

If I wanted to GPL my project, could I GPL the files that have been
generated by AjaxScaffold in my application? Well, if I don’t own the
copyright on them, I can’t, can I?

(This is more specifically interesting if I don’t want to modify the
generated code; while the Rails scaffold CRUD is a little ugly,
AjaxScaffold output is nice, and suitable to leave in as a back-end DB
manipulation feature)

Ideally, code generators would include a header comment that explicitly
laid out the usage terms, but that would probably require the original
author to understand them, and I don’t think that’s true at the moment.

-jim

GPL brings that advantage, yes, and it also means that modifications
are going to come sailing in from all over the place, however it also
makes it virtually impossible for 95% of us who make money from Rails
development from being able to do so right now. Our money does not
come from salaries, we do not have the comfort of sales teams, we
fight the dragons of insolvency daily.

You’ve completely lost me? The point of my post was that in this
application (web applications with scripted lanaguages) there is just
not that much of a difference. The MIT license does not require you to
distribute the source code to your customer, so in theory you could
compile or obfuscate it before releaseing it. The GPL would prevent you
from doing this.

Do you think all the web apps out there being developed in RoR would
be built using Rails if we all had to give our code, generated code,
plugins and other stuff away for free, because of what will now
probably be known as the ‘Bison-like output issue’?

Again you’ve lost me? If you are contracted to write applications with
Rails you basically have to give them your source, it’s a scripted
language. If you’re hosting a service you’re not required to give out
the source with either license.

Also, as the MIT license is much freer (in the ‘liberal’ sense) than
the GPL, providing you retain the Copyright, there is absolutely
nothing stopping you creating a fork of the Rails code base and your
generated code base and releasing it under the GPL license. Doing it
the other way around however, is impossible: you can’t convert GPL
code into a MIT/BSD license code base, it’s a one-way street.

I think you need to look into this a bit more. Neither license allows
re-licensing.

In other words, right now, there are REALLY, REALLY good reasons why
MIT is the way to go on Rails, plugins, engines and other assorted
bits and bobs. However, if you’re desperate for a GPL licensed Rails,
you may feel free to go forth and create that fork.

I’m not sure why you say this, but since I’m the only one you quoted
I’ll respond. This was my point exactly. The Rails community chose the
MIT license we as Rails developers should do the same. Even those
developers who may prefer the GPL because in this case the GPL gets you
so little.

On Tue, May 09, 2006 at 11:41:09PM +0100, Jim C. wrote:

I’m trying to figure out what the software license would be for code
(scaffolds, etc) generated by Rails.

And because I mentioned the GPL, people have started debating the
coverage of that particular license, especially as compared to the MIT.

As far as I can see, this is a complete red herring. The GPL FAQ link
was talking about copyright law, not the GPL itself, and was trying to
describe the circumstances under which the copyright status of a
program
could extend to its output - which is precisely what I was
interested in.

I will not be modifying the Rails application. I won’t be modifying the
AjaxScaffold gem either. Therefore the only (initial) concern that I
have with their license is my freedom to use the programs, and I have
that. Whether they’re GPL or MIT at this stage has no relevance. They
could even be pure Microsoft …

The Bison situation is relevant. Here’s the direct FAQ link
http://www.gnu.org/licenses/gpl-faq.html#TOCCanIUseGPLToolsForNF

To paraphrase :-

“Some programs copy parts of themselves into the output for technical
reasons … the copied text in the output is covered by the same license
that covers it in the source code. Meanwhile, the part of the output
which is derived from the program’s input inherits the copyright status
of the input.”

This seems to fit the description of the output of both the initial
‘rails’ command, and that of a generator like AjaxScaffold.
The implication – regardless of the license in use – is that the
majority of the output of these commands is under the copyright of the
program author, and not me.

In the case of ‘rails’, my only input was the path name for the
application, and therefore I can only claim copyright over those lines
of the files that mention that path name explicitly. Everything else
belongs to DHH, and the core team.

In the case of the AjaxScaffold generator, my input is my database
schema, and therefore everything other than the model and column names
in the view belongs to Richard W…

In the case of Bison, the FAQ indicates that they have explicitly
disclaimed copyright over the output; however I note that the current
Bison distribution seems to use only a generic GPL, and I can’t see any
exceptions.
http://cvs.savannah.gnu.org/viewcvs/bison/COPYING?rev=1.2&root=bison&view=markup

This claim of copyright over the output of such programs seems to be an
unexpected outcome of copyright law. If it is true, I’d like to see some
explicit comments in the generated files; or an explicit grant in the
license, similar to the one claimed for Bison.

Otherwise, “All your (unmodified) base belong to us” …

-jim

On 10 May 2006, at 03:46, Michael G. wrote:

The primary thing the GPL brings over the MIT is a guarantee the end
user will get the source code.

This is the worst place in the World to do a GPL vs. MIT/BSD war,
however:

GPL brings that advantage, yes, and it also means that modifications
are going to come sailing in from all over the place, however it also
makes it virtually impossible for 95% of us who make money from Rails
development from being able to do so right now. Our money does not
come from salaries, we do not have the comfort of sales teams, we
fight the dragons of insolvency daily.

Do you think all the web apps out there being developed in RoR would
be built using Rails if we all had to give our code, generated code,
plugins and other stuff away for free, because of what will now
probably be known as the ‘Bison-like output issue’?

Also, as the MIT license is much freer (in the ‘liberal’ sense) than
the GPL, providing you retain the Copyright, there is absolutely
nothing stopping you creating a fork of the Rails code base and your
generated code base and releasing it under the GPL license. Doing it
the other way around however, is impossible: you can’t convert GPL
code into a MIT/BSD license code base, it’s a one-way street.

In other words, right now, there are REALLY, REALLY good reasons why
MIT is the way to go on Rails, plugins, engines and other assorted
bits and bobs. However, if you’re desperate for a GPL licensed Rails,
you may feel free to go forth and create that fork.

Just don’t expect professional developers to have the stomach for it
right now. :frowning:

In the case of a rails app it’s a bit hard to not give them the
source.

It’s only a bit hard - not impossible. I’ve not tried creating an exe
with Rails yet, but in theory, it’s possible (and if it isn’t now, it
soon will be).


Paul R.