Commit Graph

527 Commits

Author SHA1 Message Date
Beniamino Galvani
fb2ca0ce3d config: don't set default plugins in nm-config keyfile
Like all other keys that can have a default value, substitute the
default only when needed. In this way, we can tell later if the
value comes from configuration file or if it's the default value.

Also, rename CONFIG_PLUGINS_DEFAULT to NM_CONFIG_PLUGINS_DEFAULT.
2016-10-04 14:50:01 +02:00
Thomas Haller
ad0f403f9d dhcp: refactor loading of DHCP plugins
The DHCP plugins are linked statically and don't have a plugin mechanism
to be loaded from a shared library. Change the _nm_dhcp_client_register()
mechanism to something more static.

Also, only link the plugins into the binary if they are actually
enabled. Previously, they would always be linked in (and always
register themself). However, nm_dhcp_dh*_get_path() would return NULL
which made the plugin unusable.

The autoconf code to detect the DHCP plugins is still not stellar, but
seems to work well enough for now. At least, we log the result of the
detection at the end of the configure-script, so a user can at least
notice what happend.
2016-10-04 11:41:20 +02:00
Lubomir Rintel
f605262792 build: enable JSON validation unless explicitly disabled
This makes it easier for packagers to make sure they're not building
without a feature unintentionally.
2016-09-27 18:37:22 +02:00
Thomas Haller
b33aacbc91 build: move detection of NM_GIT_SHA to separate "m4/git-sha-record.m4"
We want to embed the current commit-id in the ./configure script.
That way the generated ./configure file in the source tarball
references the commit-id from which the tarball was created.

Then, in a second step, a script can check ./configure to find
the parent commit. This is for example done by the 'makerepo.sh'
script.

This is generally useful, and also done by network-manager-applet
and libnl3 projects. Move the function to a separate m4 macro
to reuse it. It should also be re-used in NetworkManager's VPN plugins.
2016-09-14 14:11:07 +02:00
Thomas Haller
2a314557c7 release: bump version to 1.5.1-dev after 1.4.0 release
After 1.4.0 is released, merge it back into master so that
1.4.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.4.0 and 1.4.0-rc1.

Also, the closest branch parent of master and nm-1-4 branch
becomes 1.4.0 tag.

Also bump the micro version to 1.5.1-dev to indicate that this is
after 1.4.0 is out, otherwise `git describe` uses the 1.4.0 tag.
2016-08-25 14:58:06 +02:00
Lubomir Rintel
93b4119a81 release: bump version to 1.4.0 2016-08-24 18:48:19 +02:00
Lubomir Rintel
40d5749ec1 release: bump version to 1.3.91 (1.4-rc1) 2016-08-17 16:21:52 +02:00
Lubomir Rintel
b2eb64a439 release: bump version to 1.5.0 (development) 2016-08-17 16:20:42 +02:00
Thomas Haller
1f2eeb85d8 build: rename $(LIBDL) to $(DL_LIBS) and modify detection 2016-08-15 17:23:41 +02:00
Beniamino Galvani
e4b2c989dc build: fix build with '--with-suspend-resume=upower'
Now we have a single file for all suspend APIs and the selection is
done through the preprocessor: remove stale AM_CONDITIONALs and define
SUSPEND_RESUME_UPOWER when needed.

Fixes: c76eb3e8f7
2016-08-04 16:30:14 +02:00
Beniamino Galvani
5c45327056 release: bump version to 1.3.90 (1.4-beta1) 2016-08-03 09:51:02 +02:00
Lubomir Rintel
3bed742771 build: fix the logging backend default option name
It's --with-config-logging-backend-default, not --with-logging-backend-default.
2016-07-28 17:02:04 +02:00
Thomas Haller
e8b7d3e01d build: print pppd plugin directory in ./configure summary 2016-07-04 22:23:07 +02:00
Dan Williams
3ef9b6aa41 build: show ofono enablement status in configure summary 2016-06-28 17:34:42 +02:00
Thomas Haller
44ce13c786 wwan: don't compile ofono support by default and mark as experimental
At least, there are assertions that fail and must be fixed.
Still, let's merge the (incomplete) ofono patches early
to have something that can be incrementally improved.

However, for now mark it as experimental and disable it by
default.
2016-06-28 17:34:42 +02:00
Mathieu Trudel-Lapierre
a6e81af87f wwan: add support for using oFono as a modem manager
This patch adds core wwan support for ofono, as used by Ubuntu Touch.

Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>

https://mail.gnome.org/archives/networkmanager-list/2016-June/msg00089.html
2016-06-28 17:34:42 +02:00
Didier Raboud
f90abce4d5 wwan: check at runtime whether to start ModemManager
This makes NetworkManager use runtime detection to manage the
ModemManager lifecycle when not run by systemd. Under systemd, we expect
the ModemManager service to be started by systemd, under non-systemd, we
use the dbus activation feature to start ModemManager.

[thaller@redhat.com: original patch heavily modified to check for available
 libsystemd library]

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770871
https://mail.gnome.org/archives/networkmanager-list/2016-June/msg00086.html
2016-06-17 12:21:20 +02:00
Beniamino Galvani
01540cf1d3 build: add options to compile with address/undefined sanitizers
This adds two new options to the configure scripts to compile NM,
clients and libraries with the address and undefined-behavior
sanitizers available in recent GCC versions. Clang is not supported at
moment.
2016-06-03 22:19:38 +02:00
Beniamino Galvani
b5daaf43bc build: configure.ac: always set -fno-strict-aliasing
We break the aliasing rules in the code, and thus the flag should
always be enabled to prevent wrong optimizations, even without
--enable-more-warnings.
2016-06-03 22:19:37 +02:00
Beniamino Galvani
76eca6aca9 build: configure.ac: replace NM_COMPILER_FLAG with CC_CHECK_FLAG_APPEND 2016-06-03 22:19:37 +02:00
Thomas Haller
2ca21e150a configure/trivial: prettify "if" in configure.ac 2016-06-03 10:27:07 +02:00
Thomas Haller
51791c4772 dns: add configure option "--with-config-dns-rc-manager-default" for default of main.rc-manager
Downstream might want to choose a different default value for
main.rc-manager setting (and it can does so, by compiling with
explicit resolvconf or netconfig support).

Make the default configurable at build-time and also embed it into
the manual page of "NetworkManager.conf".

https://bugzilla.redhat.com/show_bug.cgi?id=1337222
2016-05-23 21:49:42 +02:00
Lubomir Rintel
c8f65e95fd build: garbage collect unused symbols by default
GCC can place each symbols into separate sections making it possible for
ld to discard unneeded sections (and thus symbols afterwards). This achieves
almost the same size benefits as LTO without the huge performance
penalty (and the undefined behavior with -g).

The cost of more section headers in .o files seems to be negligible.

Before:

  359.73user 71.94system 1:29.67elapsed 481%CPU (0avgtext+0avgdata 137948maxresident)k

     text        data     bss     dec     hex filename
  2772228       74848    9272 2856348  2b959c src/NetworkManager

With LTO:

  740.37user 94.89system 4:13.83elapsed 329%CPU (0avgtext+0avgdata 118316maxresident)k

     text        data     bss     dec     hex filename
  2435437       74224    8704 2518365  266d5d src/NetworkManager

With --gc-sections:

  365.63user 72.34system 1:30.12elapsed 485%CPU (0avgtext+0avgdata 138016maxresident)k

     text        data     bss     dec     hex filename
  2498498       74040    8408 2580946  2761d2 src/NetworkManager
2016-05-19 11:06:55 +02:00
Lubomir Rintel
071b4fca61 build: prefer LTO-aware ar and ranlib
This actually fixes --with-lto.
2016-05-18 20:53:05 +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
Lubomir Rintel
350d96a9ee release: bump version to 1.3.0 (development) 2016-04-05 22:22:58 +02:00
Lubomir Rintel
ccf1d5bd94 dbus: remove the telepathy annotations
We now generate documentation with gdbus-codegen and these are now
useless.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
0fc0cc68fc man: move nmcli-examples to section 7
It really is not a configuration file and doesn't belong to section 5.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
60582bf443 man: include version from a XML entity
This way it's consistently used across all manual page without a need
for XSL templating.

Also, the entities file could in future possibly be used to template the
build-time configurables such as filesystem paths or bug tracker URL.
2016-04-05 14:37:51 +02:00
Lubomir Rintel
f457f4ef83 man: drop nm-system-settings.conf.5
It's long deprecated and the last roff manual page.

Instead, NetworkManager.conf(5) documents the file. Let's just link that
one.
2016-04-05 14:37:50 +02:00
Lubomir Rintel
8a9350f3b0 man: convert nm-online(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Lubomir Rintel
5216307b5a man: convert nmtui(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Lubomir Rintel
b19e4d37b6 man: convert nmcli(1) manual to docbook refentry 2016-04-05 14:37:50 +02:00
Robby Workman
c0a506648f settings: add persistent hostname support for Slackware 2016-03-29 15:51:34 -05:00
Lubomir Rintel
24caeb33b7 release: bump version to 1.1.92 (1.2-beta3) 2016-03-29 16:23:21 +02:00
Lubomir Rintel
fa16fb1808 build: install udev files under prefix
It should really be in /usr/lib, not /lib. Not a real issue, since the two are
usually links, but the latter is supposably for compatibility only. This also
installs into correct place when configured with a different --prefix.
2016-03-14 16:32:14 +01:00
Thomas Haller
a8bc65b1a1 systemd: integrate sd-event into glib main loop
We should not try to reimplement sd-event based on glib,
instead we should hook sd-event into the glib mainloop.
2016-03-11 09:28:12 +01:00
Thomas Haller
24582b65e1 logging: change logging format to drop "[file:line] func():" part
Choose a new logging format.

- the logging format must not be configurable and it must be the
  same for all backends. It is neat that journal supports additional
  fields, but an average user still posts the output of plain
  journalctl, without "--output verbose" (which would also be hard
  to read).
  Also, we get used to a certain logging format, so having different
  formats is confusing. If one format is better then another, it should
  be used for all backends: syslog, journal and debug.
  The only question is, what is the best format.

- the timestamp: I find it useful to see how much time between two
  events passed. The timestamp printed by syslog doesn't have sufficient
  granularity, and the internal journal fields are not readily available.
  We used to print the timestamps for <error>, <debug> and <trace>,
  but ommited them for <info> and <warn> levels. We now print them for
  all levels, which has a uniform alignment.

- the location: the "[file:line] func():" part is mostly redundant
  and results in wide lines. It also causes a misalignment of the
  logging lines, or -- as I recently added alignment of the location --
  it results in awkward whitespace and truncation.
  But the location is really just necessary because our logging messages
  are bad:
    "<debug> [1456397604.038226] (9) 11-dhclient succeeded"
  The solution to this is not
    "<debug> [1456397604.038226] [nm-dispatcher.c:358] dispatcher_results_process(): (9) 11-dhclient succeeded"
  but a properly worded message:
    "<debug> [1456397604.038226] dispatcher: request #9, script 11-dhclient succeeded"

- logging-message: we need to write better logging messages.
  I like some form of "tags" that are easy to grep:
    "platform: signal: link changed: 4: ..."
  Downside is, that this is not nice to read as a full sentence.
  So, especially for <info> and <warn> logging, more human readable
  messages are better.
  We should find a compromise, where the log message explains what
  happens, but is still concise and contains patterns that are easy
  to grep and identify visually.

https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00077.html
2016-03-01 15:20:57 +01:00
Beniamino Galvani
e0abe36ae7 release: bump version to 1.1.91 (1.2-beta2) 2016-03-01 13:14:46 +01:00
Thomas Haller
b76d4b6b09 Revert "build: fix detection of NSS library on Debian"
Sorry, it was not Debian's fault. It is only libnss-devel package on
Ubuntu 12.04/Precise [1].

Revert the workaround and avoid the failure by dropping the version check altogether.
NSS 3.11 is from 2006, it's unlikely a user tries to build current NetworkManager
against such an old version of the library.

[1] https://bugs.launchpad.net/ubuntu/+source/nss/+bug/1547147

This reverts commit d48790cbec.
2016-02-18 19:50:51 +01:00
Thomas Haller
d48790cbec build: fix detection of NSS library on Debian
Debian added an epoch "2" to the version of NSS library. Fix configure
to account for that.

Related: https://launchpad.net/debian/sid/+source/nss
2016-02-18 12:44:21 +01:00
Dan Williams
701c05ad69 build: remove spurious comma from configure.ac 2016-01-20 12:21:40 -06:00
Lubomir Rintel
83d043b112 release: bump version to 1.1.90 (1.2-beta1) 2016-01-19 14:45:36 +01:00
Michael Biebl
39fc73eed9 build: use symlinks for nmtui
Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui.

https://bugzilla.gnome.org/show_bug.cgi?id=759824
2016-01-07 17:41:53 +01:00
Thomas Haller
db80ec05ab build: rename directory "include" to "shared"
Up to now, the "include" directory contained (only) header files that were
used project-wide by libs, core, clients, et al.

Since the directory now also contains a non-header file, the "include"
name is misleading. Instead of adding yet another directory that is
project-wide, with non-header-only content, rename the "include"
directory to "shared".
2015-12-24 11:42:37 +01:00
Lubomir Rintel
7873b1761d build: bump soup requirement to 2.40
The dns-manager uses some newer API.
2015-12-10 19:17:56 +01:00
Lubomir Rintel
15f1cd09d9 build: use soup 2.32
We already use 2.32 API and also use API that was replaced with new one after
2.42 and deprecated in 2.53.
2015-12-10 18:53:49 +01:00
Thomas Haller
14bb9419a0 examples: add README for python-networkmanager NetworkManager library 2015-12-07 16:06:46 +01:00
Thomas Haller
d5a8401686 initscript: remove all distribution initscripts
These initscripts weren't modified for a long time. Are they just
unused or flawless? It seems they are no longer best-practice
(e.g. NetworkManager supports reloading configuration via SIGHUP,
which none of these scripts implement).

Nowadays some distributions moved to systemd and quite possible
nobody uses these scripts. Also, any potential downstream user
probably has an adjusted copy of them in their repositories.

Just remove them.

https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00003.html
2015-12-07 13:37:30 +01:00
Lubomir Rintel
90683fcb3a build: substitute config directory in Makefile
The autoconf substitutions should be expanded in Makefiles and shell scripts
only, does not work well in XML.

Fixes: 3e0b590e10
2015-11-27 14:18:34 +01:00