Bug#1111676: licenserecon: reorder license stanzas
You can still use https://salsa.debian.org/debian/podman-toolbox as an example of a project where misordered debian/copyright leads to lrc emitting errors about licenses, when in fact the licenses are correct, stanzas just mis-ordered. However, "unfortunately" the debian/copyright order got fixed now that https://salsa.debian.org/debian/podman-toolbox/-/merge_requests/4 was merged, you you need to do your testing with a version of podman-toolbox sources prior to the MR.
Bug#1111676: licenserecon: reorder license stanzas
Hi! Thanks for fixing this! I confirm latest 8.1 has this fixed. Test with relevant line "Globing pattern out of order above line 113": # git diff diff --git a/debian/copyright b/debian/copyright index aa36c909..fa2d9868 100644 --- a/debian/copyright +++ b/debian/copyright @@ -84,14 +84,6 @@ Copyright: 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, Inc. License: FSFUL -Files: - aclocal.m4 - build-aux/config.rpath - m4/*.m4 -Copyright: - 1996-2023 Free Software Foundation, Inc. -License: FSFULLR - Files: m4/gettext.m4 m4/intl-thread-locale.m4 @@ -112,6 +104,14 @@ Comment: to other components of the gettext package and do not apply to this file itself. Note that "and/or" is not a standard license conjunction. +Files: + aclocal.m4 + build-aux/config.rpath + m4/*.m4 +Copyright: + 1996-2023 Free Software Foundation, Inc. +License: FSFULLR + Files: build-aux/install-sh Copyright: # lrc : Versions: licenserecon '8.1' licensecheck '3.3.9-1' Parsing Source Tree Reading d/copyright Running licensecheck No significant differences found root@d1559a37fba9:/debcraft/source# lrc : Versions: licenserecon '8.1' licensecheck '3.3.9-1' Parsing Source Tree Reading d/copyright Globing pattern out of order above line 113 Running licensecheck d/copyright | licensecheck FSFULLR | FSFULLR and/or GPL and/or LGPL m4/gettext.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/intl-thread-locale.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/intlmacosx.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/lcmessage.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/nls.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/po.m4 FSFULLR | FSFULLR and/or GPL and/or LGPL m4/progtest.m4
Bug#1111676: licenserecon: reorder license stanzas
On 06/10/2025 19:57, Otto Kekäläinen wrote: Hi! Thanks for fixing this! I confirm latest 8.1 has this fixed. Great! I did come close to a 'wontfix' on this, but it turned out to be a bit easier than I first thought. Cheers, Peter
Bug#1111676: licenserecon: reorder license stanzas
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 @@ -19,6 +13,14 @@ Copyright: 2021 Andrej Shadura 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.
Bug#1111676: licenserecon: reorder license stanzas
On 07/09/2025 16:59, Otto Kekäläinen wrote: This is actionable, right? The tool could flag if copyright stanzas as misordered so users know to fix that first before the rest of lrc can run reliably. OK, lets leave it open then. A specific example of an actual mis-ordered d/copyright would be needed to progress this, as I have never experienced this particular issue. (The issue I see many times, is Files paragraphs completely missing, so that the project default is incorrectly implied).
Bug#1111676: licenserecon: reorder license stanzas
This is actionable, right? The tool could flag if copyright stanzas as misordered so users know to fix that first before the rest of lrc can run reliably.
Bug#1111676: licenserecon: reorder license stanzas
Hi Otto, May I just close this 'bug' (wishlist really)? (I would prefer to restrict my open bug list to actionable issues, i.e. as a sort of ToDo list) Regards, Peter B

