Make license/licenses field mandatory

Marcus Rueckert darix at
Fri Oct 14 15:16:35 EDT 2011

On 2011-10-13 12:58:29 -0700, Eric Hodel wrote:
> On Oct 12, 2011, at 6:54 AM, Pavol Rusnak wrote:
> > I'd like to propose making license/licenses field mandatory. While doing
> > rubygem packages for Linux distributions we have to deal with licenses a
> > lot and currently not having a license field in gemspec is the only
> > thing stopping us from doing automated packaging. One has to unpack the
> > gem, search for the license text and change the field by hand. If these
> > fields were mandatory (i.e. one or the other), it would make the whole
> > process much easier. In my opinion the license is very important aspect
> > of the gem similarly important as its name and I think also non-Linux
> > parts of Ruby ecosystem would benefit from that change. What do you think?
> The first goal of RubyGems is to provide useful tools for Rubyists to
> share libraries.  The needs of repackagers comes second.
> I'm fine with a warning at gem build time if the license is not set.
> I don't want to make it suddenly mandatory as that disrupts a gem
> author's workflow.  In order for this to be successful for gem
> packagers, Rubyists need to agree it is a good thing.  Some authors
> will avoid upgrading RubyGems if mandatory requirements are added too
> quickly.  Perhaps in the future it can be made mandatory if gem
> authors agree it is a good thing, but not for the present.
> As a repackager, if the license field is not set you should submit a
> patch to the gem author to set it for them.

This is really not just about repackager.

It also affects users, like others have pointed out. Just to name the
recent example of the BSD4 clause fun with the bcrypt-ruby dependency
for rails 3.1. :)

rubygems would be an ideal please to make gem packager aware of that a
license is needed. you dont want to know how often i have to open bugs
with gems "what is the license of your code"? because there is neither a
license header in the source files, or a license/copyright file or at
least a mention of the license in the readme. (not even in their SCM)

And proposing to use the license tag standard recently pushed by the big
linux distributions will also make integration work easier. no need to
invent new acronyms, no need for mapping tables between the different
names. the syntax can even handle multiple license in the same package
and knows if the conditions are "and" or "or".

So i would really like to vouch for making the the check a bit more strict
when a license tag is found in the gem spec, but having it optional with
warning for a few releases.


           openSUSE - SUSE Linux is my linux
               openSUSE is good for you

More information about the RubyGems-Developers mailing list