Re: Script to generate common license texts

2015-09-05 Thread Simon McVittie
On 05/09/15 11:23, Jonas Smedegaard wrote:
> Quoting Balasankar C (2015-09-04 20:42:19)
>> Yeah. I know that. Why I asked for such a script is that some of the 
>> packages I dealt with just mentioned "Released under XYZ license. 
>> Copyright 20xx MNO" without any explicit license text (they should've, 
>> but they don't) which means they just use the _boilerplate_ license 
>> text that is commonly used.
>
> Either upstream states actual licensing terms, or refer to external 
> licensing terms.  It seems we use the term "boilerplate" differently: I 
> don't call it "boilerplate" when upstream states actual licensing terms 
> (e.g. Expat written out rather than by reference).

The three things the ftp-masters have stated the copyright file needs,
with their jargon names, are:

- the *copyright statement* (copyright holder, and dates if available)
- the *license grant* (statement by the copyright holder that you may
  copy/modify the work under a specified license)
- the full text of the *license* (which may be replaced by a reference
  to /usr/share/common-licenses if it is one of our common licenses)

The license grant is the statement by your upstream that tells you that
license A applies to work B. Some licenses (like the GPL and MPL) have a
conventional license grant ("boilerplate") that the license author
suggests should be used; but if your upstream has used a different form
of license grant, you should quote what your upstream actually said, not
the conventional boilerplate.

For short BSD-style licenses, the license grant and the license are
often the same thing: the conventional use is to paste the entire
license into each file. For longer licenses like the GPL and MPL, that
would be impractical, so authors put a short license grant in each file,
with a reference to full license text elsewhere.

For instance, take openarena-data:


Most of it is GPL-2 or GPL-2+, with several increasingly short license
grants. I refer to external GPL text because it is in common-licenses,
but if the license was something different (e.g. Creative Commons) then
I would have to quote the full license text instead.

A couple of files are under a simple all-permissive license, which is
included in the relevant files in its entirety (it's only three lines).
Those three lines have two roles: they are the license grant, and also
the full license text.

S



Re: Script to generate common license texts

2015-09-05 Thread Balasankar C
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On ??? 05  2015 03:53 , Jonas Smedegaard wrote:
> Either upstream states actual licensing terms, or refer to external
>  licensing terms.  It seems we use the term "boilerplate"
> differently: I don't call it "boilerplate" when upstream states
> actual licensing terms (e.g. Expat written out rather than by
> reference).
> 
> Upstream "should" do whatever they want - but yes, if upstream
> state licensing terms ambiguously then we cannot redistribute their
> project, so it makes sense to suggest them to clarify if we are
> uncertain what they mean (e.g. when stating "MIT" without URL or
> actual licensing terms - because that may refer to several
> different actual terms).
> 
> When upstream states "Released under MIT." then a) the actual
> licensing terms are not included and b) actual licensing terms are
> uncertain. We then should add in debian/copyright the upstream
> statement verbatim, add the actual licensing terms - also verbatim,
> and ideally also add a comment on our reasoning for resolving
> license terms from license grant.
> 
> When upstream states "Released under GPL 2." then terms are
> similarly not included but (arguably) certain.  We then should
> again add in debian/copyright the upstream statement verbatim, and
> (because we can) refer to /usr/share/common-licenses/GPL-2. We do
> *not* need¹ to also add the boilerplate included in the GPL license
> text under the title "How to Apply These Terms to Your New
> Programs" - exactly because we are not creating a new program ;-)
> 
> 
> If by boilerplate you mean common sets of actual licensing terms
> (e.g. Expat) then true, it might be convenient with a tool that can
> spit out verbatim texts we do not ship below
> /usr/share/common-licenses.
> 
> If by boilerplate you mean common _reference_ for sets of common 
> licensing term (e.g. the FSF-recommended text for GPL licenses)
> then wrong: There is no need for adding such additional text to 
> debian/copyright if upstream did not state it using those exact
> same words. Because such text is then neither verbatim copy of
> upstream statement nor actual licensing terms.
> 
> 
> 
> If you have trouble locating actual licensing terms, then take that
> as indication that those reading the copyright file you are writing
> may have trouble too: When you've succeeded locating the actual
> licensing terms then consider add a comment on where you found
> them, and your reasoning for why that location is believed to be
> reasonably correct.
> 
> Practivally, if you use the machine-readable copyright file format,
> then first line has a URL to a web page, which links to licenses at
> SPDX: http://spdx.org/licenses
> 
> 
> Hope that helps,

Cool. That makes it clear. Thanks.


- -- 
Regards
Balasankar C
http://balasankarc.in
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCgAGBQJV6sPVAAoJEJbtq5sua3Fxe28H/1VcX248/4jdEaV0CrUvAecB
+ubKPik8XWeiHsFDJS5PGo3ZOgYO3Xaj2+kA1GFMXGZFlWwwILK1xVqC5k+VLuIo
uhvShB3rcuJzfrOlZo2rVkQbxMaZWeM638uq3ee6AHs0jyT4qb3hVONp/775LDT/
Lx34hDRMGPjIFhLJgLwXGsu+uTUOa1CYUcJJwc0z0umk6PqlVW4xt3eIQ7JK8YWj
NrT5bOoEZvcHNQbnI6ATAVFKLL/Uc3P+K2RLeBVjfoE+QxzRuboO+H2cdG2C1TeD
lyzXHdpcd2d68CepmLn32D0Hr4ki5lF0zuU3CKtvPbh9o0IRl/3bedXB6mA0qMk=
=KssL
-END PGP SIGNATURE-


0x2E6B7171.asc
Description: application/pgp-keys


Re: Script to generate common license texts

2015-09-05 Thread Jonas Smedegaard
Quoting Balasankar C (2015-09-04 20:42:19)
> On ശനി 05 സെപ്റ്റംബര്‍ 2015 12:01 രാവിലെ, Jonas Smedegaard wrote:
>> Quoting Balasankar C (2015-09-04 19:38:20)
>>> Is there any script which takes abbreviation of a license (like 
>>> GPL-3+) as input and generates the license text that can be used in 
>>> debian/copyright (80 character wrapped, one space before each line, 
>>> paragraph separated with periods - the whole deal.
>>
>> Please beware that debian/copyright strings should reflect the actual 
>> _verbatim_ text stated by the copyright holders, not any generic 
>> _boilerplate_ proposed by e.g. the Free Software Foundation.
>
> Yeah. I know that. Why I asked for such a script is that some of the 
> packages I dealt with just mentioned "Released under XYZ license. 
> Copyright 20xx MNO" without any explicit license text (they should've, 
> but they don't) which means they just use the _boilerplate_ license 
> text that is commonly used. For example, many Ruby gems are Expat 
> licensed and use boilerplate text.

Either upstream states actual licensing terms, or refer to external 
licensing terms.  It seems we use the term "boilerplate" differently: I 
don't call it "boilerplate" when upstream states actual licensing terms 
(e.g. Expat written out rather than by reference).

Upstream "should" do whatever they want - but yes, if upstream state 
licensing terms ambiguously then we cannot redistribute their project, 
so it makes sense to suggest them to clarify if we are uncertain what 
they mean (e.g. when stating "MIT" without URL or actual licensing terms 
- because that may refer to several different actual terms).

When upstream states "Released under MIT." then a) the actual licensing 
terms are not included and b) actual licensing terms are uncertain. We 
then should add in debian/copyright the upstream statement verbatim, add 
the actual licensing terms - also verbatim, and ideally also add a 
comment on our reasoning for resolving license terms from license grant.

When upstream states "Released under GPL 2." then terms are similarly 
not included but (arguably) certain.  We then should again add in 
debian/copyright the upstream statement verbatim, and (because we can) 
refer to /usr/share/common-licenses/GPL-2. We do *not* need¹ to also add 
the boilerplate included in the GPL license text under the title "How to 
Apply These Terms to Your New Programs" - exactly because we are not 
creating a new program ;-)


> The scripts would just be used to reduce the time in searching for the 
> _boilerplate_ text in the Internet (or other packages), and that too 
> only if the upstream doesn't provide any verbatim text.

If by boilerplate you mean common sets of actual licensing terms (e.g. 
Expat) then true, it might be convenient with a tool that can spit out 
verbatim texts we do not ship below /usr/share/common-licenses.

If by boilerplate you mean common _reference_ for sets of common 
licensing term (e.g. the FSF-recommended text for GPL licenses) then 
wrong: There is no need for adding such additional text to 
debian/copyright if upstream did not state it using those exact same 
words. Because such text is then neither verbatim copy of upstream 
statement nor actual licensing terms.


> I fail to provide a general use case where this can be directly 
> applied, but to share one of my experiences I recently dealt with a 
> package that was released under W3C license (that only, no verbatim 
> text) and I spent quite some time searching for the license text to be 
> included in debian/copyright (not the complete license text, but 
> something like we have for GPL-3.0+ - the one I mentioned in my 
> original mail)

If you have trouble locating actual licensing terms, then take that as 
indication that those reading the copyright file you are writing may 
have trouble too: When you've succeeded locating the actual licensing 
terms then consider add a comment on where you found them, and your 
reasoning for why that location is believed to be reasonably correct.

Practivally, if you use the machine-readable copyright file format, then 
first line has a URL to a web page, which links to licenses at SPDX: 
http://spdx.org/licenses


Hope that helps,

 - Jonas


¹ Lintian may warn about lack of GPL boilerplate in debian/copyright but 
that's because lintian is not clever enough to read human language which 
may correctly refer the the actual licensing terms in other ways than 
using the boilerplate recognizable by lintian: Suppress such warnings if 
certain the reference indeed does exist.

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Script to generate common license texts

2015-09-04 Thread Jose-Luis Rivas
I have used neosnippet for it
https://github.com/ghostbar/vim-snippets/blob/master/snippets/_/licenses.snip

-- 
⨳ PGP 0x13EC43EEB9AC8C43 ⨳ https://ghostbar.co



Re: Script to generate common license texts

2015-09-04 Thread Osamu Aoki
Hi,

Here is another suggestion ...  use debmake!

On Fri, Sep 04, 2015 at 11:08:20PM +0530, Balasankar C wrote:
> Hi,
> 
> Is there any script which takes abbreviation of a license (like
> GPL-3+) as input and generates the license text that can be used in
> debian/copyright (80 character wrapped, one space before each line,
> paragraph separated with periods - the whole deal.

As others has suggested, just taking care GPL3+ is not worth it and it
should be extracted from the source as verbatim copy.

In that sense, if you use debmake as template generating initial
Debianization tool, it creates such file by scanning all the source fles
and extracting such text into DEP-5 format. (debmake is in testing but
can function in stable if installed via dpkg -i)

Please note it creates just a template copyright file.  Your manual
inspaction and editting is absolute requirement.  (But it should be a
lot easier.)

Osamu



Re: Script to generate common license texts

2015-09-04 Thread Craig Small
On Fri, Sep 04, 2015 at 11:08:20PM +0530, Balasankar C wrote:
> Is there any script which takes abbreviation of a license (like
> GPL-3+) as input and generates the license text that can be used in
> debian/copyright (80 character wrapped, one space before each line,
> paragraph separated with periods - the whole deal.
Steal them or use them from dh-make.
$ ls /usr/share/debhelper/dh_make/licenses/
apache  artistic  blank  bsd  gpl2  gpl3  lgpl2  lgpl3  mit

If you just lift them a few :%s/%blah%/this/g in vi or equivalent
and you're done.

 - Craig
-- 
Craig Small (@smallsees)   http://enc.com.au/   csmall at : enc.com.au
Debian GNU/Linux   http://www.debian.org/   csmall at : debian.org
GPG fingerprint:5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5



Re: Script to generate common license texts

2015-09-04 Thread Balasankar C
On ശനി 05 സെപ്റ്റംബര്‍ 2015 12:01 രാവിലെ, Jonas Smedegaard wrote:
> Hi Balasankar,
> 
> Quoting Balasankar C (2015-09-04 19:38:20)
>> Is there any script which takes abbreviation of a license (like 
>> GPL-3+) as input and generates the license text that can be used in 
>> debian/copyright (80 character wrapped, one space before each line, 
>> paragraph separated with periods - the whole deal.
> 
> Please beware that debian/copyright strings should reflect the actual 
> _verbatim_ text stated by the copyright holders, not any generic 
> _boilerplate_ proposed by e.g. the Free Software Foundation.

Yeah. I know that. Why I asked for such a script is that some of the
packages I dealt with just mentioned "Released under XYZ license.
Copyright 20xx MNO" without any explicit license text (they should've,
but they don't) which means they just use the _boilerplate_ license text
that is commonly used. For example, many Ruby gems are Expat licensed
and use boilerplate text.

Being that said, I believe debian/copyright should be manually rechecked
for confirmation as copyright info is one of the things we care most in
Debian. :)
The scripts would just be used to reduce the time in searching for the
_boilerplate_ text in the Internet (or other packages), and that too
only if the upstream doesn't provide any verbatim text.

I fail to provide a general use case where this can be directly applied,
but to share one of my experiences I recently dealt with a package that
was released under W3C license (that only, no verbatim text) and I spent
quite some time searching for the license text to be included in
debian/copyright (not the complete license text, but something like we
have for GPL-3.0+ - the one I mentioned in my original mail)


-- 
Regards
Balasankar C
http://balasankarc.in



Re: Script to generate common license texts

2015-09-04 Thread Jonas Smedegaard
Hi Balasankar,

Quoting Balasankar C (2015-09-04 19:38:20)
> Is there any script which takes abbreviation of a license (like 
> GPL-3+) as input and generates the license text that can be used in 
> debian/copyright (80 character wrapped, one space before each line, 
> paragraph separated with periods - the whole deal.

Please beware that debian/copyright strings should reflect the actual 
_verbatim_ text stated by the copyright holders, not any generic 
_boilerplate_ proposed by e.g. the Free Software Foundation.


> Is there any script which does this already? If not, can I write one 
> that supports all DFSG-happy licenses and add it to devscripts?

I fail to see the actual (sensible!) use case for such script.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Script to generate common license texts

2015-09-04 Thread Balasankar C
Hi,
[Don't CC me. I am subscribed to the list]

On വെള്ളി 04 സെപ്റ്റംബര്‍ 2015 11:37 വൈകു, Carsten Schoenert wrote:
> I was successful using the cme command [1] from the package
> libconfig-model-dpkg-perl [2]  while refreshing the copyright
> information for Icedove to create a base for further working. But there
> are surly other tools.
>
> [1]
> https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/
> [2] https://packages.qa.debian.org/libc/libconfig-model-dpkg-perl.html
Thanks. Let me take a look at cme and licensecheck2dep5.


-- 
Regards
Balasankar C
http://balasankarc.in



Re: Script to generate common license texts

2015-09-04 Thread Markus Koschany
Am 04.09.2015 um 19:38 schrieb Balasankar C:
[...]
> Is there any script which does this already? If not, can I write one
> that supports all DFSG-happy licenses and add it to devscripts?
> 

Hi,

You can use a combination of licensecheck (devscripts) and
licensecheck2dep5 (cdbs) to accomplish your task:

licensecheck --copyright -r . | /usr/lib/cdbs/licensecheck2dep5 >
debian/copyright

I think the output/detection could be improved and a patch to devscripts
is surely welcome.

Cheers,

Markus



signature.asc
Description: OpenPGP digital signature


Re: Script to generate common license texts

2015-09-04 Thread Carsten Schoenert
Hello Balasankar,

Am 04.09.2015 um 19:38 schrieb Balasankar C:
> Hi,
> 
> Is there any script which takes abbreviation of a license (like
> GPL-3+) as input and generates the license text that can be used in
> debian/copyright (80 character wrapped, one space before each line,
> paragraph separated with periods - the whole deal.
> 
> For example, if the script is named 'genlicense', the command
> $ genlicense gpl-3.0+
> 
> should give the following output
> 
> License: GPL-3.0+
>  This program is free software: you can redistribute it and/or modify it
> under
>  the terms of the GNU General Public License as published by the Free
> Software
>  Foundation, either version 3 of the License, or (at your option) any later
>  version.
>  .
>  This package is distributed in the hope that it will be useful, but WITHOUT
>  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> FITNESS
>  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
> details.
>  .
>  You should have received a copy of the GNU General Public License along
> with
>  this program. If not, see .
>  .
>  On Debian systems, the complete text of the GNU General Public License
> version
>  3 can be found in "/usr/share/common-licenses/GPL-3".
> 
> 
> 
> Is there any script which does this already? If not, can I write one
> that supports all DFSG-happy licenses and add it to devscripts?

I was successful using the cme command [1] from the package
libconfig-model-dpkg-perl [2]  while refreshing the copyright
information for Icedove to create a base for further working. But there
are surly other tools.

[1]
https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/
[2] https://packages.qa.debian.org/libc/libconfig-model-dpkg-perl.html

-- 
Regards
Carsten Schoenert



Script to generate common license texts

2015-09-04 Thread Balasankar C
Hi,

Is there any script which takes abbreviation of a license (like
GPL-3+) as input and generates the license text that can be used in
debian/copyright (80 character wrapped, one space before each line,
paragraph separated with periods - the whole deal.

For example, if the script is named 'genlicense', the command
$ genlicense gpl-3.0+

should give the following output

License: GPL-3.0+
 This program is free software: you can redistribute it and/or modify it
under
 the terms of the GNU General Public License as published by the Free
Software
 Foundation, either version 3 of the License, or (at your option) any later
 version.
 .
 This package is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS
 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
 .
 You should have received a copy of the GNU General Public License along
with
 this program. If not, see .
 .
 On Debian systems, the complete text of the GNU General Public License
version
 3 can be found in "/usr/share/common-licenses/GPL-3".



Is there any script which does this already? If not, can I write one
that supports all DFSG-happy licenses and add it to devscripts?

-- 
Regards
Balasankar C
http://balasankarc.in