Use Debian containers to avoid sudo and simplify job definition.
Use debian:sid for DPDK builds to get libdpdk-dev >= 25.11, which is
not yet available in Ubuntu. Use debian:trixie for non-DPDK builds.

Also set PYBUILD_SYSTEM=distutils in debian/rules to work around
pybuild no longer auto-detecting setup.py on sid
(https://bugs.debian.org/1126096).

Signed-off-by: Ihar Hrachyshka <[email protected]>
---
 .github/workflows/build-and-test.yml | 14 ++++++++++----
 debian/rules                         |  3 +++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build-and-test.yml 
b/.github/workflows/build-and-test.yml
index 0ee454e31..e4a11539f 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -624,19 +624,25 @@ jobs:
   build-linux-deb:
     name: linux deb ${{ matrix.dpdk }} dpdk
     runs-on: ubuntu-24.04
+    container: ${{ matrix.container }}
     timeout-minutes: 30
 
     strategy:
       fail-fast: false
       matrix:
         include:
+          # Use Debian containers to avoid sudo and simplify job definition.
           - dpdk: no
+            container: debian:trixie
+          # Use debian:sid to get libdpdk-dev >= 25.11, not yet in Ubuntu.
+          - dpdk: yes
+            container: debian:sid
 
     steps:
     - name: install dependencies
       run: |
-        sudo apt-get update
-        sudo apt-get install -y build-essential fakeroot devscripts equivs
+        apt-get update
+        apt-get install -y build-essential fakeroot devscripts equivs
 
     - name: checkout
       uses: actions/checkout@v4
@@ -647,7 +653,7 @@ jobs:
 
     - name: install build dependencies
       run: |
-        sudo mk-build-deps -i -r -t 'sudo apt-get -y --no-install-recommends' 
debian/control
+        mk-build-deps -i -r -t 'apt-get -y --no-install-recommends' 
debian/control
 
     - name: set common DEB_BUILD_OPTIONS
       run: |
@@ -664,7 +670,7 @@ jobs:
 
     - name: install deb packages
       run: |
-        sudo apt-get install -y ../*.deb
+        apt-get install -y ../*.deb
 
     - name: check that python C extension is built correctly
       run: |
diff --git a/debian/rules b/debian/rules
index f36d45593..83b38ea05 100755
--- a/debian/rules
+++ b/debian/rules
@@ -81,6 +81,9 @@ endif # nocheck
 
 export PYBUILD_DESTDIR = $(CURDIR)/debian/tmp
 export PYBUILD_DIR = $(CURDIR)/python
+# pybuild in sid no longer auto-detects setup.py, see
+# https://bugs.debian.org/1126096
+export PYBUILD_SYSTEM = distutils
 
 pybuild = \
        export PKG_CONFIG_PATH=$(CURDIR)/debian/tmp/usr/lib/pkgconfig; \
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to