Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPDX-License-Identifier lines to source files #134

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Copyright 2019 Antonin Bas
# SPDX-License-Identifier: Apache-2.0
FROM ubuntu:22.04 AS deps

SHELL ["/bin/bash", "-c"]
ENV PKG_DEPS python3 python3-venv git

Check warning on line 6 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV VENV /p4runtime-sh/venv

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apt-get update && \
apt-get install -y --no-install-recommends $PKG_DEPS && \
Expand All @@ -24,8 +26,8 @@
LABEL description="A shell based on ipython3 for P4Runtime"

# Any easy way to avoid installing these packages again?
ENV PKG_DEPS python3

Check warning on line 29 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV VENV /p4runtime-sh/venv

Check warning on line 30 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

RUN apt-get update && \
apt-get install -y --no-install-recommends $PKG_DEPS && \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2019 Antonin Bas
# SPDX-License-Identifier: Apache-2.0
ARG BASE_IMAGE=p4lang/p4runtime-sh:latest
FROM ${BASE_IMAGE}

Expand All @@ -5,7 +7,7 @@

WORKDIR /p4runtime-sh/

ENV PKG_DEPS curl git python3-venv

Check warning on line 10 in Dockerfile.dev

View workflow job for this annotation

GitHub Actions / test

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# git is required for codecov
RUN apt-get update && \
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2022 Antonin Bas
# SPDX-License-Identifier: Apache-2.0

all: build

.PHONY: build
Expand Down
1 change: 1 addition & 0 deletions config_builders/test_tofino.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions config_builders/tofino.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions docker_entry_point.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash

# Copyright 2019 Antonin Bas
# SPDX-License-Identifier: Apache-2.0

source $VENV/bin/activate
python3 -m p4runtime_sh "$@"
1 change: 1 addition & 0 deletions p4runtime-sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime-sh-docker
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions p4runtime_sh/__main__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Copyright 2021 Yi Tseng
# SPDX-License-Identifier: Apache-2.0

from p4runtime_sh.shell import main
main() # pragma: no cover
1 change: 1 addition & 0 deletions p4runtime_sh/bytes_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime_sh/context.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime_sh/global_options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime_sh/p4runtime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime_sh/shell.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions p4runtime_sh/test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2019 Barefoot Networks, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions p4runtime_sh/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2019 Antonin Bas
# SPDX-License-Identifier: Apache-2.0

# See https://stackoverflow.com/a/32997046
def my_partialmethod(func, *args1, **kwargs1):
def method(self, *args2, **kwargs2):
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021 Yi Tseng
# SPDX-License-Identifier: Apache-2.0

import setuptools

if __name__ == "__main__":
Expand Down