Skip to content
Open
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
1 change: 1 addition & 0 deletions rules/p4lang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ export P4LANG_P4C_VERSION_FULL
P4LANG_P4C = p4lang-p4c_$(P4LANG_P4C_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(P4LANG_P4C)_SRC_PATH = $($(P4LANG_PI)_SRC_PATH)
$(P4LANG_P4C)_DEPENDS = $(P4LANG_BMV2)
$(P4LANG_P4C)_WHEEL_DEPENDS = $(SCAPY)
$(P4LANG_P4C)_RDEPENDS = $(P4LANG_BMV2)
SONIC_MAKE_DEBS += $(P4LANG_P4C)
1 change: 0 additions & 1 deletion sonic-slave-trixie/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ RUN eatmydata apt-get install -y \
net-tools \
python3-pyroute2 \
python3-ply \
python3-scapy \
python3-thrift
{%- endif %}

Expand Down
1 change: 1 addition & 0 deletions src/p4lang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $(addprefix $(DEST)/, $(P4LANG_P4C_TARGET)): $(DEST)/% :
patch -p1 -i ../p4lang-p4c.patch/fix-build-for-boost-1.83.patch
patch -p1 -i ../p4lang-p4c.patch/update-thrift-dependency.patch
patch -p1 -i ../p4lang-p4c.patch/remove-protobuf-from-debian-dependency.patch
patch -p1 -i ../p4lang-p4c.patch/remove-scapy-from-debian-dependency.patch
ifeq ($(CROSS_BUILD_ENVIRON), y)
dpkg-buildpackage -us -uc -b -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
else
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Don't depend on Debian's python3-scapy. SONiC builds scapy locally as a
Python wheel and installs it with pip, so the distro python3-scapy package
is not present in the build slave. Remove it from both Build-Depends (so
dpkg-checkbuilddeps passes) and Depends (so installing the built deb into
the slave to satisfy downstream build dependencies does not fail). This
mirrors how python3-protobuf/python3-grpcio are already handled. Runtime
containers that ship p4lang-p4c (e.g. docker-ptf) install scapy on their
own, so dropping the runtime dependency is safe.
Index: p4lang-p4c-1.2.4.2/debian/control
===================================================================
--- p4lang-p4c-1.2.4.2.orig/debian/control
+++ p4lang-p4c-1.2.4.2/debian/control
@@ -25,6 +25,5 @@ Build-Depends:
python3-all,
python3-pyroute2,
python3-ply,
- python3-scapy,
python3-setuptools,
python3-thrift,
@@ -64,6 +63,5 @@ Depends:
net-tools,
python3-pyroute2,
python3-ply,
- python3-scapy,
python3-setuptools,
python3-thrift,
Loading