All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies
@ 2018-08-13 16:15 Francois Perrad
  2018-08-13 16:15 ` [Buildroot] [PATCH 2/2] scancpan: warn on undefined LICENSE Francois Perrad
  2018-08-14 13:37 ` [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Francois Perrad @ 2018-08-13 16:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 utils/scancpan | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/utils/scancpan b/utils/scancpan
index 3fcf3944d..a1be3dd80 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -526,6 +526,12 @@ my $mirror = 'http://cpan.metacpan.org';        # a CPAN mirror
 my $mcpan = MetaCPAN::API::Tiny->new(base_url => 'http://fastapi.metacpan.org/v1');
 my $ua = HTTP::Tiny->new();
 
+my %white_list = (
+    'Module-Build' => 1,
+    'Module-Build-Tiny' => 1,
+);
+my @info = ();
+
 sub get_checksum {
     my ($url) = @_;
     my ($path) = $url =~ m|^[^:/?#]+://[^/?#]*([^?#]*)|;
@@ -607,6 +613,8 @@ sub fetch {
             }
             else { # configure, build
                 $build{$distname} = 1;
+                push @info, qq{[$name] suspicious dependency on $distname}
+                    unless exists $white_list{$distname};
             }
         }
         $deps_build{$name} = [keys %build];
@@ -765,6 +773,8 @@ foreach my $distname (keys %need_target) {
 say qq{${cfgname} must contain the following lines:};
 say join qq{\n}, sort keys %pkg;
 
+say join qq{\n}, @info;
+
 __END__
 
 =head1 NAME
-- 
2.17.1

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

* [Buildroot] [PATCH 2/2] scancpan: warn on undefined LICENSE
  2018-08-13 16:15 [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Francois Perrad
@ 2018-08-13 16:15 ` Francois Perrad
  2018-08-14 13:37 ` [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Francois Perrad @ 2018-08-13 16:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 utils/scancpan | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/utils/scancpan b/utils/scancpan
index a1be3dd80..0b4043b5b 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -705,6 +705,10 @@ while (my ($distname, $dist) = each %dist) {
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPL-1.0+|;
         my $license_files = join q{ }, keys %{$license_files{$distname}};
+        if ($license_files && (!$license || $license eq q{unknown})) {
+            push @info, qq{[$distname] undefined LICENSE, see $license_files};
+            $license = q{???};
+        }
         say qq{write ${mkname}} unless $quiet;
         open my $fh, q{>}, $mkname;
         say {$fh} qq{################################################################################};
@@ -718,7 +722,7 @@ while (my ($distname, $dist) = each %dist) {
         say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}};
         say {$fh} qq{${brname}_DEPENDENCIES = ${dependencies}} if $need_target{$distname} && $dependencies;
         say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}} if $need_host{$distname} && $host_dependencies;
-        say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown};
+        say {$fh} qq{${brname}_LICENSE = ${license}} if $license;
         say {$fh} qq{${brname}_LICENSE_FILES = ${license_files}} if $license_files;
         say {$fh} qq{};
         foreach (sort @{$deps_optional{$distname}}) {
-- 
2.17.1

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

* [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies
  2018-08-13 16:15 [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Francois Perrad
  2018-08-13 16:15 ` [Buildroot] [PATCH 2/2] scancpan: warn on undefined LICENSE Francois Perrad
@ 2018-08-14 13:37 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-08-14 13:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 13 Aug 2018 18:15:52 +0200, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  utils/scancpan | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Both applied to next. Thanks!

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

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

end of thread, other threads:[~2018-08-14 13:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 16:15 [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Francois Perrad
2018-08-13 16:15 ` [Buildroot] [PATCH 2/2] scancpan: warn on undefined LICENSE Francois Perrad
2018-08-14 13:37 ` [Buildroot] [PATCH 1/2] scancpan: warn on suspicious host dependencies Thomas Petazzoni

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.