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

[Git][lintian/lintian][master] 4 commits: inconsistent-appstream-metadata-license: Versions with trailing ".0" are...



Title: GitLab

Axel Beckert pushed to branch master at lintian / lintian

Commits:

  • 2348bca3
    by Axel Beckert at 2023-01-16T01:10:28+01:00
    inconsistent-appstream-metadata-license: Versions with trailing ".0" are equivalent to versions without
    
    Fixes false positives as the Debian Copyright Format 1.0 explicitly
    states that versions with trailing dot-zeroes are considered to be
    equivalent to versions without.
    
    Closes: #1002053
    
    Relevant documentation:
    https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-short-name
    
  • 3721f292
    by Axel Beckert at 2023-01-16T01:10:39+01:00
    inconsistent-appstream-metadata-license: Normalize comparison (-or-later/+, -only suffix)
    
    Further normalize comparison of Debian style and SPDX style license
    identifiers to -or-later suffix vs + suffix, -only suffix vs no
    suffix.
    
    Still display the original variant in the tag.
    
    Relevant documentation/policy:
    
    https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-short-name
    
    (Also make new code perltidy.)
    
  • e48f1d48
    by Axel Beckert at 2023-01-16T01:27:45+01:00
    inconsistent-appstream-metadata-license description: Text improvements; direct ref to tag specification
    
    Closes: #1014956
    
  • bf82908d
    by Christoph Biedl at 2023-01-16T01:40:03+01:00
    Lintian::Index::FileTypes: Call "file" with "--raw" to unbreak test suite with file/libmagic ≥ 5.42
    
    Closes: #1026920
    

3 changed files:

Changes:

  • lib/Lintian/Check/Debian/Copyright/Dep5.pm
    ... ... @@ -852,8 +852,30 @@ sub check_dep5_copyright {
    852 852
                 next
    
    853 853
                   unless $seen;
    
    854 854
     
    
    855
    +            # Compare and also normalize the seen and wanted license
    
    856
    +            # identifier wrt. to redundant trailing dot-zeros,
    
    857
    +            # -or-later suffix vs + suffix, -only suffix vs no
    
    858
    +            # suffix. Still display the original variant in the tag.
    
    859
    +            my $seen_normalized = $seen;
    
    860
    +            $seen_normalized =~ s/-or-later$/+/i;
    
    861
    +            $seen_normalized =~ s/-only$//i;
    
    862
    +            my $seen_nozero = $seen_normalized;
    
    863
    +            $seen_nozero =~ s/\.0//g;
    
    864
    +
    
    855 865
                 my @wanted = @{$license_identifiers_by_file{$name}};
    
    856
    -            my @mismatched = grep { $_ ne $seen } @wanted;
    
    866
    +            my @mismatched = grep {
    
    867
    +                my $want = $_;
    
    868
    +                my $want_normalized = $want;
    
    869
    +                $want_normalized =~ s/-or-later$/+/i;
    
    870
    +                $want_normalized =~ s/-only$//i;
    
    871
    +                my $want_nozero = $want_normalized;
    
    872
    +                $want_nozero =~ s/\.0//g;
    
    873
    +
    
    874
    +                $want_normalized ne $seen_normalized
    
    875
    +                  and $want_nozero ne $seen_normalized
    
    876
    +                  and $want_normalized ne $seen_nozero
    
    877
    +                  and $want_nozero ne $seen_nozero;
    
    878
    +            } @wanted;
    
    857 879
     
    
    858 880
                 $self->pointed_hint('inconsistent-appstream-metadata-license',
    
    859 881
                     $copyright_file->pointer, $name, "($seen != $_)")
    

  • lib/Lintian/Index/FileTypes.pm
    ... ... @@ -72,7 +72,7 @@ sub add_file_types {
    72 72
         my @files = grep { $_->is_file } @{$self->sorted_list};
    
    73 73
         my @names = map { $_->name } @files;
    
    74 74
     
    
    75
    -    my @command = qw(file --no-pad --print0 --print0 --);
    
    75
    +    my @command = qw(file --raw --no-pad --print0 --print0 --);
    
    76 76
     
    
    77 77
         my %file_types;
    
    78 78
     
    

  • tags/i/inconsistent-appstream-metadata-license.tag
    ... ... @@ -2,7 +2,9 @@ Tag: inconsistent-appstream-metadata-license
    2 2
     Severity: warning
    
    3 3
     Check: debian/copyright/dep5
    
    4 4
     Explanation: The specified AppStream metadata file specifies a
    
    5
    - <code>metadata&lowbar;license</code> field but this does not match the files in
    
    5
    + <code>metadata&lowbar;license</code> field but this does not match
    
    6
    + its entry (possibly via the <code>Files: *</code> stanza) in
    
    6 7
      <code>debian/copyright</code>.
    
    7 8
     See-Also: https://wiki.debian.org/AppStream/Guidelines,
    
    8
    - https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
    9
    + https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/,
    
    10
    + https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license


  • Reply to: