1. 18 Oct, 2018 1 commit
    • Thomas Haller's avatar
      shared/tests: add test for "shared/nm-utils" · dfdbd1b3
      Thomas Haller authored
      "shared/nm-utils" is a loose collection of utility functions.
      There is a certain aim that they can be used independently.
      However, they also rely on each other.
      
      Add a test that we can build a minimal shared library with
      these tools, independent of libnm-core.
      dfdbd1b3
  2. 18 Sep, 2018 3 commits
    • Lubomir Rintel's avatar
      initrd: add configuration generator · 9f960955
      Lubomir Rintel authored
      nm-initrd-generator scans the command line for options relevant to network
      configuration and creates configuration files for an early instance of
      NetworkManager run from the initial ramdisk during early boot.
      9f960955
    • Lubomir Rintel's avatar
      initrd: add command line parser · ecc074b2
      Lubomir Rintel authored
      ecc074b2
    • Lubomir Rintel's avatar
      initrd: add iBFT reader · b544f724
      Lubomir Rintel authored
      This is loosely based on nms-ibft-reader, but with some significant
      changes. Notably, it parses /sys/firmware/ibft directly instead of
      iscsiadm output.
      
      iscsiadm is not available on early boot (perhaps it's too large) and
      turns out that parsing sysfs directly is easier and more
      straightforwared anyways. A win-win situation.
      
      It is not useful alone, it's in a separate commit just for the sake of
      easier review.
      b544f724
  3. 13 Sep, 2018 1 commit
  4. 12 Sep, 2018 1 commit
  5. 17 Jul, 2018 1 commit
    • Thomas Haller's avatar
      build: create "config-extra.h" header instead of passing directory variables via CFLAGS · a75ab799
      Thomas Haller authored
      1) the command line gets shorter. I frequently run `make V=1` to see
         the command line arguments for the compiler, and there is a lot
         of noise.
      
      2) define each of these variables at one place. This makes it easy
         to verify that for all compilation units, a particular
         define has the same value. Previously that was not obvious or
         even not the case (see commit e5d1a713
         and commit d63cf1ef).
         The point is to avoid redundancy.
      
      3) not all compilation units need all defines. In fact, most modules
         would only need a few of these defines. We aimed to pass the necessary
         minium of defines to each compilation unit, but that was non-obvious
         to get right and often we set a define that wasn't used. See for example
         "src_settings_plugins_ibft_cppflags" which needlessly had "-DSYSCONFDIR".
         This question is now entirely avoided by just defining all variables in
         a header. We don't care to find the minimum, because every component
         gets anyway all defines from the header.
      
      4) this also avoids the situation, where a module that previously did
         not use a particular define gets modified to require it. Previously,
         that would have required to identify the missing define, and add
         it to the CFLAGS of the complation unit. Since every compilation
         now includes "config-extra.h", all defines are available everywhere.
      
      5) the fact that each define is now available in all compilation units
         could be perceived as a downside. But it isn't, because these defines
         should have a unique name and one specific value. Defining the same
         name with different values, or refer to the same value by different
         names is a bug, not a desirable feature. Since these defines should
         be unique accross the entire tree, there is no problem in providing
         them to every compilation unit.
      
      6) the reason why we generate "config-extra.h" this way, instead of using
         AC_DEFINE() in configure.ac, is due to the particular handling of
         autoconf for directory variables. See [1].
         With meson, it would be trivial to put them into "config.h.meson".
         While that is not easy with autoconf, the "config-extra.h" workaround
         seems still preferable to me.
      
      [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Installation-Directory-Variables.html
      a75ab799
  6. 18 Apr, 2018 1 commit
  7. 04 Apr, 2018 1 commit
  8. 20 Mar, 2018 1 commit
  9. 12 Jan, 2018 1 commit
  10. 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
      later.
      
      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.
      0474441e
  11. 15 Dec, 2017 1 commit
  12. 08 Dec, 2017 1 commit
  13. 07 Dec, 2017 1 commit
  14. 06 Nov, 2017 1 commit
    • 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.
      
      Test:
      
        $ cat test.js
        const NM = imports.gi.NM;
        print (NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);
      
        const NMClient = imports.gi.NMClient;
        print (NMClient.SecretAgentGetSecretsFlags.ALLOW_INTERACTION);
      
      Before:
      
        $ gjs test.js
        1
      
        (gjs:16253): libnm-util-ERROR **: libnm symbols detected; Mixing libnm with libnm-util/libnm-glib is not supported
        Trace/breakpoint trap (core dumped)
        $
      
      After:
      
        $ gjs test.js
        1
        Gjs-Message: JS WARNING: [test.js 5]: reference to undefined property "SecretAgentGetSecretsFlags"
      
        (gjs:16228): Gjs-WARNING **: JS ERROR: TypeError: NMClient.SecretAgentGetSecretsFlags is undefined
        @test.js:5:1
      
        JS_EvaluateScript() failed
      4d1f090a
  15. 29 Jun, 2017 1 commit
  16. 19 May, 2017 1 commit
    • Thomas Haller's avatar
      libnm: add testable libnm/nm-libnm-utils.c file · 8df944c7
      Thomas Haller authored
      Previously, internal parts of libnm were not testable.
      Instead, add "libnm/nm-libnm-utils.c" and "libnm/libnm-utils.la"
      to contain code that can be statically linked with a new
      test "libnm/tests/test-general".
      8df944c7
  17. 19 Apr, 2017 3 commits
  18. 05 Apr, 2017 1 commit
  19. 30 Mar, 2017 2 commits
  20. 24 Nov, 2016 1 commit
  21. 23 Nov, 2016 1 commit
  22. 21 Nov, 2016 3 commits
  23. 10 Nov, 2016 1 commit
    • Thomas Haller's avatar
      build: generate src/NetworkManager.ver during build · 7b78a931
      Thomas Haller authored
      This adds 0.4 seconds to the build time.
      
      You can disable it by setting $NM_BUILD_NO_CREATE_EXPORTS environment
      variable. This is useful in the unexpected case that the script
      is broken.
      Or, if you just want to use a different, non-generated version-script.
      Or, if you want to save 0.4 seconds build-time.
      7b78a931
  24. 09 Nov, 2016 1 commit
    • Lubomir Rintel's avatar
      rdisc: rename to ndisc · 44fca246
      Lubomir Rintel authored
      We'll soon not only do the router discovery, but announce ourselves as a
      reouter. "Neighbor discovery" sounds to be a more appropriate name for
      the class than "Router discovery".
      44fca246
  25. 03 Nov, 2016 1 commit
  26. 19 Oct, 2016 1 commit
  27. 13 Oct, 2016 1 commit
    • Thomas Haller's avatar
      callouts/dispatcher: rename directory callouts · f4246621
      Thomas Haller authored
      Originally, the "callouts" directory contained various programs
      that NetworkManager would call, for example the dhcp helper.
      
      For a while, it only contains nm-dispatcher. Thus rename the directory
      to indicate that it's for dispatcher.
      f4246621
  28. 11 Oct, 2016 1 commit
    • Thomas Haller's avatar
      ifcfg-rh/tests: merge test-ifcfg-rh-utils into test-ifcfg-rh · eab8b06d
      Thomas Haller authored
      We don't need need separate unit tests for basic tests that can
      just run in the same test-run. If you really need to run only
      a particular set of tests, try
        ./src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -p /settings/plugins/ifcfg-rh/utils
      
      Results in less compilation (time), and less binaries to test during
      `make check`.
      eab8b06d
  29. 08 Oct, 2016 1 commit
  30. 06 Oct, 2016 1 commit
    • Thomas Haller's avatar
      wifi: rename NMAccessPoint to NMWifiAP · 44b2044f
      Thomas Haller authored
      NMAccessPoint was in file "nm-wifi-ap.h" with
      method nm_ap_*(). Make the naming consistent.
      
      Also rename "nm-wifi-ap-utils.*" as it contains general
      purpose wifi utilities. No need to have special "ap" utilities.
      
      Same for "test-wifi-ap-utils.c". It just contains general wifi
      tests.
      44b2044f
  31. 22 Apr, 2016 1 commit
  32. 08 Apr, 2016 1 commit
  33. 05 Apr, 2016 1 commit