Skip to content

Commit

Permalink
[dockers] Barefoot fix bulleye build (sonic-net#9766)
Browse files Browse the repository at this point in the history
#### Why I did it
Build failed.

Due to the error message looks like build failed because `pyversions` utility was not found.

`pyversions` utility is a part of `python2-minimal` package and it wasn't installed.


#### How I did it
To avoid installing python2 just specify explicit python version `--with python3` and use build system for py3 `--buildsystem=pybuild`

#### How to verify it
Run build
  • Loading branch information
novikauanton authored Jan 16, 2022
1 parent a2d1798 commit df2043e
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion platform/barefoot/bfn-modules/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: bfn-modules
Section: main
Priority: extra
Maintainer: support <support@barefootnetworks.com>
Build-Depends: debhelper (>= 8.0.0), bzip2
Build-Depends: debhelper (>= 8.0.0), bzip2, python3
Standards-Version: 3.9.3

Package: bfn-modules
Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/bfn-modules/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ KERNEL_SRC := /lib/modules/$(KVERSION)
MODULE_SRC := $(shell pwd)/modules

%:
dh $@
dh $@ --with python3

override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn-montara
Section: main
Priority: extra
Maintainer: Support <support@edge-core.com>
Build-Depends: debhelper (>= 9.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2, python3
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn-montara
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BUILD_DIR := $(shell pwd)/build
WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel

%:
dh $@
dh $@ --with python3

override_dh_auto_build:
set -e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn-newport
Section: main
Priority: extra
Maintainer: Support <support@edge-core.com>
Build-Depends: debhelper (>= 9.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2, python3
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn-newport-as9516
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel
MODULE_NAMES := as9516 as9516bf

%:
dh $@
dh $@ --with python3

override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
set -e
python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
set +e
set +e

override_dh_auto_install:
(for mod in $(MODULE_NAMES); do \
Expand All @@ -39,8 +39,8 @@ override_dh_pysupport:

override_dh_clean:
dh_clean
rm -fr $(WHEEL_BUILD_DIR)
rm -fr *.egg-info
rm -fr $(WHEEL_BUILD_DIR)
rm -fr *.egg-info
rm -fr $(BUILD)
rm -f $(MODULE_SRC)/*.o $(MODULE_SRC)/*.ko $(MODULE_SRC)/*.mod.c $(MODULE_SRC)/.*.cmd
rm -f $(MODULE_SRC)/Module.markers $(MODULE_SRC)/Module.symvers $(MODULE_SRC)/modules.order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic-platform-modules-bfn
Section: main
Priority: extra
Maintainer: support <support@edge-core.com>
Build-Depends: debhelper (>= 9.0.0), bzip2
Build-Depends: debhelper (>= 9.0.0), bzip2, python3
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn
Expand Down
6 changes: 3 additions & 3 deletions platform/barefoot/sonic-platform-modules-bfn/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BUILD_DIR := $(shell pwd)/build
WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel

%:
dh $@
dh $@ --with python3

override_dh_auto_build:
set -e
Expand All @@ -28,8 +28,8 @@ override_dh_usrlocal:
override_dh_pysupport:

override_dh_clean:
rm -fr $(WHEEL_BUILD_DIR)
rm -fr *.egg-info
rm -fr $(WHEEL_BUILD_DIR)
rm -fr *.egg-info
rm -fr $(BUILD)
dh_clean

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: platform-modules-wnc-osw1800
Section: main
Priority: extra
Maintainer: WNC <wnc@wnc.com.tw>
Build-Depends: debhelper (>= 8.0.0), bzip2
Build-Depends: debhelper (>= 8.0.0), bzip2, python3
Standards-Version: 3.9.3

Package: platform-modules-wnc-osw1800
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT_SRC := $(shell pwd)/scripts
SERVICE_SRC := $(shell pwd)/service

%:
dh $@
dh $@ --with python3

override_dh_auto_build:
make -C $(KERNEL_SRC)/build M=$(MODULE_SRC)
Expand Down

0 comments on commit df2043e

Please sign in to comment.