Commit Graph

593 Commits

Author SHA1 Message Date
Thomas Haller
79d5a06c8b build: don't link libnm against libjansson when building --without-json-validation
Also, don't add the CFLAGS for libjansson to dflt_cppflags_libnm_core.
dflt_cppflags_libnm_core is used also by core and libnm. But those
components do not (directly) link against libjansson. The cannot use
these flags.
2017-12-08 11:09:34 +01:00
Thomas Haller
b1c65d32fe Revert "Makefile: rework team compilation flags"
I don't think we should do this.

- renamining/dropping configure options is still an annoyance,
  because it requires to different ./configure options depending
  on the version. The rename from --enable-teamctl to --enable-team
  might be theoretically nice, but more annoying then helpful.

- There is no strict dependency between --enable-team and
  --enable-json-validation. At most, one could argue that
  when enabling the team plugin (--enable-teamctl), then
  libnm must also be build with --enable-json-validation.
  But in fact, the team plugin will happily work with a
  libnm that doesn't link against libjansson.
  That is --enable-teamctl --disable-json-validation will work
  in practice just fine.
  On the other hand, libnm is a client library to create connection
  profiles, fully supporting team profiles also makes sense if the
  actual plugin is not installed (or build). Thus, --disable-teamctl
  --enable-json-validation certainly makes sense.

At this point, one might ask whether libnm is even still complete without
libjansson. Maybe libnm should *require* --enable-json-validation.
But that is not what the patch was doing, and it would also need
some careful consideration before doing so.

This reverts commit 9d5cd7eae8.
2017-12-08 09:07:30 +01:00
Francesco Giudici
9d5cd7eae8 Makefile: rework team compilation flags
Rename the team functionality enablement from 'teamdctl' to 'team'.
Force jansson lib requirement for team functionality: NetworkManager
requires the teamd daemon to manage team. As teamd depends upon jansson
lib, adding jansson requirement for teaming support in NetworkManager
seems reasonable.
Remove the jansson_validation flag, as the only generic json function in
nmcli (not related to team) was the one to check if a string was in json
format. Anyway, that function is used for team checks only. So, move
also json validation functions under the WITH_TEAM flag.
2017-12-08 00:46:27 +01:00
Beniamino Galvani
07d5c86e78 build: fix wrong jansson prerequisites
Currently there are multiple features that require Jansson support,
but WITH_JANSSON=1 is set only when configuring with
--enable-json-validation.  Therefore a build with
"--disable-json-validation --enable-ovs" fails.

The availability of Jansson (WITH_JANSSON) should only be used:

 - to check if dependent features can be enabled
 - to determine compiler and linker flags in the Makefile
 - in nm-jansson.h to define compatibility functions if needed

Everything else must be controlled by a configure switch.

https://bugzilla.gnome.org/show_bug.cgi?id=790233
2017-11-14 15:56:59 +01:00
Thomas Haller
75e79b2976 release: bump version to 1.11.1-dev after 1.10.0 release
After 1.10.0 is released, merge it back into master so that
1.10.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.10.0 and 1.10-rc*.

Also bump the micro version to 1.11.1-dev to indicate that this is
after 1.10.0 is out.
2017-11-13 14:12:12 +01:00
Thomas Haller
557d83bf2d build: detect compiler features _Generic() and __auto_type in configure script
There is still a fallback detection in "shared/nm-utils/nm-macros-internal.h",
so that VPN-plugins and applet don't need to bother about adding these
configure checks.
2017-11-13 11:35:44 +01:00
Beniamino Galvani
1193fb1b08 release: bump version to 1.10.0 2017-11-10 16:15:23 +01:00
Lubomir Rintel
4d1f090aed libnm: register empty NMClient and NetworkManager when loading libnm with GIR
Register empty "NMClient" and "NetworkManager" GIR modules as soon as libnm is
loaded witch gnome-introspection. This prevents the real modules from being
loaded because they would in turn load libnm-glib and abort() and crash.

In particular this prevents the GNOME shell from crashing with
libnm-glib abort and allows gracefully disabling the extensions which
use the obsolete library.

Test:

  $ cat test.js
  const NM = imports.gi.NM;
  print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);

  const NMClient = imports.gi.NMClient;
  print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);

Before:

  $ gjs test.js
  1

  (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
  Trace/breakpoint trap (core dumped)
  $

After:

  $ gjs test.js
  1
  Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags"

  (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined
  @test.js:5:1

  JS_EvaluateScript() failed
2017-11-06 11:47:05 +01:00
Beniamino Galvani
c2c44d16f4 release: bump version to 1.11.0 (development) 2017-11-03 16:05:12 +01:00
Beniamino Galvani
de6b348bfc release: bump version to 1.9.90 (1.10-rc1) 2017-11-03 15:46:53 +01:00
Lubomir Rintel
6b532fed50 man: add OpenVSwitch overview 2017-10-30 21:46:55 +01:00
Lubomir Rintel
830a5a14cb device: add support for OpenVSwitch devices 2017-10-30 21:46:55 +01:00
juga0
3aba3e38c3 dhcp: add support for dhcpcanon client
https://github.com/NetworkManager/NetworkManager/pull/31
2017-10-30 10:43:10 +01:00
Beniamino Galvani
429a1becbb release: bump version to 1.9.3 (development) 2017-10-25 15:40:00 +02:00
Thomas Haller
650a7022c1 systemd: merge branch systemd into master 2017-10-11 13:29:42 +02:00
Thomas Haller
81f35191ea release: bump version to 1.9.2 (development) 2017-09-05 09:50:56 +02:00
Thomas Haller
484d666485 build: fix nm binutils tool when building with LTO
When building with -flto, we need to use linker plugins.
In case of binutils' nm, it means to prefer gcc-nm if
available.

Like for ranlib and ar, prefer gcc-nm.

- replace AC_PATH_TOOL() by AC_CHECK_TOOLS(). That is consistent
  with what we do for ar,ranlib and suggested on bgo#783311.
- instead of using the variable $BINUTILS_NM, replace it by
  $NM, which is more common according to bgo#783311.
- Keep recognizing $BINUTILS_NM environment, which was introduced
  by commit 8bc88bcc7c. This is purely to keep previous build
  scripts working. Originally I named it "$BINUTILS_NM" because
  using $NM in NetworkManager seemed confusing. But well...

https://bugs.gentoo.org/show_bug.cgi?id=620052
https://bugzilla.gnome.org/show_bug.cgi?id=782525
https://bugzilla.gnome.org/show_bug.cgi?id=783311
2017-06-01 12:51:31 +02:00
Mike Gilbert
a5691020f8 configure: look for pre-generated docs in srcdir
This allows the docs to be found when performing an out-of-source build.

https://mail.gnome.org/archives/networkmanager-list/2017-May/msg00074.html
2017-05-28 17:35:50 +02:00
Thomas Haller
5dd335584c release: bump version to 1.9.1-dev after 1.8.0 release
After 1.8.0 is released, merge it back into master so that
1.8.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.8.0 and 1.8-rc*.

Also bump the micro version to 1.9.1-dev to indicate that this is
after 1.8.0 is out.
2017-05-10 15:13:10 +02:00
Thomas Haller
9c3df9caa3 release: bump version to 1.8.0 2017-05-10 14:57:41 +02:00
Francesco Giudici
faa1b85dab build: set --enable-conckeck as default
connectivity check functionality should be explicitly set as disabled if
not wanted: this prevents building NM without connectivity check support
without any evident warning on systems where libcurl is not installed.

(cherry picked from commit 4e6967e33d)
2017-05-10 09:25:49 +02:00
Francesco Giudici
170e6b7772 build: restore --enable-concheck as default if libcurl is detected
Recently we removed libsoup dependency in favor of libcurl.
Connectivity checking functionality was enabled by defaut when libsoup
was detected: do the same now when detecting libcurl.

(cherry picked from commit ad35fbf3a3)
2017-05-10 09:19:47 +02:00
Francesco Giudici
4e6967e33d build: set --enable-conckeck as default
connectivity check functionality should be explicitly set as disabled if
not wanted: this prevents building NM without connectivity check support
without any evident warning on systems where libcurl is not installed.
2017-05-10 09:11:48 +02:00
Francesco Giudici
7ab6df16a7 build: fix docs building
Fixes: 378cbca6f7
2017-05-05 19:09:34 +02:00
Francesco Giudici
ad35fbf3a3 build: restore --enable-concheck as default if libcurl is detected
Recently we removed libsoup dependency in favor of libcurl.
Connectivity checking functionality was enabled by defaut when libsoup
was detected: do the same now when detecting libcurl.
2017-05-05 12:39:43 +02:00
Francesco Giudici
378cbca6f7 build/trivial: normalize configure.ac formatting/spacing 2017-05-05 12:39:43 +02:00
Lubomir Rintel
258b863130 release: bump version to 1.7.91 (1.8-rc2) 2017-04-20 17:02:31 +02:00
Lubomir Rintel
1d08fba49b release: bump version to 1.7.91 (1.8-rc2) 2017-04-06 13:50:32 +02:00
Lubomir Rintel
1fcb3b40c2 release: bump version to 1.9.0 (development) 2017-03-28 16:34:22 +02:00
Lubomir Rintel
aac581d4ec release: bump version to 1.7.90 (1.8-rc1) 2017-03-28 15:39:21 +02:00
Thomas Haller
0fefcbfb2d build: don't link against libm.so
There are very few places where we actually use floating point
or #include <math.h>.

Drop that library, although we very likely still get it as indirect
dependency (e.g. on my system it is still dragged in by libsystemd.so,
libudev.so and libnl-3.so).
2017-03-23 19:06:02 +01:00
Lubomir Rintel
b3f6bf3daf release: bump version to 1.7.2 (development) 2017-03-23 17:41:04 +01: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
Francesco Giudici
7307dea9c4 connectivity: switch connectivity checking to libcurl
[lkundrak@v3.sk: removed libsoup altogether, implemented TODOs and fixed
the poll condition handling]

Co-authored-by: Lubomir Rintel <lkundrak@v3.sk>
2017-03-22 12:09:39 +01:00
Lubomir Rintel
c05befd5aa dns-manager: use libpsl directly
...instead of via libsoup. This makes it possible to do gTLD suffix checking
even if we're building without libsoup support.
2017-03-22 12:09:39 +01:00
Thomas Haller
22b7282d84 all: use "unsigned" instead of "unsigned int" 2017-03-14 11:26:29 +01:00
Thomas Haller
fada1da80b systemd: merge branch systemd into master 2017-03-09 01:04:15 +01:00
Thomas Haller
86278ebd2e build: add configure check that we have perl and xstlproc for introspection
With --enable-introspection we generate various targets that either
require perl or xsltproc. Error out when building with introspection
enabled but the programs are not found.
2017-03-06 18:40:12 +01:00
Thomas Haller
c0d9243e7e session: make systemd-logind and elogind conflicting build options 2017-02-24 13:06:13 +01:00
Sven Eden
360e80b75f session: add elogind support
https://bugzilla.gnome.org/show_bug.cgi?id=779167
https://bugs.gentoo.org/show_bug.cgi?id=607352
2017-02-24 12:49:32 +01:00
Beniamino Galvani
9dac51d9c0 team: support the ethernet.cloned-mac-address property
The only reliable way of setting a MAC address for the team is through
the "hwaddr" property in the configuration passed to teamd. In order
to rewrite the configuration we need Jansson support; since it is
already a requirement for teamd, let the team plugin depend on it.
2017-02-23 10:07:06 +01:00
Beniamino Galvani
a1b729fddb build: automatically determine Jansson support if not specified
If configure is called without --enable-json-validation or
--disable-json-validation, let's automatically choose a value
depending on the availability of the library.
2017-02-23 10:05:48 +01:00
Lubomir Rintel
258382be12 build: create missing directories for out-of-tree builds
They could be created by dumb luck with dependency tracking, but
apparently some distributions disable that.
2017-02-16 15:55:23 +01:00
Thomas Haller
4de6f603e3 build: use sed instead of AC_SUBST() to generate man/common.ent
Otherwise, substitions are not properly expanded.

For example

- "AC_SUBST(nmrundir, '${runstatedir}'/$PACKAGE, [NetworkManager runtime state directory])"
  gives ${runstatedir}/NetworkManager/resolv.conf

- "AC_SUBST(nmrundir, "${runstatedir}/$PACKAGE", [NetworkManager runtime state directory])"
  gives ${prefix}/var/run/NetworkManager/resolv.conf
2017-02-15 18:36:24 +01:00
Thomas Haller
15177a34be dns: change behavior for "rc-manager=symlink" to preserve "/etc/resolv.conf" as file
The purpose of "rc-manager=symlink" is so that the administrator can point
the "/etc/resolv.conf" as a symlink to a certain file, and thus indicating
that a certain component is responsible to manage resolv.conf, while others
should stay away from it.
For example, systemd-resolved never touches "/etc/resolv.conf", but
expects the admin to setup the symlink appropriately. It also recognizes
whether the symlink points to it's own resolv.conf in /run or to another
component.

Previously, "rc-manager=symlink" would always replace a regular file
with a symlink to "/var/run/NetworkManager/resolv.conf". Only if
"/etc/resolv.conf" is already a symlink somewhere else, NM would not
touch it. This with the exception that if "/etc/resolv.conf" points to
"/var/run/NetworkManager/resolv.conf", it would replace the symlink
with the same link to raise inotify events.

Change behavior so if "/etc/resolv.conf" is already a regular file, keep
it as file.
This means, if you have multiple components that don't care, everybody
can write the "/etc/resolv.conf" (as file) and there is no clear
expressed responsibility.
It was wrong that NetworkManager would convert the file to a symlink,
this should be reserved to the admin. Instead, NetworkManager should
accept that the intent is unspecified and preserve the regular file.
It's up to the admin to replace the symlink to somewhere else (to keep
NM off), or to point it to "/var/run/NetworkManager/resolv.conf", to show
the explicit intent.

The wrong behavior causes dangling symlinks when somebody disables
NetworkManager for good.

https://bugzilla.redhat.com/show_bug.cgi?id=1367551
2017-02-14 17:45:55 +01:00
Thomas Haller
b599f1b743 build: combine handling of setting docs and man pages
Building the man pages via xsltproc requires "docbook.xsl"
which is part of docbook.

Previously, we would build the man pages solely based on
"--enable-introspection", which checks for the presence of
xsltproc, but not docbook. This can lead to build failure
when docbook is not available, but "--enable-introspection"
is given.

Instead of adding yet another configure option to fine-tune
and say "--with-docbook --disable-gtk-doc", just simplify it.

Now, documentation (both man pages and setting docs) will be generated
with "--enable-gtk-doc" and "--enable-introspection".
If the documentation is not about to be generated, pre-generated docs
will be installed if they are available. That is commonly the case
with a source tarball, but not with a git checkout.
Finally, if documentation is nither generated nor pre-generated,
no documentation will be installed *duh*.

This removes the possibility to treat man pages separate from settings
docs. Now you either generate both, install both pre-generated, or don't
get any of them.

https://bugzilla.gnome.org/show_bug.cgi?id=778551
2017-02-14 00:08:22 +01:00
Thomas Haller
5936a8babe build: move code around and reorder conditions
No changes really, except moving related stuff closer together.
2017-02-13 18:12:26 +01:00
Thomas Haller
a981c6c355 build: add m4 macros for --enable-lto and --enable-ld-gc 2017-02-10 12:11:21 +01:00
Thomas Haller
8bc88bcc7c build: allow configuring path to binutils's nm tool during build
`nm` is used by "tools/create-exports-NetworkManager.sh" script.
Alloc configuring an explicit path during configure.

  BINUTILS_NM=/usr/bin/nm ./configure
2017-02-08 16:52:23 +01:00
Thomas Haller
1859b90c48 systemd: merge branch systemd into master 2017-02-06 13:45:51 +01:00