[ovs-dev] [PATCH] travis: Test build of debian packages.

Ilya Maximets i.maximets at ovn.org
Fri Aug 21 11:24:08 UTC 2020


On 8/20/20 7:54 PM, Aaron Conole wrote:
> Ilya Maximets <i.maximets at ovn.org> writes:
> 
>> We had a lot of issues with debian packaging lately.  This job will
>> check build and installation of debian packages to avoid most of such
>> issues in the future.
>>
>> Installing only minimal set of tools, most of dependencies will be
>> installed according to package description, this way we will check if
>> we have all required dependencies listed.
>>
>> Not trying to install openvswitch-ipsec package as there is an issue
>> that python from the pyenv for some reason doesn't see ovs packages
>> installed from python3-openvswitch, i.e. ipsec service is not able to
>> start.
>>
>> Tests are skipped because they are tested in many other scenarios.
>> No need to waste time.
> 
> Makes sense.
> 
>> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
>> ---
> 
> I noticed some failures in the build - complains from the DKMS mechanism
> (although, we probably don't need to worry too much about it), and also
> complains about missing symbols.
> 
> Are these environmental issues in Travis / the package definition we
> need to address?  I don't know enough about the debian packaging process
> to know if these are expected.

I tried to install linux-headers and DKMS works fine with it:
  https://travis-ci.org/github/igsilya/ovs/jobs/719897162#L4621

It actually tries to re-build kernel modules against current kernel.
For now it works fine, but I'm not sure how much trouble it could produce
in case of some unexpected changes in their kernel.  However, we could
always revert installation of headers later.  I'll send v2.

For the symbols.. I'm not sure.  It seems like it complains because our
libraries are not self-contained, i.e. requires linking of additional libraries
that contains required symbols.  But we have *.pc files for pkgconfig
with extra libraries added.  So, this should not be an issue, just a warning.
And I have same warnings while trying to build locally and packages seems
to work, so I think, it's ok to keep as is.

> 
>> Since this is Travis-only change, I'd like to apply it to 2.14 and 2.13
>> too.  Of course, we need to fix 2.13 before backporting there.
>>
>>  .travis.yml              | 11 +++++++++++
>>  .travis/linux-build.sh   | 11 +++++++++++
>>  .travis/linux-prepare.sh |  6 ++++++
>>  3 files changed, 28 insertions(+)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index 527240a67..819e7669b 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -67,6 +67,17 @@ matrix:
>>        compiler: clang
>>        env: OPTS="--disable-ssl"
>>  
>> +matrix:
>> +  include:
>> +    - env: DEB_PACKAGE=1
>> +      addons:
>> +        apt:
>> +          packages:
>> +            - build-essential
>> +            - fakeroot
>> +            - devscripts
>> +            - equivs
>> +
>>  script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS
>>  
>>  notifications:
>> diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
>> index e0a065291..6981d1d47 100755
>> --- a/.travis/linux-build.sh
>> +++ b/.travis/linux-build.sh
>> @@ -164,6 +164,17 @@ function build_ovs()
>>      fi
>>  }
>>  
>> +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}
>> +    exit 0
>> +fi
>> +
>>  if [ "$KERNEL" ]; then
>>      install_kernel $KERNEL
>>  fi
>> diff --git a/.travis/linux-prepare.sh b/.travis/linux-prepare.sh
>> index 8cbbd5623..71eb347e8 100755
>> --- a/.travis/linux-prepare.sh
>> +++ b/.travis/linux-prepare.sh
>> @@ -2,6 +2,12 @@
>>  
>>  set -ev
>>  
>> +if [ "$DEB_PACKAGE" ]; then
>> +    # We're not using sparse for debian packages, tests are skipped and
>> +    # all extra dependencies tracked by mk-build-deps.
>> +    exit 0
>> +fi
>> +
>>  # Build and install sparse.
>>  #
>>  # Explicitly disable sparse support for llvm because some travis
> 



More information about the dev mailing list