Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.4014.1796096955354238209 for ; Mon, 30 Nov 2026 19:49:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=YCX3tcnZ; spf=pass (domain: konsulko.com, ip: 209.85.214.174, mailfrom: tim.orling@konsulko.com) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2f06ff94acfso53780865ad.0 for ; Mon, 30 Nov 2026 19:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1796096954; x=1796701754; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=zF9TK2mzb0BUYr4lSfll7zOClmhcQp1yczv0yYQ9Q/Q=; b=YCX3tcnZ6jXCpUGlqRaYfABU2BLIy7U/xuw8JEsLTU+XPYpXJcPTYR+v6N90m8AkQb sqnNGIVEMr0Gw8pt4W+Jnn+5wtG2rX6OInUakEQTPwZMTnDCeDQ5BktEXOUqZHHCvRLJ QQvUOBdykR31KhXEXHLpreB9E6lIzIec5HYCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796096954; x=1796701754; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=zF9TK2mzb0BUYr4lSfll7zOClmhcQp1yczv0yYQ9Q/Q=; b=eGAfp8u71NOe0Xm99P8Bp4+1Wy6oPObopnUQXgr/YtnshK3NsJQ7iisfAVSgQd2bpv lVT01ayK4OxsAFE1jY96m/1OJIbh4EfHbTY+/NslkzZgyzZ5Sr+EUWnaFf3lKXrDFnb3 O+CjhPfUu1GuVYI0pzw1MdtsNOYggPDbXXI6Tn+KExxfV77VqWNBvTbJ897gg1pfk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SMTP id d9443c01a7336-2f07254f606mr273399905ad.67.1796096954585; Mon, 30 Nov 2026 19:49:14 -0800 (PST) Return-Path: Received: from localhost (c-24-20-171-118.hsd1.or.comcast.net. [24.20.171.118]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f11770df61sm61659115ad.53.2026.11.30.19.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 19:49:14 -0800 (PST) From: Tim Orling To: openembedded-core@lists.openembedded.org Cc: Tim Orling , Bruce Ashfield Subject: [PATCH 0/7] go-mod-update-modules: identify licenses with licensecheck Date: Mon, 30 Nov 2026 19:49:03 -0800 Message-ID: <20261201034910.25521-1-tim.orling@konsulko.com> X-Mailer: git-send-email 2.56.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 03:49:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251656 Content-Type: text/plain; charset="utf-8" go-mod-update-modules identifies the license files of Go module dependencies by hash. Variant license texts, several licenses in one file and several license files in one directory end up as spdx=Unknown, which fails do_populate_lic, or are left out. This series adds licensecheck, the license detection library of pkg.go.dev, and an opt-in GO_MOD_LICENSE_SCANNER = "licensecheck" that scans each license file with it. Hash matching stays the default. It also: - keeps every license file of the nearest directory - stops files with no license text from matching "Proprietary" - adds GO_MOD_LICENSE_STRICT, to fail do_update_modules on a license that is not identified - otherwise names such a license LicenseRef-go--, with NO_GENERIC_LICENSE, so that the recipe builds Tested on qemux86-64: licensecheck and licensecheck-native build, and the oelib.license_finder, distrodata test_maintainers and recipetool test_recipetool_create_go selftests pass. For yq, hash matching leaves 5 of 30 license files unidentified (MPL-2.0, BSD-2-Clause, MIT, Apache-2.0, BSD-3-Clause variants); licensecheck identifies all 5. With either result, yq builds and do_create_spdx passes. AI-Generated: Uses Claude Code (Claude Opus 5.5, Claude Fable 5.2) Tim Orling (7): license_finder: keep all license files of the nearest directory licensecheck: add recipe license_finder: do not match files that have no license text go-mod-update-modules: identify licenses with licensecheck go-mod-update-modules: add GO_MOD_LICENSE_STRICT go-mod-update-modules: name unidentified licenses with a LicenseRef oeqa/selftest/oelib: add tests for license_finder .../go-mod-update-modules.bbclass | 84 +++++++++- meta/conf/distro/include/maintainers.inc | 1 + meta/lib/oe/license_finder.py | 115 +++++++++++++- .../selftest/cases/oelib/license_finder.py | 146 ++++++++++++++++++ .../licensecheck/files/main.go | 49 ++++++ .../licensecheck/licensecheck_0.3.1.bb | 31 ++++ 6 files changed, 416 insertions(+), 10 deletions(-) create mode 100644 meta/lib/oeqa/selftest/cases/oelib/license_finder.py create mode 100644 meta/recipes-devtools/licensecheck/files/main.go create mode 100644 meta/recipes-devtools/licensecheck/licensecheck_0.3.1.bb -- 2.56.1