summaryrefslogtreecommitdiff
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* meson: fix build_clean.sh -w meson -w testFrancesco Giudici2019-09-131-0/+1
| | | | Fixes: 6e5385a4ebba ('wwan/tests: test service-providers.xml parser')
* build: make test-service-providers depend on nm-core-enum-types.hLubomir Rintel2019-09-111-0/+2
| | | | | | | | | | | | Fixes build: In file included from ../src/devices/wwan/nm-service-providers.c:10: In file included from ../shared/nm-default.h:279: ../libnm-core/nm-core-types.h:14:10: fatal error: 'nm-core-enum-types.h' file not found #include "nm-core-enum-types.h" ^ 1 error generated. make[2]: *** [src/devices/wwan/src_devices_wwan_tests_test_service_providers-nm-service-providers.o] Error 1
* wwan/tests: test service-providers.xml parserLubomir Rintel2019-09-111-1/+25
| | | | Just a handful of unit tests.
* wwan: add service-providers.xml parserLubomir Rintel2019-09-111-1/+4
| | | | This allows up to look up a default APN if the user doesn't pick one.
* initrd: fix dt testLubomir Rintel2019-09-101-0/+19
|
* COPYING: make sure we ship the relevant license textsLubomir Rintel2019-09-101-0/+3
| | | | | | | | | | | | | This adds LGPL and GFDL texts from the GNU web site and updates the GPL one: COPYING: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt COPYING.LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt COPYING.GFDL: https://www.gnu.org/licenses/old-licenses/fdl-1.1.txt The update to the GPL text is purely cosmetic. However, shipping the exact same file as GNU publishes may help distros that deduplicate the license texts or hardlink duplicates.
* initrd: add devicetree supportLubomir Rintel2019-09-101-0/+22
| | | | | | | | | | | | This adds capability to hand over the network configuration from OpenFirmware (and potentially other boot loaders with openfirmware support such as U-Boot) to NetworkManager. It's done analogously to ACPI/iBFT. In fact, the same ip=ibft command line option is used, adding a more general ip=fw alias. This probably deserves some documentation, but I'm not adding any at this time. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/257
* build: use regexp in gtkdoc --ignore-decorators optionBeniamino Galvani2019-09-061-1/+0
| | | | | | | gtkdoc-scan supports regular expressions in the --ignore-decorators command-line option. Since it is easier to use a regexp than grepping macros from a source file, revert the ugly solution from commit 2d941dc95a1d ('build: fix errors when building with gtk-doc 1.32').
* meson: fix build_clean.sh -w meson -w testFrancesco Giudici2019-09-051-0/+1
| | | | Fixes: 2d941dc95a1d ('build: fix errors when building with gtk-doc 1.32')
* ifupdown/tests: add test with duplicate interfacesThomas Haller2019-08-241-0/+1
| | | | | | | | | | This file causes a crash [1], add it to the tests. Note that the test only check parsing the file and the crash happens in the "upper" layers. So, it's not really a test for the crash. But at least have such a file in our repository. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/235
* meson: fix build_clean.sh -w meson -w testFrancesco Giudici2019-08-221-0/+6
| | | | Fixes: 00bb6cdb4f93 ('build: fix meson warning about path separator in target')
* bluetooth: drop BlueZ 4 support (1)Thomas Haller2019-08-121-5/+2
| | | | | | | BlueZ 5.0 was released in December 2012 and broke API with BlueZ 4. NetworkManager supports Bluez 5 for years already. Of course, version 4 is long gone by now, so remove it.
* systemd: merge branch systemd into masterThomas Haller2019-07-261-1/+2
|\
* | settings: rework tracking settings connections and settings pluginsThomas Haller2019-07-161-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely rework how settings plugin handle connections and how NMSettings tracks the list of connections. Previously, settings plugins would return objects of (a subtype of) type NMSettingsConnection. The NMSettingsConnection was tightly coupled with the settings plugin. That has a lot of downsides. Change that. When changing this basic relation how settings connections are tracked, everything falls appart. That's why this is a huge change. Also, since I have to largely rewrite the settings plugins, I also added support for multiple keyfile directories, handle in-memory connections only by keyfile plugin and (partly) use copy-on-write NMConnection instances. I don't want to spend effort rewriting large parts while preserving the old way, that anyway should change. E.g. while rewriting ifcfg-rh, I don't want to let it handle in-memory connections because that's not right long-term. -- If the settings plugins themself create subtypes of NMSettingsConnection instances, then a lot of knowledge about tracking connections moves to the plugins. Just try to follow the code what happend during nm_settings_add_connection(). Note how the logic is spread out: - nm_settings_add_connection() calls plugin's add_connection() - add_connection() creates a NMSettingsConnection subtype - the plugin has to know that it's called during add-connection and not emit NM_SETTINGS_PLUGIN_CONNECTION_ADDED signal - NMSettings calls claim_connection() which hocks up the new NMSettingsConnection instance and configures the instance (like calling nm_settings_connection_added()). This summary does not sound like a lot, but try to follow that code. The logic is all over the place. Instead, settings plugins should have a very simple API for adding, modifying, deleting, loading and reloading connections. All the plugin does is to return a NMSettingsStorage handle. The storage instance is a handle to identify a profile in storage (e.g. a particular file). The settings plugin is free to subtype NMSettingsStorage, but it's not necessary. There are no more events raised, and the settings plugin implements the small API in a straightforward manner. NMSettings now drives all of this. Even NMSettingsConnection has now very little concern about how it's tracked and delegates only to NMSettings. This should make settings plugins simpler. Currently settings plugins are so cumbersome to implement, that we avoid having them. It should not be like that and it should be easy, beneficial and lightweight to create a new settings plugin. Note also how the settings plugins no longer care about duplicate UUIDs. Duplicated UUIDs are a fact of life and NMSettings must handle them. No need to overly concern settings plugins with that. -- NMSettingsConnection is exposed directly on D-Bus (being a subtype of NMDBusObject) but it was also a GObject type provided by the settings plugin. Hence, it was not possible to migrate a profile from one plugin to another. However that would be useful when one profile does not support a connection type (like ifcfg-rh not supporting VPN). Currently such migration is not implemented except for migrating them to/from keyfile's run directory. The problem is that migrating profiles in general is complicated but in some cases it is important to do. For example checkpoint rollback should recreate the profile in the right settings plugin, not just add it to persistent storage. This is not yet properly implemented. -- Previously, both keyfile and ifcfg-rh plugin implemented in-memory (unsaved) profiles, while ifupdown plugin cannot handle them. That meant duplication of code and a ifupdown profile could not be modified or made unsaved. This is now unified and only keyfile plugin handles in-memory profiles (bgo #744711). Also, NMSettings is aware of such profiles and treats them specially. In particular, NMSettings drives the migration between persistent and non-persistent storage. Note that a settings plugins may create truly generated, in-memory profiles. The settings plugin is free to generate and persist the profiles in any way it wishes. But the concept of "unsaved" profiles is now something explicitly handled by keyfile plugin. Also, these "unsaved" keyfile profiles are persisted to file system too, to the /run directory. This is great for two reasons: first of all, all profiles from keyfile storage in fact have a backing file -- even the unsaved ones. It also means you can create "unsaved" profiles in /run and load them with `nmcli connection load`, meaning there is a file based API for creating unsaved profiles. The other advantage is that these profiles now survive restarting NetworkManager. It's paramount that restarting the daemon is as non-disruptive as possible. Persisting unsaved files to /run improves here significantly. -- In the past, NMSettingsConnection also implemented NMConnection interface. That was already changed a while ago and instead users call now nm_settings_connection_get_connection() to delegate to a NMSimpleConnection. What however still happened was that the NMConnection instance gets never swapped but instead the instance was modified with nm_connection_replace_settings_from_connection(), clear-secrets, etc. Change that and treat the NMConnection instance immutable. Instead of modifying it, reference/clone a new instance. This changes that previously when somebody wanted to keep a reference to an NMConnection, then the profile would be cloned. Now, it is supposed to be safe to reference the instance directly and everybody must ensure not to modify the instance. nmtst_connection_assert_unchanging() should help with that. The point is that the settings plugins may keep references to the NMConnection instance, and so does the NMSettingsConnection. We want to avoid cloning the instances as long as they are the same. Likewise, the device's applied connection can now also be referenced instead of cloning it. This is not yet done, and possibly there are further improvements possible. -- Also implement multiple keyfile directores /usr/lib, /etc, /run (rh #1674545, bgo #772414). It was always the case that multiple files could provide the same UUID (both in case of keyfile and ifcfg-rh). For keyfile plugin, if a profile in read-only storage in /usr/lib gets modified, then it gets actually stored in /etc (or /run, if the profile is unsaved). -- While at it, make /etc/network/interfaces profiles for ifupdown plugin reloadable. -- https://bugzilla.gnome.org/show_bug.cgi?id=772414 https://bugzilla.gnome.org/show_bug.cgi?id=744711 https://bugzilla.redhat.com/show_bug.cgi?id=1674545
* | build: dist test file "test-tpm2wrapped-key.pem"Thomas Haller2019-07-111-0/+1
| | | | | | | | Fixes: 107ba8e00ca5 ('libnm/crypto: accept TPM2-wrapped PEM keys')
* | build: add missing dependency for shared/systemd/src/sharedBeniamino Galvani2019-07-081-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | In file included from ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:21, from shared/systemd/src/shared/dns-domain.c:3: ./shared/nm-default.h:106:10: fatal error: config-extra.h: No such file or directory #include "config-extra.h" ^~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:12933: shared/systemd/src/shared/libnm_systemd_shared_la-dns-domain.lo] Error 1 Fixes: 7d3098ff90ec ('systemd: add dns-domain utils to systemd static library')
* | dhcp/internal: move dhcp options management to shared dhcp codebaseFrancesco Giudici2019-07-051-0/+2
| |
* | dhcp: access internal systemd structure to retrieve dhcp private optionsFrancesco Giudici2019-07-051-0/+2
| |
* | systemd: add dns-domain utils to systemd static libraryBeniamino Galvani2019-07-051-3/+3
| | | | | | | | | | | | | | dns-domain.c contains useful functions for manipulating DNS names. Add it to the systemd static library we build in shared/, similarly to what we already do for other utility files that were originally in src/systemd/src/basic/.
* | dhcp: add nettools dhcp4 clientTom Gundersen2019-07-051-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is inspired by the existing systemd integration, with a few differences: * This parses the WPAD option, which systemd requested, but did not use. * We hook into the DAD handling, only making use of the configured address once DAD has completed successfully, and declining the lease if it fails. There are still many areas of possible improvement. In particular, we need to ensure the parsing of all options are compliant, as n-dhcp4 treats all options as opaque, unlike sd-dhcp4. We probably also need to look at how to handle failures and retries (in particular if we decline a lease). We need to query the current MTU at client startu, as well as the hardware broadcast address. Both these are provided by the kernel over netlink, so it should simply be a matter of hooking that up with NM's netlink layer. Contribution under LGPL2.0+, in addition to stated licenses.
* | systemd: merge branch systemd into masterBeniamino Galvani2019-07-051-1/+2
|\ \ | |/
* | settings: drop ibft settings pluginth/drop-ibft-settings-pluginThomas Haller2019-06-201-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functionality of the ibft settings plugin is now handled by nm-initrd-generator. There is no need for it anymore, drop it. Note that ibft called iscsiadm, which requires CAP_SYS_ADMIN to work ([1]). We really want to drop this capability, so the current solution of a settings plugin (as it is implemented) is wrong. The solution instead is nm-initrd-generator. Also, on Fedora the ibft was disabled and probably on most other distributions as well. This was only used on RHEL. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1371201#c7
* | build/autotools: generate "config-extra.h" via makefile "config-extra.h.mk"Lubomir Rintel2019-06-171-28/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the code that generates "config-extra.h" changes, we want to regenerate the file. Move that code to a separate makefile so we can add a dependency. Otherwise, we'd had to depend on "Makefile", which itself is generated by Makefile.am. Also, depend on "config.h" to regenerate it when ./configure runs and touches that header. This may not cover all cases where ./configure's configuration changes and a regeneration would be due. But such is life. Also, most components depend on this header, so let various .dirstamp files depend on it, so we are sure to build this first. That because, autotools generates dependencies for header files automatically, but that requires that the header file exist. Such automatic dependencies don't work out-of-the-box for generated headers. Co-authored-by: Thomas Haller <thaller@redhat.com>
* | build/autotools: depend "config-extra.h" on "config.h"Thomas Haller2019-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | "config-extra.h" is really just like "config.h", except it works around some limitations of autoconf. If we depend on "Makefile", any changes to "Makefile.am" will cause a full rebuild. We want to avoid that. Instead, depend on "config.h". That one only changes when configure runs again. And that's the better dependancy, because "config-extra.h" is generated based on informations generated by configure (despite being generated by "Makefile").
* | Revert "build: only update config-extra.h if it changes"Thomas Haller2019-06-171-19/+19
| | | | | | | | | | | | | | | | | | | | | | Not touching "config-extra.h" means that the target is rebuild every time (because the timestampt does not get updated). On the other hand, touching it will cause a full rebuild (which we often want to avoid). The right solution is instead to depend on "config.h", which will be done next. This reverts commit 14271d84a0c9707e4efe5e32de9932032949c320.
* | libnm-core: add ovs-dpdk settingLubomir Rintel2019-06-141-0/+2
| |
* | build: only update config-extra.h if it changesLubomir Rintel2019-06-141-19/+19
| | | | | | | | | | | | | | | | This is to avoid updating config-extra.h timestamp very time one touches Makefile.am, because it has a large dependency chain and makes debugging of the Makefile inconvenient. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/180
* | ipv6: add 'disabled' methodBeniamino Galvani2019-06-111-0/+1
| | | | | | | | | | | | | | Add a new ipv6.method value 'disabled' that completely disables IPv6 for the interface. https://bugzilla.redhat.com/show_bug.cgi?id=1643841
* | ifcfg-rh: drop unused "nm-inotify-helper.h"Thomas Haller2019-05-291-3/+2
| | | | | | | | | | | | | | | | | | | | This code is now unused. Also, it does not seem state of the art to me anymore. Drop it, it could always be resurrected if need by, but maybe GFileMonitor could be used instead.
* | ifcfg-rh: use PKCS #12 private key also as client cert in readerBeniamino Galvani2019-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | Before commit e3ac45c02610 the reader set the private key in the setting using the libnm function, which also set the key as client certificate if it was in PKCS #12 format. After the commit, existing connections with a PKCS #12 private key but without a client certificate became invalid. Restore the old behavior. Fixes: e3ac45c02610 ('ifcfg-rh: don't use 802-1x certifcate setter functions')
* | build: don't link dispatcher with generated nmdbus-dispatcher bindingsThomas Haller2019-05-271-21/+28
| | | | | | | | | | | | | | | | We don't need it anymore. Still, for tests let gdbus-codegen run and generate the sources and compile them. We want to keep "dispatcher/nm-dispatcher.xml" and ensure that it is still valid.
* | libnm: add "libnm-core/nm-team-utils.h"Thomas Haller2019-05-231-9/+16
| |
* | shared: add "shared/nm-glib-aux/nm-value-type.h"Thomas Haller2019-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glib has GValue which used for boxing value. Add NMValueType enum, which has a similar purpose, but it's much more limited. - contrary to GValue, the type must be tracked separately from the user-data. That is, the "user-data" is only a pointer of appropriate type, and the knowledge of the actual NMValueType is kept separately. This will be used to have a static list of meta-data that knows the value types, but keeping the values independent of this type information. With GValue this would not be possible. - the use case is much more limited. Just support basic integers, boolean and strings. Nothing fancy. Note that we already do something similar at muliple places. See for example NMVariantAttributeSpec and nm_utils_team_link_watcher_to_string(). These could/should instead use NMValueType.
* | shared: add "shared/nm-glib-aux/nm-json-aux.h"Thomas Haller2019-05-231-0/+2
| | | | | | | | | | This will be a set of JSON related utilities, that are independent of libjansson.
* | build: don't statically link static libraries with other static libraries (6)Thomas Haller2019-05-221-8/+9
| |
* | build: don't statically link static libraries with other static libraries (5)Thomas Haller2019-05-221-9/+17
| |
* | build: don't statically link static libraries with other static libraries (4)Thomas Haller2019-05-221-7/+21
| |
* | build: drop trivial variables from Makefile.amThomas Haller2019-05-221-12/+14
| | | | | | | | | | It just hides what we link. Link against GLIB explicitly instead of indirectly via another variable.
* | build: don't statically link static libraries with other static libraries (3)Thomas Haller2019-05-221-1/+10
| |
* | build: don't statically link static libraries with other static libraries (2)Thomas Haller2019-05-221-4/+11
| |
* | build: don't statically link static libraries with other static libraries (1)Thomas Haller2019-05-221-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we link static libraries together, there must be no duplicate symbols. Since we have a lot of static/intermediate libraries, getting this right is complicated and sometimes leads to ugly solutions. As a new rule: don't let static libraries link with other static libraries. Only binaries and libnm/libnm.la should explicitly link with all the static libraries that they require. There are exceptions: "src/libNetworkManager.la" and "libnm/liblibnm.la". These are static, internal libraries, but they are basically *everything* that ends up in "src/NetworkManager" and "libnm/libnm.la", respecitively. Hence, these static libraries also link against other static libraries. Another exception to this rule is "src/libNetworkManagerTest.la", for similar reasons.
* | build: link src/NetworkManager explicitly with glibThomas Haller2019-05-221-0/+1
| | | | | | | | | | | | We compile src/main.c as part of src/NetworkManager. Explicitly link with glib, because that is required by the source code. Apparently, it also works without this, but still do it for correctness.
* | build: link libnm/liblibnm.la with udev libraryThomas Haller2019-05-221-0/+1
| | | | | | | | | | | | | | libnm/liblibnm.la compiles "libnm/nm-device.c" and "libnm/nm-client.c", both include libudev.h. Let's explicitly link this library with libudev.
* | build: introduce libnm/liblibnm.la as static library for libnm/libnm.laThomas Haller2019-05-221-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have "src/libNetworkManager.la" which is an intermediate static library containing everything that ends up in "src/NetworkManager". Likewise, add "libnm/liblibnm.la" to be the static library that contains everything from "libnm/libnm.la". The point of these libraries is to tie everything together that is used by "src/NetworkManager" and "libnm/libnm.la" so that it also can be used by unit-tests. Thereby, the unit tests will link statically against the code of libnm. The problem is that the unit tests also want to access internal functionality of libnm that is not accessible when dynamically linking. In part, this new library replaces "libnm/libnm-utils.la". The previous name was confusing, because to us everything is an "utils", and it's unclear what the purpose of that library was. Now the purpose should be a bit clearer: liblibnm.la is a step before libnm.la, similar to what libNetworkManager.la is to NetworkManager.
* | build: style cleanups of Makefile.amThomas Haller2019-05-221-47/+91
| |
* | shared: implement _nm_utils_monotonic_timestamp_initialized() in ↵Thomas Haller2019-05-221-0/+1
| | | | | | | | "nm-logging-stub.c"
* | src/tests: rename core's "test-general*" to "test-core*"Thomas Haller2019-05-191-10/+10
| |
* | libnm/tests: rename libnm's "test-general" to "test-libnm"Thomas Haller2019-05-191-10/+7
| |
* | clients/tests: rename clients/common's "test-general" to "test-clients-common"Thomas Haller2019-05-191-6/+6
| |
* | wifi/tests: rename Wi-Fi's "test-general" to "test-devices-wifi"Thomas Haller2019-05-191-7/+7
| | | | | | | | We already have 4 other tests that are named "test-general". Rename.