Commit graph

268 commits

Author SHA1 Message Date
Thomas Haller fada1da80b systemd: merge branch systemd into master 2017-03-09 01:04:15 +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
Beniamino Galvani b42f780e04 core: add support for dummy devices
Add support for creating dummy devices. This commit adds a D-Bus
interface 'org.freedesktop.NetworkManager.Device.Dummy' which is used
primarily for determining the device type but does not carry any
properties.
2017-02-22 21:05:04 +01:00
Beniamino Galvani 1bf2d3b049 libnm-core: add dummy connection setting
The setting must be present in connections with type=dummy. It does
not contain any property.
2017-02-22 21:05:04 +01:00
Thomas Haller 86ac68049a build: ensure libnm-core directory exists for generated files
Since we generate "libnm-core/nm-core-enum-types.h" via GLIB_GENERAED,
there is no obvious place to $(MKDIR_P). Add a dependency to the
.dirstamp of the directory to instruct automake to create the directory.
2017-02-22 13:16:28 +01:00
Thomas Haller 47e55561a7 build: ensure build directories exist for gdbus-codegen targets 2017-02-22 11:48:40 +01:00
Thomas Haller d440958de1 build: don't depend on libnm-core directory for make target 2017-02-22 11:43:21 +01:00
Thomas Haller c2f0764c1e build: add slash to directory name for mkdir
Just for consistency with other locations that call
$(MKDIR_P).
2017-02-22 11:42:38 +01:00
Thomas Haller e824dd34f0 build: fix type on Makefile.am
Fixes: 3cc00dd550
2017-02-21 00:37:48 +01:00
Thomas Haller 3cc00dd550 ifcfg: also read DEFROUTE and GATEWAY from alias files
Also accept DEFROUTE and GATEWAY when they are defined in
alias files -- provided, that they are not yet defined
in the main ifcfg file.
2017-02-20 23:18:36 +01:00
Thomas Haller c79e84368a all: add new "shared/nm-setting-metadata.h" file
"shared/nm-setting-metadata.h" will contain data structures
to handle NM setting properties in a generic way.

For now, this is internal API, but shared between libnm-core (which
extends to libnm, NetworkManager, device-plugins, settings-plugins),
and nmcli.

Related: https://bugzilla.gnome.org/show_bug.cgi?id=732292
2017-02-17 19:51:53 +01:00
Lubomir Rintel dbbcd076fb build: disable dependency tracking on distcheck
This just tests a configuration we don't typically run also potentially
making distcheck a tiny bit faster.
2017-02-16 15:57:03 +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 4179cbb677 build: fix dist-ing "man/common.ent.in" 2017-02-15 23:21:29 +01:00
Thomas Haller 03efe8dba7 build: fix out-of-tree build generating "man/common.ent"
Fixes: 4de6f603e3
2017-02-15 23:21:29 +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 0769a52f05 build: simplify (un)install hooks for man pages 2017-02-14 00:17:32 +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 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
Lubomir Rintel d9ebd31d40 build: install all necessary directories 2017-01-29 12:28:55 +01:00
Lubomir Rintel b4e1d4794e build: don't install /run files
They're volatile and created during runtime.
2017-01-29 12:28:55 +01:00
Thomas Haller cd267cceed build: add missing GLIB_CFLAGS for compiling adsl device plugin 2017-01-29 12:25:05 +01:00
Beniamino Galvani 91d0c036de build: libnm-wwan.so depends on linker script
(cherry picked from commit 8134d72f49)
2017-01-25 17:21:29 +01:00
Thomas Haller 90f097b9f5 build: don't install /etc/dbus-1/system.d/nm-ifcfg-rh.conf when building without ifcfg-rh plugin
(cherry picked from commit cca0ba01e4)
2017-01-18 00:11:21 +01:00
Jiří Klimeš 49e1fefc35 ifcfg-rh: add a basic test for Proxy setting 2017-01-17 14:27:31 +01:00
Beniamino Galvani d252a99fa2 libnm-core: add NMSettingMacsec
The new NMSettingMacsec contains information necessary to establish a
MACsec connection. At the moment we support two different MACsec
modes, both using wpa_supplicant: PSK and EAP.

PSK mode is based on a static CAK key for the MACsec key agreement
protocol, while EAP mode derives keys from a 802.1x authentication and
thus requires the presence of a NMSetting8021x in the connection.
2017-01-16 17:37:14 +01:00
Beniamino Galvani 67adbda83e core,libnm: introduce NMDeviceMacsec
At the moment the device only exposes the current link status, but
cannot create new links.
2017-01-16 17:37:14 +01:00
Thomas Haller f4fb4d271f keyfile/tests: add test for reading dcb connection
Catches previously fixed memleak in read_array_of_uint()
2017-01-05 11:13:17 +01:00
Thomas Haller a8afbb7299 systemd: merge branch systemd into master 2017-01-04 15:55:46 +01:00
Beniamino Galvani a7945ef765 build: don't run GIR tools on private headers
Fixes the warning:

libnm-glib/nm-object-private.h:28: Warning: NMClient: symbol='PropertyMarshalFunc': Unknown namespace for identifier 'PropertyMarshalFunc'
2016-12-20 11:40:12 +01:00
Thomas Haller 0dfb5d2452 build: remove "src/NetworkManager.ver-orig"
Generating "src/NetworkManager.ver" each time seems to work well.
Thus, src/NetworkManager.ver-orig is unused an gets easily out
of date. Just remove it. It's not useful anymore.
2016-12-18 17:45:15 +01:00
Michael Catanzaro 4b6fb82bc5 build: always use the right python for generate-settings-docs.py
Fixes: 6070fe697a

https://bugzilla.gnome.org/show_bug.cgi?id=775768
2016-12-16 09:13:24 +01:00
Lubomir Rintel 0c2a59b08a build: build documentation for o.fd.NM.DnsManager
Fixes: 14105ece56
2016-12-15 20:29:46 +01:00
Francesco Giudici 2ee6b7bf82 ifcfg-rh: merge branch 'fg/dhcp_hostname_bgo775622'
https://bugzilla.gnome.org/show_bug.cgi?id=775622
2016-12-15 11:29:05 +01:00
Thomas Haller 6070fe697a build: allow specifying the python interpreter for building
As build-requirement, we either require
  - python2 with python-gobject-base
  - python3 with python3-gobject-base
Previously, we would require that a plain `python` gives the desired
interpreter version.

If somebody's "/usr/bin/env python" however points to a different
python version, there was no easy way to change it -- aside
resetting the $PATH variable to some desired "python" binary.

Now, you can specify it during configure:

  ./configure PYTHON=python3 ...

This especially matters, if you only have python3-gobject-base
installed, you /usr/bin/python is a symlink to python2.

https://bugzilla.gnome.org/show_bug.cgi?id=775768
2016-12-14 19:00:42 +01:00
Francesco Giudici 6bf69d0fa1 ifcfg-rh/tests: add ipv6 hostname legacy support read test 2016-12-14 16:21:26 +01:00
Beniamino Galvani 597f327b20 dns: merge branch 'bg/dns-dbus-bgo603321'
https://bugzilla.gnome.org/show_bug.cgi?id=603321
2016-12-12 22:27:39 +01:00
Beniamino Galvani a8d6005256 libnm: implement support for DNS manager properties 2016-12-12 22:06:24 +01:00
Beniamino Galvani 14105ece56 dns: export DNS manager D-Bus object
Extend the D-Bus API and introduce a new NMDnsManager interface that
contains all the information related to DNS configuration.

At the moment the new DnsManager object only contains basic properties
describing the current DNS mode and resolv.conf manager.
2016-12-12 21:49:15 +01:00
Thomas Haller a2402acfed build: fix dependency of NetworkManager.ver for libnm-ppp-plugin
Fixes: 025235e00f
2016-12-12 21:38:26 +01:00
Beniamino Galvani 025235e00f ppp: split ppp manager into a plugin
Moving the PPP manager to a separate plugin that is loaded when needed
has the advantage of slightly reducing memory footprint and makes it
possible to install the PPP support only where needed.

https://bugzilla.gnome.org/show_bug.cgi?id=773482
2016-12-06 11:08:11 +01:00
Thomas Haller a80ba4ea09 build: fix gtk-doc/introspection handling for build
- `make dist` requires --enable-gtk-doc --enable-introspection --with-libnm-glib
- --enable-gtk-doc requires --enable-introspection
- --with-nmcli requires either --enable-introspection or pregenerated
   settings-docs.c files from the dist tarball. It does not require
   --enable-gtk-doc.

There is a bit of a problem in that --enable-introspection requires
now xsltproc. However, gobject-introspection does itself not depend
on xsltproc. So, more correct might be a special --enable-doc argument,
that combines --enable-introspection --with-xsltproc. Anyway, that
seems to make it more complicated then it already is so just implicitly
(and surprisingly?) require xsltproc with --enable-introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=775003
2016-11-28 12:43:51 +01:00
Emmanuele Bassi 41ed42d5ba build: do not require GTK-Doc to build nmcli
We can simply check for xsltproc and depend on pygobject and
introspection.

https://bugzilla.gnome.org/show_bug.cgi?id=775003
2016-11-28 12:43:47 +01:00
Thomas Haller a4224b9882 build: combine targets for nm-settings*.xml via pattern rule in Makefile.am 2016-11-24 16:55:17 +01:00
Thomas Haller 7864435c3c build: fix out-of-tree build to find common.ent for documentation
Need to pass --path to xsltproc to find common.ent in the
build-directory.

  $ git clean -fdx && NMTST_MAKE='V=1 -d' ./tools/test-build.sh man/nm-settings-ifcfg-rh.xml
2016-11-24 16:55:17 +01:00
Thomas Haller 5701febb16 build: avoid specifying man/nm-settings.xml paths multiple times
Don't repeat yourself. Aim to specify paths at few places.
2016-11-24 16:55:17 +01:00
Thomas Haller 020f4fb5ba build: combine pattern rule for makefiles 2016-11-24 16:55:17 +01:00
Thomas Haller ab208d69da build: fix lookup "nm-settings-docs-overrides.xml" for out-of-tree build
When building "libnm/nm-settings-docs.xml", we require
"nm-settings-docs-overrides.xml". As we dist the overrides files,
we must consult VPATH to locate the proper version of the file.
2016-11-24 16:55:00 +01:00