I did some further testing with the example
https://salsa.debian.org/debian/podman-toolbox

Lintian currently warns:

W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order
debian/gocode/src/github.com/acobaugh/osrelease/* debian/*
debian/gocode/src/github.com/acobaugh/osrelease/.travis.yml
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order
debian/gocode/src/github.com/acobaugh/osrelease/* debian/*
debian/gocode/src/github.com/acobaugh/osrelease/LICENSE
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order
debian/gocode/src/github.com/acobaugh/osrelease/* debian/*
debian/gocode/src/github.com/acobaugh/osrelease/README.md
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order
debian/gocode/src/github.com/acobaugh/osrelease/* debian/*
debian/gocode/src/github.com/acobaugh/osrelease/osrelease.go
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/0001-Generate-completions-without-fakeroot.patch
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/0002-Do-not-use-versioned-go-module.patch
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/0005-meson-build-riscv.patch [debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/0006-Add-unofficial-Debian-and-Ubuntu-images.patch
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/0007-add-support-for-loongarch.patch
[debian/copyright:15]
W: golang-github-containers-toolbox source:
globbing-patterns-out-of-order debian/patches/* debian/*
debian/patches/series [debian/copyright:15]
W: golang-github-containers-toolbox source: superfluous-file-pattern
debian/gocode/src/github.com/acobaugh/osrelease/*
[debian/copyright:11]

lrc says:

# lrc
: Versions: licenserecon '7.0'  licensecheck '3.3.9-1'

Parsing Source Tree  ....
Reading d/copyright  ....
Running licensecheck ....

d/copyright      | licensecheck

Apache-2.0       | FSFAP             NEWS
GPL-2+           | BSD-3-clause
debian/gocode/src/github.com/acobaugh/osrelease/LICENSE
Apache-2.0       | CC0-1.0           test/system/libs/bats-assert/LICENSE
Apache-2.0       | CC0-1.0           test/system/libs/bats-assert/package.json
Apache-2.0       | CC0-1.0           test/system/libs/bats-support/LICENSE

The first one was purely a reordering issue, which isn't obvious
looking at the debian/copyright file at first.

After applying fix:

--- a/debian/copyright
+++ b/debian/copyright
@@ -2,16 +2,10 @@ Format:
https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: toolbox
 Source: https://github.com/containers/toolbox/

-Files:
- *
- debian/patches/*
+Files: *
 Copyright: 2018-2020 Red Hat, Inc.
 License: Apache-2.0

-Files: debian/gocode/src/github.com/acobaugh/osrelease/*
-Copyright: 2017 Andrew Cobaugh
-License: BSD-3-Clause
-
 Files: debian/*
 Copyright:
  2020 Hayley Hughes <[email protected]>
@@ -19,6 +13,14 @@ Copyright:
  2021 Andrej Shadura <[email protected]>
 License: GPL-2+

+Files: debian/patches/*
+Copyright: 2018-2020 Red Hat, Inc.
+License: Apache-2.0
+
+Files: debian/gocode/src/github.com/acobaugh/osrelease/*
+Copyright: 2017 Andrew Cobaugh
+License: BSD-3-Clause

..we get:

# lrc
: Versions: licenserecon '7.0'  licensecheck '3.3.9-1'

Parsing Source Tree  ....
Reading d/copyright  ....
Running licensecheck ....

d/copyright      | licensecheck

Apache-2.0       | FSFAP             NEWS
Apache-2.0       | CC0-1.0           test/system/libs/bats-assert/LICENSE
Apache-2.0       | CC0-1.0           test/system/libs/bats-assert/package.json
Apache-2.0       | CC0-1.0           test/system/libs/bats-support/LICENSE


Hence I think it would be very nice if lrc could warn that stanzas are
out of order and need to be fixed before the license comparison can be
correct.

Reply via email to