From ae262ddf229a05e8f400332cb6fbd31980f450f9 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Thu, 14 Jul 2022 17:55:41 +0200 Subject: ci: Separate job for debs, ensure built pkg is tested. Use a separate GitHub Actions job for deb test so that we can control base image for package test. The CI deb package test code currently attempts to use `apt` to install local packages. That may not produce the expected result. Explicitly install the local packages with `dpkg` after installing dependencies from `apt` instead. Also enable test installation of ipsec deb package. Signed-off-by: Frode Nordahl Signed-off-by: Ilya Maximets --- .ci/linux-build.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to '.ci/linux-build.sh') diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 9963fb810..a8c437aaf 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -207,10 +207,23 @@ if [ "$DEB_PACKAGE" ]; then mk-build-deps --install --root-cmd sudo --remove debian/control dpkg-checkbuilddeps DEB_BUILD_OPTIONS='parallel=4 nocheck' fakeroot debian/rules binary - # Not trying to install ipsec package as there are issues with system-wide - # installed python3-openvswitch package and the pyenv used by Travis. - packages=$(ls $(pwd)/../*.deb | grep -v ipsec) - sudo apt install ${packages} + packages=$(ls $(pwd)/../*.deb) + deps="" + for pkg in $packages; do + _ifs=$IFS + IFS="," + for dep in $(dpkg-deb -f $pkg Depends); do + dep_name=$(echo "$dep"|awk '{print$1}') + # Don't install internal package inter-dependencies from apt + echo $dep_name | grep -q openvswitch && continue + deps+=" $dep_name" + done + IFS=$_ifs + done + # install package dependencies from apt + echo $deps | xargs sudo apt -y install + # install the locally built openvswitch packages + sudo dpkg -i $packages exit 0 fi -- cgit v1.2.1