Skip to content

Commit 308edb7

Browse files
Peter Kjellerstedtrpurdie
authored andcommitted
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 Signed-off-by: Peter Kjellerstedt <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]>
1 parent 7e9d922 commit 308edb7

File tree

1 file changed

+40
-6
lines changed

1 file changed

+40
-6
lines changed

meta/recipes-core/util-linux/util-linux_2.41.bb

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
11
require util-linux.inc
22

3+
# Most of the applications and the libraries are linked with libcommon.la,
4+
# which uses these licenses
5+
LIBCOMMON_LICENSES = "LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & MIT"
6+
7+
# The default license is GPL-2.0-or-later
8+
DEFAULT_LICENSES = "GPL-2.0-or-later & ${LIBCOMMON_LICENSES}"
9+
310
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"
11+
LICENSE:${PN}-bash-completion = "GPL-2.0-or-later"
12+
LICENSE:${PN}-dev = "${LIBCOMMON_LICENSES}"
13+
# All dynamic packages use ${DEFAULT_LICENSES} with the following exceptions
14+
LICENSE:${PN}-cal = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
15+
LICENSE:${PN}-col = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
16+
LICENSE:${PN}-colcrt = "BSD-4-Clause-UC"
17+
LICENSE:${PN}-colrm = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
18+
LICENSE:${PN}-column = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
19+
LICENSE:${PN}-coresched = "EUPL-1.2 & ${LIBCOMMON_LICENSES}"
420
LICENSE:${PN}-fcntl-lock = "MIT"
5-
LICENSE:${PN}-fdisk = "GPL-1.0-or-later"
6-
LICENSE:${PN}-libblkid = "LGPL-2.1-or-later"
7-
LICENSE:${PN}-libfdisk = "LGPL-2.1-or-later"
8-
LICENSE:${PN}-libmount = "LGPL-2.1-or-later"
9-
LICENSE:${PN}-libsmartcols = "LGPL-2.1-or-later"
10-
LICENSE:${PN}-coresched = "EUPL-1.2"
21+
LICENSE:${PN}-fdisk = "GPL-1.0-or-later & ${DEFAULT_LICENSES}"
22+
LICENSE:${PN}-fsfreeze = "GPL-1.0-or-later"
23+
LICENSE:${PN}-hexdump = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
24+
LICENSE:${PN}-kill = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
25+
LICENSE:${PN}-libblkid = "${LIBCOMMON_LICENSES}"
26+
LICENSE:${PN}-libfdisk = "${LIBCOMMON_LICENSES}"
27+
LICENSE:${PN}-libmount = "${LIBCOMMON_LICENSES}"
28+
LICENSE:${PN}-libsmartcols = "${LIBCOMMON_LICENSES}"
29+
LICENSE:${PN}-logger = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
30+
LICENSE:${PN}-look = "BSD-4-Clause-UC"
31+
LICENSE:${PN}-lscpu = "GPL-2.0-only & ${DEFAULT_LICENSES}"
32+
LICENSE:${PN}-mesg = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
33+
LICENSE:${PN}-nsenter = "GPL-2.0-only & ${DEFAULT_LICENSES}"
34+
LICENSE:${PN}-renice = "BSD-4-Clause-UC"
35+
LICENSE:${PN}-rev = "BSD-4-Clause-UC"
36+
LICENSE:${PN}-script = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
37+
LICENSE:${PN}-ul = "BSD-4-Clause-UC"
38+
LICENSE:${PN}-vipw = "BSD-4-Clause-UC & ${DEFAULT_LICENSES}"
39+
LICENSE:${PN}-wall = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
40+
LICENSE:${PN}-whereis = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
41+
LICENSE:${PN}-write = "BSD-4-Clause-UC & ${LIBCOMMON_LICENSES}"
1142

1243
LIC_FILES_CHKSUM = "file://README.licensing;md5=55e895a80bdd4ffc65e167a76d2e7569 \
1344
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
@@ -33,6 +64,9 @@ python util_linux_binpackages () {
3364
pn = d.getVar('PN')
3465
d.appendVar('RRECOMMENDS:%s' % pn, ' %s' % pkg)
3566

67+
if not d.getVar('LICENSE:' + pkg):
68+
d.setVar('LICENSE:' + pkg, '${DEFAULT_LICENSES}')
69+
3670
if d.getVar('ALTERNATIVE:' + pkg):
3771
return
3872
if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):

0 commit comments

Comments
 (0)