Make license/licenses field mandatory

Jeremy Hinegardner jeremy at hinegardner.org
Wed Oct 12 14:44:16 EDT 2011


On Wed, Oct 12, 2011 at 02:29:41PM -0400, Jon 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?
> 
> Is it your perspective that the field is mandatory and the field's value must be something other than one of the following?
> 
>   s.license = ""
>     - or -
>   s.licenses = []
> 
> If the field is not present and "correct", do you believe things similar to
> `gem build mygem.gemspec` should refuse to create a .gem?

I can see the benefits of making the license strongly encouraged. Possibly issue
a warning if the license is not filled out with a non-empty value. RPM lint has
a great warning on this, and there a list of many many licenses with decent
shortnames at:

    https://fedoraproject.org/wiki/Licensing#Software_License_List

I could see a case for; an error if the license is empty, and a warning if it is
not one of the known licenses. Also, to help prevent proprietary code from
getting accidentally pushed to rubygems.org; rubygems.org could be updated by
default refusing to accept gems that have 'Proprietary' in the license field.
This of course could be overridden...

Just my $.02.

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              jeremy at hinegardner.org 



More information about the RubyGems-Developers mailing list