aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-30 11:05:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-04 10:41:13 +0100
commitff237c33337f4da2ca06c3a2c49699bc26608a6b (patch)
treeffe4392ebc075494b69e221e205f3a54a7a3137e /lib/bb
parent93e94c06baf013e3d072465a55bddd1fe61c0772 (diff)
downloadbitbake-ff237c33337f4da2ca06c3a2c49699bc26608a6b.tar.gz
bitbake: Add initial pass of SPDX license headers to source code
This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/__init__.py2
-rw-r--r--lib/bb/build.py2
-rw-r--r--lib/bb/cache.py2
-rw-r--r--lib/bb/cache_extra.py2
-rw-r--r--lib/bb/checksum.py2
-rw-r--r--lib/bb/codeparser.py4
-rw-r--r--lib/bb/command.py2
-rw-r--r--lib/bb/compat.py4
-rw-r--r--lib/bb/cooker.py2
-rw-r--r--lib/bb/cookerdata.py2
-rw-r--r--lib/bb/daemonize.py4
-rw-r--r--lib/bb/data.py2
-rw-r--r--lib/bb/data_smart.py2
-rw-r--r--lib/bb/event.py2
-rw-r--r--lib/bb/exceptions.py3
-rw-r--r--lib/bb/fetch2/__init__.py2
-rw-r--r--lib/bb/fetch2/bzr.py2
-rw-r--r--lib/bb/fetch2/clearcase.py2
-rw-r--r--lib/bb/fetch2/cvs.py2
-rw-r--r--lib/bb/fetch2/git.py4
-rw-r--r--lib/bb/fetch2/gitannex.py2
-rw-r--r--lib/bb/fetch2/gitsm.py2
-rw-r--r--lib/bb/fetch2/hg.py2
-rw-r--r--lib/bb/fetch2/local.py2
-rw-r--r--lib/bb/fetch2/npm.py3
-rw-r--r--lib/bb/fetch2/osc.py3
-rw-r--r--lib/bb/fetch2/perforce.py2
-rw-r--r--lib/bb/fetch2/repo.py2
-rw-r--r--lib/bb/fetch2/s3.py2
-rw-r--r--lib/bb/fetch2/sftp.py2
-rw-r--r--lib/bb/fetch2/ssh.py2
-rw-r--r--lib/bb/fetch2/svn.py2
-rw-r--r--lib/bb/fetch2/wget.py2
-rwxr-xr-xlib/bb/main.py2
-rw-r--r--lib/bb/methodpool.py2
-rw-r--r--lib/bb/monitordisk.py2
-rw-r--r--lib/bb/msg.py2
-rw-r--r--lib/bb/namedtuple_with_abc.py3
-rw-r--r--lib/bb/parse/__init__.py2
-rw-r--r--lib/bb/parse/ast.py2
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py2
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py2
-rw-r--r--lib/bb/parse/parse_py/__init__.py2
-rw-r--r--lib/bb/persist_data.py2
-rw-r--r--lib/bb/process.py4
-rw-r--r--lib/bb/progress.py2
-rw-r--r--lib/bb/providers.py2
-rw-r--r--lib/bb/remotedata.py2
-rw-r--r--lib/bb/runqueue.py2
-rw-r--r--lib/bb/server/__init__.py2
-rw-r--r--lib/bb/server/process.py2
-rw-r--r--lib/bb/server/xmlrpcclient.py2
-rw-r--r--lib/bb/server/xmlrpcserver.py2
-rw-r--r--lib/bb/siggen.py4
-rw-r--r--lib/bb/taskdata.py2
-rw-r--r--lib/bb/tests/codeparser.py2
-rw-r--r--lib/bb/tests/cooker.py2
-rw-r--r--lib/bb/tests/cow.py2
-rw-r--r--lib/bb/tests/data.py2
-rw-r--r--lib/bb/tests/event.py2
-rw-r--r--lib/bb/tests/fetch.py2
-rw-r--r--lib/bb/tests/parse.py2
-rw-r--r--lib/bb/tests/persist_data.py2
-rw-r--r--lib/bb/tests/utils.py2
-rw-r--r--lib/bb/tinfoil.py2
-rw-r--r--lib/bb/ui/__init__.py2
-rw-r--r--lib/bb/ui/buildinfohelper.py2
-rw-r--r--lib/bb/ui/knotty.py2
-rw-r--r--lib/bb/ui/ncurses.py2
-rw-r--r--lib/bb/ui/taskexp.py2
-rw-r--r--lib/bb/ui/toasterui.py2
-rw-r--r--lib/bb/ui/uievent.py2
-rw-r--r--lib/bb/ui/uihelper.py2
-rw-r--r--lib/bb/utils.py2
74 files changed, 163 insertions, 1 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 8d0cef0d6..b013cbb89 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -8,6 +8,8 @@
#
# Based on Gentoo's portage.py.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/build.py b/lib/bb/build.py
index a228b05dd..c19f91d06 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -10,6 +10,8 @@
#
# Based on Gentoo's portage.py.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 65c514b90..42193dc9d 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -15,6 +15,8 @@
# Copyright (C) 2005 Holger Hans Peter Freyther
# Copyright (C) 2005 ROAD GmbH
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/cache_extra.py b/lib/bb/cache_extra.py
index 83f4959d6..108d55d16 100644
--- a/lib/bb/cache_extra.py
+++ b/lib/bb/cache_extra.py
@@ -12,6 +12,8 @@
# Copyright (C) 2011, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 4e1598fe8..9ac07a6a8 100644
--- a/lib/bb/checksum.py
+++ b/lib/bb/checksum.py
@@ -2,6 +2,8 @@
#
# Copyright (C) 2012 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index ac995a6a1..fd2c4734f 100644
--- a/lib/bb/codeparser.py
+++ b/lib/bb/codeparser.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
"""
BitBake code parser
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 6c966e3db..9ebaac643 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -6,6 +6,8 @@ Provide an interface to interact with the bitbake server through 'commands'
# Copyright (C) 2006-2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/compat.py b/lib/bb/compat.py
index de1923d28..49356681a 100644
--- a/lib/bb/compat.py
+++ b/lib/bb/compat.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
"""Code pulled from future python versions, here for compatibility"""
from collections import MutableMapping, KeysView, ValuesView, ItemsView, OrderedDict
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 9ccaa79f5..fe812653f 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -9,6 +9,8 @@
# Copyright (C) 2005 ROAD GmbH
# Copyright (C) 2006 - 2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 09412e28c..3b074b2f3 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -9,6 +9,8 @@
# Copyright (C) 2005 ROAD GmbH
# Copyright (C) 2006 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/daemonize.py b/lib/bb/daemonize.py
index c937675eb..f01e6ec7c 100644
--- a/lib/bb/daemonize.py
+++ b/lib/bb/daemonize.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
"""
Python Daemonizing helper
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 29c238803..ba50b9ff1 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -22,6 +22,8 @@ the speed is more critical here.
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2005 Holger Hans Peter Freyther
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 07db7be97..441bb3001 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -14,6 +14,8 @@ BitBake build tools.
# Copyright (C) 2005 Uli Luckas
# Copyright (C) 2005 ROAD GmbH
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 5b1b094a8..48f8e7384 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -9,6 +9,8 @@ BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/exceptions.py b/lib/bb/exceptions.py
index cd713439e..ecbad5997 100644
--- a/lib/bb/exceptions.py
+++ b/lib/bb/exceptions.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
import inspect
import traceback
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 8fecc809d..c92844da5 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -10,6 +10,8 @@ BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2012 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/bzr.py b/lib/bb/fetch2/bzr.py
index 658502f9a..891fef9b9 100644
--- a/lib/bb/fetch2/bzr.py
+++ b/lib/bb/fetch2/bzr.py
@@ -10,6 +10,8 @@ BitBake 'Fetch' implementation for bzr.
# BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/clearcase.py b/lib/bb/fetch2/clearcase.py
index 3a6573d0b..ff181bb78 100644
--- a/lib/bb/fetch2/clearcase.py
+++ b/lib/bb/fetch2/clearcase.py
@@ -47,6 +47,8 @@ User credentials:
"""
# Copyright (C) 2014 Siemens AG
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/cvs.py b/lib/bb/fetch2/cvs.py
index 0e0a3196f..666f4be2b 100644
--- a/lib/bb/fetch2/cvs.py
+++ b/lib/bb/fetch2/cvs.py
@@ -10,6 +10,8 @@ BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index c69d25c91..78ad18cc7 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -55,7 +55,9 @@ Supported SRC_URI options are:
"""
-#Copyright (C) 2005 Richard Purdie
+# Copyright (C) 2005 Richard Purdie
+#
+# SPDX-License-Identifier: GPL-2.0-only
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/lib/bb/fetch2/gitannex.py b/lib/bb/fetch2/gitannex.py
index a9b69caab..3a32c85a8 100644
--- a/lib/bb/fetch2/gitannex.py
+++ b/lib/bb/fetch2/gitannex.py
@@ -7,6 +7,8 @@ BitBake 'Fetch' git annex implementation
# Copyright (C) 2014 Otavio Salvador
# Copyright (C) 2014 O.S. Systems Software LTDA.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 32389130b..e910a0839 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -16,6 +16,8 @@ NOTE: Switching a SRC_URI from "git://" to "gitsm://" requires a clean of your r
# Copyright (C) 2013 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 5a2985e16..c9eeaaefc 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -13,6 +13,8 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg).
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/lib/bb/fetch2/local.py b/lib/bb/fetch2/local.py
index a114ac12e..13e6d80b5 100644
--- a/lib/bb/fetch2/local.py
+++ b/lib/bb/fetch2/local.py
@@ -10,6 +10,8 @@ BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index 65bf5a364..7235f899f 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
"""
diff --git a/lib/bb/fetch2/osc.py b/lib/bb/fetch2/osc.py
index 6c60456b5..19c0d9dca 100644
--- a/lib/bb/fetch2/osc.py
+++ b/lib/bb/fetch2/osc.py
@@ -1,3 +1,6 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
"""
diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index 903a8e61a..366da99ea 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/lib/bb/fetch2/perforce.py
@@ -8,6 +8,8 @@ BitBake 'Fetch' implementation for perforce
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2016 Kodak Alaris, Inc.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/repo.py b/lib/bb/fetch2/repo.py
index 8c7e81853..066ab08fc 100644
--- a/lib/bb/fetch2/repo.py
+++ b/lib/bb/fetch2/repo.py
@@ -10,6 +10,8 @@ BitBake "Fetch" repo (git) implementation
# Based on git.py which is:
#Copyright (C) 2005 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/s3.py b/lib/bb/fetch2/s3.py
index 162928862..fae7c8b0f 100644
--- a/lib/bb/fetch2/s3.py
+++ b/lib/bb/fetch2/s3.py
@@ -13,6 +13,8 @@ The aws tool must be correctly installed and configured prior to use.
# Based in part on bb.fetch2.wget:
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/sftp.py b/lib/bb/fetch2/sftp.py
index 81884a6aa..6dea6ad6b 100644
--- a/lib/bb/fetch2/sftp.py
+++ b/lib/bb/fetch2/sftp.py
@@ -44,6 +44,8 @@ SRC_URI = "sftp://user@host.example.com/dir/path.file.txt"
# Based in part on bb.fetch2.wget:
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
index 6047ee417..d416a9db8 100644
--- a/lib/bb/fetch2/ssh.py
+++ b/lib/bb/fetch2/ssh.py
@@ -29,6 +29,8 @@ IETF secsh internet draft:
# Copyright 2003 Holger Schurig
#
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py
index 9dcf3eb09..4249e34c4 100644
--- a/lib/bb/fetch2/svn.py
+++ b/lib/bb/fetch2/svn.py
@@ -8,6 +8,8 @@ BitBake 'Fetch' implementation for svn.
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2004 Marcin Juszkiewicz
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 3bb3e3bb0..89dfd4a7b 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -10,6 +10,8 @@ BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 41dd3b9e0..215c63ef9 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -9,6 +9,8 @@
# Copyright (C) 2005 ROAD GmbH
# Copyright (C) 2006 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/methodpool.py b/lib/bb/methodpool.py
index 49aed3338..2f899098e 100644
--- a/lib/bb/methodpool.py
+++ b/lib/bb/methodpool.py
@@ -4,6 +4,8 @@
#
# Copyright (C) 2006 Holger Hans Peter Freyther
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/monitordisk.py b/lib/bb/monitordisk.py
index 2ad1e6156..c243add54 100644
--- a/lib/bb/monitordisk.py
+++ b/lib/bb/monitordisk.py
@@ -4,6 +4,8 @@
#
# Copyright (C) 2012 Robert Yang
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index 96f077ec4..64662079a 100644
--- a/lib/bb/msg.py
+++ b/lib/bb/msg.py
@@ -9,6 +9,8 @@ Message handling infrastructure for bitbake
# Copyright (C) 2006 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/namedtuple_with_abc.py b/lib/bb/namedtuple_with_abc.py
index 32f2fc642..c8e1d55c1 100644
--- a/lib/bb/namedtuple_with_abc.py
+++ b/lib/bb/namedtuple_with_abc.py
@@ -1,6 +1,9 @@
# http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/
#!/usr/bin/env python
# Copyright (c) 2011 Jan Kaliszewski (zuo). Available under the MIT License.
+#
+# SPDX-License-Identifier: MIT
+#
"""
namedtuple_with_abc.py:
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index 5397d57a5..8ff1b8a24 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -9,6 +9,8 @@ File parsers for the BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index 6d7c80b34..cf76dadba 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -8,6 +8,8 @@
# Copyright (C) 2003, 2004 Phil Blundell
# Copyright (C) 2009 Holger Hans Peter Freyther
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 314e8021f..297ab7790 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -12,6 +12,8 @@
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index ea49f8ca9..d1784b6c5 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -11,6 +11,8 @@
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/parse/parse_py/__init__.py b/lib/bb/parse/parse_py/__init__.py
index 3e658d0de..a8f78dba7 100644
--- a/lib/bb/parse/parse_py/__init__.py
+++ b/lib/bb/parse/parse_py/__init__.py
@@ -11,6 +11,8 @@ File parsers for the BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index 0d44100f1..cac56728a 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -8,6 +8,8 @@ currently, providing a key/value store accessed by 'domain'.
# Copyright (C) 2007 Richard Purdie
# Copyright (C) 2010 Chris Larson <chris_larson@mentor.com>
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/process.py b/lib/bb/process.py
index e69697cb6..2dc472a86 100644
--- a/lib/bb/process.py
+++ b/lib/bb/process.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import logging
import signal
import subprocess
diff --git a/lib/bb/progress.py b/lib/bb/progress.py
index f54d1c76f..00dddabbb 100644
--- a/lib/bb/progress.py
+++ b/lib/bb/progress.py
@@ -4,6 +4,8 @@ BitBake progress handling code
# Copyright (C) 2016 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/providers.py b/lib/bb/providers.py
index f496d84d1..856f0de76 100644
--- a/lib/bb/providers.py
+++ b/lib/bb/providers.py
@@ -8,6 +8,8 @@
# Copyright (C) 2005 ROAD GmbH
# Copyright (C) 2006 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/remotedata.py b/lib/bb/remotedata.py
index 68ecffc19..05c6fabdf 100644
--- a/lib/bb/remotedata.py
+++ b/lib/bb/remotedata.py
@@ -6,6 +6,8 @@ Provides support for using a datastore from the bitbake client
# Copyright (C) 2016 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 524c85d7d..ddd2fde0a 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -9,6 +9,8 @@ Handles preparation and execution of a queue of tasks
# Copyright (C) 2006-2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/server/__init__.py b/lib/bb/server/__init__.py
index 5a3fba968..5ec7a7560 100644
--- a/lib/bb/server/__init__.py
+++ b/lib/bb/server/__init__.py
@@ -5,6 +5,8 @@
# Copyright (C) 2006 - 2008 Richard Purdie
# Copyright (C) 2013 Alexandru Damian
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 80a7875ad..bac94fcc2 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -3,6 +3,8 @@
#
# Copyright (C) 2010 Bob Foerster <robert@erafx.com>
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/server/xmlrpcclient.py b/lib/bb/server/xmlrpcclient.py
index 4661a9e5a..fc2fddd54 100644
--- a/lib/bb/server/xmlrpcclient.py
+++ b/lib/bb/server/xmlrpcclient.py
@@ -4,6 +4,8 @@
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/server/xmlrpcserver.py b/lib/bb/server/xmlrpcserver.py
index 875b1282e..b885f9a79 100644
--- a/lib/bb/server/xmlrpcserver.py
+++ b/lib/bb/server/xmlrpcserver.py
@@ -4,6 +4,8 @@
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2008 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 7b9f3debc..e0a66e68d 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -1,3 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
import hashlib
import logging
import os
diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index 94e822c48..5316d1b42 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -10,6 +10,8 @@ Task data collection and handling
# Copyright (C) 2006 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py
index 3fd76a8f9..00ee6de53 100644
--- a/lib/bb/tests/codeparser.py
+++ b/lib/bb/tests/codeparser.py
@@ -6,6 +6,8 @@
# Copyright (C) 2010 Chris Larson
# Copyright (C) 2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/cooker.py b/lib/bb/tests/cooker.py
index 2b4423650..850dde4f6 100644
--- a/lib/bb/tests/cooker.py
+++ b/lib/bb/tests/cooker.py
@@ -3,6 +3,8 @@
#
# BitBake Tests for cooker.py
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/cow.py b/lib/bb/tests/cow.py
index d149d84d0..5051e4ed7 100644
--- a/lib/bb/tests/cow.py
+++ b/lib/bb/tests/cow.py
@@ -3,6 +3,8 @@
#
# BitBake Tests for Copy-on-Write (cow.py)
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# Copyright 2006 Holger Freyther <freyther@handhelds.org>
#
# This program is free software; you can redistribute it and/or modify
diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py
index 3c511f214..b584edee5 100644
--- a/lib/bb/tests/data.py
+++ b/lib/bb/tests/data.py
@@ -6,6 +6,8 @@
# Copyright (C) 2010 Chris Larson
# Copyright (C) 2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/event.py b/lib/bb/tests/event.py
index d3a5f6269..4822dc7bc 100644
--- a/lib/bb/tests/event.py
+++ b/lib/bb/tests/event.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2017 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 429998b34..559b4892e 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py
index 747fc35fc..bbb4dc376 100644
--- a/lib/bb/tests/parse.py
+++ b/lib/bb/tests/parse.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2015 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/persist_data.py b/lib/bb/tests/persist_data.py
index 812bcbd7b..6aee9f1ca 100644
--- a/lib/bb/tests/persist_data.py
+++ b/lib/bb/tests/persist_data.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2018 Garmin Ltd.
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tests/utils.py b/lib/bb/tests/utils.py
index f1cd83a41..13351068d 100644
--- a/lib/bb/tests/utils.py
+++ b/lib/bb/tests/utils.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 368264f39..da049b6e5 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -4,6 +4,8 @@
# Copyright (C) 2011 Mentor Graphics Corporation
# Copyright (C) 2006-2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/__init__.py b/lib/bb/ui/__init__.py
index a4805ed02..669dc86fc 100644
--- a/lib/bb/ui/__init__.py
+++ b/lib/bb/ui/__init__.py
@@ -3,6 +3,8 @@
#
# Copyright (C) 2006-2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 31323d281..37b94cd07 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -3,6 +3,8 @@
#
# Copyright (C) 2013 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 4567c148c..cf1e59e46 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -5,6 +5,8 @@
#
# Copyright (C) 2006-2012 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/ncurses.py b/lib/bb/ui/ncurses.py
index 8690c529c..713a4a416 100644
--- a/lib/bb/ui/ncurses.py
+++ b/lib/bb/ui/ncurses.py
@@ -6,6 +6,8 @@
# Copyright (C) 2006 Michael 'Mickey' Lauer
# Copyright (C) 2006-2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/taskexp.py b/lib/bb/ui/taskexp.py
index 8305d70f4..3ea0a242b 100644
--- a/lib/bb/ui/taskexp.py
+++ b/lib/bb/ui/taskexp.py
@@ -4,6 +4,8 @@
# Copyright (C) 2007 Ross Burton
# Copyright (C) 2007 - 2008 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 88cec3759..d2517edbb 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -7,6 +7,8 @@
# Copyright (C) 2006-2012 Richard Purdie
# Copyright (C) 2013 Intel Corporation
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/uievent.py b/lib/bb/ui/uievent.py
index 9542b911c..e96454404 100644
--- a/lib/bb/ui/uievent.py
+++ b/lib/bb/ui/uievent.py
@@ -4,6 +4,8 @@
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/ui/uihelper.py b/lib/bb/ui/uihelper.py
index 963c1ea2d..000a7cf41 100644
--- a/lib/bb/ui/uihelper.py
+++ b/lib/bb/ui/uihelper.py
@@ -4,6 +4,8 @@
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2007 Richard Purdie
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index a3f75fbe9..69e01519b 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -6,6 +6,8 @@ BitBake Utility Functions
# Copyright (C) 2004 Michael Lauer
#
+# SPDX-License-Identifier: GPL-2.0-only
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.