-
Notifications
You must be signed in to change notification settings - Fork 455
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: GPL-2.0-only to Python source files using scapy #5111
base: main
Are you sure you want to change the base?
Add SPDX-License-Identifier: GPL-2.0-only to Python source files using scapy #5111
Conversation
…g scapy either by directly importing scapy, or by importing a package that imports scapy. Remove the one Scapy method call in tools/testutils.py that existed, so that it no longer needs to import scapy, reducing the number of Python files that are GPL-2.0-only. Signed-off-by: Andy Fingerhut <[email protected]>
Note: Changes may take a few seconds to appear on GitHub Pages. Please refresh the page if you do not see the updates immediately. |
I think this is ready for review now. |
Putting this back in draft mode for now. I know how to modify 2 or 3 of the Python source files that import scapy, currently modified by this PR, so that they no longer need to import scapy, but it requires a non-scapy implementation of a PcapWriter class and a rdpcap function. See this PR for one possible implementation of this (and older version of PcapWriter has been in ptf since it was derived from oftest in 2015, but it needed a little bit of generalization): p4lang/ptf#214 The ebpf and ubpf test program that use Scapy use its packet header construction capabilities quite heavily. MAYBE they can be updated to use bf_pktpy instead, but again, THEY ARE ONLY TEST PROGRAMS that do not affect the contents of the p4c executables. |
Signed-off-by: Andy Fingerhut <[email protected]>
Signed-off-by: Andy Fingerhut <[email protected]>
if the dependence on Scapy can be removed. Signed-off-by: Andy Fingerhut <[email protected]>
…-python-source-files-importing-scapy
OK, I have the set of files in the p4c repo that import Scapy down to only 6. They are definitely all only used at test time. I have added a comment in each of these files that if some day, someone eliminates the dependence upon Scapy, then they can be relicensed to Apache-2.0. |
Updated comment as of commit 4:
I have reduced this PR to only adding GPL-2.0-only license to 6 Python test programs. They use Scapy pretty extensively. They might be made to work with bf_pktpy in the future, but that is work we might attempt another day. Until then, we should call a spade a spade, and mark these files with the license they should have.
Reminder: These files are only used at test time. They are never included as part of any p4c executable.