1. 09 Jan, 2018 1 commit
  2. 08 Jan, 2018 2 commits
    • Thomas Haller's avatar
      build: refine the NETWORKMANAGER_COMPILATION define · 22ef6a50
      Thomas Haller authored
      Note that:
       - we compile some source files multiple times. Most notably those
         under "shared/".
       - we include a default header "shared/nm-default.h" in every source
         file. This header is supposed to setup a common environment by defining
         and including parts that are commonly used. As we always include the
         same header, the header must behave differently depending
         one whether the compilation is for libnm-core, NetworkManager or
         libnm-glib. E.g. it must include <glib/gi18n.h> or <glib/gi18n-lib.h>
         depending on whether we compile a library or an application.
      For that, the source files need the NETWORKMANAGER_COMPILATION #define
      to behave accordingly.
      Extend the define to be composed of flags. These flags are all named
      NM_NETWORKMANAGER_COMPILATION_WITH_*, they indicate which part of the
      build are available. E.g. when building libnm-core.la itself, then
      are available. When building NetworkManager, WITH_LIBNM_CORE_PRIVATE
      is not available but the internal parts are still accessible. When
      building nmcli, only WITH_LIBNM_CORE (the public part) is available.
      This granularily controls the build.
    • Lubomir Rintel's avatar
      core: load jansson on demand · cd476e4d
      Lubomir Rintel authored
      Avoid using it if the symbols clash is detected.
  3. 21 Dec, 2017 1 commit
    • Thomas Haller's avatar
      settings: drop unmaintained ifnet settings plugin of Gentoo · 0474441e
      Thomas Haller authored
      Even Gentoo disables this plugin since before 0.9.8 release
      of NetworkManager. Time to say goodbye.
      If somebody happens to show up to maintain it, we may resurrect it
      If "$distro_plugins=ifnet" was set, configure.ac would use that
      to autodetect --with-hostname-persist=gentoo. Replace that autodetect
      part by checking for /etc/gentoo-release file.
  4. 18 Dec, 2017 1 commit
  5. 16 Dec, 2017 2 commits
    • Inigo Martínez's avatar
      build: Merge no introspection headers with public headers · e2562d2b
      Inigo Martínez authored
      There are three headers `nm-secret-agent-old.h`,
      `nm-vpn-plugin-old.h`, and `nm-vpn-service-plugin.h`, which are
      named as no introspection headers. However, these files also
      join to the rest headers to generate introspection data.
      This patch merges those no introspection headers with the public
    • Inigo Martínez's avatar
      build: Make generate-plugin-docs.pl independent of autotools · 28914f6a
      Inigo Martínez authored
      `generate-plugin-docs.pl` script which is used to parse
      `nm-setting-c*.c` files depends on autotools. This is because it
      parses the `Makefile.am` in order to figure out the setting files
      it needs to parse.
      This patch makes the script independent of autotools by passing
      the necessary setting files by command line instead of parsing the
      `Makefile.am` file. It also changes the autotools' and meson's
  6. 13 Dec, 2017 2 commits
    • Andrew Zaborowski's avatar
      devices/wifi: Track IWD devices, match to NMDeviceIwd objects · a25d99f5
      Andrew Zaborowski authored
      Add the NMIwdManager singleton to be responsible for matching
      NMDeviceIwd objects created from platform devices, to IWD Device dbus
      objects when they appear/disappear.
    • Andrew Zaborowski's avatar
      devices/wifi: Add NMDeviceIwd class to support IWD backend · ec1db966
      Andrew Zaborowski authored
      This is very similar to NMDeviceWifi but simplified to remove the things
      currently unsupported and with calls to nm_platform_wifi_* and
      nm_supplicant_* replaced with IWD DBus API calls.  Only unsecured
      infrastructure-mode networks are supported here.
      [bgalvani@redhat.com: fix compilation error after rebase for
      [thaller@redhat.com: don't use _() macro strings server side.
        Translating strings only makes sense for clients that set environment
        variables accordingly.]
  7. 11 Dec, 2017 2 commits
  8. 08 Dec, 2017 2 commits
    • Thomas Haller's avatar
      build: don't link libnm against libjansson when building --without-json-validation · 79d5a06c
      Thomas Haller authored
      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.
    • Thomas Haller's avatar
      Revert "Makefile: rework team compilation flags" · b1c65d32
      Thomas Haller authored
      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 9d5cd7ea.
  9. 07 Dec, 2017 2 commits
    • Francesco Giudici's avatar
      Makefile: rework team compilation flags · 9d5cd7ea
      Francesco Giudici authored
      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.
    • Lubomir Rintel's avatar
      libnm-core: merge the settings tests into a single one · 9bb30f86
      Lubomir Rintel authored
      Thomas likes this more and who am I to argue.
  10. 06 Dec, 2017 1 commit
  11. 05 Dec, 2017 1 commit
  12. 23 Nov, 2017 2 commits
  13. 16 Nov, 2017 3 commits
    • Thomas Haller's avatar
      build: fix link failure of src/tests/test-systemd (2) · c512a018
      Thomas Haller authored
      Actually, test-systemd only needs siphash24.c, not the
      other parts.
      Fixes: ac95f7da
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      build: include "siphash24.c" source in "nm-hash-utils.c" · ac95f7da
      Thomas Haller authored
      This allows the compiler to inline the siphash24*() functions
      for nm_hash_ptr() and nm_hash_str() (even without LTO).
      This of course only applies to nm_hash_ptr() and nm_hash_str(),
      which are implemented in "nm-hash-utils.c" itself. All other
      nm_hash_*() functions are inline functions in "nm-hash-utils.h",
      and thus these functions can be inlined instead. That is, in
      other cases, the nm_hash_*() function instead can be inlined.
      For nm_hash_ptr() and nm_hash_str() instead we want to inline the
      siphash24*() functions.
      So, no longer compile "siphash24.c" directly. Instead, only
      build "nm-hash-utils.c" which internally #include "siphash24.c".
  14. 15 Nov, 2017 1 commit
    • Beniamino Galvani's avatar
      build: fix 'make distcheck' · 30f679c4
      Beniamino Galvani authored
         CC       src/systemd/src/basic/src_libsystemd_nm_la-string-table.lo
       ../../src/systemd/src/basic/parse-util.c:30:10: fatal error: 'errno-list.h' file not found
       #include "errno-list.h"
      Fixes: 1a2419a0
  15. 13 Nov, 2017 1 commit
    • Thomas Haller's avatar
      all: support route-attribute "onlink" for IPv4 · 0ed49717
      Thomas Haller authored
      Kernel doesn't support it for IPv6.
      This is especially useful, if you combine static routes
      with DHCP. In that case, you might want to get the device-route
      to the gateway automatically, but add a static-route for it.
  16. 09 Nov, 2017 2 commits
  17. 08 Nov, 2017 1 commit
    • Beniamino Galvani's avatar
      build: fix make distcheck · b227198e
      Beniamino Galvani authored
      Fixes the following errors in 'make distcheck':
        GEN      libnm/fake-typelib/NMClient.typelib
       failed to open 'libnm/fake-typelib/NMClient.typelib.tmp': No such file or directory
       make[2]: *** [libnm/fake-typelib/NMClient.typelib] Error 1
        GEN      libnm/fake-typelib/typelibs.c
       ../../libnm/fake-typelib/typelibs.gresource.xml: Failed to locate “NetworkManager.typelib” in any source directory.
       make[1]: *** [Makefile:17790: libnm/fake-typelib/typelibs.c] Error 1
       ERROR: files left in build directory after distclean:
      Fixes: 4d1f090a
  18. 06 Nov, 2017 5 commits
    • Beniamino Galvani's avatar
      ifcfg-rh: persist the connection type for TeamPort connections · 29371043
      Beniamino Galvani authored
      Currently the ifcfg-rh plugin doesn't explicitly store the connection
      type for team slaves and is only able to read back ethernet and vlan
      Leave this unchanged for ethernet and vlan slaves, but store the TYPE
      variable for other connection types (Wi-Fi and Infiniband) so that we
      can properly determine their type when the connection is read.
      (cherry picked from commit 29a57649)
    • Beniamino Galvani's avatar
      ifcfg-rh: persist the connection type for TeamPort connections · 29a57649
      Beniamino Galvani authored
      Currently the ifcfg-rh plugin doesn't explicitly store the connection
      type for team slaves and is only able to read back ethernet and vlan
      Leave this unchanged for ethernet and vlan slaves, but store the TYPE
      variable for other connection types (Wi-Fi and Infiniband) so that we
      can properly determine their type when the connection is read.
    • Thomas Haller's avatar
      build: fix glib-compile-resources for unsupported --internal flag · 84878ac4
      Thomas Haller authored
      Travis' version of glib-compile-resources does not support the
      --internal flag:
          GEN      libnm/fake-typelib/typelibs.c
        Unknown option --internal
        make: *** [libnm/fake-typelib/typelibs.c] Error 1
      We don't really need it anyway, because we have a linker version
      script, that controls symbol visibility.
      Fixes: 4d1f090a
    • Lubomir Rintel's avatar
      build: make dist with fake typelibs · a172b901
      Lubomir Rintel authored
      Fixes: 4d1f090a
    • Lubomir Rintel's avatar
      libnm: register empty NMClient and NetworkManager when loading libnm with GIR · 4d1f090a
      Lubomir Rintel authored
      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.
        $ cat test.js
        const NM = imports.gi.NM;
        print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);
        const NMClient = imports.gi.NMClient;
        print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);
        $ gjs test.js
        (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
        Trace/breakpoint trap (core dumped)
        $ gjs test.js
        Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags"
        (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined
        JS_EvaluateScript() failed
  19. 31 Oct, 2017 2 commits
  20. 30 Oct, 2017 6 commits