Commit graph

35 commits

Author SHA1 Message Date
Thomas Haller e06b333c43 travis-ci: update build platform to Ubuntu 16.04 (xenial)
We kept building NetworkManager in travis on an ancient
Ubuntu 14.04 (trusty). However, we already cannot install
latest meson, because that would require a newer python
version. The used meson 1.44.1 does not support "link_whole".
At this point, it's getting just too cumbersom.

Update the dependencies.

(cherry picked from commit 9c00eb5cb9)
2019-12-02 17:34:52 +01:00
Lubomir Rintel 455f6dcbdc build/debian: install mobile-broadband-provider-info 2019-09-11 14:54:34 +02:00
Lubomir Rintel 5801f89f4d all: goodbye libnm-glib
This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
The it has been replaced with libnm since NetworkManager 1.0, disabled
by default since 1.12 and no up-to-date distributions ship it for years
now.

Removing the libraries allows us to:

* Remove the horrible hacks that were in place to deal with accidental use
  of both the new and old library in a single process.
* Relief the translators of maintenance burden of similar yet different
  strings.
* Get rid of known bad code without chances of ever getting fixed
  (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
* Generally lower the footprint of the releases and our workspace

If there are some really really legacy users; they can just build
libnm-glib and friends from the NetworkManager-1.16 distribution. The
D-Bus API is stable and old libnm-glib will keep working forever.

https://github.com/NetworkManager/NetworkManager/pull/308
2019-04-16 15:52:27 +02:00
Lubomir Rintel b027723e00 Revert "all: goodbye libnm-glib"
We need this for a little little longer :(

This reverts commit 1de8383ad9.
2019-04-03 08:52:38 +02:00
Lubomir Rintel 1de8383ad9 all: goodbye libnm-glib
This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
The it has been replaced with libnm since NetworkManager 1.0, disabled
by default since 1.12 and no up-to-date distributions ship it for years
now.

Removing the libraries allows us to:

* Remove the horrible hacks that were in place to deal with accidental use
  of both the new and old library in a single process.
* Relief the translators of maintenance burden of similar yet different
  strings.
* Get rid of known bad code without chances of ever getting fixed
  (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
* Generally lower the footprint of the releases and our workspace

If there are some really really legacy users; they can just build
libnm-glib and friends from the NetworkManager-1.16 distribution. The
D-Bus API is stable and old libnm-glib will keep working forever.

https://github.com/NetworkManager/NetworkManager/pull/308
2019-03-19 17:15:15 +01:00
Thomas Haller 763cb8d486 ci: use common script for tests on travis and gitlab
For one, it's not unreasonable that we want to run the same
tests both for gitlab and travis.

Move the actual tests into a script, which is called by both
CI environments.

We still can do something different, based on the environment.
The advantage here is, that the common part will be shared, and
the places where we differ can easily be spot.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/44
2018-11-12 11:29:37 +01:00
Beniamino Galvani 81a565ebe5 build: autodetect ebpf support 2018-09-19 17:23:11 +02:00
Beniamino Galvani 5af7d46be4 travis: disable gtk-doc for meson builds
Introspection can't be enabled on travis due to a GLib bug [1].
Therefore, gtk-doc must be disabled as well.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=774368
2018-09-19 16:03:32 +02:00
Beniamino Galvani 691c71a7f2 build: allow disabling eBPF support in n-acd
Add a configure option to disable eBPF support in n-acd.

Note that, even if eBPF is not supported, n-acd requires a kernel >
3.19, which means that the setsockopt(..., SO_ATTACH_BPF) option must
be defined. To allow building on older kernels without modifying the
n-acd code, we inject the SO_ATTACH_BPF value as a preprocessor define
in the compiler the command line.
2018-09-18 15:32:36 +02:00
Thomas Haller 51d7ae2ba7 build/autotools: fail configure if netconfig/resolveconf tool is not found
If the user explicitly passes --with-netconfig=$PATH or --with-resolvconf=$PATH,
the path is accepted as is. We only do autodetection, if the binary was not found.

In that case, if the binary cannot be found in the common paths fail compilation.

(cherry picked from commit 5b36585a3d)
2018-09-13 14:35:35 +02:00
Thomas Haller 4fc3bdb45c travis: enabling building more optional components during CI with meson
After fixing meson build for these components, enable them for
build in travis.

(cherry picked from commit 0dda7586e4)
2018-09-13 14:35:33 +02:00
Thomas Haller 22e6314dd9 travis: enabling building more optional components during CI
A few components are still disabled. Most notably, team support
which is not available on Ubuntu 14.04 (trusty).

All other components which are disabled are bugs in our build tools.
It should be possible to enable them, but currently breaks on travis.
Those needs additional fixes.

In particular, the DHCP plugins and ifcfg-rh plugin with meson.

Also, netconfig plugin with autotools requires that the path exists.

(cherry picked from commit e893405927)
2018-09-12 15:34:28 +02:00
Thomas Haller 6b8280f6a9 build/travis: build both against crypto "gnutls" and "nss"
We already do matrix-builds with autotools|meson and gcc|clang.

Make the selected crypto backend depending on the compiler, so
that we get more coverage.
2018-09-04 07:38:30 +02:00
Thomas Haller b4e6cf60f3 travis: do out-of-tree build in travis
When developing, we usually do in-tree-builds, so that case is
already better tested in every-day usage. It makes sense for
travis to test the less-well-tested case: the out-of-tree
build with autotools.
2018-07-17 17:46:39 +02:00
Thomas Haller 09facbca39 travis: we don't need de_DE locale for clients tests
clients/tests only uses Polish locale for testing localized output.
No need to generate the Germane locale as well.

(cherry picked from commit 3a58c956c5)
2018-06-18 11:33:16 +02:00
Thomas Haller d4093a3a2c clients/tests: add python test script for nmcli tests
Add a test which runs nmcli against our stub NetworkManager
service and compares the output.

The output formats of nmcli are complicated and not easily understood.
For example how --mode tabular|multiline interacts with selecting
output-fields (--fields) and output modes ([default]|--terse|--pretty).
Also, there are things like `nmcli connection show --order $FIELD_SPEC`.

We need unit tests to ensure that we don't change the output
accidentally.
2018-05-11 16:51:20 +02:00
Thomas Haller 065741c7b2 travis: install meson 0.44.1 for travis' meson build
Latest versions of meson require now Python 3.5+. Not only that meson requires Python3
and thus makes building on some systems cumbersome (RHEL7), it also eagerly bumps
Python3.y requirements.

Install the last working release which works with Python3.4. This fixes
the the travis build failure on Ubuntu 14.04 (trusty):

  Meson works correctly only with python 3.5+.
  You have python 3.4.3 (default, Nov 28 2017, 16:41:13)
  [GCC 4.8.4].
  Please update your environment
2018-03-05 17:47:21 +01:00
Thomas Haller 3fab322a20 netlink: drop libnl3 dependency
From libnl3, we only used the helper function to parse/generate netlink
messages and the socket functions to send/receive messages. We don't
need an external dependency to do that, it is simple enough.

Drop the libnl3 dependency, and replace all missing code by directly
copying it from libnl3 sources. At this point, I mostly tried to
import the required bits to make it working with few modifications.

Note that this increases the binary size of NetworkManager by 4736 bytes
for contrib/rpm build on x86_64. In the future, we can simplify the code
further.

A few modifications from libnl3 are:

- netlink errors NLE_* are now in the domain or regular errno.
  The distinction of having to bother with two kinds of error
  number domains was annoying.

- parts of the callback handling is copied partially and unused parts
  are dropped. Especially, the verbose/debug handlers are not used.
  In following commits, the callback handling will be significantly
  simplified.

- the complex handling of seleting ports was simplified. We now always
  let kernel choose the right port automatically.
2018-02-21 12:08:46 +01:00
Thomas Haller 4bf77ea810 travis: enable matrix build for gcc/clang and autotools/meson 2018-01-10 12:31:44 +01:00
Thomas Haller 58299703a2 travis: add meson builds to travis-ci 2018-01-10 12:31:44 +01:00
Lubomir Rintel b936ccd283 travis: update to Ubuntu 14.04 (trusty)
It is slightly less obsolete. We don't really support precise (12.04)
anyway, the build only works because we steal libndp and perhaps more
from the trusty repository.
2018-01-02 15:37:45 +01:00
Lubomir Rintel 95747d2c73 travis: use apt addon to install packages
Looks better. Also, this would be the only way to install deps if we ever
switch to a non-privileged run (if we manage to rid of "sudo dbus-uuidgen").
2018-01-02 15:37:45 +01:00
Thomas Haller 0474441e22 settings: drop unmaintained ifnet settings plugin of Gentoo
Even Gentoo disables this plugin since before 0.9.8 release
of NetworkManager. Time to say goodbye.

If somebody happens to show up to maintain it, we may resurrect it
later.

If "$distro_plugins=ifnet" was set, configure.ac would use that
to autodetect --with-hostname-persist=gentoo. Replace that autodetect
part by checking for /etc/gentoo-release file.
2017-12-21 10:50:33 +01:00
Thomas Haller 595aaf0f3e all: update compatiblity for older libjansson versions
- nm-ovsdb.c uses json_load_callback(), which is jansson v2.4.
  Hence, it cannot build the OVS plugin in our Travis-CI, which is
  still on Ubuntu Precise. Disable building the plugin in travis and
  add a compiler warning when building against an older version.

- since jansson v2.3, there is json_object_key_to_iter() to implement
  the for-each macros. Use it in json_object_foreach_safe() when
  available.
2017-11-09 17:34:39 +01:00
Thomas Haller e260f2a08a travis: fix travis build to use Ubuntu 12.04 LTS (Precise Pangolin)
Travis used by default Ubuntu 12.04 which is now EOL. Hence, the default
changed.

Eventually, we may want to upgrade the tests to run on Ubuntu 14.04.5
LTS (Trusty Tahr). But for that we need to adjust the travis test
script.

For now, explicitly select precise.

https://blog.travis-ci.com/2017-07-11-trusty-as-default-linux-is-coming?utm_source=web&utm_medium=banner&&utm_campaign=trusty-default
2017-07-25 16:24:34 +02:00
Thomas Haller 4efab710e4 travis: enable gcc+clang compiler for travis builds 2017-05-12 14:29:10 +02:00
Thomas Haller bd530f396e travis: fix build due to missing libcurl library
Since using libcurl for connectivity checks, we failed to build
with connectivity checking on travis. Fix that by installing the
required library (from trusty).

Fixes: 4e6967e33d
(cherry picked from commit 1f2b5a2032)
2017-05-10 13:19:15 +02:00
Thomas Haller e32839838e udev: drop libgudev in favor of libudev
libgudev is just a wrapper around libudev. We can
use libudev directly and drop the dependency for
libgudev.
2017-03-22 12:41:06 +01:00
Thomas Haller 6375c54679 travis: build additional settings plugin in travis-ci
Although the build environment is Ubuntu, we still can build the
non-native settings plugins to test the build.
2016-10-22 17:15:50 +02:00
Beniamino Galvani 82f8a54854 libnm-core: use jansson to compare and check team configurations
Optionally link libnm-core against jansson JSON library and use it to
validate and compare team configurations.
2016-04-18 21:50:51 +02:00
Thomas Haller ad45d232fe travis: update .travis.yml not to run tests when build fails
When building fails, we should not run the tests. They clutter
the output.
2016-02-16 13:01:47 +01:00
Thomas Haller c94a9372fa travis: fix bug in .travis.yml
Fixes: 1408b8c0a2
2016-01-23 16:26:03 +01:00
Lubomir Rintel 1408b8c0a2 travis: add coverity submission
Also, decouple the build from the test run; it looks better in the .yml file as
well as in the travis UI.
2016-01-22 22:12:43 +01:00
Thomas Haller 34050e9c0b travis: move build script to a separate script and improve debugging for failed tests 2016-01-22 11:06:09 +01:00
Lubomir Rintel df27e6d5fd build: add .travis.yml 2015-09-30 13:43:03 +02:00