New optional field: extra-license-files #970

Closed
wants to merge 5 commits into
from

Projects

None yet

6 participants

@mboes

Hi,

some licenses cannot be presented as self contained single files. This is the case of the LGPL for example, or for code that is dual licensed. In such situations, some packages list one of the license files in the license-file field, and the rest in extra-source-files. But this additional license material isn't really a source file, just like any other, and should be installed in exactly the same location as the file listed in the license-file field.

The LGPL is a license that modifies the GPL. Therefore to distribute code under the LGPL, one should include the GPL license file, in say COPYING, and the LGPL license file, in say COPYING.LESSER (see [1] and [2]). This series of patches allows one to have an "extra-license-files" field in a package description. This allows one to list COPYING.LESSER as the license of project, if it is under LGPL, and list COPYING in "extra-license-files", for reference. Dual licensed code could reference a LICENSE file in the license-file field, which would contain pointers to the files for each of the licenses that the code can be distributed under, and these files would be listed in "extra-license-files".

I think it is important that all license related files be distinguished semantically from other source files of the package and treated accordingly. Accordingly, I hope that you will consider merging this patch series into mainline.

Regards,

-- Mathieu

mboes added some commits Jul 9, 2012
@mboes mboes Indentation. 53f74ad
@mboes mboes New extra-license-files field.
This field is intended to list additional license material. This is
useful when eg the license is supplemented by additional permissions
and/or conditions. Notably, the LGPL is structured in this way: it
amends the GPL with additional permissions, therefore one should
distribute both the GPL in COPYING and the LGPL in COPYING.LESSER.
dd1493c
@mboes mboes Check that extra license files really exist. 057e640
@mboes mboes Document extra-license-files. 0b3567c
@mboes mboes Install extra license files along with license file. 6281a9a
@mboes

Hi, is there anything blocking thes patches being pulled in, that I could possibly work on?

-- Mathieu

@23Skidoo
Haskell member

We're waiting for @dcoutts to take a look.

@23Skidoo
Haskell member

The code looks fine to me, can someone who has an opinion about licenses ( @dcoutts ? @kosmikus ? ) take a look?

@bmillwood

I know this is a trivial issue, and I have no particular authority, but why extra-license-files rather than just allowing license-files in place of license-file? (both would have to be supported, but only one would be necessary/allowed in a given package).

@dcoutts
Haskell member

Right, I think it'd be more sensible to allow license-file to just take a list of files. Perhaps allow "license-files" as an alias, but not really essential.

@mboes

I have made another pull request featuring a different patch, introducing license-files and making license-file a special case of that. However, I'll explain the rational here for my original patch series.

The rational for introducing an extra-license-files field separate from license-file is that even when there are multiple license files, the cabal file author still should document the main license file, and treat the other license files as "supporting documentation".

In the case of the LGPL, a file containing the text of the GPL is included because the LGPL is a modification to that reference license. Therefore the actual license file is the text of LGPL, and the text of the GPL is only there for reference, because the LGPL links to it. Likewise, in a dual licensing arrangement, the author should write a license file stating the dual licensing, make that the file referenced in the license-file field, and then include the two licenses in to ancillary files and list them in the extra-license-files field.

@tibbe
Haskell member

If I understood your comment correctly this pull request is now superseded by #1048.

@tibbe tibbe closed this Mar 15, 2013
@23Skidoo 23Skidoo reopened this Oct 17, 2013
@23Skidoo
Haskell member

Reopened by @mboes's request - see discussion in #1048.

@tibbe
Haskell member

This cross-linking back and forth between these pull requests is starting to get confusing. Could we please use this pull requests for the remaining discussions/code review?

@mboes

@dcoutts @tibbe @23Skidoo This pull request has been open for over a year. I have addressed the only comments that were made about this pull request in a separate pull request, #1048, but I believe this pull request to be the better approach. To quote what I said there:

I now think keeping license-file and introducing extra-license-files can be done with more readable code than making license-file an alias to license-files.

Is there anything I can do to help with pull request being merged?

@tibbe
Haskell member

@dcoutts I don't have a strong opinion on license-files vs extra-license-files, but I'd like to reach a decision now. Could you please weigh in if you feel strongly. Otherwise I'll merge as-is.

@phaazon

license-files sounds the better choice to me. extra-license-files would just duplicate things and it would be annoying to deal with I guess.

@23Skidoo
Haskell member

+1 on calling it license-files.

@dcoutts
Haskell member

license-files

@tibbe
Haskell member

@mboes Already, we've settled on license files. Do you want to change this pull request or want me to use another one?

@dcoutts
Haskell member

I'm working on updating and merging this, using license-files. I'm adjusting things to allow either license-file or license-files and do the right thing.

@dcoutts
Haskell member

Ok, done. Available for review as pull req #1642.

I've taken @mboes patches, and changed it to allow either license-file or license-files. From the docs:

`license-file:` _filename_ or `license-files:` _filename list_
:   The name of a file(s) containing the precise copyright license for
    this package. The license file(s) will be installed with the package.

    If you have multiple license files then use the `license-files`
    field instead of (or in addition to) the `license-file` field.
@23Skidoo
Haskell member

Closing in favour of #1642.

@23Skidoo 23Skidoo closed this Jan 8, 2014
@dcoutts
Haskell member

@mboes Thanks for your perseverance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment