Merge pull request #1777 from apache/tristan/dont-distribute-generated-code

setup.py: Stop including generated Cython code in source distributions.
diff --git a/.asf.yaml b/.asf.yaml
index 7483a9a..120de7b 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -33,6 +33,9 @@
     # disable rebase button:
     rebase: false
 
+  # Close branches when pull requests are merged
+  del_branch_on_merge: true
+
   # Enable pages publishing
   ghp_branch: gh-pages
   ghp_path: /
diff --git a/.coveragerc b/.coveragerc
index 5b06d81..b789d7c 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 [run]
 concurrency = multiprocessing
 plugins = Cython.Coverage
diff --git a/.github/common.env b/.github/common.env
index 2072f21..598896c 100644
--- a/.github/common.env
+++ b/.github/common.env
@@ -1,6 +1,6 @@
 # Shared common variables
 
-CI_IMAGE_VERSION=master-533491591
-CI_TOXENV_MAIN=py37,py38-nocover,py39-nocover,py310-nocover
-CI_TOXENV_PLUGINS=py37-plugins,py38-plugins-nocover,py39-plugins-nocover,py310-plugins-nocover
+CI_IMAGE_VERSION=master-643533272
+CI_TOXENV_MAIN=py37,py38,py39,py310,py311
+CI_TOXENV_PLUGINS=py37-plugins,py38-plugins,py39-plugins,py310-plugins,py311-plugins
 CI_TOXENV_ALL="${CI_TOXENV_MAIN},${CI_TOXENV_PLUGINS}"
diff --git a/.github/compose/ci.docker-compose.yml b/.github/compose/ci.docker-compose.yml
index f616f1a..19e0b2a 100644
--- a/.github/compose/ci.docker-compose.yml
+++ b/.github/compose/ci.docker-compose.yml
@@ -1,7 +1,7 @@
 version: '3.4'
 
 x-tests-template: &tests-template
-    image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:35-${CI_IMAGE_VERSION:-latest}
+    image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:36-${CI_IMAGE_VERSION:-latest}
     command: tox -vvvvv -- --color=yes --integration
     environment:
       TOXENV: ${CI_TOXENV_ALL}
@@ -22,14 +22,14 @@
 
 services:
 
-  fedora-35:
-    <<: *tests-template
-    image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:35-${CI_IMAGE_VERSION:-latest}
-
   fedora-36:
     <<: *tests-template
     image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:36-${CI_IMAGE_VERSION:-latest}
 
+  fedora-37:
+    <<: *tests-template
+    image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:37-${CI_IMAGE_VERSION:-latest}
+
   debian-10:
     <<: *tests-template
     image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-debian:10-${CI_IMAGE_VERSION:-latest}
@@ -109,3 +109,8 @@
     <<: *tests-template
     image: quay.io/pypa/manylinux_2_28_x86_64
     command: .github/wheel-helpers/test-wheel-manylinux.sh cp310-cp310-manylinux_2_28_x86_64 /opt/python/cp310-cp310/bin/python3
+
+  wheels-manylinux_2_28-cp311:
+    <<: *tests-template
+    image: quay.io/pypa/manylinux_2_28_x86_64
+    command: .github/wheel-helpers/test-wheel-manylinux.sh cp311-cp311-manylinux_2_28_x86_64 /opt/python/cp311-cp311/bin/python3
diff --git a/.github/run-ci.sh b/.github/run-ci.sh
index 3227b32..bff9de8 100755
--- a/.github/run-ci.sh
+++ b/.github/run-ci.sh
@@ -102,7 +102,7 @@
 
 
 if [ -z "${test_names}" ]; then
-    for test_name in mypy debian-10 fedora-35 fedora-36 fedora-missing-deps; do
+    for test_name in mypy debian-10 fedora-36 fedora-37 fedora-missing-deps; do
 	if ! runTest "${test_name}"; then
 	    echo "Tests failed"
 	    exit 1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 81d1435..307bbb8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,8 +37,8 @@
         # "../compose/ci.docker-compose.yml"
         test-name:
           - debian-10
-          - fedora-35
           - fedora-36
+          - fedora-37
           - fedora-missing-deps
           - lint
           - mypy
@@ -125,7 +125,7 @@
         run: ${GITHUB_WORKSPACE}/.github/wheel-helpers/fetch-latest-buildbox-release.sh
 
       - name: Build wheels
-        run: pipx run cibuildwheel==2.8.1
+        run: pipx run cibuildwheel==2.11.3
 
       - uses: actions/upload-artifact@v3
         with:
@@ -146,6 +146,7 @@
           - wheels-manylinux_2_28-cp38
           - wheels-manylinux_2_28-cp39
           - wheels-manylinux_2_28-cp310
+          - wheels-manylinux_2_28-cp311
 
     steps:
       - uses: actions/checkout@v3
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 125b45e..0019749 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -69,7 +69,7 @@
         run: ${GITHUB_WORKSPACE}/.github/wheel-helpers/fetch-latest-buildbox-release.sh
 
       - name: Build wheels
-        run: pipx run cibuildwheel==2.8.1
+        run: pipx run cibuildwheel==2.11.3
 
       - uses: actions/upload-artifact@v3
         with:
@@ -90,6 +90,7 @@
           - wheels-manylinux_2_28-cp38
           - wheels-manylinux_2_28-cp39
           - wheels-manylinux_2_28-cp310
+          - wheels-manylinux_2_28-cp311
 
     steps:
       - uses: actions/checkout@v3
diff --git a/.pylintrc b/.pylintrc
index f06fcb0..4a1ddd7 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 [MASTER]
 
 # A comma-separated list of package or module names from where C extensions may
diff --git a/COMMITTERS.rst b/COMMITTERS.rst
index 77e866e..acb8fb4 100644
--- a/COMMITTERS.rst
+++ b/COMMITTERS.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 .. _committers:
 
 Committers
@@ -22,3 +35,6 @@
 +-----------------------------------+-----------------------------------+
 | Abderrahim Kitouni                | abderrahim                        |
 +-----------------------------------+-----------------------------------+
+| Sander Striker                    | sstriker                          |
++-----------------------------------+-----------------------------------+
+
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 4ac301d..3cad208 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Contributing
 ============
 Some tips and guidelines for developers hacking on BuildStream
diff --git a/LICENSE b/LICENSE
index d645695..799a4f7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -200,3 +200,66 @@
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
+
+
+===============================================================================
+
+Apache BuildStream Subcomponents:
+
+The Apache BuildStream project contains subcomponents or borrowed code with separate
+copyright notices and license terms. Your use of the source code for the these subcomponents
+is subject to the terms and conditions of the following licenses.
+
+
+-------------------------------------------------------------------------------
+doc/bst2html.py (MIT license)
+-------------------------------------------------------------------------------
+
+Copyright (c) 2013 German M. Bravo (Kronuz)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+-------------------------------------------------------------------------------
+src/buildstream/_frontend/complete.py (BSD license)
+-------------------------------------------------------------------------------
+
+Copyright (c) 2014 by Armin Ronacher.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+-------------------------------------------------------------------------------
+versioneer.py / src/_version.py (Public Domain)
+-------------------------------------------------------------------------------
+
+To make Versioneer easier to embed, all its code is dedicated to the public
+domain. The `_version.py` that it creates is also in the public domain.
+Specifically, both are released under the Creative Commons "Public Domain
+Dedication" license (CC0-1.0), as described in
+https://creativecommons.org/publicdomain/zero/1.0/ .
diff --git a/MANIFEST.in b/MANIFEST.in
index 047ceac..a0deafa 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,8 +1,22 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Basic toplevel package includes
-include BuildStream.doap
 include COMMITTERS.rst
 include CONTRIBUTING.rst
-include COPYING
+include LICENSE
+include NOTICE
 include NEWS
 include README.rst
 
diff --git a/NEWS b/NEWS
index 7d639cf..e5b236e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,42 @@
+=================
+buildstream 2.0.0
+=================
+
+No changes since 1.95.6, releasing voted upon 2.0.0
+
+==================
+buildstream 1.95.6
+==================
+
+  o Adding missing license headers to some files in the _testing module
+
+==================
+buildstream 1.95.5
+==================
+
+  o Fixed remaining license header issues (in sources and also docs)
+
+  o Documenting how to prepare BuildStream for new python versions
+
+  o Remove generated GPL files from autotools test tarballs
+
+  o Update package metadata urls and author
+
+==================
+buildstream 1.95.4
+==================
+
+  o Fixed license headers in source files
+
+  o Attribute third party licenses etc properly in the LICENCE
+    and NOTICE files and ensure they are included in source distributions
+
+  o Removed obsolete update_committers.py script in contrib
+
+  o Require at least the first cython version which properly supported python 3.10
+
+  o Update copyright year and attribution in generated documentation
+
 ==================
 buildstream 1.95.3
 ==================
diff --git a/NOTICE b/NOTICE
index f104d0c..3c80d58 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache BuildStream
-Copyright 2021 The Apache Software Foundation
+Copyright 2022 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
@@ -17,3 +17,23 @@
 
     This file is forked from the click library which is under BSD license
     and as such is acceptable to redistribute under the Apache License.
+
+  * versioneer.py / src/_version.py
+
+    These files are distributed under public domain and originate from
+    the versioneer project at: https://github.com/python-versioneer/python-versioneer/
+
+  * src/buildstream/_protos/google
+
+    This directory contains software developed by google:
+    https://github.com/googleapis/googleapis/
+
+  * src/buildstream/_protos/build/bazel
+
+    This directory contains software developed by the Bazel authors:
+    https://github.com/bazelbuild/remote-apis/
+
+  * src/buildstream/_protos/build/buildgrid
+
+    This directory contains software developed by the BuildGrid authors:
+    https://gitlab.com/BuildGrid/buildgrid
diff --git a/README.rst b/README.rst
index b0fb11a..515a369 100644
--- a/README.rst
+++ b/README.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 About
 -----
 
@@ -17,7 +30,7 @@
 
 What is BuildStream?
 ====================
-`BuildStream <https://buildstream.build>`_ is a Free Software tool for 
+`BuildStream <https://buildstream.build>`_ is an Open Source tool for
 building/integrating software stacks.
 It takes inspiration, lessons and use-cases from various projects including
 OBS, Reproducible Builds, Yocto, Baserock, Buildroot, Aboriginal, GNOME Continuous,
@@ -86,7 +99,7 @@
 To get started, first `install BuildStream by following the installation guide
 <https://buildstream.build/install.html>`_
 and then follow our tutorial in the
-`user guide <https://docs.buildstream.build/1.4.1/main_using.html>`_.
+`user guide <https://docs.buildstream.build/master/main_using.html>`_.
 
 We also recommend exploring some existing BuildStream projects:
 
@@ -95,16 +108,3 @@
 * https://gitlab.com/baserock/definitions
 
 If you have any questions please ask on our `#buildstream <irc://irc.gnome.org/buildstream>`_ channel in `irc.gnome.org <irc://irc.gnome.org>`_
-
-
-Availability in distros
-=======================
-* BuildStream:
-
-.. image:: https://repology.org/badge/vertical-allrepos/buildstream.svg
-   :target: https://repology.org/metapackage/buildstream/versions
-
-* BuildStream external plugins (bst-external)
-
-.. image:: https://repology.org/badge/vertical-allrepos/bst-external.svg
-   :target: https://repology.org/metapackage/bst-external/versions
diff --git a/contrib/COMMITTERS.rst.j2 b/contrib/COMMITTERS.rst.j2
deleted file mode 100644
index 6f602d6..0000000
--- a/contrib/COMMITTERS.rst.j2
+++ /dev/null
@@ -1,18 +0,0 @@
-.. _committers:
-
-Committers
-==========
-
-Full commit access
--------------------
-List of people with full commit access, i.e. blanket commit access to
-the BuildStream codebase. Note that this is not a full list of all
-contributors.
-
-+-----------------------------------+-----------------------------------+
-| Full Name                         | GitLab User                       |
-+===================================+===================================+
-{% for name, username in committers.items() -%}
-| {{ get_table_entry(name) }}| {{ get_table_entry(username)}}|
-+-----------------------------------+-----------------------------------+
-{% endfor %}
diff --git a/contrib/bst-docker-import b/contrib/bst-docker-import
index d86f364..3e983ef 100755
--- a/contrib/bst-docker-import
+++ b/contrib/bst-docker-import
@@ -1,7 +1,5 @@
 #!/bin/bash
 #
-#  Copyright 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/contrib/bst-graph b/contrib/bst-graph
index 5310aae..783027d 100755
--- a/contrib/bst-graph
+++ b/contrib/bst-graph
@@ -1,4 +1,20 @@
 #!/usr/bin/env python3
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#  Authors:
+#        Chandan Singh <csingh43@bloomberg.net>
+#
 '''Print dependency graph of given element(s) in DOT format.
 
 This script must be run from the same directory where you would normally
diff --git a/contrib/bst-here b/contrib/bst-here
index 2c2d21f..1f7396a 100755
--- a/contrib/bst-here
+++ b/contrib/bst-here
@@ -1,7 +1,5 @@
 #!/bin/bash
 #
-#  Copyright 2017 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/contrib/update_committers.py b/contrib/update_committers.py
deleted file mode 100755
index 927c02e..0000000
--- a/contrib/update_committers.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python3
-"""A script to set up COMMITTERS.rst according to gitlab committers."""
-
-import os
-import sys
-import subprocess
-import argparse
-import json
-import urllib.request
-import urllib.parse
-from jinja2 import Environment, FileSystemLoader
-from collections import OrderedDict
-
-GIT_ERROR = 1
-MERGE_REQUEST = 'https://gitlab.com/api/v4/projects/1975139/merge_requests'
-ALL_MEMBERS = 'https://gitlab.com/api/v4/projects/1975139/members/all'
-PROTECTED = 'https://gitlab.com/api/v4/projects/1975139/protected_branches/master'
-USERS = 'https://gitlab.com/api/v4/users/{}'
-MAX_LEN = len('Full Name                         ')
-
-
-def get_committers(token: str) -> OrderedDict:
-    request = urllib.request.Request(PROTECTED)
-    request.add_header('PRIVATE-TOKEN', token)
-    response = urllib.request.urlopen(request).read().decode('utf-8')
-    named_developers = [x['user_id'] for x in json.loads(response)['merge_access_levels']]
-    request = urllib.request.Request(ALL_MEMBERS)
-    request.add_header('PRIVATE-TOKEN', token)
-    all_members = json.loads(urllib.request.urlopen(request).read().decode('utf-8'))
-    names_usernames_dictionary = OrderedDict()
-    for contributor in all_members:
-        if contributor['access_level'] >= 40:
-            names_usernames_dictionary[contributor['name']] = contributor['username']
-    for contributor in named_developers:
-        if contributor:
-            request = urllib.request.Request(USERS.format(contributor))
-            response = json.loads(urllib.request.urlopen(request).read().decode('utf-8'))
-            if response['name'] != 'bst-marge-bot':
-                names_usernames_dictionary[response['name']] = response['username']
-    return names_usernames_dictionary
-
-
-def get_table_entry(entry: str) -> str:
-    res = entry
-    for _ in range(MAX_LEN - len(entry)):
-        res = res + ' '
-    return res
-
-
-def find_repository_root() -> str:
-    root = os.getcwd()
-    try:
-        root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel'])
-    except subprocess.CalledProcessError as e:
-        print('The current working directory is not a git repository. \
-               \"git rev-parse --show-toplevel\" exited with code {}.'.format(e.returncode))
-        sys.exit(GIT_ERROR)
-    return root.rstrip().decode('utf-8')
-
-
-def create_committers_file(committers: OrderedDict):
-    repository_root = find_repository_root()
-    contrib_directory = os.path.join(repository_root, 'contrib')
-    file_loader = FileSystemLoader(contrib_directory)
-    env = Environment(loader=file_loader, autoescape=True)
-    template = env.get_template('COMMITTERS.rst.j2')
-    render_output = template.render(committers=committers, get_table_entry=get_table_entry)
-    committers_file = os.path.join(repository_root, 'COMMITTERS.rst')
-
-    with open(committers_file, 'w') as f:
-        f.write(render_output)
-
-
-def commit_changes_if_needed(token: str):
-    committers_file = os.path.join(find_repository_root(), 'COMMITTERS.rst')
-    git_diff = subprocess.call(['git', 'diff', '--quiet', committers_file])
-    if git_diff:
-        commit_message = '\'Update COMMITTERS.rst\''
-        branch_name = 'update_committers'
-        subprocess.call(['git', 'add', committers_file])
-        subprocess.call(['git', 'commit', '-m', commit_message])
-        try:
-            subprocess.check_call(['git', 'push', '-u', 'origin', branch_name], stderr=subprocess.STDOUT)
-        except subprocess.CalledProcessError as e:
-            print('Could not push to remote branch. \"git push -u origin {}\" \
-                   exited with code {}.'.format(branch_name, e.returncode))
-            sys.exit(GIT_ERROR)
-        data = urllib.parse.urlencode({'source_branch': 'update_committers',
-                                       'target_branch': 'master',
-                                       'title': 'Update COMMITTERS.rst file'})
-        request = urllib.request.Request(MERGE_REQUEST, data=bytearray(data, 'ASCII'))
-        request.add_header('PRIVATE-TOKEN', token)
-        response = urllib.request.urlopen(request)
-        if response.getcode() != 200:
-            print("Failed to open MR; please open an MR for branch {} manually".format(branch_name))
-
-
-def main():
-    parser = argparse.ArgumentParser(
-        description="Update gitlab committers according to COMMITTERS.rst"
-    )
-    parser.add_argument(
-        "token", type=str,
-        help="Your private access token. See https://gitlab.com/profile/personal_access_tokens."
-    )
-    args = parser.parse_args()
-
-    committers = get_committers(args.token)
-    create_committers_file(committers)
-    commit_changes_if_needed(args.token)
-
-
-if __name__ == '__main__':
-    main()
diff --git a/doc/badges.py b/doc/badges.py
index b6cb34a..e052689 100755
--- a/doc/badges.py
+++ b/doc/badges.py
@@ -1,7 +1,5 @@
 #!/usr/bin/env python3
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/doc/bst2html.py b/doc/bst2html.py
index cfaf055..d904931 100755
--- a/doc/bst2html.py
+++ b/doc/bst2html.py
@@ -1,7 +1,6 @@
 #!/usr/bin/env python3
 #
 # Copyright (c) 2013 German M. Bravo (Kronuz)
-# Copyright (c) 2018 Codethink Limited
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
diff --git a/doc/source/additional_docker.rst b/doc/source/additional_docker.rst
index a7cfd28..6cbfa42 100644
--- a/doc/source/additional_docker.rst
+++ b/doc/source/additional_docker.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _bst_and_docker:
 
diff --git a/doc/source/arch_cachekeys.rst b/doc/source/arch_cachekeys.rst
index 0d469de..4989c09 100644
--- a/doc/source/arch_cachekeys.rst
+++ b/doc/source/arch_cachekeys.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _cachekeys:
 
diff --git a/doc/source/arch_caches.rst b/doc/source/arch_caches.rst
index 77fd77a..6a3e7e4 100644
--- a/doc/source/arch_caches.rst
+++ b/doc/source/arch_caches.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _caches:
 
diff --git a/doc/source/arch_data_model.rst b/doc/source/arch_data_model.rst
index 6e78d3a..2d90ca3 100644
--- a/doc/source/arch_data_model.rst
+++ b/doc/source/arch_data_model.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Data model
diff --git a/doc/source/arch_dependency_model.rst b/doc/source/arch_dependency_model.rst
index 2b80564..2944910 100644
--- a/doc/source/arch_dependency_model.rst
+++ b/doc/source/arch_dependency_model.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Dependency model
diff --git a/doc/source/arch_overview.rst b/doc/source/arch_overview.rst
index f01dec4..42b676f 100644
--- a/doc/source/arch_overview.rst
+++ b/doc/source/arch_overview.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Overview of modules
diff --git a/doc/source/arch_program_flow.rst b/doc/source/arch_program_flow.rst
index 9198ee1..a0ba5ab 100644
--- a/doc/source/arch_program_flow.rst
+++ b/doc/source/arch_program_flow.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Overview of program flow
diff --git a/doc/source/arch_remote_execution.rst b/doc/source/arch_remote_execution.rst
index 9c8e9d3..7aef44a 100644
--- a/doc/source/arch_remote_execution.rst
+++ b/doc/source/arch_remote_execution.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Remote execution
 ================
 Remote execution allows builds to take place on different machines from the machine *bst* is run on, allowing faster builds, shared resources and different build capabilities, for example different machine architectures.
diff --git a/doc/source/arch_sandboxing.rst b/doc/source/arch_sandboxing.rst
index 324c6ae..a5daf3d 100644
--- a/doc/source/arch_sandboxing.rst
+++ b/doc/source/arch_sandboxing.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _sandboxing:
 
diff --git a/doc/source/arch_scheduler.rst b/doc/source/arch_scheduler.rst
index 4b05014..572bf59 100644
--- a/doc/source/arch_scheduler.rst
+++ b/doc/source/arch_scheduler.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Scheduler
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 80af5a7..358f4ab 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -52,8 +52,8 @@
 
 # General information about the project.
 project = "BuildStream"
-copyright = "2017-2020, The BuildStream Contributors"  # pylint: disable=redefined-builtin
-author = "The BuildStream Contributors"
+copyright = "2017-2022, The Apache Software Foundation"  # pylint: disable=redefined-builtin
+author = "The Apache Software Foundation"
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
diff --git a/doc/source/core_additional.rst b/doc/source/core_additional.rst
index 878745b..b496754 100644
--- a/doc/source/core_additional.rst
+++ b/doc/source/core_additional.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Additional writings
diff --git a/doc/source/core_format.rst b/doc/source/core_format.rst
index 294867f..e8089a9 100644
--- a/doc/source/core_format.rst
+++ b/doc/source/core_format.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Project format
diff --git a/doc/source/core_framework.rst b/doc/source/core_framework.rst
index 026607a..14efdc5 100644
--- a/doc/source/core_framework.rst
+++ b/doc/source/core_framework.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _core_framework:
diff --git a/doc/source/core_plugins.rst b/doc/source/core_plugins.rst
index 4786ec4..1b02cd4 100644
--- a/doc/source/core_plugins.rst
+++ b/doc/source/core_plugins.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _plugins:
 
diff --git a/doc/source/developing/strict-mode.rst b/doc/source/developing/strict-mode.rst
index e516a66..ed3255c 100644
--- a/doc/source/developing/strict-mode.rst
+++ b/doc/source/developing/strict-mode.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _developing_strict_mode:
diff --git a/doc/source/developing/workspaces.rst b/doc/source/developing/workspaces.rst
index 62c6138..db2c9a9 100644
--- a/doc/source/developing/workspaces.rst
+++ b/doc/source/developing/workspaces.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _developing_workspaces:
diff --git a/doc/source/examples/git-mirror.rst b/doc/source/examples/git-mirror.rst
index 1b05bf6..bcce6ec 100644
--- a/doc/source/examples/git-mirror.rst
+++ b/doc/source/examples/git-mirror.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Creating and using a git mirror
diff --git a/doc/source/examples/tar-mirror.rst b/doc/source/examples/tar-mirror.rst
index 7a4a2f5..77146b1 100644
--- a/doc/source/examples/tar-mirror.rst
+++ b/doc/source/examples/tar-mirror.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _using_tar_mirror:
diff --git a/doc/source/format_declaring.rst b/doc/source/format_declaring.rst
index fede3e0..7bad61f 100644
--- a/doc/source/format_declaring.rst
+++ b/doc/source/format_declaring.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Declaring elements
diff --git a/doc/source/format_intro.rst b/doc/source/format_intro.rst
index cc74345..9c19225 100644
--- a/doc/source/format_intro.rst
+++ b/doc/source/format_intro.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Introduction
diff --git a/doc/source/format_project.rst b/doc/source/format_project.rst
index 435fdee..83eac5e 100644
--- a/doc/source/format_project.rst
+++ b/doc/source/format_project.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 .. _projectconf:
 
 
diff --git a/doc/source/format_project_refs.rst b/doc/source/format_project_refs.rst
index 8dcb244..140e8e5 100644
--- a/doc/source/format_project_refs.rst
+++ b/doc/source/format_project_refs.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _projectrefs:
diff --git a/doc/source/format_public.rst b/doc/source/format_public.rst
index d596ea7..fc51681 100644
--- a/doc/source/format_public.rst
+++ b/doc/source/format_public.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _public_builtin:
diff --git a/doc/source/hacking/coding_guidelines.rst b/doc/source/hacking/coding_guidelines.rst
index 156d36b..eafb0c7 100644
--- a/doc/source/hacking/coding_guidelines.rst
+++ b/doc/source/hacking/coding_guidelines.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _coding_guidelines:
diff --git a/doc/source/hacking/grpc_protocols.rst b/doc/source/hacking/grpc_protocols.rst
index 9ac650f..0ca4c74 100644
--- a/doc/source/hacking/grpc_protocols.rst
+++ b/doc/source/hacking/grpc_protocols.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _protocol_buffers:
diff --git a/doc/source/hacking/making_releases.rst b/doc/source/hacking/making_releases.rst
index 52d4890..4f71c45 100644
--- a/doc/source/hacking/making_releases.rst
+++ b/doc/source/hacking/making_releases.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _making_releases:
diff --git a/doc/source/hacking/managing_data_files.rst b/doc/source/hacking/managing_data_files.rst
index ec9639e..291ee39 100644
--- a/doc/source/hacking/managing_data_files.rst
+++ b/doc/source/hacking/managing_data_files.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _managing_data_files:
diff --git a/doc/source/hacking/measuring_performance.rst b/doc/source/hacking/measuring_performance.rst
index b78d23a..44798c4 100644
--- a/doc/source/hacking/measuring_performance.rst
+++ b/doc/source/hacking/measuring_performance.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _measuring_performance:
diff --git a/doc/source/hacking/ui.rst b/doc/source/hacking/ui.rst
index cf33c55..5a8c4d5 100644
--- a/doc/source/hacking/ui.rst
+++ b/doc/source/hacking/ui.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Contributing to the UI
 ~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/source/hacking/updating_python_deps.rst b/doc/source/hacking/updating_python_deps.rst
index 711cc26..548c317 100644
--- a/doc/source/hacking/updating_python_deps.rst
+++ b/doc/source/hacking/updating_python_deps.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _updating_python_deps:
@@ -20,3 +33,104 @@
 file::
 
    make -C requirements
+
+
+Adding support for a new Python release
+---------------------------------------
+When a new stable release of Python 3 appears, we must explicitly declare
+our support for it in the following places.
+
+
+tox.ini
+~~~~~~~
+The ``tox.ini`` file defines the environments where the BuildStream test suite
+runs.  Every ``py{3.x,3.y}`` list must be updated to contain the new version
+number such as ``311`` for CPython 3.11.
+
+Use ``tox -e py311-nocover`` to run the test suite with the new version of
+Python.
+
+
+pyproject.toml
+~~~~~~~~~~~~~~
+
+
+Bump cython version
+'''''''''''''''''''
+New releases of Cython must be depended on with new versions of Python
+in lock step.
+
+When supporting a new Python version, it is important to bump the minimal
+dependency on Cython to a new enough version which also supports the new
+version of Python.
+
+
+Wheel details
+'''''''''''''
+We produce binary "wheel" packages for each supported version of Python.
+The cibuildwheel build tool will build for all released versions of Python
+so no change is needed in the config.
+
+However, if you want to test wheel building with a prerelease version of Python
+you will need to set ``CIBW_PRERELEASE_PYTHONS=1`` in the cibuildwheel
+environment.
+
+
+.github/compose/ci.docker-compose.yml
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Each binary package is tested in a container, using the
+`pypa/manylinux <https://github.com/pypa/manylinux>`_ images.
+
+You need to add a new docker-compose service here -- copy the
+latest one and update the version number where it appears.
+
+
+.github/workflows/ci.yml and .github/workflows/release.yml
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+There is a separate CI job to run each of the above tests. Update the
+matrix config for the ``test_wheels`` jobs in ``ci.yml`` and ``release.yml``
+to add the new Python version.
+
+
+Removing support for a Python release
+-------------------------------------
+
+
+tox.ini
+~~~~~~~
+You will need to update the ``py{3.x,3.y}`` lists to remove the old version. In
+the ``envlist`` section, make sure the oldest version still has coverage
+enabled while the other versions are marked ``-nocover``.
+
+
+pyproject.toml
+~~~~~~~~~~~~~~
+The cibuildwheel tool will produce wheels for all versions of Python supported
+upstream.. If we drop support for a version before upstream do, update the
+``tool.cibuildwheel.skip`` list to skip all platform tags for that version.
+The glob ``cp36-*`` would skip all CPython 3.6 builds, for example.
+
+
+.github/compose/ci.docker-compose.yml
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Remove the corresponding service.
+
+
+.github/workflows/ci.yml and .github/workflows/release.yml
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Update the matrix config for the `test_wheels` jobs in `ci.yml` and
+`release.yml` to remove the old Python version.
+
+
+ABI compatibility for binary Python packages
+--------------------------------------------
+The Python binary packages declare system requirements using
+`platform compatibility tags <https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/>`_.
+
+For linux-gnu systems we use `manylinux_x_y platform tags <https://peps.python.org/pep-0600/>`_
+to specify a minimum GLIBC version. The platform tag is controlled in ``pyproject.toml`` with the
+``tool.cibuildwheel.manylinux-x86_64-image`` key.  It must correspond with the version of
+GLIBC used in `buildbox-integration <https://gitlab.com/BuildGrid/buildbox/buildbox-integration>`_
+to produce static buildbox binaries that are included in the package.
+The ``cibuildwheel`` tool uses `auditwheel <https://github.com/pypa/auditwheel>`_
+to ensure the correct platform tag is declared.
diff --git a/doc/source/hacking/using_the_testsuite.rst b/doc/source/hacking/using_the_testsuite.rst
index 487e3ca..347b4ac 100644
--- a/doc/source/hacking/using_the_testsuite.rst
+++ b/doc/source/hacking/using_the_testsuite.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _contributing_testing:
diff --git a/doc/source/hacking/writing_documentation.rst b/doc/source/hacking/writing_documentation.rst
index a234c7c..f744c63 100644
--- a/doc/source/hacking/writing_documentation.rst
+++ b/doc/source/hacking/writing_documentation.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _writing_documentation:
diff --git a/doc/source/hacking/writing_plugins.rst b/doc/source/hacking/writing_plugins.rst
index d8462d8..7e4ed46 100644
--- a/doc/source/hacking/writing_plugins.rst
+++ b/doc/source/hacking/writing_plugins.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _writing_plugins:
diff --git a/doc/source/handling-files/composition.rst b/doc/source/handling-files/composition.rst
index 2adfda3..2511192 100644
--- a/doc/source/handling-files/composition.rst
+++ b/doc/source/handling-files/composition.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _handling_files_composition:
diff --git a/doc/source/handling-files/filtering.rst b/doc/source/handling-files/filtering.rst
index 4fa3b4c..c030c02 100644
--- a/doc/source/handling-files/filtering.rst
+++ b/doc/source/handling-files/filtering.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _handling_files_filtering:
diff --git a/doc/source/handling-files/overlaps.rst b/doc/source/handling-files/overlaps.rst
index ab573d9..20ebfca 100644
--- a/doc/source/handling-files/overlaps.rst
+++ b/doc/source/handling-files/overlaps.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _handling_files_overlaps:
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 57f9b21..e0be324 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,7 +1,15 @@
-.. BuildStream documentation master file, created by
-   sphinx-quickstart on Mon Nov  7 21:03:37 2016.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
 
 
 BuildStream documentation
diff --git a/doc/source/junctions/junction-elements.rst b/doc/source/junctions/junction-elements.rst
index fb95523..f0effec 100644
--- a/doc/source/junctions/junction-elements.rst
+++ b/doc/source/junctions/junction-elements.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _junction_elements:
diff --git a/doc/source/junctions/junction-includes.rst b/doc/source/junctions/junction-includes.rst
index b8d0e77..0f58805 100644
--- a/doc/source/junctions/junction-includes.rst
+++ b/doc/source/junctions/junction-includes.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _advanced_junction_includes:
diff --git a/doc/source/junctions/junction-workspaces.rst b/doc/source/junctions/junction-workspaces.rst
index 82b73ad..23ebe3e 100644
--- a/doc/source/junctions/junction-workspaces.rst
+++ b/doc/source/junctions/junction-workspaces.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _junction_workspaces:
diff --git a/doc/source/main_about.rst b/doc/source/main_about.rst
index a6210d3..eb8c037 100644
--- a/doc/source/main_about.rst
+++ b/doc/source/main_about.rst
@@ -1 +1,14 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 .. include:: ../../README.rst
diff --git a/doc/source/main_architecture.rst b/doc/source/main_architecture.rst
index d9b9f3e..cff4d74 100644
--- a/doc/source/main_architecture.rst
+++ b/doc/source/main_architecture.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Architecture
diff --git a/doc/source/main_core.rst b/doc/source/main_core.rst
index c0757b7..0049de0 100644
--- a/doc/source/main_core.rst
+++ b/doc/source/main_core.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Reference
diff --git a/doc/source/main_glossary.rst b/doc/source/main_glossary.rst
index f1bf4cf..f16fac1 100644
--- a/doc/source/main_glossary.rst
+++ b/doc/source/main_glossary.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Glossary
diff --git a/doc/source/main_install.rst b/doc/source/main_install.rst
index a95d8f3..819c124 100644
--- a/doc/source/main_install.rst
+++ b/doc/source/main_install.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Installing from Source
 ======================
 
diff --git a/doc/source/main_porting.rst b/doc/source/main_porting.rst
index 07ac9ef..62f534d 100644
--- a/doc/source/main_porting.rst
+++ b/doc/source/main_porting.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _main_porting:
diff --git a/doc/source/main_using.rst b/doc/source/main_using.rst
index c6cd385..e5dfee4 100644
--- a/doc/source/main_using.rst
+++ b/doc/source/main_using.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _using:
diff --git a/doc/source/porting_command_line.rst b/doc/source/porting_command_line.rst
index 4520c07..5b24697 100644
--- a/doc/source/porting_command_line.rst
+++ b/doc/source/porting_command_line.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _porting_command_line:
diff --git a/doc/source/porting_project.rst b/doc/source/porting_project.rst
index cb2ddac..9a981ca 100644
--- a/doc/source/porting_project.rst
+++ b/doc/source/porting_project.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _porting_project:
diff --git a/doc/source/porting_user_configuration.rst b/doc/source/porting_user_configuration.rst
index 1971ddb..cdf5ff1 100644
--- a/doc/source/porting_user_configuration.rst
+++ b/doc/source/porting_user_configuration.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _porting_user_configuration:
diff --git a/doc/source/tutorial/autotools.rst b/doc/source/tutorial/autotools.rst
index 36b09bf..1907f26 100644
--- a/doc/source/tutorial/autotools.rst
+++ b/doc/source/tutorial/autotools.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial_autotools:
diff --git a/doc/source/tutorial/directives.rst b/doc/source/tutorial/directives.rst
index 33d9eeb..61b4d2c 100644
--- a/doc/source/tutorial/directives.rst
+++ b/doc/source/tutorial/directives.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial_directives:
diff --git a/doc/source/tutorial/first-project.rst b/doc/source/tutorial/first-project.rst
index ca3fd5b..c5c9407 100644
--- a/doc/source/tutorial/first-project.rst
+++ b/doc/source/tutorial/first-project.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial_first_project:
diff --git a/doc/source/tutorial/integration-commands.rst b/doc/source/tutorial/integration-commands.rst
index 8113ac6..16fd69a 100644
--- a/doc/source/tutorial/integration-commands.rst
+++ b/doc/source/tutorial/integration-commands.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial_integration_commands:
diff --git a/doc/source/tutorial/running-commands.rst b/doc/source/tutorial/running-commands.rst
index ac77f06..8be85dc 100644
--- a/doc/source/tutorial/running-commands.rst
+++ b/doc/source/tutorial/running-commands.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial_running_commands:
diff --git a/doc/source/using_commands.rst b/doc/source/using_commands.rst
index 6f4b1ce..aca308e 100644
--- a/doc/source/using_commands.rst
+++ b/doc/source/using_commands.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _commands:
 
diff --git a/doc/source/using_config.rst b/doc/source/using_config.rst
index 996fddf..b465977 100644
--- a/doc/source/using_config.rst
+++ b/doc/source/using_config.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 .. _user_config:
 
diff --git a/doc/source/using_configuring_cache_server.rst b/doc/source/using_configuring_cache_server.rst
index 8fdbabc..1ca3887 100644
--- a/doc/source/using_configuring_cache_server.rst
+++ b/doc/source/using_configuring_cache_server.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _cache_servers:
diff --git a/doc/source/using_configuring_remote_execution.rst b/doc/source/using_configuring_remote_execution.rst
index 759e40f..b4f0521 100644
--- a/doc/source/using_configuring_remote_execution.rst
+++ b/doc/source/using_configuring_remote_execution.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _remote_execution_servers:
diff --git a/doc/source/using_developing.rst b/doc/source/using_developing.rst
index b80cb20..ad64e4e 100644
--- a/doc/source/using_developing.rst
+++ b/doc/source/using_developing.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Developing
 ==========
 This section covers the features BuildStream provides for users
diff --git a/doc/source/using_examples.rst b/doc/source/using_examples.rst
index f4e16d4..89918b2 100644
--- a/doc/source/using_examples.rst
+++ b/doc/source/using_examples.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _examples:
diff --git a/doc/source/using_handling_files.rst b/doc/source/using_handling_files.rst
index 8d2e356..3899435 100644
--- a/doc/source/using_handling_files.rst
+++ b/doc/source/using_handling_files.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 Handling files
 ==============
 This section covers the various aspects related to finer grained
diff --git a/doc/source/using_junctions.rst b/doc/source/using_junctions.rst
index 9fe492c..a48747d 100644
--- a/doc/source/using_junctions.rst
+++ b/doc/source/using_junctions.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 Combining projects
diff --git a/doc/source/using_tutorial.rst b/doc/source/using_tutorial.rst
index 96a9da2..7e5139f 100644
--- a/doc/source/using_tutorial.rst
+++ b/doc/source/using_tutorial.rst
@@ -1,3 +1,16 @@
+..
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
 
 
 .. _tutorial:
diff --git a/pyproject.toml b/pyproject.toml
index ea9f0df..989fb08 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,10 +1,24 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 [build-system]
 requires = [
     # We need at least version 36.6.0 that introduced "build_meta"
     "setuptools>=36.6.0",
     # In order to build wheels, and as required by PEP 517
     "wheel",
-    "Cython",
+    # Require a new enough cython for the python versions we support
+    "Cython>=0.29.25",
     "packaging",
 ]
 build-backend = "setuptools.build_meta"
diff --git a/requirements/cov-requirements.in b/requirements/cov-requirements.in
index d80d8f4..65bd5da 100644
--- a/requirements/cov-requirements.in
+++ b/requirements/cov-requirements.in
@@ -1,4 +1,4 @@
-coverage == 4.4.0
+coverage >= 6
 pytest-cov >= 2.5.0
 pytest >= 6.0.1
 Cython
diff --git a/requirements/cov-requirements.txt b/requirements/cov-requirements.txt
index d202c6e..9df1cf0 100644
--- a/requirements/cov-requirements.txt
+++ b/requirements/cov-requirements.txt
@@ -1,12 +1,11 @@
-coverage==4.4
-pytest-cov==2.10.1
-pytest==7.1.2
-Cython==0.29.28
+coverage==7.0.5
+pytest-cov==4.0.0
+pytest==7.2.0
+Cython==0.29.32
 ## The following requirements were added by pip freeze:
-attrs==21.4.0
+attrs==22.2.0
+exceptiongroup==1.1.0
 iniconfig==1.1.1
-packaging==21.3
+packaging==22.0
 pluggy==1.0.0
-py==1.11.0
-pyparsing==3.0.8
 tomli==2.0.1
diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt
index 040734d..203e5e3 100644
--- a/requirements/dev-requirements.txt
+++ b/requirements/dev-requirements.txt
@@ -1,28 +1,27 @@
 pexpect==4.8.0
 pylint==2.13.8
 # Pytest 6.0.0 doesn't play well with pylint
-pytest==7.1.2
+pytest==7.2.0
 pytest-datafiles==2.0.1
-pytest-env==0.6.2
-pytest-xdist==2.5.0
+pytest-env==0.8.1
+pytest-xdist==3.1.0
 pytest-timeout==2.1.0
-pyftpdlib==1.5.6
+pyftpdlib==1.5.7
 ## The following requirements were added by pip freeze:
-astroid==2.11.4
-attrs==21.4.0
-dill==0.3.4
+astroid==2.11.7
+attrs==22.2.0
+dill==0.3.6
+exceptiongroup==1.1.0
 execnet==1.9.0
 iniconfig==1.1.1
-isort==5.10.1
-lazy-object-proxy==1.7.1
+isort==5.11.4
+lazy-object-proxy==1.8.0
 mccabe==0.7.0
-packaging==21.3
-platformdirs==2.5.2
+packaging==22.0
+platformdirs==2.6.2
 pluggy==1.0.0
 ptyprocess==0.7.0
 py==1.11.0
-pyparsing==3.0.8
-pytest-forked==1.4.0
 tomli==2.0.1
-typing-extensions==4.2.0
+typing_extensions==4.4.0
 wrapt==1.14.1
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index a8ab1ef..3c621fb 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -1,14 +1,14 @@
 click==8.1.3
-grpcio==1.46.0
+grpcio==1.51.1
 Jinja2==3.1.2
 pluginbase==1.0.1
-protobuf==3.20.1
-psutil==5.9.0
+protobuf==4.21.12
+psutil==5.9.4
 ruamel.yaml==0.17.21
-ruamel.yaml.clib==0.2.6
-setuptools==44.1.1
-pyroaring==0.3.3
-ujson==5.2.0
+ruamel.yaml.clib==0.2.7
+setuptools==56.0.0
+pyroaring==0.3.4
+ujson==5.6.0
 python-dateutil==2.8.2
 ## The following requirements were added by pip freeze:
 MarkupSafe==2.1.1
diff --git a/setup.cfg b/setup.cfg
index d220e39..83211c0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 [versioneer]
 VCS = git
 style = pep440_buildstream
diff --git a/setup.py b/setup.py
index 01a0b96..017b046 100755
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,5 @@
 #!/usr/bin/env python3
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -402,7 +400,7 @@
     name="BuildStream",
     version=version,
     cmdclass=get_cmdclass(),
-    author="BuildStream Developers",
+    author="The Apache Software Foundation",
     author_email="dev@buildstream.apache.org",
     classifiers=[
         "Environment :: Console",
@@ -422,9 +420,9 @@
     long_description_content_type="text/x-rst; charset=UTF-8",
     url="https://buildstream.build",
     project_urls={
-        "Source": "https://gitlab.com/BuildStream/buildstream",
+        "Source": "https://github.com/apache/buildstream",
         "Documentation": "https://docs.buildstream.build",
-        "Tracker": "https://gitlab.com/BuildStream/buildstream/issues",
+        "Tracker": "https://github.com/apache/buildstream/issues",
         "Mailing List": "https://lists.apache.org/list.html?dev@buildstream.apache.org",
     },
     python_requires="~={}.{}".format(REQUIRED_PYTHON_MAJOR, REQUIRED_PYTHON_MINOR),
diff --git a/src/buildstream/__init__.py b/src/buildstream/__init__.py
index 55833c7..1c51bd6 100644
--- a/src/buildstream/__init__.py
+++ b/src/buildstream/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/__main__.py b/src/buildstream/__main__.py
index 556a0f6..7718329 100644
--- a/src/buildstream/__main__.py
+++ b/src/buildstream/__main__.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 ##################################################################
 #                      Private Entry Point                       #
 ##################################################################
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index 2ff345e..c3a5d68 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index b855942..0eec734 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2017-2018 Codethink Limited
-#  Copyright (C) 2019-2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_artifactelement.py b/src/buildstream/_artifactelement.py
index 868b477..7a1c336 100644
--- a/src/buildstream/_artifactelement.py
+++ b/src/buildstream/_artifactelement.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_artifactproject.py b/src/buildstream/_artifactproject.py
index 8650bf9..3defd4e 100644
--- a/src/buildstream/_artifactproject.py
+++ b/src/buildstream/_artifactproject.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_assetcache.py b/src/buildstream/_assetcache.py
index dce8d10..6a48063 100644
--- a/src/buildstream/_assetcache.py
+++ b/src/buildstream/_assetcache.py
@@ -1,4 +1,3 @@
-#  Copyright (C) 2019-2020 Bloomberg Finance LP
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/_cachekey.py b/src/buildstream/_cachekey.py
index 2c514bf..2a3b7f2 100644
--- a/src/buildstream/_cachekey.py
+++ b/src/buildstream/_cachekey.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_cas/__init__.py b/src/buildstream/_cas/__init__.py
index 409925d..5f9c4ab 100644
--- a/src/buildstream/_cas/__init__.py
+++ b/src/buildstream/_cas/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017-2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index 42419d0..42937c1 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018-2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_cas/casdprocessmanager.py b/src/buildstream/_cas/casdprocessmanager.py
index 5ecdcad..8fa9861 100644
--- a/src/buildstream/_cas/casdprocessmanager.py
+++ b/src/buildstream/_cas/casdprocessmanager.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018-2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_cas/casremote.py b/src/buildstream/_cas/casremote.py
index 2ca4287..4299783 100644
--- a/src/buildstream/_cas/casremote.py
+++ b/src/buildstream/_cas/casremote.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018-2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_cas/casserver.py b/src/buildstream/_cas/casserver.py
index 9736387..4e46b4f 100644
--- a/src/buildstream/_cas/casserver.py
+++ b/src/buildstream/_cas/casserver.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py
index 710c706..676b686 100644
--- a/src/buildstream/_context.py
+++ b/src/buildstream/_context.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_elementproxy.py b/src/buildstream/_elementproxy.py
index 0e2e925..d1b7483 100644
--- a/src/buildstream/_elementproxy.py
+++ b/src/buildstream/_elementproxy.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_elementsources.py b/src/buildstream/_elementsources.py
index c4e3be4..549e12e 100644
--- a/src/buildstream/_elementsources.py
+++ b/src/buildstream/_elementsources.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#  Copyright (C) 2017-2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_elementsourcescache.py b/src/buildstream/_elementsourcescache.py
index fcbd987..dbe6cb9 100644
--- a/src/buildstream/_elementsourcescache.py
+++ b/src/buildstream/_elementsourcescache.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019-2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -14,7 +12,6 @@
 #  limitations under the License.
 #
 import os
-import grpc
 
 from ._cas.casremote import BlobNotFound
 from ._assetcache import AssetCache
@@ -229,12 +226,6 @@
             if cas_error.reason != "cache-too-full":
                 raise SourceCacheError("Failed to push source blobs: {}".format(cas_error))
             return False
-        except grpc.RpcError as e:
-            if e.code() != grpc.StatusCode.RESOURCE_EXHAUSTED:
-                raise SourceCacheError(
-                    "Failed to push source blobs with status {}: {}".format(e.code().name, e.details()), temporary=True
-                )
-            return False
 
         return True
 
@@ -271,10 +262,8 @@
                 source_digest,
                 references_directories=referenced_directories,
             )
-        except grpc.RpcError as e:
-            raise SourceCacheError(
-                "Failed to push source with status {}: {}".format(e.code().name, e.details()), temporary=True
-            )
+        except AssetCacheError as e:
+            raise SourceCacheError("Failed to push source: {}".format(e), temporary=True)
 
         return True
 
@@ -307,12 +296,10 @@
                 f.write(source.SerializeToString())
 
             self.cas._fetch_directory(remote, source.files)
-        except grpc.RpcError as e:
-            if e.code() != grpc.StatusCode.NOT_FOUND:
-                raise SourceCacheError(
-                    "Failed to pull source with status {}: {}".format(e.code().name, e.details()), temporary=True
-                )
+        except BlobNotFound:
             return False
+        except CASRemoteError as e:
+            raise SourceCacheError("Failed to pull source: {}".format(e), temporary=True)
 
         return True
 
@@ -325,9 +312,6 @@
             remote.push_directory([uri], source_proto.files)
             return True
 
-        except grpc.RpcError as e:
-            if e.code() != grpc.StatusCode.RESOURCE_EXHAUSTED:
-                raise SourceCacheError(
-                    "Failed to push source with status {}: {}".format(e.code().name, e.details()), temporary=True
-                )
-            return False
+        except AssetCacheError as e:
+            raise SourceCacheError("Failed to push source: {}".format(e), temporary=True)
+        return False
diff --git a/src/buildstream/_exceptions.py b/src/buildstream/_exceptions.py
index 75badf0..20aa318 100644
--- a/src/buildstream/_exceptions.py
+++ b/src/buildstream/_exceptions.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/__init__.py b/src/buildstream/_frontend/__init__.py
index 55ec767..223a905 100644
--- a/src/buildstream/_frontend/__init__.py
+++ b/src/buildstream/_frontend/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/app.py b/src/buildstream/_frontend/app.py
index 18ed04b..30d7ebb 100644
--- a/src/buildstream/_frontend/app.py
+++ b/src/buildstream/_frontend/app.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index fa4e0b6..995f40b 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import sys
 from functools import partial
diff --git a/src/buildstream/_frontend/complete.py b/src/buildstream/_frontend/complete.py
index d616371..6fef9d2 100644
--- a/src/buildstream/_frontend/complete.py
+++ b/src/buildstream/_frontend/complete.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (c) 2014 by Armin Ronacher.
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -18,6 +15,8 @@
 #  original copyright notice from the Click library and following disclaimer
 #  as per their LICENSE requirements.
 #
+#  Copyright (c) 2014 by Armin Ronacher.
+#
 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/src/buildstream/_frontend/linuxapp.py b/src/buildstream/_frontend/linuxapp.py
index b055fef..aa9e050 100644
--- a/src/buildstream/_frontend/linuxapp.py
+++ b/src/buildstream/_frontend/linuxapp.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/profile.py b/src/buildstream/_frontend/profile.py
index 0e2b7b1..424e2c8 100644
--- a/src/buildstream/_frontend/profile.py
+++ b/src/buildstream/_frontend/profile.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/status.py b/src/buildstream/_frontend/status.py
index b0d3254..675867b 100644
--- a/src/buildstream/_frontend/status.py
+++ b/src/buildstream/_frontend/status.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_frontend/widget.py b/src/buildstream/_frontend/widget.py
index e815933..20054a7 100644
--- a/src/buildstream/_frontend/widget.py
+++ b/src/buildstream/_frontend/widget.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_includes.py b/src/buildstream/_includes.py
index b25803c..5aa821a 100644
--- a/src/buildstream/_includes.py
+++ b/src/buildstream/_includes.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 from . import _yaml
 from .node import MappingNode, ScalarNode, SequenceNode
diff --git a/src/buildstream/_loader/__init__.py b/src/buildstream/_loader/__init__.py
index 097d272..ee5d019 100644
--- a/src/buildstream/_loader/__init__.py
+++ b/src/buildstream/_loader/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_loader/loadcontext.py b/src/buildstream/_loader/loadcontext.py
index 687abc9..5f3f4ed 100644
--- a/src/buildstream/_loader/loadcontext.py
+++ b/src/buildstream/_loader/loadcontext.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_loader/loadelement.pyi b/src/buildstream/_loader/loadelement.pyi
index b18a8de..1aba5c0 100644
--- a/src/buildstream/_loader/loadelement.pyi
+++ b/src/buildstream/_loader/loadelement.pyi
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from typing import List
 
 from ..node import Node, ScalarNode
diff --git a/src/buildstream/_loader/loadelement.pyx b/src/buildstream/_loader/loadelement.pyx
index 0fcaed3..b215028 100644
--- a/src/buildstream/_loader/loadelement.pyx
+++ b/src/buildstream/_loader/loadelement.pyx
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index 0f60422..f142b26 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_loader/metasource.py b/src/buildstream/_loader/metasource.py
index 6e5f720..8df0342 100644
--- a/src/buildstream/_loader/metasource.py
+++ b/src/buildstream/_loader/metasource.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_loader/types.py b/src/buildstream/_loader/types.py
index c7c2b19..e961809 100644
--- a/src/buildstream/_loader/types.py
+++ b/src/buildstream/_loader/types.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_message.py b/src/buildstream/_message.py
index c54398c..af09c3e 100644
--- a/src/buildstream/_message.py
+++ b/src/buildstream/_message.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_messenger.py b/src/buildstream/_messenger.py
index 93b1db9..ba2556d 100644
--- a/src/buildstream/_messenger.py
+++ b/src/buildstream/_messenger.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/__init__.py b/src/buildstream/_options/__init__.py
index 49cbe08..3c14284 100644
--- a/src/buildstream/_options/__init__.py
+++ b/src/buildstream/_options/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/option.py b/src/buildstream/_options/option.py
index bc1d732..d8b5a94 100644
--- a/src/buildstream/_options/option.py
+++ b/src/buildstream/_options/option.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionarch.py b/src/buildstream/_options/optionarch.py
index 0d5ad23..aab0f7e 100644
--- a/src/buildstream/_options/optionarch.py
+++ b/src/buildstream/_options/optionarch.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionbool.py b/src/buildstream/_options/optionbool.py
index 74212d4..4693289 100644
--- a/src/buildstream/_options/optionbool.py
+++ b/src/buildstream/_options/optionbool.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optioneltmask.py b/src/buildstream/_options/optioneltmask.py
index e545858..43d659d 100644
--- a/src/buildstream/_options/optioneltmask.py
+++ b/src/buildstream/_options/optioneltmask.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionenum.py b/src/buildstream/_options/optionenum.py
index 9e9b7c9..2266b5d 100644
--- a/src/buildstream/_options/optionenum.py
+++ b/src/buildstream/_options/optionenum.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionflags.py b/src/buildstream/_options/optionflags.py
index 888024f..8d33dc8 100644
--- a/src/buildstream/_options/optionflags.py
+++ b/src/buildstream/_options/optionflags.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionos.py b/src/buildstream/_options/optionos.py
index 6f6ddc8..6df9c21 100644
--- a/src/buildstream/_options/optionos.py
+++ b/src/buildstream/_options/optionos.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_options/optionpool.py b/src/buildstream/_options/optionpool.py
index 922787d..52ae0b3 100644
--- a/src/buildstream/_options/optionpool.py
+++ b/src/buildstream/_options/optionpool.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_overlapcollector.py b/src/buildstream/_overlapcollector.py
index 0294b36..79f62b1 100644
--- a/src/buildstream/_overlapcollector.py
+++ b/src/buildstream/_overlapcollector.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py
index 18789b5..cb8afd0 100644
--- a/src/buildstream/_pipeline.py
+++ b/src/buildstream/_pipeline.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016-2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_platform/__init__.py b/src/buildstream/_platform/__init__.py
index 664d4d1..a356424 100644
--- a/src/buildstream/_platform/__init__.py
+++ b/src/buildstream/_platform/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_platform/platform.py b/src/buildstream/_platform/platform.py
index bfe5a11..2cb9d90 100644
--- a/src/buildstream/_platform/platform.py
+++ b/src/buildstream/_platform/platform.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/__init__.py b/src/buildstream/_pluginfactory/__init__.py
index 7f28b71..28b4f3d 100644
--- a/src/buildstream/_pluginfactory/__init__.py
+++ b/src/buildstream/_pluginfactory/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/elementfactory.py b/src/buildstream/_pluginfactory/elementfactory.py
index 4dca545..b85b177 100644
--- a/src/buildstream/_pluginfactory/elementfactory.py
+++ b/src/buildstream/_pluginfactory/elementfactory.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/pluginfactory.py b/src/buildstream/_pluginfactory/pluginfactory.py
index 1f1be38..23de609 100644
--- a/src/buildstream/_pluginfactory/pluginfactory.py
+++ b/src/buildstream/_pluginfactory/pluginfactory.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/pluginorigin.py b/src/buildstream/_pluginfactory/pluginorigin.py
index 262c450..9dfaf55 100644
--- a/src/buildstream/_pluginfactory/pluginorigin.py
+++ b/src/buildstream/_pluginfactory/pluginorigin.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/pluginoriginjunction.py b/src/buildstream/_pluginfactory/pluginoriginjunction.py
index cf0205c..1f719df 100644
--- a/src/buildstream/_pluginfactory/pluginoriginjunction.py
+++ b/src/buildstream/_pluginfactory/pluginoriginjunction.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/pluginoriginlocal.py b/src/buildstream/_pluginfactory/pluginoriginlocal.py
index 8acdbfa..e7875da 100644
--- a/src/buildstream/_pluginfactory/pluginoriginlocal.py
+++ b/src/buildstream/_pluginfactory/pluginoriginlocal.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/pluginoriginpip.py b/src/buildstream/_pluginfactory/pluginoriginpip.py
index 2dc84ea..00ac58e 100644
--- a/src/buildstream/_pluginfactory/pluginoriginpip.py
+++ b/src/buildstream/_pluginfactory/pluginoriginpip.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginfactory/sourcefactory.py b/src/buildstream/_pluginfactory/sourcefactory.py
index 5ecf021..4d3722a 100644
--- a/src/buildstream/_pluginfactory/sourcefactory.py
+++ b/src/buildstream/_pluginfactory/sourcefactory.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_pluginproxy.py b/src/buildstream/_pluginproxy.py
index de6e384..0480408 100644
--- a/src/buildstream/_pluginproxy.py
+++ b/src/buildstream/_pluginproxy.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_profile.py b/src/buildstream/_profile.py
index d851ca5..543c980 100644
--- a/src/buildstream/_profile.py
+++ b/src/buildstream/_profile.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 57b801a..1a10548 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_projectrefs.py b/src/buildstream/_projectrefs.py
index a911464..5095f1f 100644
--- a/src/buildstream/_projectrefs.py
+++ b/src/buildstream/_projectrefs.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_protos/buildstream/v2/artifact.proto b/src/buildstream/_protos/buildstream/v2/artifact.proto
index 08a456a..86ac452 100644
--- a/src/buildstream/_protos/buildstream/v2/artifact.proto
+++ b/src/buildstream/_protos/buildstream/v2/artifact.proto
@@ -1,4 +1,3 @@
-// Copyright 2019 Bloomberg Finance LP
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
diff --git a/src/buildstream/_protos/buildstream/v2/source.proto b/src/buildstream/_protos/buildstream/v2/source.proto
index fdab986..7caf05e 100644
--- a/src/buildstream/_protos/buildstream/v2/source.proto
+++ b/src/buildstream/_protos/buildstream/v2/source.proto
@@ -1,4 +1,3 @@
-// Copyright 2019 Bloomberg Finance LP
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
diff --git a/src/buildstream/_remote.py b/src/buildstream/_remote.py
index c19e314..453f7f2 100644
--- a/src/buildstream/_remote.py
+++ b/src/buildstream/_remote.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_remotespec.py b/src/buildstream/_remotespec.py
index f6247d5..c31a10b 100644
--- a/src/buildstream/_remotespec.py
+++ b/src/buildstream/_remotespec.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/__init__.py b/src/buildstream/_scheduler/__init__.py
index d014c17..d37e47b 100644
--- a/src/buildstream/_scheduler/__init__.py
+++ b/src/buildstream/_scheduler/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/jobs/__init__.py b/src/buildstream/_scheduler/jobs/__init__.py
index 3de09a4..fb3557d 100644
--- a/src/buildstream/_scheduler/jobs/__init__.py
+++ b/src/buildstream/_scheduler/jobs/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/jobs/elementjob.py b/src/buildstream/_scheduler/jobs/elementjob.py
index 3d04beb..1b06ca0 100644
--- a/src/buildstream/_scheduler/jobs/elementjob.py
+++ b/src/buildstream/_scheduler/jobs/elementjob.py
@@ -1,4 +1,3 @@
-#  Copyright (C) 2018 Codethink Limited
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/_scheduler/jobs/job.py b/src/buildstream/_scheduler/jobs/job.py
index 08bdbcd..6a9101f 100644
--- a/src/buildstream/_scheduler/jobs/job.py
+++ b/src/buildstream/_scheduler/jobs/job.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/__init__.py b/src/buildstream/_scheduler/queues/__init__.py
index 3b22939..82ea114 100644
--- a/src/buildstream/_scheduler/queues/__init__.py
+++ b/src/buildstream/_scheduler/queues/__init__.py
@@ -1 +1,14 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from .queue import Queue, QueueStatus
diff --git a/src/buildstream/_scheduler/queues/artifactpushqueue.py b/src/buildstream/_scheduler/queues/artifactpushqueue.py
index 95c4446..97a7242 100644
--- a/src/buildstream/_scheduler/queues/artifactpushqueue.py
+++ b/src/buildstream/_scheduler/queues/artifactpushqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/buildqueue.py b/src/buildstream/_scheduler/queues/buildqueue.py
index 6a05594..4b3fada 100644
--- a/src/buildstream/_scheduler/queues/buildqueue.py
+++ b/src/buildstream/_scheduler/queues/buildqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/cachequeryqueue.py b/src/buildstream/_scheduler/queues/cachequeryqueue.py
index e8b9dda..5251dc9 100644
--- a/src/buildstream/_scheduler/queues/cachequeryqueue.py
+++ b/src/buildstream/_scheduler/queues/cachequeryqueue.py
@@ -1,18 +1,16 @@
 #
-#  Copyright (C) 2020 Bloomberg Finance LP
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
 #
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2 of the License, or (at your option) any later version.
+#      http://www.apache.org/licenses/LICENSE-2.0
 #
-#  This library 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 GNU
-#  Lesser General Public License for more details.
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
 #
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
 from . import Queue, QueueStatus
 from ..resources import ResourceType
diff --git a/src/buildstream/_scheduler/queues/fetchqueue.py b/src/buildstream/_scheduler/queues/fetchqueue.py
index b6c9158..b865011 100644
--- a/src/buildstream/_scheduler/queues/fetchqueue.py
+++ b/src/buildstream/_scheduler/queues/fetchqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/pullqueue.py b/src/buildstream/_scheduler/queues/pullqueue.py
index 1ab0953..1bb3ed5 100644
--- a/src/buildstream/_scheduler/queues/pullqueue.py
+++ b/src/buildstream/_scheduler/queues/pullqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/queue.py b/src/buildstream/_scheduler/queues/queue.py
index e9f934d..2b5445e 100644
--- a/src/buildstream/_scheduler/queues/queue.py
+++ b/src/buildstream/_scheduler/queues/queue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/sourcepushqueue.py b/src/buildstream/_scheduler/queues/sourcepushqueue.py
index 4239b2f..4b839f0 100644
--- a/src/buildstream/_scheduler/queues/sourcepushqueue.py
+++ b/src/buildstream/_scheduler/queues/sourcepushqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/queues/trackqueue.py b/src/buildstream/_scheduler/queues/trackqueue.py
index 26e22eb..3375b0c 100644
--- a/src/buildstream/_scheduler/queues/trackqueue.py
+++ b/src/buildstream/_scheduler/queues/trackqueue.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_scheduler/resources.py b/src/buildstream/_scheduler/resources.py
index a11555c..736227f 100644
--- a/src/buildstream/_scheduler/resources.py
+++ b/src/buildstream/_scheduler/resources.py
@@ -1,3 +1,18 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+
 class ResourceType:
     CACHE = 0
     DOWNLOAD = 1
diff --git a/src/buildstream/_scheduler/scheduler.py b/src/buildstream/_scheduler/scheduler.py
index bba7de7..2e1ec69 100644
--- a/src/buildstream/_scheduler/scheduler.py
+++ b/src/buildstream/_scheduler/scheduler.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/_signals.py b/src/buildstream/_signals.py
index 6ae6637..0556945 100644
--- a/src/buildstream/_signals.py
+++ b/src/buildstream/_signals.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_site.py b/src/buildstream/_site.py
index 62dd7b5..a75faaa 100644
--- a/src/buildstream/_site.py
+++ b/src/buildstream/_site.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_sourcecache.py b/src/buildstream/_sourcecache.py
index 24776ff..e4f2f5a 100644
--- a/src/buildstream/_sourcecache.py
+++ b/src/buildstream/_sourcecache.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019-2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_state.py b/src/buildstream/_state.py
index 1b3a000..b581642 100644
--- a/src/buildstream/_state.py
+++ b/src/buildstream/_state.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 07f8782..57c19ee 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/__init__.py b/src/buildstream/_testing/__init__.py
index 08551ac..a7520c8 100644
--- a/src/buildstream/_testing/__init__.py
+++ b/src/buildstream/_testing/__init__.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2019 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_cachekeys.py b/src/buildstream/_testing/_cachekeys.py
index 086ceac..9a834c8 100644
--- a/src/buildstream/_testing/_cachekeys.py
+++ b/src/buildstream/_testing/_cachekeys.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_fixtures.py b/src/buildstream/_testing/_fixtures.py
index a4bba80..338fd93 100644
--- a/src/buildstream/_testing/_fixtures.py
+++ b/src/buildstream/_testing/_fixtures.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/build_checkout.py b/src/buildstream/_testing/_sourcetests/build_checkout.py
index 391f5e4..58c60e6 100644
--- a/src/buildstream/_testing/_sourcetests/build_checkout.py
+++ b/src/buildstream/_testing/_sourcetests/build_checkout.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/conftest.py b/src/buildstream/_testing/_sourcetests/conftest.py
index e2fbe11..53fe015 100644
--- a/src/buildstream/_testing/_sourcetests/conftest.py
+++ b/src/buildstream/_testing/_sourcetests/conftest.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/fetch.py b/src/buildstream/_testing/_sourcetests/fetch.py
index 9ddeff6..4e75e03 100644
--- a/src/buildstream/_testing/_sourcetests/fetch.py
+++ b/src/buildstream/_testing/_sourcetests/fetch.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/mirror.py b/src/buildstream/_testing/_sourcetests/mirror.py
index 97d397f..ef6710d 100644
--- a/src/buildstream/_testing/_sourcetests/mirror.py
+++ b/src/buildstream/_testing/_sourcetests/mirror.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/source_determinism.py b/src/buildstream/_testing/_sourcetests/source_determinism.py
index 91e46a3..efe808a 100644
--- a/src/buildstream/_testing/_sourcetests/source_determinism.py
+++ b/src/buildstream/_testing/_sourcetests/source_determinism.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/track.py b/src/buildstream/_testing/_sourcetests/track.py
index 013adf7..fb784e0 100644
--- a/src/buildstream/_testing/_sourcetests/track.py
+++ b/src/buildstream/_testing/_sourcetests/track.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/track_cross_junction.py b/src/buildstream/_testing/_sourcetests/track_cross_junction.py
index c6eee3a..79a0c0e 100644
--- a/src/buildstream/_testing/_sourcetests/track_cross_junction.py
+++ b/src/buildstream/_testing/_sourcetests/track_cross_junction.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/utils.py b/src/buildstream/_testing/_sourcetests/utils.py
index ab0cc52..c0b631e 100644
--- a/src/buildstream/_testing/_sourcetests/utils.py
+++ b/src/buildstream/_testing/_sourcetests/utils.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_sourcetests/workspace.py b/src/buildstream/_testing/_sourcetests/workspace.py
index c5bb7eb..b3a7c1a 100644
--- a/src/buildstream/_testing/_sourcetests/workspace.py
+++ b/src/buildstream/_testing/_sourcetests/workspace.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_update_cachekeys.py b/src/buildstream/_testing/_update_cachekeys.py
index cf85459..a6e9d08 100755
--- a/src/buildstream/_testing/_update_cachekeys.py
+++ b/src/buildstream/_testing/_update_cachekeys.py
@@ -1,8 +1,5 @@
 #!/usr/bin/env python3
 #
-#  Copyright (C) 2019 Codethink Limited
-#  Copyright (C) 2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/_utils/__init__.py b/src/buildstream/_testing/_utils/__init__.py
index 5938e6a..9f2c1df 100644
--- a/src/buildstream/_testing/_utils/__init__.py
+++ b/src/buildstream/_testing/_utils/__init__.py
@@ -1 +1,14 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from .junction import generate_junction
diff --git a/src/buildstream/_testing/_utils/junction.py b/src/buildstream/_testing/_utils/junction.py
index a3537ac..bc1869f 100644
--- a/src/buildstream/_testing/_utils/junction.py
+++ b/src/buildstream/_testing/_utils/junction.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import tarfile
 
diff --git a/src/buildstream/_testing/_utils/site.py b/src/buildstream/_testing/_utils/site.py
index d0e4cdb..0895e2b 100644
--- a/src/buildstream/_testing/_utils/site.py
+++ b/src/buildstream/_testing/_utils/site.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 # Some things resolved about the execution site,
 # so we dont have to repeat this everywhere
 #
diff --git a/src/buildstream/_testing/_yaml.py b/src/buildstream/_testing/_yaml.py
index 396266b..3464219 100644
--- a/src/buildstream/_testing/_yaml.py
+++ b/src/buildstream/_testing/_yaml.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 from buildstream import _yaml
 
diff --git a/src/buildstream/_testing/integration.py b/src/buildstream/_testing/integration.py
index 5f8bf92..4fcb9ae 100644
--- a/src/buildstream/_testing/integration.py
+++ b/src/buildstream/_testing/integration.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/repo.py b/src/buildstream/_testing/repo.py
index 72af900..e429cf4 100644
--- a/src/buildstream/_testing/repo.py
+++ b/src/buildstream/_testing/repo.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_testing/runcli.py b/src/buildstream/_testing/runcli.py
index a1ee935..02c3edd 100644
--- a/src/buildstream/_testing/runcli.py
+++ b/src/buildstream/_testing/runcli.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_types.pyi b/src/buildstream/_types.pyi
index d1986fc..5e2b8a5 100644
--- a/src/buildstream/_types.pyi
+++ b/src/buildstream/_types.pyi
@@ -1 +1,14 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 class MetaFastEnum(type): ...
diff --git a/src/buildstream/_types.pyx b/src/buildstream/_types.pyx
index dbf58aa..4fc2972 100644
--- a/src/buildstream/_types.pyx
+++ b/src/buildstream/_types.pyx
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Bloomberg LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_utils.pyi b/src/buildstream/_utils.pyi
index 1938eec..4f8dd32 100644
--- a/src/buildstream/_utils.pyi
+++ b/src/buildstream/_utils.pyi
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 def url_directory_name(url: str) -> str: ...
 def valid_chars_name(name: str) -> bool: ...
 def terminate_thread(thread_id: int) -> None: ...
diff --git a/src/buildstream/_utils.pyx b/src/buildstream/_utils.pyx
index 3758e66..91fd9ad 100644
--- a/src/buildstream/_utils.pyx
+++ b/src/buildstream/_utils.pyx
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg L.P.
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_variables.pyi b/src/buildstream/_variables.pyi
index 1e2f473..8d9acdb 100644
--- a/src/buildstream/_variables.pyi
+++ b/src/buildstream/_variables.pyi
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from typing import Optional
 
 from .node import MappingNode, Node
diff --git a/src/buildstream/_variables.pyx b/src/buildstream/_variables.pyx
index 32569fb..b26bfa2 100644
--- a/src/buildstream/_variables.pyx
+++ b/src/buildstream/_variables.pyx
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#  Copyright (C) 2019 Bloomberg L.P.
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_versions.py b/src/buildstream/_versions.py
index e96516a..b3b23b1 100644
--- a/src/buildstream/_versions.py
+++ b/src/buildstream/_versions.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_workspaces.py b/src/buildstream/_workspaces.py
index 43e1926..7d4fc4d 100644
--- a/src/buildstream/_workspaces.py
+++ b/src/buildstream/_workspaces.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/_yaml.pyi b/src/buildstream/_yaml.pyi
index 6f4b31b..224abc5 100644
--- a/src/buildstream/_yaml.pyi
+++ b/src/buildstream/_yaml.pyi
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from typing import Optional
 
 from .node import MappingNode
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx
index 57d98e4..d58973d 100644
--- a/src/buildstream/_yaml.pyx
+++ b/src/buildstream/_yaml.pyx
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#  Copyright (C) 2019 Bloomberg LLP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index a3bcd42..40355f5 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/data/bst b/src/buildstream/data/bst
index e38720f..118e11e 100644
--- a/src/buildstream/data/bst
+++ b/src/buildstream/data/bst
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 # BuildStream bash completion scriptlet.
 #
 # On systems which use the bash-completion module for
diff --git a/src/buildstream/data/build-all.sh.in b/src/buildstream/data/build-all.sh.in
index bf5c9f8..cff1c73 100644
--- a/src/buildstream/data/build-all.sh.in
+++ b/src/buildstream/data/build-all.sh.in
@@ -1,15 +1,26 @@
 #!/bin/sh
 #
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 # DO NOT EDIT THIS FILE
 #
-# This is a build script generated by
-# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/).
+# This is a build script generated by BuildStream
 #
 # Builds all given modules using their respective scripts.
 
 set -eu
 
-echo "Buildstream native bootstrap script"
+echo "BuildStream native bootstrap script"
 
 export PATH='/usr/bin:/usr/sbin/:/sbin:/bin:/tools/bin:/tools/sbin'
 export SRCDIR='./source'
diff --git a/src/buildstream/data/build-module.sh.in b/src/buildstream/data/build-module.sh.in
index 6e9ea45..29d5270 100644
--- a/src/buildstream/data/build-module.sh.in
+++ b/src/buildstream/data/build-module.sh.in
@@ -1,9 +1,20 @@
 #!/bin/sh
 #
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 # DO NOT EDIT THIS FILE
 #
-# This is a build script generated by
-# [BuildStream](https://wiki.gnome.org/Projects/BuildStream/).
+# This is a build script generated by BuildStream
 #
 # Builds the module {name}.
 
diff --git a/src/buildstream/data/projectconfig.yaml b/src/buildstream/data/projectconfig.yaml
index aeeb3ee..4632d7a 100644
--- a/src/buildstream/data/projectconfig.yaml
+++ b/src/buildstream/data/projectconfig.yaml
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Default BuildStream project configuration.
 
 
diff --git a/src/buildstream/data/userconfig.yaml b/src/buildstream/data/userconfig.yaml
index 5672b2c..1c30254 100644
--- a/src/buildstream/data/userconfig.yaml
+++ b/src/buildstream/data/userconfig.yaml
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Default BuildStream user configuration.
 
 #
diff --git a/src/buildstream/downloadablefilesource.py b/src/buildstream/downloadablefilesource.py
index e96039a..ce91f7c 100644
--- a/src/buildstream/downloadablefilesource.py
+++ b/src/buildstream/downloadablefilesource.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg LP
-#  Copyright (C) 2019 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -100,28 +97,42 @@
     if etag is not None:
         request.add_header("If-None-Match", etag)
 
-    with contextlib.closing(opener.open(request)) as response:
-        info = response.info()
+    try:
+        with contextlib.closing(opener.open(request)) as response:
+            info = response.info()
 
-        # some servers don't honor the 'If-None-Match' header
-        if etag and info["ETag"] == etag:
-            return None, None
+            # some servers don't honor the 'If-None-Match' header
+            if etag and info["ETag"] == etag:
+                return None, None, None
 
-        etag = info["ETag"]
+            etag = info["ETag"]
 
-        filename = info.get_filename(default_name)
-        filename = os.path.basename(filename)
-        local_file = os.path.join(directory, filename)
-        with open(local_file, "wb") as dest:
-            shutil.copyfileobj(response, dest)
+            filename = info.get_filename(default_name)
+            filename = os.path.basename(filename)
+            local_file = os.path.join(directory, filename)
+            with open(local_file, "wb") as dest:
+                shutil.copyfileobj(response, dest)
 
-    return local_file, etag
+    except urllib.error.HTTPError as e:
+        if e.code == 304:
+            # 304 Not Modified.
+            # Because we use etag only for matching ref, currently specified ref is what
+            # we would have downloaded.
+            return None, None, None
+
+        return None, None, str(e)
+    except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError, ValueError) as e:
+        # Note that urllib.request.Request in the try block may throw a
+        # ValueError for unknown url types, so we handle it here.
+        return None, None, str(e)
+
+    return local_file, etag, None
 
 
 class DownloadableFileSource(Source):
     # pylint: disable=attribute-defined-outside-init
 
-    COMMON_CONFIG_KEYS = Source.COMMON_CONFIG_KEYS + ["url", "ref", "etag"]
+    COMMON_CONFIG_KEYS = Source.COMMON_CONFIG_KEYS + ["url", "ref"]
 
     __urlopener = None
     __default_mirror_file = None
@@ -131,7 +142,6 @@
         self.ref = node.get_str("ref", None)
         self.url = self.translate_url(self.original_url)
         self._mirror_dir = os.path.join(self.get_mirror_directory(), utils.url_directory_name(self.original_url))
-        self._warn_deprecated_etag(node)
 
     def preflight(self):
         return
@@ -144,7 +154,6 @@
 
     def load_ref(self, node):
         self.ref = node.get_str("ref", None)
-        self._warn_deprecated_etag(node)
 
     def get_ref(self):
         return self.ref
@@ -188,12 +197,6 @@
                 "File downloaded from {} has sha256sum '{}', not '{}'!".format(self.url, sha256, self.ref)
             )
 
-    def _warn_deprecated_etag(self, node):
-        etag = node.get_str("etag", None)
-        if etag:
-            provenance = node.get_scalar(etag).get_provenance()
-            self.warn('{} "etag" is deprecated and ignored.'.format(provenance))
-
     def _get_etag(self, ref):
         etagfilename = os.path.join(self._mirror_dir, "{}.etag".format(ref))
         if os.path.exists(etagfilename):
@@ -209,50 +212,39 @@
 
     def _ensure_mirror(self, activity_name: str):
         # Downloads from the url and caches it according to its sha256sum.
-        try:
-            with self.tempdir() as td:
-                # We do not use etag in case what we have in cache is
-                # not matching ref in order to be able to recover from
-                # corrupted download.
-                if self.ref and not self.is_cached():
-                    # Do not re-download the file if the ETag matches.
-                    etag = self._get_etag(self.ref)
-                else:
-                    etag = None
+        with self.tempdir() as td:
+            # We do not use etag in case what we have in cache is
+            # not matching ref in order to be able to recover from
+            # corrupted download.
+            if self.ref and not self.is_cached():
+                # Do not re-download the file if the ETag matches.
+                etag = self._get_etag(self.ref)
+            else:
+                etag = None
 
-                local_file, new_etag = self.blocking_activity(
-                    _download_file, (self.__get_urlopener(), self.url, etag, td), activity_name
-                )
+            local_file, new_etag, error = self.blocking_activity(
+                _download_file, (self.__get_urlopener(), self.url, etag, td), activity_name
+            )
 
-                if local_file is None:
-                    return self.ref
+            if error:
+                raise SourceError("{}: Error mirroring {}: {}".format(self, self.url, error), temporary=True)
 
-                # Make sure url-specific mirror dir exists.
-                if not os.path.isdir(self._mirror_dir):
-                    os.makedirs(self._mirror_dir)
-
-                # Store by sha256sum
-                sha256 = utils.sha256sum(local_file)
-                # Even if the file already exists, move the new file over.
-                # In case the old file was corrupted somehow.
-                os.rename(local_file, self._get_mirror_file(sha256))
-
-                if new_etag:
-                    self._store_etag(sha256, new_etag)
-                return sha256
-
-        except urllib.error.HTTPError as e:
-            if e.code == 304:
-                # 304 Not Modified.
-                # Because we use etag only for matching ref, currently specified ref is what
-                # we would have downloaded.
+            if local_file is None:
                 return self.ref
-            raise SourceError("{}: Error mirroring {}: {}".format(self, self.url, e), temporary=True) from e
 
-        except (urllib.error.URLError, urllib.error.ContentTooShortError, OSError, ValueError) as e:
-            # Note that urllib.request.Request in the try block may throw a
-            # ValueError for unknown url types, so we handle it here.
-            raise SourceError("{}: Error mirroring {}: {}".format(self, self.url, e), temporary=True) from e
+            # Make sure url-specific mirror dir exists.
+            if not os.path.isdir(self._mirror_dir):
+                os.makedirs(self._mirror_dir)
+
+            # Store by sha256sum
+            sha256 = utils.sha256sum(local_file)
+            # Even if the file already exists, move the new file over.
+            # In case the old file was corrupted somehow.
+            os.rename(local_file, self._get_mirror_file(sha256))
+
+            if new_etag:
+                self._store_etag(sha256, new_etag)
+            return sha256
 
     def _get_mirror_file(self, sha=None):
         if sha is not None:
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 66bc9cf..1a97308 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016-2022 Codethink Limited
-#  Copyright (C) 2017-2020 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/exceptions.py b/src/buildstream/exceptions.py
index 628d6cc..4806218 100644
--- a/src/buildstream/exceptions.py
+++ b/src/buildstream/exceptions.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/node.pxd b/src/buildstream/node.pxd
index 245111e..d1cc945 100644
--- a/src/buildstream/node.pxd
+++ b/src/buildstream/node.pxd
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg L.P.
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/node.pyi b/src/buildstream/node.pyi
index 378a1fb..253ba93 100644
--- a/src/buildstream/node.pyi
+++ b/src/buildstream/node.pyi
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from typing import (
     overload,
     Generic,
diff --git a/src/buildstream/node.pyx b/src/buildstream/node.pyx
index 79634c4..41599b0 100644
--- a/src/buildstream/node.pyx
+++ b/src/buildstream/node.pyx
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg LLP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index b00d127..14e35b9 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -125,7 +123,6 @@
 import multiprocessing.popen_forkserver  # type: ignore
 
 import os
-import pickle
 import queue
 import signal
 import subprocess
@@ -186,13 +183,8 @@
     try:
         result = target(*args)
         result_queue.put((None, result))
-    except Exception as exc:  # pylint: disable=broad-except
-        try:
-            # Here we send the result again, just in case it was a PickleError
-            # in which case the same exception would be thrown down
-            result_queue.put((exc, result))
-        except pickle.PickleError:
-            result_queue.put((traceback.format_exc(), None))
+    except Exception:  # pylint: disable=broad-except
+        result_queue.put((traceback.format_exc(), None))
 
 
 class Plugin:
@@ -608,7 +600,8 @@
         in order to avoid starving the scheduler.
 
         The function, its arguments and return value must all be pickleable,
-        as it will be run in another process.
+        as it will be run in another process. The function should not raise
+        an exception.
 
         This should be used whenever there is a potential for a blocking
         syscall to not return in a reasonable (<1s) amount of time.
@@ -678,12 +671,7 @@
                     raise PluginError("Background process didn't exit after 15 seconds and got killed.")
 
             if err is not None:
-                if isinstance(err, str):
-                    # This was a pickle error, this is a bug
-                    raise PluginError(
-                        "An error happened while returning the result from a blocking activity", detail=err
-                    )
-                raise err
+                raise PluginError("An error happened while running a blocking activity", detail=err)
 
             return result
 
diff --git a/src/buildstream/plugins/elements/compose.py b/src/buildstream/plugins/elements/compose.py
index 3884a4a..7152528 100644
--- a/src/buildstream/plugins/elements/compose.py
+++ b/src/buildstream/plugins/elements/compose.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/compose.yaml b/src/buildstream/plugins/elements/compose.yaml
index fd2eb93..d7f64d5 100644
--- a/src/buildstream/plugins/elements/compose.yaml
+++ b/src/buildstream/plugins/elements/compose.yaml
@@ -1,3 +1,14 @@
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
 
 # Compose element configuration
 config:
diff --git a/src/buildstream/plugins/elements/filter.py b/src/buildstream/plugins/elements/filter.py
index 5cccbc6..3e03dc0 100644
--- a/src/buildstream/plugins/elements/filter.py
+++ b/src/buildstream/plugins/elements/filter.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/filter.yaml b/src/buildstream/plugins/elements/filter.yaml
index 12a82a9..633db7c 100644
--- a/src/buildstream/plugins/elements/filter.yaml
+++ b/src/buildstream/plugins/elements/filter.yaml
@@ -1,3 +1,14 @@
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
 
 # Filter element configuration
 config:
diff --git a/src/buildstream/plugins/elements/import.py b/src/buildstream/plugins/elements/import.py
index 8a16a9f..55bc29e 100644
--- a/src/buildstream/plugins/elements/import.py
+++ b/src/buildstream/plugins/elements/import.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/import.yaml b/src/buildstream/plugins/elements/import.yaml
index 698111b..33a2d64 100644
--- a/src/buildstream/plugins/elements/import.yaml
+++ b/src/buildstream/plugins/elements/import.yaml
@@ -1,3 +1,15 @@
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # The import element simply stages the given sources
 # directly to the root of the sandbox and then collects
 # the output to create an output artifact.
diff --git a/src/buildstream/plugins/elements/junction.py b/src/buildstream/plugins/elements/junction.py
index 1788973..d35ed63 100644
--- a/src/buildstream/plugins/elements/junction.py
+++ b/src/buildstream/plugins/elements/junction.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/link.py b/src/buildstream/plugins/elements/link.py
index 7e354cf..48e3890 100644
--- a/src/buildstream/plugins/elements/link.py
+++ b/src/buildstream/plugins/elements/link.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/manual.py b/src/buildstream/plugins/elements/manual.py
index dbad6cf..ecebcac 100644
--- a/src/buildstream/plugins/elements/manual.py
+++ b/src/buildstream/plugins/elements/manual.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/manual.yaml b/src/buildstream/plugins/elements/manual.yaml
index 38fe7d1..5891f2d 100644
--- a/src/buildstream/plugins/elements/manual.yaml
+++ b/src/buildstream/plugins/elements/manual.yaml
@@ -1,3 +1,15 @@
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # Manual build element does not provide any default
 # build commands
 config:
diff --git a/src/buildstream/plugins/elements/script.py b/src/buildstream/plugins/elements/script.py
index 8330533..90e4e02 100644
--- a/src/buildstream/plugins/elements/script.py
+++ b/src/buildstream/plugins/elements/script.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/elements/script.yaml b/src/buildstream/plugins/elements/script.yaml
index 390f603..a286a55 100644
--- a/src/buildstream/plugins/elements/script.yaml
+++ b/src/buildstream/plugins/elements/script.yaml
@@ -1,3 +1,15 @@
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # The script element allows staging elements into specific locations
 # via it's "location" dependency configuration
 #
diff --git a/src/buildstream/plugins/elements/stack.py b/src/buildstream/plugins/elements/stack.py
index 0ad0a01..83f205b 100644
--- a/src/buildstream/plugins/elements/stack.py
+++ b/src/buildstream/plugins/elements/stack.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/sources/local.py b/src/buildstream/plugins/sources/local.py
index 0928ef1..2cb7bdc 100644
--- a/src/buildstream/plugins/sources/local.py
+++ b/src/buildstream/plugins/sources/local.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/sources/remote.py b/src/buildstream/plugins/sources/remote.py
index a95ef70..e2bb0e5 100644
--- a/src/buildstream/plugins/sources/remote.py
+++ b/src/buildstream/plugins/sources/remote.py
@@ -1,6 +1,4 @@
 #
-#  Copyright Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/sources/tar.py b/src/buildstream/plugins/sources/tar.py
index 7010ec4..5c45d1c 100644
--- a/src/buildstream/plugins/sources/tar.py
+++ b/src/buildstream/plugins/sources/tar.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/plugins/sources/workspace.py b/src/buildstream/plugins/sources/workspace.py
index 0f174f2..237c020 100644
--- a/src/buildstream/plugins/sources/workspace.py
+++ b/src/buildstream/plugins/sources/workspace.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/sandbox/__init__.py b/src/buildstream/sandbox/__init__.py
index 7564995..ceb1b84 100644
--- a/src/buildstream/sandbox/__init__.py
+++ b/src/buildstream/sandbox/__init__.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/sandbox/_config.py b/src/buildstream/sandbox/_config.py
index 6ad09ba..654f164 100644
--- a/src/buildstream/sandbox/_config.py
+++ b/src/buildstream/sandbox/_config.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/sandbox/_sandboxbuildboxrun.py b/src/buildstream/sandbox/_sandboxbuildboxrun.py
index 058eeda..1987eba 100644
--- a/src/buildstream/sandbox/_sandboxbuildboxrun.py
+++ b/src/buildstream/sandbox/_sandboxbuildboxrun.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018-2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/sandbox/_sandboxdummy.py b/src/buildstream/sandbox/_sandboxdummy.py
index 9db6518..31834e8 100644
--- a/src/buildstream/sandbox/_sandboxdummy.py
+++ b/src/buildstream/sandbox/_sandboxdummy.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2017 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -13,7 +11,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-#  Authors:
 
 from .._exceptions import SandboxError
 from .sandbox import Sandbox, SandboxCommandError
diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py
index f9b61a7..3590110 100644
--- a/src/buildstream/sandbox/_sandboxreapi.py
+++ b/src/buildstream/sandbox/_sandboxreapi.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018-2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py
index 4c0a86b..299eefc 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -1,6 +1,3 @@
-#!/usr/bin/env python3
-#
-#  Copyright (C) 2018 Bloomberg LP
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/sandbox/sandbox.py b/src/buildstream/sandbox/sandbox.py
index 8faa13b..ffae823 100644
--- a/src/buildstream/sandbox/sandbox.py
+++ b/src/buildstream/sandbox/sandbox.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/scriptelement.py b/src/buildstream/scriptelement.py
index ad91fa7..4b798ad 100644
--- a/src/buildstream/scriptelement.py
+++ b/src/buildstream/scriptelement.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2022 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/source.py b/src/buildstream/source.py
index 4cf8f1d..90ae7a5 100644
--- a/src/buildstream/source.py
+++ b/src/buildstream/source.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/storage/__init__.py b/src/buildstream/storage/__init__.py
index c634f85..cb3b625 100644
--- a/src/buildstream/storage/__init__.py
+++ b/src/buildstream/storage/__init__.py
@@ -1,6 +1,3 @@
-#!/usr/bin/env python3
-#
-#  Copyright (C) 2018 Bloomberg Finance LP
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/storage/_casbaseddirectory.py b/src/buildstream/storage/_casbaseddirectory.py
index f1dd935..545ee08 100644
--- a/src/buildstream/storage/_casbaseddirectory.py
+++ b/src/buildstream/storage/_casbaseddirectory.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Bloomberg LP
-#  Copyright (C) 2022 Codethink Ltd
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/storage/_filebaseddirectory.py b/src/buildstream/storage/_filebaseddirectory.py
index cf234ea..93fc177 100644
--- a/src/buildstream/storage/_filebaseddirectory.py
+++ b/src/buildstream/storage/_filebaseddirectory.py
@@ -1,7 +1,3 @@
-#!/usr/bin/env python3
-#
-#  Copyright (C) 2018 Bloomberg Finance LP
-#  Copyright (C) 2022 Codethink Ltd
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/storage/directory.py b/src/buildstream/storage/directory.py
index 021af41..fd19393 100644
--- a/src/buildstream/storage/directory.py
+++ b/src/buildstream/storage/directory.py
@@ -1,7 +1,3 @@
-#!/usr/bin/env python3
-#
-#  Copyright (C) 2018 Bloomberg Finance LP
-#  Copyright (C) 2022 Codethink Ltd
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/src/buildstream/types.py b/src/buildstream/types.py
index c3ad435..7789417 100644
--- a/src/buildstream/types.py
+++ b/src/buildstream/types.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Bloomberg LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py
index 26f7925..267cd51 100644
--- a/src/buildstream/utils.py
+++ b/src/buildstream/utils.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016-2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -72,6 +70,10 @@
 _UMASK = os.umask(0o777)
 os.umask(_UMASK)
 
+# Only some operating systems have os.copy_file_range and even when present
+# it might not work
+_USE_CP_FILE_RANGE = hasattr(os, "copy_file_range")
+
 
 class UtilError(BstError):
     """Raised by utility functions when system calls fail.
@@ -359,6 +361,26 @@
     return h.hexdigest()
 
 
+def _copy_file_range(src, dest):
+    global _USE_CP_FILE_RANGE  # pylint: disable=global-statement
+    if not _USE_CP_FILE_RANGE:
+        return False
+    with open(src, "rb") as src_file, open(dest, "wb") as dest_file:
+        num_bytes = os.fstat(src_file.fileno()).st_size
+        while num_bytes > 0:
+            try:
+                bytes_read = os.copy_file_range(src_file.fileno(), dest_file.fileno(), num_bytes)
+                if not bytes_read:
+                    return True
+                num_bytes -= bytes_read
+            except OSError as error:
+                if error.errno in (errno.ENOSYS, errno.EXDEV):
+                    _USE_CP_FILE_RANGE = False
+                    return False
+                raise error from None
+    return True
+
+
 def safe_copy(src: str, dest: str, *, copystat: bool = True, result: Optional[FileListResult] = None) -> None:
     """Copy a file while optionally preserving attributes
 
@@ -383,7 +405,9 @@
             raise UtilError("Failed to remove destination file '{}': {}".format(dest, e)) from e
 
     try:
-        shutil.copyfile(src, dest)
+        ret = _copy_file_range(src, dest)
+        if not ret:
+            shutil.copyfile(src, dest)
     except (OSError, shutil.Error) as e:
         raise UtilError("Failed to copy '{} -> {}': {}".format(src, dest, e)) from e
 
diff --git a/tests/artifactcache/capabilities.py b/tests/artifactcache/capabilities.py
index c515666..39fb18c 100644
--- a/tests/artifactcache/capabilities.py
+++ b/tests/artifactcache/capabilities.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 912add2..20297c8 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py
index 9dadaa6..3fd3121 100644
--- a/tests/artifactcache/expiry.py
+++ b/tests/artifactcache/expiry.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py
index aec7be3..83c9e01 100644
--- a/tests/artifactcache/junctions.py
+++ b/tests/artifactcache/junctions.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py
index 5c3c066..f79cbbf 100644
--- a/tests/artifactcache/pull.py
+++ b/tests/artifactcache/pull.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py
index 4748b58..7c2160f 100644
--- a/tests/artifactcache/push.py
+++ b/tests/artifactcache/push.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 4b44c63..409498f 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Cache Key Test Instructions
 #
 # Adding Tests
diff --git a/tests/conftest.py b/tests/conftest.py
index 69f9a07..a572712 100755
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,8 +1,5 @@
 #!/usr/bin/env python3
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LLP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 8db488a..11a0737 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index b2081da..3babdd2 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index 5abfe2f..a39afad 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py
index e98fa92..f049ea3 100644
--- a/tests/examples/first-project.py
+++ b/tests/examples/first-project.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py
index 2639406..5c36fcb 100644
--- a/tests/examples/integration-commands.py
+++ b/tests/examples/integration-commands.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py
index 06c3da9..5e28c82 100644
--- a/tests/examples/junctions.py
+++ b/tests/examples/junctions.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py
index e720540..b5e9211 100644
--- a/tests/examples/running-commands.py
+++ b/tests/examples/running-commands.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/assertion.py b/tests/format/assertion.py
index a83e545..192152d 100644
--- a/tests/format/assertion.py
+++ b/tests/format/assertion.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/dependencies.py b/tests/format/dependencies.py
index 6c57273..65e722c 100644
--- a/tests/format/dependencies.py
+++ b/tests/format/dependencies.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/elementnames.py b/tests/format/elementnames.py
index cc3d2e1..d9146a5 100644
--- a/tests/format/elementnames.py
+++ b/tests/format/elementnames.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/include.py b/tests/format/include.py
index 42f85c1..7f6433d 100644
--- a/tests/format/include.py
+++ b/tests/format/include.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/include_composition.py b/tests/format/include_composition.py
index 8148e18..9f5faf3 100644
--- a/tests/format/include_composition.py
+++ b/tests/format/include_composition.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 
 from contextlib import contextmanager
diff --git a/tests/format/invalid_keys.py b/tests/format/invalid_keys.py
index 7e9d00f..cb386f3 100644
--- a/tests/format/invalid_keys.py
+++ b/tests/format/invalid_keys.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/junctions.py b/tests/format/junctions.py
index 6f0a5d1..0dae652 100644
--- a/tests/format/junctions.py
+++ b/tests/format/junctions.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/link.py b/tests/format/link.py
index ea1fa32..c75744b 100644
--- a/tests/format/link.py
+++ b/tests/format/link.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/listdirectiveerrors.py b/tests/format/listdirectiveerrors.py
index 70ebfb5..4647f18 100644
--- a/tests/format/listdirectiveerrors.py
+++ b/tests/format/listdirectiveerrors.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionarch.py b/tests/format/optionarch.py
index 34ad7d4..789a32f 100644
--- a/tests/format/optionarch.py
+++ b/tests/format/optionarch.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionbool.py b/tests/format/optionbool.py
index 3fed1a4..b1a9fa9 100644
--- a/tests/format/optionbool.py
+++ b/tests/format/optionbool.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optioneltmask.py b/tests/format/optioneltmask.py
index eb1ae95..12e6a79 100644
--- a/tests/format/optioneltmask.py
+++ b/tests/format/optioneltmask.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionenum.py b/tests/format/optionenum.py
index 716dc03..58c2d51 100644
--- a/tests/format/optionenum.py
+++ b/tests/format/optionenum.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionexports.py b/tests/format/optionexports.py
index 1cbb5bf..27f7c6c 100644
--- a/tests/format/optionexports.py
+++ b/tests/format/optionexports.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionflags.py b/tests/format/optionflags.py
index bb085d8..dbeaa53 100644
--- a/tests/format/optionflags.py
+++ b/tests/format/optionflags.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionos.py b/tests/format/optionos.py
index f998970..fbf9115 100644
--- a/tests/format/optionos.py
+++ b/tests/format/optionos.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionoverrides.py b/tests/format/optionoverrides.py
index 6e6394b..69f5004 100644
--- a/tests/format/optionoverrides.py
+++ b/tests/format/optionoverrides.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/optionprojectroot.py b/tests/format/optionprojectroot.py
index 8f26b4a..8460cc5 100644
--- a/tests/format/optionprojectroot.py
+++ b/tests/format/optionprojectroot.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/options.py b/tests/format/options.py
index 4b4f44f..0e5e707 100644
--- a/tests/format/options.py
+++ b/tests/format/options.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/project.py b/tests/format/project.py
index 17b6290..568f9ab 100644
--- a/tests/format/project.py
+++ b/tests/format/project.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/projectoverrides.py b/tests/format/projectoverrides.py
index 5fec490..42793db 100644
--- a/tests/format/projectoverrides.py
+++ b/tests/format/projectoverrides.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/stack.py b/tests/format/stack.py
index e51a8cd..5cf74ad 100644
--- a/tests/format/stack.py
+++ b/tests/format/stack.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/substitutions.py b/tests/format/substitutions.py
index acf0c3e..d7919bc 100644
--- a/tests/format/substitutions.py
+++ b/tests/format/substitutions.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/userconfig.py b/tests/format/userconfig.py
index 6d401d0..c98ef4a 100644
--- a/tests/format/userconfig.py
+++ b/tests/format/userconfig.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/format/variables.py b/tests/format/variables.py
index 7fbd54e..3b75eda 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/__init__.py b/tests/frontend/__init__.py
index 8bb061e..847cf63 100644
--- a/tests/frontend/__init__.py
+++ b/tests/frontend/__init__.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 import os
 from buildstream import _yaml
 
diff --git a/tests/frontend/artifact_checkout.py b/tests/frontend/artifact_checkout.py
index fba25b4..b238019 100644
--- a/tests/frontend/artifact_checkout.py
+++ b/tests/frontend/artifact_checkout.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/artifact_delete.py b/tests/frontend/artifact_delete.py
index 2d96ecf..d6f8385 100644
--- a/tests/frontend/artifact_delete.py
+++ b/tests/frontend/artifact_delete.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/artifact_list_contents.py b/tests/frontend/artifact_list_contents.py
index 2daaf55..7a72ae6 100644
--- a/tests/frontend/artifact_list_contents.py
+++ b/tests/frontend/artifact_list_contents.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/artifact_log.py b/tests/frontend/artifact_log.py
index b26564e..cd1b91f 100644
--- a/tests/frontend/artifact_log.py
+++ b/tests/frontend/artifact_log.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/artifact_pull.py b/tests/frontend/artifact_pull.py
index 01f8714..b33dd53 100644
--- a/tests/frontend/artifact_pull.py
+++ b/tests/frontend/artifact_pull.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/artifact_show.py b/tests/frontend/artifact_show.py
index d7aa47a..32e6542 100644
--- a/tests/frontend/artifact_show.py
+++ b/tests/frontend/artifact_show.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index ab891b6..5f51546 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py
index 3155ebc..af477fb 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/compose_splits.py b/tests/frontend/compose_splits.py
index a5604f4..af5258a 100644
--- a/tests/frontend/compose_splits.py
+++ b/tests/frontend/compose_splits.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py
index 98339e2..766f693 100644
--- a/tests/frontend/configurable_warnings.py
+++ b/tests/frontend/configurable_warnings.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py
index 92bee86..45025f2 100644
--- a/tests/frontend/cross_junction_workspace.py
+++ b/tests/frontend/cross_junction_workspace.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/default_target.py b/tests/frontend/default_target.py
index 3a9e94e..c3e7b93 100644
--- a/tests/frontend/default_target.py
+++ b/tests/frontend/default_target.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index 98d91c4..b67b9a1 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/help.py b/tests/frontend/help.py
index 729ab08..0dafd46 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/init.py b/tests/frontend/init.py
index 152922e..5adbc5c 100644
--- a/tests/frontend/init.py
+++ b/tests/frontend/init.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/interactive_init.py b/tests/frontend/interactive_init.py
index c05fd4e..e771977 100644
--- a/tests/frontend/interactive_init.py
+++ b/tests/frontend/interactive_init.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 
 import pexpect
diff --git a/tests/frontend/large_directory.py b/tests/frontend/large_directory.py
index a9ec989..a8a6cc2 100644
--- a/tests/frontend/large_directory.py
+++ b/tests/frontend/large_directory.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index 315d20b..f7ccab2 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/main.py b/tests/frontend/main.py
index d864a0b..990b405 100644
--- a/tests/frontend/main.py
+++ b/tests/frontend/main.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 import click
 import pytest
 
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index d8a17ee..0ad7819 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/order.py b/tests/frontend/order.py
index 30dd652..057a418 100644
--- a/tests/frontend/order.py
+++ b/tests/frontend/order.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py
index 7a62fbe..0ea47a6 100644
--- a/tests/frontend/overlaps.py
+++ b/tests/frontend/overlaps.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/progress.py b/tests/frontend/progress.py
index 2d946d5..8198377 100644
--- a/tests/frontend/progress.py
+++ b/tests/frontend/progress.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 52a30cd..32067cc 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index ebb4350..b7ed393 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/rebuild.py b/tests/frontend/rebuild.py
index 67adef5..e3a4d43 100644
--- a/tests/frontend/rebuild.py
+++ b/tests/frontend/rebuild.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/remote-caches.py b/tests/frontend/remote-caches.py
index a46cb9b..489b57f 100644
--- a/tests/frontend/remote-caches.py
+++ b/tests/frontend/remote-caches.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index bb6a427..6aee29a 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py
index 977a344..3d9e571 100644
--- a/tests/frontend/source_checkout.py
+++ b/tests/frontend/source_checkout.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index 61bee73..b30af4f 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/version.py b/tests/frontend/version.py
index 8de4a71..bcc7e92 100644
--- a/tests/frontend/version.py
+++ b/tests/frontend/version.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 7c59ca1..51887bf 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index aa35189..09c7136 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index ac017ff8..fe7d853 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/base/generate-base.sh b/tests/integration/base/generate-base.sh
index 338c6d9..d869c04 100755
--- a/tests/integration/base/generate-base.sh
+++ b/tests/integration/base/generate-base.sh
@@ -1,4 +1,16 @@
 #!/bin/sh
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
 
 # Generate a base sysroot for running the BuildStream integration tests.
 #
diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py
index 0b0835e..51782ed 100644
--- a/tests/integration/build-uid.py
+++ b/tests/integration/build-uid.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py
index a954c48..9a0f2bb 100644
--- a/tests/integration/cachedfail.py
+++ b/tests/integration/cachedfail.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -13,6 +10,8 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/compose-symlinks.py b/tests/integration/compose-symlinks.py
index 51cd9fc..522976d 100644
--- a/tests/integration/compose-symlinks.py
+++ b/tests/integration/compose-symlinks.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index 2211dc1..b502c94 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/filter.py b/tests/integration/filter.py
index 12b9862..23e053b 100644
--- a/tests/integration/filter.py
+++ b/tests/integration/filter.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/import.py b/tests/integration/import.py
index 55142a8..ba9cf5b 100644
--- a/tests/integration/import.py
+++ b/tests/integration/import.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/interactive_build.py b/tests/integration/interactive_build.py
index 56509ea..bc41345 100644
--- a/tests/integration/interactive_build.py
+++ b/tests/integration/interactive_build.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index 062c066..e0fd359 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/messages.py b/tests/integration/messages.py
index 33b07e5..102c89e 100644
--- a/tests/integration/messages.py
+++ b/tests/integration/messages.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/integration/project/elements/autotools/amhello-failure.bst b/tests/integration/project/elements/autotools/amhello-failure.bst
index 771466b..23175b5 100644
--- a/tests/integration/project/elements/autotools/amhello-failure.bst
+++ b/tests/integration/project/elements/autotools/amhello-failure.bst
@@ -12,4 +12,4 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
diff --git a/tests/integration/project/elements/autotools/amhello.bst b/tests/integration/project/elements/autotools/amhello.bst
index ee3a029..3e5532a 100644
--- a/tests/integration/project/elements/autotools/amhello.bst
+++ b/tests/integration/project/elements/autotools/amhello.bst
@@ -7,4 +7,4 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
diff --git a/tests/integration/project/elements/autotools/amhelloconfroot.bst b/tests/integration/project/elements/autotools/amhelloconfroot.bst
index 2892644..2fde4aa 100644
--- a/tests/integration/project/elements/autotools/amhelloconfroot.bst
+++ b/tests/integration/project/elements/autotools/amhelloconfroot.bst
@@ -7,7 +7,7 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
   directory: SourceFile
 
 variables:
diff --git a/tests/integration/project/elements/compose/amhello.bst b/tests/integration/project/elements/compose/amhello.bst
index bec7e31..2b57186 100644
--- a/tests/integration/project/elements/compose/amhello.bst
+++ b/tests/integration/project/elements/compose/amhello.bst
@@ -8,4 +8,4 @@
 sources:
   - kind: tar
     url: project_dir:/files/amhello.tar.gz
-    ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+    ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
diff --git a/tests/integration/project/files/amhello.tar.gz b/tests/integration/project/files/amhello.tar.gz
index afe1899..b484095 100644
--- a/tests/integration/project/files/amhello.tar.gz
+++ b/tests/integration/project/files/amhello.tar.gz
Binary files differ
diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index ad7f59e..2d7cd91 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/sandbox.py b/tests/integration/sandbox.py
index 6d9fe94..aed00c7 100644
--- a/tests/integration/sandbox.py
+++ b/tests/integration/sandbox.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/integration/script.py b/tests/integration/script.py
index 67a8f4b..494b7e9 100644
--- a/tests/integration/script.py
+++ b/tests/integration/script.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index bb94b26..4af301c 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index 32f4710..c4f1d35 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/sockets.py b/tests/integration/sockets.py
index 42ec088..158da76 100644
--- a/tests/integration/sockets.py
+++ b/tests/integration/sockets.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/source-determinism.py b/tests/integration/source-determinism.py
index bdc3595..3ae8f18 100644
--- a/tests/integration/source-determinism.py
+++ b/tests/integration/source-determinism.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/stack.py b/tests/integration/stack.py
index 362452e..8947aed 100644
--- a/tests/integration/stack.py
+++ b/tests/integration/stack.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py
index b5cb60e..f921193 100644
--- a/tests/integration/symlinks.py
+++ b/tests/integration/symlinks.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index 41b79fc..1db9860 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/internals/cascache.py b/tests/internals/cascache.py
index 61d1b83..23f7575 100644
--- a/tests/internals/cascache.py
+++ b/tests/internals/cascache.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import time
 from unittest.mock import MagicMock
diff --git a/tests/internals/context.py b/tests/internals/context.py
index a1d9698..bd68140 100644
--- a/tests/internals/context.py
+++ b/tests/internals/context.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/internals/loader.py b/tests/internals/loader.py
index 5257da6..1cf6504 100644
--- a/tests/internals/loader.py
+++ b/tests/internals/loader.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from contextlib import contextmanager
 import os
 import pytest
diff --git a/tests/internals/storage.py b/tests/internals/storage.py
index 8602e19..49bb704 100644
--- a/tests/internals/storage.py
+++ b/tests/internals/storage.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 from contextlib import contextmanager
 import os
 import pprint
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py
index 6a567bb..3b54183 100644
--- a/tests/internals/storage_vdir_import.py
+++ b/tests/internals/storage_vdir_import.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -12,6 +10,7 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
+#
 from hashlib import sha256
 import os
 import random
diff --git a/tests/internals/utils_move_atomic.py b/tests/internals/utils_move_atomic.py
index 4f86efd..88176de 100644
--- a/tests/internals/utils_move_atomic.py
+++ b/tests/internals/utils_move_atomic.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/internals/utils_save_atomic.py b/tests/internals/utils_save_atomic.py
index 197a90c..966eb92 100644
--- a/tests/internals/utils_save_atomic.py
+++ b/tests/internals/utils_save_atomic.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import pytest
 
diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py
index 212c236..662576e 100644
--- a/tests/internals/yaml.py
+++ b/tests/internals/yaml.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 from io import StringIO
 
diff --git a/tests/plugins/loading.py b/tests/plugins/loading.py
index 4764649..972c75a 100644
--- a/tests/plugins/loading.py
+++ b/tests/plugins/loading.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/plugins/sample-plugins/setup.py b/tests/plugins/sample-plugins/setup.py
index 2ab23fe..14fe1cf 100755
--- a/tests/plugins/sample-plugins/setup.py
+++ b/tests/plugins/sample-plugins/setup.py
@@ -1,7 +1,5 @@
 #!/usr/bin/env python3
 #
-#  Copyright (C) 2020 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/plugins/sample-plugins/src/sample_plugins/elements/autotools.py b/tests/plugins/sample-plugins/src/sample_plugins/elements/autotools.py
index 7f9e6d0..7523332 100644
--- a/tests/plugins/sample-plugins/src/sample_plugins/elements/autotools.py
+++ b/tests/plugins/sample-plugins/src/sample_plugins/elements/autotools.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2016, 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/plugins/sample-plugins/src/sample_plugins/sources/git.py b/tests/plugins/sample-plugins/src/sample_plugins/sources/git.py
index decd2ec..4c7bace 100644
--- a/tests/plugins/sample-plugins/src/sample_plugins/sources/git.py
+++ b/tests/plugins/sample-plugins/src/sample_plugins/sources/git.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2016 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/plugins/shadow.py b/tests/plugins/shadow.py
index c94743c..f109aa0 100644
--- a/tests/plugins/shadow.py
+++ b/tests/plugins/shadow.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/remotecache/__init__.py b/tests/remotecache/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/remotecache/__init__.py
diff --git a/tests/remotecache/project/elements/autotools/amhello.bst b/tests/remotecache/project/elements/autotools/amhello.bst
index 3af67ef..cb371e2 100644
--- a/tests/remotecache/project/elements/autotools/amhello.bst
+++ b/tests/remotecache/project/elements/autotools/amhello.bst
@@ -7,7 +7,7 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
 
 config:
 
diff --git a/tests/remotecache/project/files/amhello.tar.gz b/tests/remotecache/project/files/amhello.tar.gz
index afe1899..b484095 100644
--- a/tests/remotecache/project/files/amhello.tar.gz
+++ b/tests/remotecache/project/files/amhello.tar.gz
Binary files differ
diff --git a/tests/remotecache/simple.py b/tests/remotecache/simple.py
index 747e3b7..77d08b8 100644
--- a/tests/remotecache/simple.py
+++ b/tests/remotecache/simple.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
@@ -59,7 +73,6 @@
 @pytest.mark.skipif("not pip_sample_packages()", reason=SAMPLE_PACKAGES_SKIP_REASON)
 def test_remote_autotools_build_no_cache(cli, datafiles):
     project = str(datafiles)
-    checkout = os.path.join(cli.directory, "checkout")
     element_name = "autotools/amhello.bst"
 
     cli.configure({"artifacts": {"servers": [{"url": "http://fake.url.service", "push": True}]}})
diff --git a/tests/remoteexecution/buildfail.py b/tests/remoteexecution/buildfail.py
index 1d553e7..69c7950 100644
--- a/tests/remoteexecution/buildfail.py
+++ b/tests/remoteexecution/buildfail.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/remoteexecution/buildtree.py b/tests/remoteexecution/buildtree.py
index 43a3e54..33992b5 100644
--- a/tests/remoteexecution/buildtree.py
+++ b/tests/remoteexecution/buildtree.py
@@ -1,4 +1,3 @@
-#  Copyright (C) 2019 Bloomberg Finance LP
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
diff --git a/tests/remoteexecution/junction.py b/tests/remoteexecution/junction.py
index 226974b..62a6605 100644
--- a/tests/remoteexecution/junction.py
+++ b/tests/remoteexecution/junction.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/remoteexecution/project/elements/autotools/amhello.bst b/tests/remoteexecution/project/elements/autotools/amhello.bst
index 3af67ef..cb371e2 100644
--- a/tests/remoteexecution/project/elements/autotools/amhello.bst
+++ b/tests/remoteexecution/project/elements/autotools/amhello.bst
@@ -7,7 +7,7 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
 
 config:
 
diff --git a/tests/remoteexecution/project/files/amhello.tar.gz b/tests/remoteexecution/project/files/amhello.tar.gz
index afe1899..b484095 100644
--- a/tests/remoteexecution/project/files/amhello.tar.gz
+++ b/tests/remoteexecution/project/files/amhello.tar.gz
Binary files differ
diff --git a/tests/remoteexecution/project/files/sub-project/elements/autotools/amhello.bst b/tests/remoteexecution/project/files/sub-project/elements/autotools/amhello.bst
index ee3a029..3e5532a 100644
--- a/tests/remoteexecution/project/files/sub-project/elements/autotools/amhello.bst
+++ b/tests/remoteexecution/project/files/sub-project/elements/autotools/amhello.bst
@@ -7,4 +7,4 @@
 sources:
 - kind: tar
   url: project_dir:/files/amhello.tar.gz
-  ref: 9ba123fa4e660929e9a0aa99f0c487b7eee59c5e7594f3284d015640b90f5590
+  ref: 534a884bc1974ffc539a9c215e35c4217b6f666a134cd729e786b9c84af99650
diff --git a/tests/remoteexecution/project/files/sub-project/files/amhello.tar.gz b/tests/remoteexecution/project/files/sub-project/files/amhello.tar.gz
index afe1899..b484095 100644
--- a/tests/remoteexecution/project/files/sub-project/files/amhello.tar.gz
+++ b/tests/remoteexecution/project/files/sub-project/files/amhello.tar.gz
Binary files differ
diff --git a/tests/remoteexecution/remotecache.py b/tests/remoteexecution/remotecache.py
index 231d417..b78070c 100644
--- a/tests/remoteexecution/remotecache.py
+++ b/tests/remoteexecution/remotecache.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/remoteexecution/simple.py b/tests/remoteexecution/simple.py
index 4dd4f9c..478e6fc 100644
--- a/tests/remoteexecution/simple.py
+++ b/tests/remoteexecution/simple.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/remoteexecution/workspace.py b/tests/remoteexecution/workspace.py
index 44b1d00..636b79a 100644
--- a/tests/remoteexecution/workspace.py
+++ b/tests/remoteexecution/workspace.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
@@ -31,12 +45,8 @@
     _input_files = [
         ".bstproject.yaml",
         "aclocal.m4",
-        "missing",
         "README",
-        "install-sh",
-        "depcomp",
         "configure.ac",
-        "compile",
         SRC,
         MAIN,
         os.path.join(SRC, "Makefile.am"),
@@ -53,12 +63,16 @@
         os.path.join(AUTO, "requests"),
         os.path.join(AUTO, "output.0"),
         os.path.join(AUTO, "output.1"),
+        "compile",
         "config.h",
         "config.h.in",
         "config.log",
         "config.status",
         "configure",
         "configure.lineno",
+        "depcomp",
+        "install-sh",
+        "missing",
         os.path.join(SRC, "hello"),
         DEPS,
         os.path.join(DEPS, "main.Po"),
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
index 98ff6ef..3dbe60d 100644
--- a/tests/sandboxes/missing-command.py
+++ b/tests/sandboxes/missing-command.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sandboxes/missing_dependencies.py b/tests/sandboxes/missing_dependencies.py
index 2d037e5..1c4a403 100644
--- a/tests/sandboxes/missing_dependencies.py
+++ b/tests/sandboxes/missing_dependencies.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py
index 82dad4f..c89efc2 100644
--- a/tests/sandboxes/remote-exec-config.py
+++ b/tests/sandboxes/remote-exec-config.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sandboxes/selection.py b/tests/sandboxes/selection.py
index efb22dc..d24b894 100644
--- a/tests/sandboxes/selection.py
+++ b/tests/sandboxes/selection.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
@@ -12,6 +10,8 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sourcecache/cache.py b/tests/sourcecache/cache.py
index 9eb03b1..1e79dab 100644
--- a/tests/sourcecache/cache.py
+++ b/tests/sourcecache/cache.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/capabilities.py b/tests/sourcecache/capabilities.py
index 11a3c99..a22bbf4 100644
--- a/tests/sourcecache/capabilities.py
+++ b/tests/sourcecache/capabilities.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sourcecache/config.py b/tests/sourcecache/config.py
index dc0c3ff..85dea84 100644
--- a/tests/sourcecache/config.py
+++ b/tests/sourcecache/config.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance L.P.
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py
index 4e42bde..b153573 100644
--- a/tests/sourcecache/fetch.py
+++ b/tests/sourcecache/fetch.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/project/plugins/elements/always_fail.py b/tests/sourcecache/project/plugins/elements/always_fail.py
index aa14bf3..8885d41 100644
--- a/tests/sourcecache/project/plugins/elements/always_fail.py
+++ b/tests/sourcecache/project/plugins/elements/always_fail.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance L.P.
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/project/plugins/sources/patch.py b/tests/sourcecache/project/plugins/sources/patch.py
index e664005..00e8249 100644
--- a/tests/sourcecache/project/plugins/sources/patch.py
+++ b/tests/sourcecache/project/plugins/sources/patch.py
@@ -1,7 +1,4 @@
 #
-#  Copyright Bloomberg Finance LP
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/push.py b/tests/sourcecache/push.py
index 5fa9368..7fb7c96 100644
--- a/tests/sourcecache/push.py
+++ b/tests/sourcecache/push.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/source-checkout.py b/tests/sourcecache/source-checkout.py
index 70a074d..d1b2aa3 100644
--- a/tests/sourcecache/source-checkout.py
+++ b/tests/sourcecache/source-checkout.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/staging.py b/tests/sourcecache/staging.py
index 61c0feb..786a240 100644
--- a/tests/sourcecache/staging.py
+++ b/tests/sourcecache/staging.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sourcecache/workspace.py b/tests/sourcecache/workspace.py
index 13eb18e..e8992b3 100644
--- a/tests/sourcecache/workspace.py
+++ b/tests/sourcecache/workspace.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sources/__init__.py b/tests/sources/__init__.py
index 02a7550..d00c304 100644
--- a/tests/sources/__init__.py
+++ b/tests/sources/__init__.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 import os
 
 
diff --git a/tests/sources/keytest.py b/tests/sources/keytest.py
index 2df0149..ac56b77 100644
--- a/tests/sources/keytest.py
+++ b/tests/sources/keytest.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/sources/local.py b/tests/sources/local.py
index 5a3f98e..d1d197e 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sources/no_fetch_cached.py b/tests/sources/no_fetch_cached.py
index 9652d3f..4808444 100644
--- a/tests/sources/no_fetch_cached.py
+++ b/tests/sources/no_fetch_cached.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index a35044f..a4ab42b 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index fb3bfcd..15710aa 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index c6dc239..c7abbc6 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/sources/variables.py b/tests/sources/variables.py
index addbaf8..5cdd82e 100644
--- a/tests/sources/variables.py
+++ b/tests/sources/variables.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
diff --git a/tests/testutils/__init__.py b/tests/testutils/__init__.py
index 87f61d9..028131e 100644
--- a/tests/testutils/__init__.py
+++ b/tests/testutils/__init__.py
@@ -1,7 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py
index 1a40d43..753384b 100644
--- a/tests/testutils/artifactshare.py
+++ b/tests/testutils/artifactshare.py
@@ -1,10 +1,23 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+import multiprocessing
 import os
 import shutil
 import signal
 from collections import namedtuple
 from contextlib import ExitStack, contextmanager
 from concurrent import futures
-from multiprocessing import Process, Queue
 from urllib.parse import urlparse
 
 import grpc
@@ -23,9 +36,11 @@
 
 class BaseArtifactShare:
     def __init__(self):
-        q = Queue()
+        multiprocessing_context = multiprocessing.get_context("forkserver")
 
-        self.process = Process(target=self.run, args=(q,))
+        q = multiprocessing_context.Queue()
+
+        self.process = multiprocessing_context.Process(target=self.run, args=(q,))
         self.process.start()
 
         # Retrieve port from server subprocess
@@ -61,14 +76,6 @@
 
             server.stop(0)
 
-        # Save collected coverage data
-        try:
-            from pytest_cov.embed import cleanup
-        except ImportError:
-            pass
-        else:
-            cleanup()
-
     # _create_server()
     #
     # Create the server that will be run in the process
@@ -125,13 +132,14 @@
         self.repodir = os.path.join(self.directory, "repo")
         os.makedirs(self.repodir)
 
-        self.cas = CASCache(self.repodir, casd=False)
-
         self.quota = quota
         self.index_only = index_only
 
         super().__init__()
 
+        # Set after subprocess creation as it's not picklable
+        self.cas = CASCache(self.repodir, casd=False)
+
     def _create_server(self):
         return create_server(
             self.repodir,
diff --git a/tests/testutils/constants.py b/tests/testutils/constants.py
index e95d442..a26145b 100644
--- a/tests/testutils/constants.py
+++ b/tests/testutils/constants.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # Constants used during BuildStream tests.
 
 
diff --git a/tests/testutils/context.py b/tests/testutils/context.py
index 50bb755..4ee841b 100644
--- a/tests/testutils/context.py
+++ b/tests/testutils/context.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/testutils/element_generators.py b/tests/testutils/element_generators.py
index fa1f9c0..2547665 100644
--- a/tests/testutils/element_generators.py
+++ b/tests/testutils/element_generators.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 
 from buildstream import _yaml
diff --git a/tests/testutils/file_server.py b/tests/testutils/file_server.py
index 3e6e419..ac1d6ec 100644
--- a/tests/testutils/file_server.py
+++ b/tests/testutils/file_server.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 from contextlib import contextmanager
 
 from .ftp_server import SimpleFtpServer
diff --git a/tests/testutils/filetypegenerator.py b/tests/testutils/filetypegenerator.py
index 70e068e..61b0b8d 100644
--- a/tests/testutils/filetypegenerator.py
+++ b/tests/testutils/filetypegenerator.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Codethink Limited
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/testutils/ftp_server.py b/tests/testutils/ftp_server.py
index 7eda90b..c350e7e 100644
--- a/tests/testutils/ftp_server.py
+++ b/tests/testutils/ftp_server.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import multiprocessing
 
 from pyftpdlib.authorizers import DummyAuthorizer
diff --git a/tests/testutils/http_server.py b/tests/testutils/http_server.py
index 8591159..7b538de 100644
--- a/tests/testutils/http_server.py
+++ b/tests/testutils/http_server.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import multiprocessing
 import os
 import posixpath
diff --git a/tests/testutils/junction.py b/tests/testutils/junction.py
index 515f3e4..dd3f6f1 100644
--- a/tests/testutils/junction.py
+++ b/tests/testutils/junction.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 
 from buildstream import _yaml
diff --git a/tests/testutils/patch.py b/tests/testutils/patch.py
index 85b38de..44bbd9d 100644
--- a/tests/testutils/patch.py
+++ b/tests/testutils/patch.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import subprocess
 
 
diff --git a/tests/testutils/platform.py b/tests/testutils/platform.py
index bda2801..05acdd7 100644
--- a/tests/testutils/platform.py
+++ b/tests/testutils/platform.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2019 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/testutils/python_repo.py b/tests/testutils/python_repo.py
index f0c7959..4069e0a 100644
--- a/tests/testutils/python_repo.py
+++ b/tests/testutils/python_repo.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import re
 import shutil
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py
index 34d4e12..050d10e 100644
--- a/tests/testutils/repo/git.py
+++ b/tests/testutils/repo/git.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import shutil
 import subprocess
@@ -65,7 +78,7 @@
         if url is not None:
             submodule["url"] = url
         self.submodules[subdir] = submodule
-        self._run_git("submodule", "add", url, subdir)
+        self._run_git("-c", "protocol.file.allow=always", "submodule", "add", url, subdir)
         self._run_git("commit", "-m", "Added the submodule")
         return self.latest_commit()
 
diff --git a/tests/testutils/repo/tar.py b/tests/testutils/repo/tar.py
index 0b3236a..563a56d 100644
--- a/tests/testutils/repo/tar.py
+++ b/tests/testutils/repo/tar.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import tarfile
 
diff --git a/tests/testutils/runner_integration.py b/tests/testutils/runner_integration.py
index 8456826..daf0412 100644
--- a/tests/testutils/runner_integration.py
+++ b/tests/testutils/runner_integration.py
@@ -1,6 +1,4 @@
 #
-#  Copyright (C) 2018 Bloomberg Finance LP
-#
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 #  You may obtain a copy of the License at
diff --git a/tests/testutils/setuptools.py b/tests/testutils/setuptools.py
index 0f7f30f..17f4b86 100644
--- a/tests/testutils/setuptools.py
+++ b/tests/testutils/setuptools.py
@@ -1,3 +1,16 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
 import os
 import pytest
 import pkg_resources
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index d626cfe..57857ee 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -1,3 +1,17 @@
+#
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
 # This function is used for pytest skipif() expressions.
 #
 # Tests which require our plugins in tests/plugins/pip-samples need
diff --git a/tox.ini b/tox.ini
index bfe925e..df878d8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,8 +1,22 @@
 #
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+#
 # Tox global configuration
 #
 [tox]
-envlist = py37,py{38,39,310}-nocover
+envlist = py{37,38,39,310,311}
 skip_missing_interpreters = true
 isolated_build = true
 
@@ -19,30 +33,30 @@
 [testenv]
 usedevelop =
     # This is required by Cython in order to get coverage for cython files.
-    py{37,38,39,310}-!nocover: True
+    py{37,38,39,310,311}-!nocover: True
 
 commands =
     # Running with coverage reporting enabled
-    py{37,38,39,310}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
+    py{37,38,39,310,311}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
     # Running with coverage reporting disabled
-    py{37,38,39,310}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
+    py{37,38,39,310,311}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
     # Running external plugins tests with coverage reporting enabled
-    py{37,38,39,310}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
+    py{37,38,39,310,311}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
     # Running external plugins tests with coverage disabled
-    py{37,38,39,310}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
+    py{37,38,39,310,311}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
 commands_post:
-    py{37,38,39,310}-!nocover: mkdir -p .coverage-reports
-    py{37,38,39,310}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
+    py{37,38,39,310,311}-!nocover: mkdir -p .coverage-reports
+    py{37,38,39,310,311}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
 deps =
-    py{37,38,39,310}: -rrequirements/requirements.txt
-    py{37,38,39,310}: -rrequirements/dev-requirements.txt
-    py{37,38,39,310}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}
+    py{37,38,39,310,311}: -rrequirements/requirements.txt
+    py{37,38,39,310,311}: -rrequirements/dev-requirements.txt
+    py{37,38,39,310,311}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}
 
     # Install local sample plugins for testing pip plugin origins
-    py{37,38,39,310}: {toxinidir}/tests/plugins/sample-plugins
+    py{37,38,39,310,311}: {toxinidir}/tests/plugins/sample-plugins
 
     # Install external plugins for plugin tests
-    py{37,38,39,310}-plugins: git+https://gitlab.com/buildstream/bst-plugins-experimental.git@{env:BST_PLUGINS_EXPERIMENTAL_VERSION:{[config]BST_PLUGINS_EXPERIMENTAL_VERSION}}#egg=bst_plugins_experimental[deb]
+    py{37,38,39,310,311}-plugins: git+https://gitlab.com/buildstream/bst-plugins-experimental.git@{env:BST_PLUGINS_EXPERIMENTAL_VERSION:{[config]BST_PLUGINS_EXPERIMENTAL_VERSION}}#egg=bst_plugins_experimental[deb]
 
     # Only require coverage and pytest-cov when using it
     !nocover: -rrequirements/cov-requirements.txt
@@ -70,21 +84,21 @@
 # These keys are not inherited by any other sections
 #
 setenv =
-    py{37,38,39,310}: COVERAGE_FILE = {envtmpdir}/.coverage
-    py{37,38,39,310}: BST_TEST_HOME = {envtmpdir}
-    py{37,38,39,310}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
-    py{37,38,39,310}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
-    py{37,38,39,310}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
+    py{37,38,39,310,311}: COVERAGE_FILE = {envtmpdir}/.coverage
+    py{37,38,39,310,311}: BST_TEST_HOME = {envtmpdir}
+    py{37,38,39,310,311}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
+    py{37,38,39,310,311}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
+    py{37,38,39,310,311}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
 
     # This is required to run tests with python 3.7
     py37: SETUPTOOLS_ENABLE_FEATURES = "legacy-editable"
 
     # This is required to get coverage for Cython
-    py{37,38,39,310}-!nocover: BST_CYTHON_TRACE = 1
+    py{37,38,39,310,311}-!nocover: BST_CYTHON_TRACE = 1
     randomized: PYTEST_ADDOPTS="--random-order-bucket=global"
 
 whitelist_externals =
-    py{37,38,39,310}:
+    py{37,38,39,310,311}:
         mv
         mkdir
 
@@ -164,7 +178,7 @@
 [testenv:mypy]
 skip_install = True
 commands =
-    mypy {posargs}
+    mypy --namespace-packages {posargs}
 deps =
     mypy==0.910
     types-protobuf