1. 08 May, 2019 1 commit
  2. 07 May, 2019 3 commits
  3. 06 May, 2019 9 commits
  4. 03 May, 2019 2 commits
    • Thomas Haller's avatar
      device/wireguard: fix memleak for NMDeviceWireGuard · 5a1818b6
      Thomas Haller authored
      Fixes: 2148d094 ('core/wireguard: add support for WireGuard peers')
      (cherry picked from commit 56d748eb)
      5a1818b6
    • Thomas Haller's avatar
      platform/tests: workaround routing-rules test failure due to suppress_prefixlen on older kernels · cc438c2a
      Thomas Haller authored
      On Ubuntu 14.04 kernel (4.4.0-146-generic, x86_64) this easily causes
      test failures:
      
          make -j 8 src/platform/tests/test-route-linux \
          && while true; do \
              NMTST_SEED_RANDOM= ./tools/run-nm-test.sh src/platform/tests/test-route-linux -p /route/rule \
              || break; \
          done
      
      outputs:
      
          ...
          /route/rule/1:
          nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=22892021
          OK
          /route/rule/2: >>> failing...
          >>> no fuzzy match between: [routing-rule,0x205ab30,1,+alive,+visible; [6] 0: from all suppress_prefixlen 8 none]
          >>>                    and: [routing-rule,0x205c0c0,1,+alive,+visible; [6] 0: from all suppress_prefixlen -1579099242 none]
          **
          test:ERROR:src/platform/tests/test-route.c:1695:test_rule: code should not be reached
      
      (cherry picked from commit d5a2b709)
      cc438c2a
  5. 23 Apr, 2019 2 commits
    • Thomas Haller's avatar
      tools: fix out-of-tree build test "tools/check-docs.sh" for duplicate generated sources · 19cb8f91
      Thomas Haller authored
      When we do an in-tree-build with autotools and an out-of-tree build
      with meson (all in the same source directory), then we have the
      following files:
      
        libnm-core/nm-core-enum-types.h
        libnm/nm-enum-types.h
        build/libnm-core/nm-core-enum-types.h
        build/libnm/nm-enum-types.h
      
      This caused "tools/check-docs.sh" for `ninja -C build test` to fail,
      because the files are detected twice:
      
          --- command ---
          /data/src/NetworkManager/tools/check-docs.sh /data/src/NetworkManager /data/src/NetworkManager/build
          --- stderr ---
          8a9
          > nm-core-enum-types
          38a40
          > nm-enum-types
          *** Error: libnm classes not included in docs/libnm/libnm-docs.xml ***
          -------
      
      (cherry picked from commit 17adf58d)
      19cb8f91
    • Thomas Haller's avatar
      tools: cleanup path variable in "tools/check-docs.sh" · f81cefde
      Thomas Haller authored
      - don't append the path separator to the SOURCEDIR variable.
        Instead, use the path separator when we need it.
      
      (cherry picked from commit a9b4362f)
      f81cefde
  6. 21 Apr, 2019 4 commits
  7. 20 Apr, 2019 5 commits
  8. 19 Apr, 2019 3 commits
  9. 18 Apr, 2019 11 commits
    • Till Maas's avatar
      contrib/rpm: Provide list of units to %systemd_postun · 51aee380
      Till Maas authored
      %systemd_postun is meant to be run with arguments and Fedora Rawhide
      seems to enforce this now. Therefore provide the units there, too.
      
      https://github.com/NetworkManager/NetworkManager/pull/348
      (cherry picked from commit 7d62f81e)
      51aee380
    • Thomas Haller's avatar
      build/meson: fix location of introspection files · 69b8036f
      Thomas Haller authored
      With glib < 2.51.3, gdbus-codegen does not understand "--output-directory" [1].
      Hence, the generated files are like
      
          "build/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"
      
      instead of
      
          "build/introspection/dbus-org.freedesktop.NetworkManager.Device.WifiP2P.xml"
      
      But gnome.gdbus_codegen() returns a path as if it would be inside
      "build/introspection". Hack around that, by patching the correct path
      otherwise. This is still ugly, because repeated "ninja -C build" calls
      will always try to rebuild this target (because the wrong file name
      is considered).
      
      See also [2].
      
      [1] https://gitlab.gnome.org/GNOME/glib/commit/ee09bb704fe9ccb24d92dd86696a0e6bb8f0dc1a
      [2] https://github.com/mesonbuild/meson/blob/2e93ed58c30d63da8527ff16375ff9e0642e7533/mesonbuild/modules/gnome.py#L1170
      
      (cherry picked from commit ad9e5995)
      69b8036f
    • Thomas Haller's avatar
      platform: fix nm_platform_lnk_gre_to_string() for tap links · ed88c71f
      Thomas Haller authored
      Why didn't we get a compiler warning about this bug?
      At least clang (3.8.0-2ubuntu4, Ubuntu 16.04) warns:
      
          CC       src/platform/src_libNetworkManagerBase_la-nm-platform.lo
        ../src/platform/nm-platform.c:5389:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                            lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
                            ^
      
      Fixes: 4c2862b9 ('platform: add gretap tunnels support')
      (cherry picked from commit dfb899f4)
      ed88c71f
    • Thomas Haller's avatar
      shared: merge branch 'th/shared-library-refactoring' · 0e2abc02
      Thomas Haller authored
      !113
      
      (cherry picked from commit 9740bd6d)
      0e2abc02
    • Thomas Haller's avatar
      build/meson: rename "nm_core_dep" to "libnm_core_dep" · e7836cd1
      Thomas Haller authored
      The library is called "libnm_core". So the dependency should be called
      "libnm_core_dep", like in all other cases.
      
      (cherry picked from commit c27ad37c)
      e7836cd1
    • Thomas Haller's avatar
      shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core · 284ac92e
      Thomas Haller authored
      "libnm-core" implements common functionality for "NetworkManager" and
      "libnm".
      
      Note that clients like "nmcli" cannot access the internal API provided
      by "libnm-core". So, if nmcli wants to do something that is also done by
      "libnm-core", , "libnm", or "NetworkManager", the code would have to be
      duplicated.
      
      Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
      Note that:
      
        0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
           On the other hand, "libnm-libnm-core-aux.la" is not used by
           libnm-core, but provides utilities on top of it.
      
        1) they both extend "libnm-core" with utlities that are not public
           API of libnm itself. Maybe part of the code should one day become
           public API of libnm. On the other hand, this is code for which
           we may not want to commit to a stable interface or which we
           don't want to provide as part of the API.
      
        2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
           and thus directly available to "libnm" and "NetworkManager".
           On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
           and "NetworkManager".
           Both libraries may be statically linked by libnm clients (like
           nmcli).
      
        3) it must only use glib, libnm-glib-aux.la, and the public API
           of libnm-core.
           This is important: it must not use "libnm-core/nm-core-internal.h"
           nor "libnm-core/nm-utils-private.h" so the static library is usable
           by nmcli which couldn't access these.
      
      Note that "shared/nm-meta-setting.c" is an entirely different case,
      because it behaves differently depending on whether linking against
      "libnm-core" or the client programs. As such, this file must be compiled
      twice.
      
      (cherry picked from commit af07ed01)
      284ac92e
    • Thomas Haller's avatar
      shared: move "nm-dbus-compat.h" header to "nm-std-aux/nm-dbus-compat.h" · 87f7e684
      Thomas Haller authored
      (cherry picked from commit 81833358)
      87f7e684
    • Thomas Haller's avatar
      shared: move most of "shared/nm-utils" to "shared/nm-glib-aux" · d984b2ce
      Thomas Haller authored
      From the files under "shared/nm-utils" we build an internal library
      that provides glib-based helper utilities.
      
      Move the files of that basic library to a new subdirectory
      "shared/nm-glib-aux" and rename the helper library "libnm-core-base.la"
      to "libnm-glib-aux.la".
      
      Reasons:
      
       - the name "utils" is overused in our code-base. Everything's an
         "utils". Give this thing a more distinct name.
      
       - there were additional files under "shared/nm-utils", which are not
         part of this internal library "libnm-utils-base.la". All the files
         that are part of this library should be together in the same
         directory, but files that are not, should not be there.
      
       - the new name should better convey what this library is and what is isn't:
         it's a set of utilities and helper functions that extend glib with
         funcitonality that we commonly need.
      
      There are still some files left under "shared/nm-utils". They have less
      a unifying propose to be in their own directory, so I leave them there
      for now. But at least they are separate from "shared/nm-glib-aux",
      which has a very clear purpose.
      
      (cherry picked from commit 80db06f7)
      d984b2ce
    • Thomas Haller's avatar
      shared: move udev helper to separate directory "shared/nm-udev-aux" · 95621586
      Thomas Haller authored
      We built (among others) two libraries from the sources in "shared/nm-utils":
      "libnm-utils-base.la" and "libnm-utils-udev.la".
      
      It's confusing. Instead use directories so there is a direct
      correspondence between these internal libraries and the source files.
      
      (cherry picked from commit 2973d682)
      95621586
    • Thomas Haller's avatar
      shared: split C-only helper "shared/nm-std-aux" utils out of "shared/nm-utils" · 0a6f21fb
      Thomas Haller authored
      "shared/nm-utils" contains general purpose utility functions that only
      depend on glib (and extend glib with some helper functions).
      
      We will also add code that does not use glib, hence it would be good
      if the part of "shared/nm-utils" that does not depend on glib, could be
      used by these future projects.
      
      Also, we use the term "utils" everywhere. While that covers the purpose
      and content well, having everything called "nm-something-utils" is not
      great. Instead, call this "nm-std-aux", inspired by "c-util/c-stdaux".
      
      (cherry picked from commit b434b9ec)
      0a6f21fb
    • Thomas Haller's avatar
      cli,all: merge branch 'th/strsplit-pt4' · e63f835d
      Thomas Haller authored
      !117
      
      (cherry picked from commit df3c7c3f)
      e63f835d