Commit graph

66 commits

Author SHA1 Message Date
Beniamino Galvani 7e1443746b build: rename DNSSEC_TRIGGER_SCRIPT to DNSSEC_TRIGGER_PATH
Rename the define for consistency, since the configure option is named
'dnssec-trigger'.

(cherry picked from commit 8e776955ee)
2018-09-13 14:35:32 +02:00
Beniamino Galvani e86b552e0c build: print both pppd path and plugins path in configure summary
Reported-by: Michael Biebl <biebl@debian.org>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/25
(cherry picked from commit ff837b2686)
2018-09-13 14:35:30 +02:00
Beniamino Galvani 7ba7c1038d build: meson: fix NMSTATEDIR path
Reported-by: Michael Biebl <biebl@debian.org>
(cherry picked from commit 8c77ca1a6d)
2018-09-13 14:35:29 +02:00
Beniamino Galvani 5a0cef2f36 build: meson: uniform handling of rc managers
Handle all rc managers paths through the same code.

(cherry picked from commit 2fd7559819)
2018-09-13 14:35:19 +02:00
Beniamino Galvani 73249e2ef7 build: meson: uniform handling of dhcp client paths
Handle all dhcp client paths through the same code.

(cherry picked from commit 36b0e46146)
2018-09-13 14:35:18 +02:00
Beniamino Galvani 4fd6623161 build: move paths of dhcp clients from config-extra.h to config.h
Some path variable like $(bindir), $(datadir), etc. are special for
autotools and must be handled separately through config-extra.h.

But dhcp path variables are just normal variables defined through
the configure script and should go into config.h.

(cherry picked from commit 087c367d62)
2018-09-13 14:35:15 +02:00
Beniamino Galvani b66607af95 build: remove check on dhcpcd version number
dhcpcd version 6, the first supporting IPv6, was released more than 5
years ago. Remove all checks on version number and IPv6 support.

(cherry picked from commit e0c49d7341)
2018-09-13 14:35:14 +02:00
Beniamino Galvani 365482bf5e build: remove check on dhclient version
dhclient 4.0 was released more than 10 years ago. I think it is
reasonable to expect that nobody is using an older version today.

https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=shortlog;h=refs/tags/v4_0_0
(cherry picked from commit 9e61ea7040)
2018-09-13 14:35:13 +02:00
Beniamino Galvani bda3bb931b build: meson: fix pppd path
Allow specifying a non-existent path.

(cherry picked from commit 794e499ab8)
2018-09-13 14:35:12 +02:00
Beniamino Galvani e860a2e09c build: meson: fix setting iptables/dnsmasq/dnssec-trigger paths
Handle the iptables, dnsmasq and dnssec-trigger paths in the same way
through common code.

The path set by user must be accepted as is, even if does not exist,
because this is a requirement for cross-compilation. When user does
not specify a path, search a predefined set of paths and fall back to
an hardcoded one.

(cherry picked from commit 220dea0948)
2018-09-13 14:35:10 +02:00
Jan Alexander Steffens (heftig) 58e5627909 meson: Use libexecdir for dnssec-trigger-script fallback
Use an `if` to keep line length down.

(cherry picked from commit 5b042b16ca)
2018-09-13 14:33:14 +02:00
Thomas Haller 16ad82f967 release: bump version to 1.13.90 (1.14-rc1) 2018-09-08 10:24:16 +02:00
Thomas Haller e01f7f2c6d build: enable building both crypto backends for tests
If the library is available, let's at least compile both
crypto backends.

That is helpful when developing on crypto backends, so that
one does not have to configure the build twice.

With autotools, the build is only run during `make check`.
Not for meson, but that is generally the case with our meson
setup, that it also builds tests during the regular build step.
2018-09-04 07:38:30 +02:00
Thomas Haller 1dd63580df build/meson: fix build options for suspend-resume
suspend-resume must be selectable, out of for possible options.
We can do auto-detection based on present libraries, but it
shall be selectable. Like it is with autotools.
2018-08-27 17:49:29 +02:00
Thomas Haller 1a9bc22460 build: cleanup build defines for session-tracking
- always define the SESSION_TRACKING_* defines to replace
  "#ifdef" with "#if".

- drop defining the consolekit database path CKDB_PATH in
  config.h. The path was not customizable via configure/meson.

- fix meson build to enable consolekit support for session tracking
  without also enabling logind/elogind session tracking.
  logind/elogind is mutually exclusive, but consolekit session tracking
  goes together just fine.
2018-08-27 17:49:29 +02:00
Beniamino Galvani e96851673b build: fix meson build with -Dppp=false
meson.build:897:15: ERROR: Unknown variable "pppd_plugin_dir".

Fixes: a75ab799e4

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/7
2018-08-15 11:35:44 +02:00
Thomas Haller 72db613ca7 release: bump version to 1.13.3 (development) 2018-08-13 10:00:45 +02:00
Lubomir Rintel 1d7372462d release: bump version to 1.13.2 (development) 2018-07-25 12:39:06 +02:00
Thomas Haller a75ab799e4 build: create "config-extra.h" header instead of passing directory variables via CFLAGS
1) the command line gets shorter. I frequently run `make V=1` to see
   the command line arguments for the compiler, and there is a lot
   of noise.

2) define each of these variables at one place. This makes it easy
   to verify that for all compilation units, a particular
   define has the same value. Previously that was not obvious or
   even not the case (see commit e5d1a71396
   and commit d63cf1ef2f).
   The point is to avoid redundancy.

3) not all compilation units need all defines. In fact, most modules
   would only need a few of these defines. We aimed to pass the necessary
   minium of defines to each compilation unit, but that was non-obvious
   to get right and often we set a define that wasn't used. See for example
   "src_settings_plugins_ibft_cppflags" which needlessly had "-DSYSCONFDIR".
   This question is now entirely avoided by just defining all variables in
   a header. We don't care to find the minimum, because every component
   gets anyway all defines from the header.

4) this also avoids the situation, where a module that previously did
   not use a particular define gets modified to require it. Previously,
   that would have required to identify the missing define, and add
   it to the CFLAGS of the complation unit. Since every compilation
   now includes "config-extra.h", all defines are available everywhere.

5) the fact that each define is now available in all compilation units
   could be perceived as a downside. But it isn't, because these defines
   should have a unique name and one specific value. Defining the same
   name with different values, or refer to the same value by different
   names is a bug, not a desirable feature. Since these defines should
   be unique accross the entire tree, there is no problem in providing
   them to every compilation unit.

6) the reason why we generate "config-extra.h" this way, instead of using
   AC_DEFINE() in configure.ac, is due to the particular handling of
   autoconf for directory variables. See [1].
   With meson, it would be trivial to put them into "config.h.meson".
   While that is not easy with autoconf, the "config-extra.h" workaround
   seems still preferable to me.

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
2018-07-17 17:46:39 +02:00
Jan Tojnar f3c1e7f6ab meson: define PPPD_PATH variable
configure.ac defines it just like it defines other PATH variables
for use with nm_utils_find_helper. Meson for some reason did not.

https://bugzilla.gnome.org/show_bug.cgi?id=796752
2018-07-09 11:27:13 +02:00
Thomas Haller cbeb34d355 release: bump version to 1.13.1-dev after 1.12.0 release
After 1.12.0 is released, merge it back into master so that
1.12.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.12.0 and 1.12-rc*.

Also bump the micro version to 1.13.1-dev to indicate that this is
after 1.12.0 is out.
2018-06-29 18:06:13 +02:00
Thomas Haller 8964dbe8bc release: bump version to 1.12.0 2018-06-29 17:06:25 +02:00
Lubomir Rintel 1491efa5d8 meson: run the check-export.sh in test phase
Targets not depended on by anything are not useful and likely never get run.
2018-06-28 20:38:52 +02:00
Thomas Haller e0d7e29334 release: bump version to 1.11.90 (1.12-rc1) 2018-06-15 17:16:18 +02:00
Thomas Haller fb9edd5edd release: bump version to 1.13.0 (development) 2018-06-15 17:16:18 +02:00
Lubomir Rintel 960632ee7b release: bump version to 1.11.4 (development) 2018-05-31 16:58:10 +02:00
Thomas Haller 7fcf33908b build: define NM_BUILD_SRCDIR and NM_BUILD_BUILDDIR 2018-05-31 15:59:38 +02:00
Lubomir Rintel 320422e4cf build: qualify plugin dir name with a version string
This makes package updates more robust, avoiding in-place replaces of
the plugins.

Previously, if an upgrade transaction was terminated, NetworkManager
library could end up being of a different version than the plugins.
If the user was unfortunate enough to connect using a connection that
required a plugin (say, Wi-Fi), he would be left without a network
connection making it somewhat inconvenient to recover from the botched
upgrade.

This makes the whole situation a little bit less sad.

The VPN plugins are kept where they always have been -- the path is not
qualified with a version number.
2018-05-14 16:05:12 +02:00
Thomas Haller 3934a2c392 build: set LD_LIBRARY_PATH and GI_TYPELIB_PATH variables in run-nm-test.sh
With autotools, we use libtool so that the right libraries are
automatically found. Still, we won't find the right GI typelib.

Add a mechanism so that when make/meson invokes the run-nm-test.sh
runner, it passes the build-root directory.

Also, try to autodetect when invoked manually.
2018-05-11 16:51:20 +02:00
Lubomir Rintel 62363ebc8f Revert "build: qualify plugin dir name with a version string"
This is broken -- looks for VPN plugins in a version-qualified path,
which is wrong and break installed VPN plugins.

This reverts commit 6384ad4ee1.
2018-05-11 10:41:50 +02:00
Lubomir Rintel 6384ad4ee1 build: qualify plugin dir name with a version string
This makes package updates more robust, avoiding in-place replaces of
the plugins.

Previously, if an upgrade transaction was terminated, NetworkManager
library could end up being of a different version than the plugins.
If the user was unfortunate enough to connect using a connection that
required a plugin (say, Wi-Fi), he would be left without a network
connection making it somewhat inconvenient to recover from the botched
upgrade.

This makes the whole situation a little bit less sad.
2018-05-09 12:59:39 +02:00
Lubomir Rintel 6aac441f1c meson: distinguish arch specific and arch neutral lib dir
Plugins go to the arch specific place while conf.d/ and VPN/ are in
lib/. Use the same naming as is used with autoconf.
2018-05-09 12:59:39 +02:00
Lubomir Rintel 84a6010718 meson: quote dist_version properly 2018-05-09 12:59:39 +02:00
Thomas Haller 5d5b9d7ce0 release: bump version to 1.11.3 (development) 2018-04-23 10:43:42 +02:00
Thomas Haller 41abf9f8e8 auth-manager: always compile D-Bus calls to polkit
Supporting PolicyKit required no additional library, just extra code
to handle the D-Bus calls. For that, there was a compile time option
to even stip out that code. Note, that you could (and still can)
configure the system not to use policy-kit. The point was to reduce
the binary size in case you don't need it.

Remove this. I guess, we we aim for such aggressive optimization of
the binary size, we should instead make all device types disablable
at configuration time. We don't do that either and other low hanging
fruits, because it's better to always enable features, unless they
require external dependencies.

Also, the next commit will make more use of NMAuthManager. So, having
it disabled at compile time, makes even less sense.
2018-04-13 09:09:46 +02:00
Beniamino Galvani a2479b95c0 build: meson: use run-nm-test.sh to run tests
Like autotools, use the wrapper script 'run-nm-test.sh' that starts a
separate D-Bus session when needed.
2018-04-12 09:21:10 +02:00
Thomas Haller c4048d4d90 systemd: merge branch systemd into master 2018-04-04 17:47:22 +02:00
Thomas Haller b6059158b5 release: bump version to 1.11.2 (development) 2018-03-15 17:14:20 +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 997cce7c90 build: fix glib dependency to require at least 2.40
Fixes: 8a46b25cfa
2018-02-16 13:26:07 +01:00
Thomas Haller 23e4ef5092 systemd: merge branch systemd into master 2018-02-15 10:26:10 +01:00
Thomas Haller 2a3de3778d build/meson: fix printing DHCP build status 2018-02-11 17:37:22 +01:00
Thomas Haller aed6e28461 trivial: avoid XXX tag and replace by NOTE or FIXME
XXX was used to either raise attention (NOTE) or to indicate
that this is ugly code that should be fixed (FIXME). The usage
was inconsistent.

Let's avoid XXX and use either NOTE or FIXME.
2018-01-23 12:55:33 +01:00
Thomas Haller c7ff37967a version: add reminder comment for adding version macros to configure.ac 2018-01-23 10:57:41 +01:00
Lubomir Rintel 1443bf77e8 all: require jansson 2.5
It was released Sep 19 2013 and Ubuntu 14.04 LTS (trusty) ships it.

https://bugzilla.gnome.org/show_bug.cgi?id=792323
2018-01-18 11:45:24 +01:00
Lubomir Rintel bfff3ecfb0 build: don't install NetworkManager.pc when libnm-glib is disabled 2018-01-16 12:15:51 +01:00
Thomas Haller d2292cc649 wifi: remove configure checks for suitable WEXT header
The check doesn't seem useful, because it does not result in a fallback
or a different build.

Just assume <linux/wireless.h> is valid. In case it is not, we will get a
build failure later. That is just as good.
2018-01-15 20:29:26 +01:00
Thomas Haller cd6116e58f wifi: remove configure checks for suitable linux/nl80211.h header
The check doesn't seem useful, because it does not result in a fallback
or a different build.

Just assume <linux/nl80211.h> is valid. In case it is not, we will get a
build failure later. That is just as good.
2018-01-15 20:29:26 +01:00
Thomas Haller a3f77b259c wifi: always build nl80211 CRIT_PROTOCOL support
netlink's API is stable, and strictly defined by the integer values that make
up commands and attributes. There is little reason do disable a netlink feature
based on compile time detection of the kernel headers.

Either kernel supports it, or it will fail with an appropriate response.

Also, support for NL80211_CMD_CRIT_PROTOCOL_START was merge to kernel
in 2013. Maybe, we should now just always assume support (in the kernel
headers is there). Anyway, don't do that yet, but instead avoid the
defines and use the numeric values directly.
2018-01-15 20:29:26 +01:00
Iñigo Martínez 4fc4c16092 meson: Slightly simplify jansson soname retrieval
The process for retrieving jansson's soname has been slightly
simplified.

https://mail.gnome.org/archives/networkmanager-list/2018-January/msg00054.html
2018-01-12 09:35:55 +01:00