All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC PATCH 0/2] scancpan patches
@ 2018-08-13 13:11 Christopher McCrory
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long Christopher McCrory
  0 siblings, 2 replies; 12+ messages in thread
From: Christopher McCrory @ 2018-08-13 13:11 UTC (permalink / raw)
  To: buildroot

These should help scancpan do the right thing.
Tested on perl-astro-suntime, gpl_3
and perl-appconfig, Config.in desciption too long

Christopher McCrory (2):
  scancpan: support more licenses
  scancpan: wrap abstract if too long

 utils/scancpan | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

-- 
2.14.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 13:11 [Buildroot] [RFC PATCH 0/2] scancpan patches Christopher McCrory
@ 2018-08-13 13:11 ` Christopher McCrory
  2018-08-13 15:42   ` François Perrad
                     ` (2 more replies)
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long Christopher McCrory
  1 sibling, 3 replies; 12+ messages in thread
From: Christopher McCrory @ 2018-08-13 13:11 UTC (permalink / raw)
  To: buildroot

from perl-module-build Module/Build/Base.pm %licenses
GPL, LGPT, and BSD

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
---
 utils/scancpan | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/utils/scancpan b/utils/scancpan
index da8e7b91ac..2070e2a233 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -692,8 +692,19 @@ while (my ($distname, $dist) = each %dist) {
                     : $dist->{license};
         # BR requires license name as in http://spdx.org/licenses/
         $license =~ s|apache_2_0|Apache-2.0|;
+        $license =~ s|apache_1_1|Apache-1.1|;
+        $license =~ s|apache|Apache-2.0|;
         $license =~ s|artistic_2|Artistic-2.0|;
+        $license =~ s|artistic|Artistic-1.0|;
+        $license =~ s|lgpl_2_1|LGPL-2.1|;
+        $license =~ s|lgpl_3_0|LGPL-3.0|;
+        $license =~ s|lgpl|LGPL-2.1|;
+        $license =~ s|bsd|BSD|;
+        $license =~ s|gpl_2|GPL-2.0|;
+        $license =~ s|gpl_3|GPL-3.0|;
+        $license =~ s|gpl|GPL-1.0|;
         $license =~ s|mit|MIT|;
+        $license =~ s|mozilla_1_1|Mozilla-1.1|;
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPL-1.0+|;
         my $license_files = join q{ }, keys %{$license_files{$distname}};
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long
  2018-08-13 13:11 [Buildroot] [RFC PATCH 0/2] scancpan patches Christopher McCrory
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
@ 2018-08-13 13:11 ` Christopher McCrory
  2018-08-13 16:29   ` François Perrad
  2018-08-16  3:07   ` Ricardo Martincoski
  1 sibling, 2 replies; 12+ messages in thread
From: Christopher McCrory @ 2018-08-13 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
---
 utils/scancpan | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utils/scancpan b/utils/scancpan
index 2070e2a233..f8411079e1 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -484,6 +484,8 @@ use HTTP::Tiny;
 use Safe;
 use MetaCPAN::API::Tiny;
 use Digest::SHA qw(sha256_hex);
+use Text::Wrap;
+$Text::Wrap::columns = 70;
 
 # Below, 5.026 should be aligned with the version of perl actually
 # bundled in Buildroot:
@@ -655,7 +657,7 @@ while (my ($distname, $dist) = each %dist) {
     my $brname = brname( $fsname );
     mkdir $dirname unless -d $dirname;
     if ($need_target{$distname} && ($force || !-f $cfgname)) {
-        my $abstract = $dist->{abstract};
+        my $abstract = wrap("","\t  ",$dist->{abstract});
         my $homepage = $dist->{resources}->{homepage} || qq{https://metacpan.org/release/${distname}};
         say qq{write ${cfgname}} unless $quiet;
         open my $fh, q{>}, $cfgname;
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
@ 2018-08-13 15:42   ` François Perrad
  2018-08-13 16:54   ` Thomas Petazzoni
  2018-08-14 11:33   ` Thomas Petazzoni
  2 siblings, 0 replies; 12+ messages in thread
From: François Perrad @ 2018-08-13 15:42 UTC (permalink / raw)
  To: buildroot

2018-08-13 15:11 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

> from perl-module-build Module/Build/Base.pm %licenses
> GPL, LGPT, and BSD
>
> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
>

Acked-by: Francois Perrad <francois.perrad@gadz.org>


> ---
>  utils/scancpan | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/utils/scancpan b/utils/scancpan
> index da8e7b91ac..2070e2a233 100755
> --- a/utils/scancpan
> +++ b/utils/scancpan
> @@ -692,8 +692,19 @@ while (my ($distname, $dist) = each %dist) {
>                      : $dist->{license};
>          # BR requires license name as in http://spdx.org/licenses/
>          $license =~ s|apache_2_0|Apache-2.0|;
> +        $license =~ s|apache_1_1|Apache-1.1|;
> +        $license =~ s|apache|Apache-2.0|;
>          $license =~ s|artistic_2|Artistic-2.0|;
> +        $license =~ s|artistic|Artistic-1.0|;
> +        $license =~ s|lgpl_2_1|LGPL-2.1|;
> +        $license =~ s|lgpl_3_0|LGPL-3.0|;
> +        $license =~ s|lgpl|LGPL-2.1|;
> +        $license =~ s|bsd|BSD|;
> +        $license =~ s|gpl_2|GPL-2.0|;
> +        $license =~ s|gpl_3|GPL-3.0|;
> +        $license =~ s|gpl|GPL-1.0|;
>          $license =~ s|mit|MIT|;
> +        $license =~ s|mozilla_1_1|Mozilla-1.1|;
>          $license =~ s|openssl|OpenSSL|;
>          $license =~ s|perl_5|Artistic or GPL-1.0+|;
>          my $license_files = join q{ }, keys %{$license_files{$distname}};
> --
> 2.14.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180813/bd0c601a/attachment.html>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long Christopher McCrory
@ 2018-08-13 16:29   ` François Perrad
  2018-08-16  3:07   ` Ricardo Martincoski
  1 sibling, 0 replies; 12+ messages in thread
From: François Perrad @ 2018-08-13 16:29 UTC (permalink / raw)
  To: buildroot

2018-08-13 15:11 GMT+02:00 Christopher McCrory <chrismcc@gmail.com>:

> Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
> ---
>  utils/scancpan | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/utils/scancpan b/utils/scancpan
> index 2070e2a233..f8411079e1 100755
> --- a/utils/scancpan
> +++ b/utils/scancpan
> @@ -484,6 +484,8 @@ use HTTP::Tiny;
>  use Safe;
>  use MetaCPAN::API::Tiny;
>  use Digest::SHA qw(sha256_hex);
> +use Text::Wrap;
>

Ok, Text::Wrap is a core module, so the script scancpan stays self-depend.

>
> +$Text::Wrap::columns = 70;
>
>  # Below, 5.026 should be aligned with the version of perl actually
>  # bundled in Buildroot:
> @@ -655,7 +657,7 @@ while (my ($distname, $dist) = each %dist) {
>      my $brname = brname( $fsname );
>      mkdir $dirname unless -d $dirname;
>      if ($need_target{$distname} && ($force || !-f $cfgname)) {
> -        my $abstract = $dist->{abstract};
> +        my $abstract = wrap("","\t  ",$dist->{abstract});
>

In this script, I don't use quote but q{} and qq{}.
And I put one space after comma.

Fran?ois


>          my $homepage = $dist->{resources}->{homepage} || qq{
> https://metacpan.org/release/${distname}};
>          say qq{write ${cfgname}} unless $quiet;
>          open my $fh, q{>}, $cfgname;
> --
> 2.14.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180813/7dfe8759/attachment.html>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
  2018-08-13 15:42   ` François Perrad
@ 2018-08-13 16:54   ` Thomas Petazzoni
  2018-08-13 17:35     ` Christopher McCrory
  2018-08-14 11:33   ` Thomas Petazzoni
  2 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2018-08-13 16:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 13 Aug 2018 06:11:34 -0700, Christopher McCrory wrote:

>          $license =~ s|apache_2_0|Apache-2.0|;
> +        $license =~ s|apache_1_1|Apache-1.1|;
> +        $license =~ s|apache|Apache-2.0|;

So just "apache" always means it's Apache-2.0 ?

>          $license =~ s|artistic_2|Artistic-2.0|;
> +        $license =~ s|artistic|Artistic-1.0|;
> +        $license =~ s|lgpl_2_1|LGPL-2.1|;
> +        $license =~ s|lgpl_3_0|LGPL-3.0|;
> +        $license =~ s|lgpl|LGPL-2.1|;

Just "lgpl" always means it's LGPL-2.1 ?

> +        $license =~ s|bsd|BSD|;

"BSD" is not a license. There are several different BSD licenses.
Though with just "bsd" as an initial information, there's not much you
can do :-/

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 16:54   ` Thomas Petazzoni
@ 2018-08-13 17:35     ` Christopher McCrory
  2018-08-13 21:16       ` Yann E. MORIN
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher McCrory @ 2018-08-13 17:35 UTC (permalink / raw)
  To: buildroot

On Mon, Aug 13, 2018 at 9:54 AM, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> On Mon, 13 Aug 2018 06:11:34 -0700, Christopher McCrory wrote:
>
> >          $license =~ s|apache_2_0|Apache-2.0|;
> > +        $license =~ s|apache_1_1|Apache-1.1|;
> > +        $license =~ s|apache|Apache-2.0|;
>
> So just "apache" always means it's Apache-2.0 ?
>
> >          $license =~ s|artistic_2|Artistic-2.0|;
> > +        $license =~ s|artistic|Artistic-1.0|;
> > +        $license =~ s|lgpl_2_1|LGPL-2.1|;
> > +        $license =~ s|lgpl_3_0|LGPL-3.0|;
> > +        $license =~ s|lgpl|LGPL-2.1|;
>
> Just "lgpl" always means it's LGPL-2.1 ?
>
> Apparently



> > +        $license =~ s|bsd|BSD|;
>
> "BSD" is not a license. There are several different BSD licenses.
> Though with just "bsd" as an initial information, there's not much you
> can do :-/
>
>
yea :(


AFAICT, this is the source from Base.pm


  my %licenses = (
    perl         => 'Perl_5',
    apache       => 'Apache_2_0',
    apache_1_1   => 'Apache_1_1',
    artistic     => 'Artistic_1',
    artistic_2   => 'Artistic_2',
    lgpl         => 'LGPL_2_1',
    lgpl2        => 'LGPL_2_1',
    lgpl3        => 'LGPL_3_0',
    bsd          => 'BSD',
    gpl          => 'GPL_1',
    gpl2         => 'GPL_2',
    gpl3         => 'GPL_3',
    mit          => 'MIT',
    mozilla      => 'Mozilla_1_1',
    restrictive  => 'Restricted',
    open_source  => undef,
    unrestricted => undef,
    unknown      => undef,
  );

 # TODO - would be nice to not have these here, since they're more
  # properly stored only in Software::License
  my %license_urls = (
    perl         => 'http://dev.perl.org/licenses/',
    apache       => 'http://apache.org/licenses/LICENSE-2.0',
    apache_1_1   => 'http://apache.org/licenses/LICENSE-1.1',
    artistic     => 'http://opensource.org/licenses/artistic-license.php',
    artistic_2   => 'http://opensource.org/licenses/artistic-license-2.0.php
',
    lgpl         => 'http://opensource.org/licenses/lgpl-license.php',
    lgpl2        => 'http://opensource.org/licenses/lgpl-2.1.php',
    lgpl3        => 'http://opensource.org/licenses/lgpl-3.0.html',
    bsd          => 'http://opensource.org/licenses/bsd-license.php',
    gpl          => 'http://opensource.org/licenses/gpl-license.php',
    gpl2         => 'http://opensource.org/licenses/gpl-2.0.php',
    gpl3         => 'http://opensource.org/licenses/gpl-3.0.html',
    mit          => 'http://opensource.org/licenses/mit-license.php',
    mozilla      => 'http://opensource.org/licenses/mozilla1.1.php',
    restrictive  => undef,
    open_source  => undef,
    unrestricted => undef,
    unknown      => undef,
  );






> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
>



-- 
Christopher McCrory
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180813/739880ce/attachment.html>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 17:35     ` Christopher McCrory
@ 2018-08-13 21:16       ` Yann E. MORIN
  2018-08-13 22:52         ` Arnout Vandecappelle
  0 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2018-08-13 21:16 UTC (permalink / raw)
  To: buildroot

Christopher, All,

On 2018-08-13 10:35 -0700, Christopher McCrory spake thusly:
> On Mon, Aug 13, 2018 at 9:54 AM, Thomas Petazzoni < [1]thomas.petazzoni@bootlin.com> wrote:
>   > +? ? ? ? $license =~ s|lgpl|LGPL-2.1|;
>   Just "lgpl" always means it's LGPL-2.1 ?
> Apparently

IANAL...

Usually, if any license of the GPL familly is used without any version
specified, then it means just any version can be used:

    https://www.gnu.org/licenses/gpl.html

    14. Revised Versions of this License.

    [...]  If the Program does not specify a version number of the GNU
    General Public License, you may choose any version ever published
    by the Free Software Foundation.

Similar clauses can be had for each license. So I doubt 'lgpl' would
stand for LGPL-2.1.

Besides, see below...

>   > +? ? ? ? $license =~ s|bsd|BSD|;
>   "BSD" is not a license. There are several different BSD licenses.
>   Though with just "bsd" as an initial information, there's not much you
>   can do :-/
> 
> yea :(
> AFAICT, this is the source from Base.pm

What 'Base.pm' are you talink about? On my Ubuntu 17.10, I get:

    $ apt-file search /Base.pm |wc -l
    191

> ? my %licenses = (
> ??? perl???????? => 'Perl_5',
> ??? apache?????? => 'Apache_2_0',
> ??? apache_1_1?? => 'Apache_1_1',
> ??? artistic???? => 'Artistic_1',
> ??? artistic_2?? => 'Artistic_2',
> ??? lgpl???????? => 'LGPL_2_1',
> ??? lgpl2??????? => 'LGPL_2_1',
> ??? lgpl3??????? => 'LGPL_3_0',
> ??? bsd????????? => 'BSD',
> ??? gpl????????? => 'GPL_1',
> ??? gpl2???????? => 'GPL_2',
> ??? gpl3???????? => 'GPL_3',
> ??? mit????????? => 'MIT',
> ??? mozilla????? => 'Mozilla_1_1',
> ??? restrictive? => 'Restricted',
> ??? open_source? => undef,
> ??? unrestricted => undef,
> ??? unknown????? => undef,
> ? );
> 
> ?# TODO - would be nice to not have these here, since they're more
> ? # properly stored only in Software::License
> ? my %license_urls = (
> ??? perl???????? => 'http://dev.perl.org/licenses/',
> ??? apache?????? => 'http://apache.org/licenses/LICENSE-2.0',
> ??? apache_1_1?? => 'http://apache.org/licenses/LICENSE-1.1',
> ??? artistic???? => 'http://opensource.org/licenses/artistic-license.php',
> ??? artistic_2?? => 'http://opensource.org/licenses/artistic-license-2.0.php',
> ??? lgpl???????? => 'http://opensource.org/licenses/lgpl-license.php',
> ??? lgpl2??????? => 'http://opensource.org/licenses/lgpl-2.1.php',
> ??? lgpl3??????? => 'http://opensource.org/licenses/lgpl-3.0.html',
> ??? bsd????????? => 'http://opensource.org/licenses/bsd-license.php',
> ??? gpl????????? => 'http://opensource.org/licenses/gpl-license.php',
> ??? gpl2???????? => 'http://opensource.org/licenses/gpl-2.0.php',
> ??? gpl3???????? => 'http://opensource.org/licenses/gpl-3.0.html',
> ??? mit????????? => 'http://opensource.org/licenses/mit-license.php',
> ??? mozilla????? => 'http://opensource.org/licenses/mozilla1.1.php',
> ??? restrictive? => undef,
> ??? open_source? => undef,
> ??? unrestricted => undef,
> ??? unknown????? => undef,
> ? );

And at the same time, still on my Ubuntu 17.10, I was looking at
/usr/share/perl/5.26.0/CPAN/Meta/Converter.pm, which has;

    # The "old" values were defined by Module::Build, and were often vague.
    # I have
    # made the decisions below based on reading Module::Build::API and how
    # clearly
    # it specifies the version of the license.
    my %license_map_2 = (
      (map { $_ => $_ } @valid_licenses_2),
      apache      => 'apache_2_0',  # clearly stated as 2.0
      artistic    => 'artistic_1',  # clearly stated as 1
      artistic2   => 'artistic_2',  # clearly stated as 2
      gpl         => 'open_source', # we don't know which GPL; punt
      lgpl        => 'open_source', # we don't know which LGPL; punt
      mozilla     => 'open_source', # we don't know which MPL; punt
      perl        => 'perl_5',      # clearly Perl 5
      restrictive => 'restricted',
    );

So... The resolution is not that clear-cut IMNSHO...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 21:16       ` Yann E. MORIN
@ 2018-08-13 22:52         ` Arnout Vandecappelle
  0 siblings, 0 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2018-08-13 22:52 UTC (permalink / raw)
  To: buildroot



On 13-08-18 23:16, Yann E. MORIN wrote:
> Christopher, All,
> 
> On 2018-08-13 10:35 -0700, Christopher McCrory spake thusly:
>> On Mon, Aug 13, 2018 at 9:54 AM, Thomas Petazzoni < [1]thomas.petazzoni@bootlin.com> wrote:
>>   > +? ? ? ? $license =~ s|lgpl|LGPL-2.1|;
>>   Just "lgpl" always means it's LGPL-2.1 ?
>> Apparently
> 
> IANAL...
> 
> Usually, if any license of the GPL familly is used without any version
> specified, then it means just any version can be used:

 But that is not the case here. In this case, it's most likely an incomplete
manifest, not a package that is actually under any GPL version.

 So instead, scancpan should issue a warning.

 I have the feeling that the licenses mentioned in perl packages are not very
reliable, unless it is "perl".

> 
>     https://www.gnu.org/licenses/gpl.html
> 
>     14. Revised Versions of this License.
> 
>     [...]  If the Program does not specify a version number of the GNU
>     General Public License, you may choose any version ever published
>     by the Free Software Foundation.
> 
> Similar clauses can be had for each license. So I doubt 'lgpl' would
> stand for LGPL-2.1.
> 
> Besides, see below...
> 
>>   > +? ? ? ? $license =~ s|bsd|BSD|;
>>   "BSD" is not a license. There are several different BSD licenses.
>>   Though with just "bsd" as an initial information, there's not much you
>>   can do :-/
>>
>> yea :(
>> AFAICT, this is the source from Base.pm
> 
> What 'Base.pm' are you talink about? On my Ubuntu 17.10, I get:
> 
>     $ apt-file search /Base.pm |wc -l
>     191
> 
>> ? my %licenses = (
>> ??? perl???????? => 'Perl_5',
>> ??? apache?????? => 'Apache_2_0',
>> ??? apache_1_1?? => 'Apache_1_1',
>> ??? artistic???? => 'Artistic_1',
>> ??? artistic_2?? => 'Artistic_2',
>> ??? lgpl???????? => 'LGPL_2_1',
>> ??? lgpl2??????? => 'LGPL_2_1',
>> ??? lgpl3??????? => 'LGPL_3_0',
>> ??? bsd????????? => 'BSD',
>> ??? gpl????????? => 'GPL_1',
>> ??? gpl2???????? => 'GPL_2',
>> ??? gpl3???????? => 'GPL_3',
>> ??? mit????????? => 'MIT',
>> ??? mozilla????? => 'Mozilla_1_1',
>> ??? restrictive? => 'Restricted',
>> ??? open_source? => undef,
>> ??? unrestricted => undef,
>> ??? unknown????? => undef,
>> ? );
>>
>> ?# TODO - would be nice to not have these here, since they're more
>> ? # properly stored only in Software::License
>> ? my %license_urls = (
>> ??? perl???????? => 'http://dev.perl.org/licenses/',
>> ??? apache?????? => 'http://apache.org/licenses/LICENSE-2.0',
>> ??? apache_1_1?? => 'http://apache.org/licenses/LICENSE-1.1',
>> ??? artistic???? => 'http://opensource.org/licenses/artistic-license.php',
>> ??? artistic_2?? => 'http://opensource.org/licenses/artistic-license-2.0.php',
>> ??? lgpl???????? => 'http://opensource.org/licenses/lgpl-license.php',
>> ??? lgpl2??????? => 'http://opensource.org/licenses/lgpl-2.1.php',
>> ??? lgpl3??????? => 'http://opensource.org/licenses/lgpl-3.0.html',
>> ??? bsd????????? => 'http://opensource.org/licenses/bsd-license.php',
>> ??? gpl????????? => 'http://opensource.org/licenses/gpl-license.php',
>> ??? gpl2???????? => 'http://opensource.org/licenses/gpl-2.0.php',
>> ??? gpl3???????? => 'http://opensource.org/licenses/gpl-3.0.html',
>> ??? mit????????? => 'http://opensource.org/licenses/mit-license.php',
>> ??? mozilla????? => 'http://opensource.org/licenses/mozilla1.1.php',
>> ??? restrictive? => undef,
>> ??? open_source? => undef,
>> ??? unrestricted => undef,
>> ??? unknown????? => undef,
>> ? );
> 
> And at the same time, still on my Ubuntu 17.10, I was looking at
> /usr/share/perl/5.26.0/CPAN/Meta/Converter.pm, which has;
> 
>     # The "old" values were defined by Module::Build, and were often vague.
>     # I have
>     # made the decisions below based on reading Module::Build::API and how
>     # clearly
>     # it specifies the version of the license.
>     my %license_map_2 = (
>       (map { $_ => $_ } @valid_licenses_2),
>       apache      => 'apache_2_0',  # clearly stated as 2.0
>       artistic    => 'artistic_1',  # clearly stated as 1
>       artistic2   => 'artistic_2',  # clearly stated as 2
>       gpl         => 'open_source', # we don't know which GPL; punt
>       lgpl        => 'open_source', # we don't know which LGPL; punt
>       mozilla     => 'open_source', # we don't know which MPL; punt

 That sounds correct :-)

 Regards,
 Arnout

>       perl        => 'perl_5',      # clearly Perl 5
>       restrictive => 'restricted',
>     );
> 
> So... The resolution is not that clear-cut IMNSHO...
> 
> Regards,
> Yann E. MORIN.
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
  2018-08-13 15:42   ` François Perrad
  2018-08-13 16:54   ` Thomas Petazzoni
@ 2018-08-14 11:33   ` Thomas Petazzoni
  2018-08-15 11:57     ` Christopher McCrory
  2 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2018-08-14 11:33 UTC (permalink / raw)
  To: buildroot

Hello Christopher,

So, taking Arnout/Yann feedback into account.

On Mon, 13 Aug 2018 06:11:34 -0700, Christopher McCrory wrote:

> diff --git a/utils/scancpan b/utils/scancpan
> index da8e7b91ac..2070e2a233 100755
> --- a/utils/scancpan
> +++ b/utils/scancpan
> @@ -692,8 +692,19 @@ while (my ($distname, $dist) = each %dist) {
>                      : $dist->{license};
>          # BR requires license name as in http://spdx.org/licenses/
>          $license =~ s|apache_2_0|Apache-2.0|;
> +        $license =~ s|apache_1_1|Apache-1.1|;
> +        $license =~ s|apache|Apache-2.0|;

In this case, scancpan should not conclude that Apache-2.0 is used,
because "apache" is not specific enough. Instead, it should emit a
warning.

>          $license =~ s|artistic_2|Artistic-2.0|;
> +        $license =~ s|artistic|Artistic-1.0|;
> +        $license =~ s|lgpl_2_1|LGPL-2.1|;
> +        $license =~ s|lgpl_3_0|LGPL-3.0|;
> +        $license =~ s|lgpl|LGPL-2.1|;

Same.

> +        $license =~ s|bsd|BSD|;

Same.

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses
  2018-08-14 11:33   ` Thomas Petazzoni
@ 2018-08-15 11:57     ` Christopher McCrory
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher McCrory @ 2018-08-15 11:57 UTC (permalink / raw)
  To: buildroot

hello

On Tue, Aug 14, 2018 at 4:33 AM, Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Christopher,
>
> So, taking Arnout/Yann feedback into account.
>
> On Mon, 13 Aug 2018 06:11:34 -0700, Christopher McCrory wrote:
>
> > diff --git a/utils/scancpan b/utils/scancpan
> > index da8e7b91ac..2070e2a233 100755
> > --- a/utils/scancpan
> > +++ b/utils/scancpan
> > @@ -692,8 +692,19 @@ while (my ($distname, $dist) = each %dist) {
> >                      : $dist->{license};
> >          # BR requires license name as in http://spdx.org/licenses/
> >          $license =~ s|apache_2_0|Apache-2.0|;
> > +        $license =~ s|apache_1_1|Apache-1.1|;
> > +        $license =~ s|apache|Apache-2.0|;
>
> In this case, scancpan should not conclude that Apache-2.0 is used,
> because "apache" is not specific enough. Instead, it should emit a
> warning.
>
>
I looked at CPAN/Meta/Converter.pm that is used to generate the META.json
files, it contains

*  apache      => 'apache_2_0',  # clearly stated as 2.0

But I'm going with you and warn



> >          $license =~ s|artistic_2|Artistic-2.0|;
> > +        $license =~ s|artistic|Artistic-1.0|;
> > +        $license =~ s|lgpl_2_1|LGPL-2.1|;
> > +        $license =~ s|lgpl_3_0|LGPL-3.0|;
> > +        $license =~ s|lgpl|LGPL-2.1|;
>
> Same.
>
>
yea


> > +        $license =~ s|bsd|BSD|;
>
> Same.
>
>
In one of the perl bits that generate the META.json files it adds the URL

https://opensource.org/licenses/bsd-license.php

which is the BSD 2 clause version.  But a google search with

site:metacpan.org 'LICENCE: bsd'

finds a mixture of two and three clause versions


I'll gen up another submission with these fixes.



Best regards,
>
> Thomas Petazzoni
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
>



-- 
Christopher McCrory
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180815/80f622e9/attachment.html>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long
  2018-08-13 13:11 ` [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long Christopher McCrory
  2018-08-13 16:29   ` François Perrad
@ 2018-08-16  3:07   ` Ricardo Martincoski
  1 sibling, 0 replies; 12+ messages in thread
From: Ricardo Martincoski @ 2018-08-16  3:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, Aug 13, 2018 at 10:11 AM, Christopher McCrory wrote:

> +++ b/utils/scancpan
> @@ -484,6 +484,8 @@ use HTTP::Tiny;
>  use Safe;
>  use MetaCPAN::API::Tiny;
>  use Digest::SHA qw(sha256_hex);
> +use Text::Wrap;
> +$Text::Wrap::columns = 70;

Please use 62 instead of 70 here ...

>  
>  # Below, 5.026 should be aligned with the version of perl actually
>  # bundled in Buildroot:
> @@ -655,7 +657,7 @@ while (my ($distname, $dist) = each %dist) {
>      my $brname = brname( $fsname );
>      mkdir $dirname unless -d $dirname;
>      if ($need_target{$distname} && ($force || !-f $cfgname)) {
> -        my $abstract = $dist->{abstract};
> +        my $abstract = wrap("","\t  ",$dist->{abstract});

... so the help text generated here always fits in:
<tab><2 spaces><62 chars>
"tab counts for 8" as described in:
http://nightly.buildroot.org/#writing-rules-config-in

>          my $homepage = $dist->{resources}->{homepage} || qq{https://metacpan.org/release/${distname}};
>          say qq{write ${cfgname}} unless $quiet;
>          open my $fh, q{>}, $cfgname;
> -- 

Regards,
Ricardo

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-08-16  3:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 13:11 [Buildroot] [RFC PATCH 0/2] scancpan patches Christopher McCrory
2018-08-13 13:11 ` [Buildroot] [RFC PATCH 1/2] scancpan: support more licenses Christopher McCrory
2018-08-13 15:42   ` François Perrad
2018-08-13 16:54   ` Thomas Petazzoni
2018-08-13 17:35     ` Christopher McCrory
2018-08-13 21:16       ` Yann E. MORIN
2018-08-13 22:52         ` Arnout Vandecappelle
2018-08-14 11:33   ` Thomas Petazzoni
2018-08-15 11:57     ` Christopher McCrory
2018-08-13 13:11 ` [Buildroot] [RFC PATCH 2/2] scancpan: wrap abstract if too long Christopher McCrory
2018-08-13 16:29   ` François Perrad
2018-08-16  3:07   ` Ricardo Martincoski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.