savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] [PATCH 2/2] print_markdown_report: print secti


From: Bruno Félix Rezende Ribeiro
Subject: [Savannah-hackers-public] [PATCH 2/2] print_markdown_report: print section which lists files probably licensed under a non-free license.
Date: Tue, 22 Sep 2015 21:10:36 -0300

---
 gsv-eval.pl | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/gsv-eval.pl b/gsv-eval.pl
index 6dc36f4..ae03872 100755
--- a/gsv-eval.pl
+++ b/gsv-eval.pl
@@ -90,6 +90,7 @@ my @files_missing_copyright;
 my @files_missing_license;
 my %files_shady_copyright;
 my %files_shady_license;
+my %files_nonfree_license;
 my @files_with_linux_term;
 my @files_with_opensource_term;
 my %copyright_holder; # hash of filename => detected name of copyright holder 
(if any), or a warning
@@ -159,6 +160,7 @@ if ($debug) {
        print '@files_missing_license = ', Dumper(address@hidden), "\n";
        print '%files_shady_copyright = ', Dumper(\%files_shady_copyright), 
"\n";
        print '%files_shady_license = ', Dumper(\%files_shady_license), "\n";
+       print '%files_nonfree_license = ', Dumper(\%files_nonfree_license), 
"\n";
        print '%licenses = ', Dumper(\%licenses),"\n";
 }
 
@@ -611,7 +613,10 @@ sub detect_license
          );
 
         my $possible_json = ($text =~ /The Software shall be used for Good, 
not Evil/ && $possible_x11);
-        $possible_x11 = 0 if $possible_json;
+        if ($possible_json) {
+            $possible_x11 = 0;
+            $files_nonfree_license{$filename} = 
'[JSON](http://www.gnu.org/licenses/license-list.en.html#JSON)';
+        }
 
        my $possible_perl = $text =~ /This library is free software; you can 
redistribute it and\/or modify it under the same terms as Perl itself/;
 
@@ -663,7 +668,7 @@ sub detect_license
        push @licenses, $possible_bsd if $possible_bsd;
        push @licenses, "zlib" if $possible_zlib;
        push @licenses, "X11/MIT" if $possible_x11;
-        push @licenses, "JSON (non-free)" if $possible_json;
+        push @licenses, "JSON" if $possible_json;
        push @licenses, "Perl" if $possible_perl;
        push @licenses, "Apache2.0" if $possible_apache2;
        push @licenses, "All permissive (autotools)" if 
$possible_permissive_autotools;
@@ -997,6 +1002,25 @@ EOF
                print join("", map { "    $_\n" } 
@small_source_code_files),"\n";
        }
 
+       if (%files_nonfree_license) {
+               print<<'EOF';
+## Files licensed under a non-free license
+
+The following files are probably licensed under a non-free license.
+
+Find a free replacement or make the package not depend upon them.
+Notice that it's not acceptable to just remove these files from the
+source distribution and keep them as dependecy, since software hosted
+on Savannah cannot depend on proprietary software.
+
+EOF
+               print join("",
+                        map { "- $_: " . $files_nonfree_license{$_} . "\n" }
+                            sort
+                            keys %files_nonfree_license)
+                      ,"\n";
+       }
+
        if (@files_with_linux_term) {
                print<<'EOF';
 ## Possible misue of *Linux* vs *GNU/Linux*
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]