util-linux: Improve the package licenses
PATCH 1/1 util-linux: Improve the package licenses
The default license for util-linux is GPL-2.0-or-later.
Most of the applications and the libraries are also linked with libcommon.la, which uses these licenses:
LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MIT
Set the above licenses for all dynamic packages, unless explicitly specified.
In particular, this avoids setting BSD-4-Clause-UC and EUPL-1.2 on packages where they do not belong.
License-Update: See above
--- meta/recipes-core/util-linux/util-linux.inc | 41 ++++++++++++++++--- .../util-linux/util-linux_2.41.bb | 3 ++ 2 files changed, 38 insertions(+), 6 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +35 -6
@@ -6,14 +6,43 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base" +# Most of the applications and the libraries are linked with libcommon.la, +# which uses these licenses +LIBCOMMON_LICENSES = "LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MIT" + +# The default license is GPL-2.0-or-later +DEFAULT_LICENSES = "GPL-2.0-or-later & ${LIBCOMMON_LICENSES}" + LICENSE = "GPL-1.0-or-later & GPL-2.0-only & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause-UC & MIT & EUPL-1.2" +# All dynamic packages use ${DEFAULT_LICENSES} with the following exceptions +LICENSE:${PN}-cal = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-col = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-colcrt = "BSD-4-Clause-UC" +LICENSE:${PN}-colrm = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-column = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-coresched = "EUPL-1.2 & ${LIBCOMMON_LICENSES}" LICENSE:${PN}-fcntl-lock = "MIT" -LICENSE:${PN}-fdisk = "GPL-1.0-or-later" -LICENSE:${PN}-libblkid = "LGPL-2.1-or-later" -LICENSE:${PN}-libfdisk = "LGPL-2.1-or-later" -LICENSE:${PN}-libmount = "LGPL-2.1-or-later" -LICENSE:${PN}-libsmartcols = "LGPL-2.1-or-later" -LICENSE:${PN}-coresched = "EUPL-1.2" +LICENSE:${PN}-fdisk = "GPL-1.0-or-later & ${DEFAULT_LICENSES}" +LICENSE:${PN}-fsfreeze = "GPL-1.0-or-later" +LICENSE:${PN}-hexdump = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-kill = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-libblkid = "${LIBCOMMON_LICENSES}" +LICENSE:${PN}-libfdisk = "${LIBCOMMON_LICENSES}" +LICENSE:${PN}-libmount = "${LIBCOMMON_LICENSES}" +LICENSE:${PN}-libsmartcols = "${LIBCOMMON_LICENSES}" +LICENSE:${PN}-logger = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-look = "BSD-4-Clause-UC" +LICENSE:${PN}-lscpu = "GPL-2.0-only & ${DEFAULT_LICENSES}" +LICENSE:${PN}-mesg = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-nsenter = "GPL-2.0-only & ${DEFAULT_LICENSES}" +LICENSE:${PN}-renice = "BSD-4-Clause-UC" +LICENSE:${PN}-rev = "BSD-4-Clause-UC" +LICENSE:${PN}-script = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-ul = "BSD-4-Clause-UC" +LICENSE:${PN}-vipw = "BSD-4-Clause-UC & ${DEFAULT_LICENSES}" +LICENSE:${PN}-wall = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-whereis = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" +LICENSE:${PN}-write = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}" LIC_FILES_CHKSUM = "file://README.licensing;md5=55e895a80bdd4ffc65e167a76d2e7569 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
meta/recipes-core/util-linux/util-linux_2.41.bb +3 -0
@@ -11,6 +11,9 @@ python util_linux_binpackages () { pn = d.getVar('PN') d.appendVar('RRECOMMENDS:%s' % pn, ' %s' % pkg) + if not d.getVar('LICENSE:' + pkg): + d.setVar('LICENSE:' + pkg, '${DEFAULT_LICENSES}') + if d.getVar('ALTERNATIVE:' + pkg): return if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
Hi Peter,
Quoted 24 lines · Peter Kjellerstedt via lists.openembedded.org
The default license for util-linux is GPL-2.0-or-later.
Most of the applications and the libraries are also linked with libcommon.la, which uses these licenses:
LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MITSet the above licenses for all dynamic packages, unless explicitly specified.
In particular, this avoids setting BSD-4-Clause-UC and EUPL-1.2 on packages where they do not belong.
License-Update: See above
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-core/util-linux/util-linux.inc | 41 ++++++++++++++++--- .../util-linux/util-linux_2.41.bb | 3 ++ 2 files changed, 38 insertions(+), 6 deletions(-)meta/recipes-core/util-linux/util-linux.inc +0
-0
meta/recipes-core/util-linux/util-linux.inc disk partitioning, kernel message management, filesystem creation, and system lo · line 10
Quoted 5 lines
meta/recipes-core/util-linux/util-linux.inc +2
-0@@ -6,14 +6,43 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base" +# Most of the applications and the libraries are linked with libcommon.la, +# which uses these licenses
Is this something we can detect directly within the binaries in a package, so that we could simply add those licenses dynamically to LICENSE:${PN}-x instead of having to list them by hand?
Packages without a package-specific LICENSE will take the recipe's LICENSE I believe, considering that *.la is part of the -dev package should the -dev package have a "more precise" license than the recipe's default?
Cheers,
Quentin
Quoted 34 lines
-----Original Message-----
From: Quentin Schulz <[email protected]>
Sent: den 3 juni 2025 11:27
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] util-linux: Improve the package licensesHi Peter,
Quoted 25 lines · Peter Kjellerstedt via lists.openembedded.org
The default license for util-linux is GPL-2.0-or-later.
Most of the applications and the libraries are also linked with libcommon.la, which uses these licenses:
LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MITSet the above licenses for all dynamic packages, unless explicitly specified.
In particular, this avoids setting BSD-4-Clause-UC and EUPL-1.2 on packages where they do not belong.
License-Update: See above
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-core/util-linux/util-linux.inc | 41 ++++++++++++++++--- .../util-linux/util-linux_2.41.bb | 3 ++ 2 files changed, 38 insertions(+), 6 deletions(-)meta/recipes-core/util-linux/util-linux.inc +0
-0@@ -6,14 +6,43 @@ disk partitioning, kernel message management, filesystem creation, and system lo
Quoted 8 lines
meta/recipes-core/util-linux/util-linux.inc disk partitioning, kernel message management, filesystem creation, and system lo · line 10
Quoted 4 lines
meta/recipes-core/util-linux/util-linux.inc +2
-0SECTION = "base" +# Most of the applications and the libraries are linked with libcommon.la, +# which uses these licensesIs this something we can detect directly within the binaries in a package, so that we could simply add those licenses dynamically to LICENSE:${PN}-x instead of having to list them by hand?
I doubt that is possible.
Quoted 4 lines
Packages without a package-specific LICENSE will take the recipe's LICENSE I believe, considering that *.la is part of the -dev package should the -dev package have a "more precise" license than the recipe's default?
Sounds like a good idea. I'll send an updated patch.
Quoted 3 lines
Cheers,
Quentin
//Peter
Hi Peter,
Quoted 36 lines · Peter Kjellerstedt
Quoted 36 lines
-----Original Message-----
From: Quentin Schulz <[email protected]>
Sent: den 3 juni 2025 11:27
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] util-linux: Improve the package licensesHi Peter,
Quoted 27 lines · Peter Kjellerstedt via lists.openembedded.org
The default license for util-linux is GPL-2.0-or-later.
Most of the applications and the libraries are also linked with libcommon.la, which uses these licenses:
LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MITSet the above licenses for all dynamic packages, unless explicitly specified.
In particular, this avoids setting BSD-4-Clause-UC and EUPL-1.2 on packages where they do not belong.
License-Update: See above
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-core/util-linux/util-linux.inc | 41 ++++++++++++++++--- .../util-linux/util-linux_2.41.bb | 3 ++ 2 files changed, 38 insertions(+), 6 deletions(-)meta/recipes-core/util-linux/util-linux.inc +0
-0@@ -6,14 +6,43 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base"
Quoted 9 lines
Quoted 6 lines
meta/recipes-core/util-linux/util-linux.inc disk partitioning, kernel message management, filesystem creation, and system lo · line 10
Quoted 2 lines
meta/recipes-core/util-linux/util-linux.inc +2
-0+# Most of the applications and the libraries are linked with libcommon.la, +# which uses these licensesIs this something we can detect directly within the binaries in a package, so that we could simply add those licenses dynamically to LICENSE:${PN}-x instead of having to list them by hand?
I doubt that is possible.
Fair enough, was just a random thought I had :)
Quoted 7 lines
Quoted 4 lines
Packages without a package-specific LICENSE will take the recipe's LICENSE I believe, considering that *.la is part of the -dev package should the -dev package have a "more precise" license than the recipe's default?
Sounds like a good idea. I'll send an updated patch.
I don't know the content of the dev package, so maybe that isn't the best suggestion and the default would work fine?
After all, the LIBCOMMON_LICENSE is part of the recipe's LICENSE so it would be covered at the very least (albeit not necessarily proper).
Cheers,
Quentin
Quoted 61 lines
-----Original Message-----
From: Quentin Schulz <[email protected]>
Sent: den 3 juni 2025 12:12
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] util-linux: Improve the package licensesHi Peter,
Quoted 36 lines · Peter Kjellerstedt
Quoted 36 lines
-----Original Message-----
From: Quentin Schulz <[email protected]>
Sent: den 3 juni 2025 11:27
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] util-linux: Improve the package licensesHi Peter,
Quoted 27 lines · Peter Kjellerstedt via lists.openembedded.org
The default license for util-linux is GPL-2.0-or-later.
Most of the applications and the libraries are also linked with libcommon.la, which uses these licenses:
LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MITSet the above licenses for all dynamic packages, unless explicitly specified.
In particular, this avoids setting BSD-4-Clause-UC and EUPL-1.2 on packages where they do not belong.
License-Update: See above
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-core/util-linux/util-linux.inc | 41 ++++++++++++++++--- .../util-linux/util-linux_2.41.bb | 3 ++ 2 files changed, 38 insertions(+), 6 deletions(-)meta/recipes-core/util-linux/util-linux.inc +0
-0@@ -6,14 +6,43 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base"Quoted 8 lines
Quoted 6 lines
meta/recipes-core/util-linux/util-linux.inc disk partitioning, kernel message management, filesystem creation, and system lo · line 10
Quoted 2 lines
meta/recipes-core/util-linux/util-linux.inc +2
-0+# Most of the applications and the libraries are linked with libcommon.la, +# which uses these licensesIs this something we can detect directly within the binaries in a package, so that we could simply add those licenses dynamically to LICENSE:${PN}-x instead of having to list them by hand?
I doubt that is possible.
Fair enough, was just a random thought I had :)
Quoted 5 lines
Quoted 4 lines
Packages without a package-specific LICENSE will take the recipe's LICENSE I believe, considering that *.la is part of the -dev package should the -dev package have a "more precise" license than the recipe's default?
Quoted 4 lines
Quoted 1 line
Sounds like a good idea. I'll send an updated patch.
I don't know the content of the dev package, so maybe that isn't the best suggestion and the default would work fine?
It only contains stuff related to the libraries that util-linux provides so it seems reasonable to set its license to ${LIBCOMMON_LICENSE}.
Quoted 3 lines
After all, the
LIBCOMMON_LICENSEis part of the recipe's LICENSE so it would be covered at the very least (albeit not necessarily proper).
The problem is when some irrelevant licenses are set and those licenses are "problematic", such as BSD-4-Clause. At least for us that means we have to go through extra hoops if we want to include such a package in an image. Thus having the licenses as correct as possible helps a lot. Now, we don't include -dev packages in our images, but still, it does not hurt.
Quoted 3 lines
Cheers,
Quentin
//Peter