1. 08 Feb, 2019 14 commits
  2. 07 Feb, 2019 9 commits
    • Thomas Haller's avatar
      7b8a9a29
    • Thomas Haller's avatar
      gitlab-ci: build with clang and do multiple builds in one test-step · bdac03fe
      Thomas Haller authored
      Also, let one docker image do multiple builds. We fetch a fedora docker
      image, and then install 250 MB of packages. That alone takes a lot of
      time and resources. Instead of running a large number of docker images
      that only do one build, let one image do several builds.
      
      Also, install ccache. Hopefully this way we can benefit from
      building the same sources multiple times.
      
      Also note that building docs does not work currently with clang,
      due to g-ir-scanner. See commit 05568860.
      bdac03fe
    • Thomas Haller's avatar
      gitlab-ci: allow enabling/disabling building documentation in "nm-ci-run.sh" · 389197fa
      Thomas Haller authored
      g-ir-scanner does not support building with clang, due to [1], [2], [3].
      
      It triggers
      
          checking if /usr/bin/g-ir-scanner works... no (compiler failure -- check config.log)
          configure: error: introspection enabled but can't be used
      
      with
      
          clang-7: error: unknown argument: '-fstack-clash-protection'
      
      See also commit 99b92fd9, which adds this configure
      check.
      
      Honor the environment variable WITH_DOCS to allow the caller to overwrite
      the automatic detection that the script does.
      
      [1] https://bugzilla.gnome.org/show_bug.cgi?id=757934
      [2] https://gitlab.gnome.org/GNOME/gobject-introspection/issues/150
      [3] https://gitlab.gnome.org/GNOME/gobject-introspection/commit/c14d0372283abc1b857e38517e791447233e4d62
      389197fa
    • Thomas Haller's avatar
      contrib: install python3-gobject as REQUIRED_PACKAGES · 6505a781
      Thomas Haller authored
      To run the tests with python3, we need python3-gobject.
      
      Note that "contrib/fedora/REQUIRED_PACKAGES" is called by
      "contrib/scripts/nm-ci-run.sh" script to install the packages
      in Fedora.
      6505a781
    • Thomas Haller's avatar
      macros: don't use __externally_visible__ attribute for clang · 06701e95
      Thomas Haller authored
      clang does not support externally_visible:
      
          ../libnm/nm-access-point.c:243:1: error: unknown attribute externally_visible ignored [-Werror,-Wunknown-attributes]
          NM_BACKPORT_SYMBOL (libnm_1_0_6, int, nm_access_point_get_last_seen, (NMAccessPoint *ap), (ap));
          ^
          ../shared/nm-utils/nm-macros-internal.h:1299:74: note: expanded from macro NM_BACKPORT_SYMBOL
          #define NM_BACKPORT_SYMBOL(version, return_type, func, args_typed, args) \
                                                                                   ^
          ../shared/nm-utils/nm-macros-internal.h:1292:17: note: expanded from macro _NM_BACKPORT_SYMBOL_IMPL
          __attribute__ ((externally_visible)) return_type versioned_func args_typed \
                          ^
      06701e95
    • Thomas Haller's avatar
      iwd: drop unused variable in disconnect() · 68d7e638
      Thomas Haller authored
      Fixes: a6f13d3c
      68d7e638
    • Thomas Haller's avatar
      ofono: drop unused variable in disconnect() · 74e9468c
      Thomas Haller authored
      Fixes: 9b935fad
      74e9468c
    • Thomas Haller's avatar
      cli: drop invalid validation for default-routes in nmcli · e95cf643
      Thomas Haller authored
      Currently, default-routes cannot be added like regular static-routes
      as ipv4.routes setting.
      Instead, one has to configure "ipv4.gateway" and "ipv4.never-default".
      That of course should be fixed, for example to configure a default-route
      in different routing tables.
      
      As it is, both nmcli's parse function and libnm's
      NMSettingIPConfig:verify() functions reject default-routes.
      
      But nmcli goes way beyond that, it also rejects all networks with
      "0.0.0.0"/"::" even if their prefix length is not zero. Such routes are
      not default-routes, and nmcli has no business rejecting them. The
      correct way for checking for a default-route is to check the prefix-length
      for zero.
      
      Drop the wrong validation in nmcli.
      
      Note, it may still not be the best idea to add catch-all routes like
      "0.0.0.0/1" and "128.0.0.0/1". It just defeats what counts as a default-route.
      NM has other means (like configuring the route-metric) to handle routing
      in face of multiple interfaces. But sure, whatever works for you.
      
      #114
      !75
      e95cf643
    • Thomas Haller's avatar
      contrib/rpm: quote snapshot/git_sha variables in spec-file · a0b976ac
      Thomas Haller authored
      Otherwise the following fails:
      
          $ ./contrib/fedora/rpm/build_clean.sh -g -s x.1
          ...
          error: parse error in expression
          error: /data/src/_NetworkManager/contrib/fedora/rpm/NetworkManager.20190207-165257.XOkW4i/SPECS/NetworkManager.spec:35: bad %if condition
          ERROR: rpmbuild FAILED
      
      Even with the fix, not all characters are allowed:
      
          $ ./contrib/fedora/rpm/build_clean.sh -g -s x-1
          ...
          error: line 112: Illegal char '-' (0x2d) in: Release: 22165.x-1.25b13e2053.fc29
          ERROR: rpmbuild FAILED
      a0b976ac
  3. 06 Feb, 2019 16 commits
    • Thomas Haller's avatar
      build/meson: add dependency of libnm to libnm-core · db980702
      Thomas Haller authored
      We need to build libnm-core first. Especially, because libnm
      sources require the "libnm-core/nm-core-enum-types.h" header
      to be generated first.
      
      Add a missing dependency.
      db980702
    • Thomas Haller's avatar
      build/meson: cleanup of libnm/meson.build · 052734a8
      Thomas Haller authored
      "libnm/fake-typelib/meson.build" modifies the variable "sources",
      which is defined by the outer "libnm/meson.build" file.
      
      That is confusing. If a variable is not only used within one "meson.build"
      file alone, it should have a unique name. Rename the variable to
      "libnm_utils_sources".
      
      Also avoid local variable "deps" which is only used at one place.
      052734a8
    • Thomas Haller's avatar
      Revert "clients/tests: fix client tests" · 708f8105
      Thomas Haller authored
      This reverts commit dc1187a1.
      708f8105
    • Thomas Haller's avatar
      Revert "cli: verify connections before sending them over to daemon" · e357d150
      Thomas Haller authored
      Just calling nm_connection_verify() is not correct. We need
      nm_connection_normalize() because otherwise we miss out on places
      where we have common normalization steps implemented to fix a
      connection. This is also what server-side is done.
      
      Revert the patch, as it breaks CI tests.
      
      I wonder also whether this is the right place. There are already
      several places in "clients/cli/connections.c" that call verify()
      and normalize(). These places should be unified so that there is
      one place where we complete the connection. And it probably should be
      done as a separate step before the add_new_connection()/update_connection()
      calls.
      
      This reverts commit ca58bcca.
      e357d150
    • Thomas Haller's avatar
      all: don't use "static inline" in source files · d25ed082
      Thomas Haller authored
      For static functions inside a module, the compiler determines on its own
      whether to inline the function.
      
      Also, "inline" was used at some places that don't immediatly look like
      candidates for inlining. It was most likely a copy&paste error.
      d25ed082
    • Thomas Haller's avatar
      all: avoid backslash escape double quote inside single quote · bb341900
      Thomas Haller authored
      It's not necessary.
      bb341900
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · de1741e2
      Thomas Haller authored
      de1741e2
    • Thomas Haller's avatar
      systemd: update code from upstream (2019-02-05) · 8372c0e9
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=6d6308f6774b4c684de7f3aab12cb752c59d5e2f
      
      (
        cd "$SYSTEMD_DIR"
        git checkout "$COMMIT"
        git reset --hard
        git clean -fdx
      )
      
      git ls-files -z :/src/systemd/src/ \
                      :/shared/systemd/src/ \
                      :/shared/nm-utils/unaligned.h | \
        xargs -0 rm -f
      
      nm_copy_sd_shared() {
          mkdir -p "./shared/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
      }
      
      nm_copy_sd_core() {
          mkdir -p "./src/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
      }
      
      nm_copy_sd_nmutils() {
          mkdir -p "./shared/nm-utils/"
          cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
      }
      
      nm_copy_sd_core "src/libsystemd-network/arp-util.c"
      nm_copy_sd_core "src/libsystemd-network/arp-util.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
      nm_copy_sd_core "src/libsystemd-network/network-internal.c"
      nm_copy_sd_core "src/libsystemd-network/network-internal.h"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
      nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
      nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
      nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
      nm_copy_sd_core "src/shared/dns-domain.c"
      nm_copy_sd_core "src/shared/dns-domain.h"
      nm_copy_sd_core "src/systemd/_sd-common.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
      nm_copy_sd_core "src/systemd/sd-event.h"
      nm_copy_sd_core "src/systemd/sd-id128.h"
      nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
      nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
      nm_copy_sd_core "src/systemd/sd-lldp.h"
      nm_copy_sd_core "src/systemd/sd-ndisc.h"
      nm_copy_sd_nmutils "src/basic/unaligned.h"
      nm_copy_sd_shared "src/basic/alloc-util.c"
      nm_copy_sd_shared "src/basic/alloc-util.h"
      nm_copy_sd_shared "src/basic/async.h"
      nm_copy_sd_shared "src/basic/env-file.c"
      nm_copy_sd_shared "src/basic/env-file.h"
      nm_copy_sd_shared "src/basic/env-util.c"
      nm_copy_sd_shared "src/basic/env-util.h"
      nm_copy_sd_shared "src/basic/escape.c"
      nm_copy_sd_shared "src/basic/escape.h"
      nm_copy_sd_shared "src/basic/ether-addr-util.c"
      nm_copy_sd_shared "src/basic/ether-addr-util.h"
      nm_copy_sd_shared "src/basic/extract-word.c"
      nm_copy_sd_shared "src/basic/extract-word.h"
      nm_copy_sd_shared "src/basic/fd-util.c"
      nm_copy_sd_shared "src/basic/fd-util.h"
      nm_copy_sd_shared "src/basic/fileio.c"
      nm_copy_sd_shared "src/basic/fileio.h"
      nm_copy_sd_shared "src/basic/fs-util.c"
      nm_copy_sd_shared "src/basic/fs-util.h"
      nm_copy_sd_shared "src/basic/hash-funcs.c"
      nm_copy_sd_shared "src/basic/hash-funcs.h"
      nm_copy_sd_shared "src/basic/hashmap.c"
      nm_copy_sd_shared "src/basic/hashmap.h"
      nm_copy_sd_shared "src/basic/hexdecoct.c"
      nm_copy_sd_shared "src/basic/hexdecoct.h"
      nm_copy_sd_shared "src/basic/hostname-util.c"
      nm_copy_sd_shared "src/basic/hostname-util.h"
      nm_copy_sd_shared "src/basic/in-addr-util.c"
      nm_copy_sd_shared "src/basic/in-addr-util.h"
      nm_copy_sd_shared "src/basic/io-util.c"
      nm_copy_sd_shared "src/basic/io-util.h"
      nm_copy_sd_shared "src/basic/list.h"
      nm_copy_sd_shared "src/basic/log.h"
      nm_copy_sd_shared "src/basic/macro.h"
      nm_copy_sd_shared "src/basic/mempool.c"
      nm_copy_sd_shared "src/basic/mempool.h"
      nm_copy_sd_shared "src/basic/missing_fcntl.h"
      nm_copy_sd_shared "src/basic/missing_type.h"
      nm_copy_sd_shared "src/basic/parse-util.c"
      nm_copy_sd_shared "src/basic/parse-util.h"
      nm_copy_sd_shared "src/basic/path-util.c"
      nm_copy_sd_shared "src/basic/path-util.h"
      nm_copy_sd_shared "src/basic/prioq.c"
      nm_copy_sd_shared "src/basic/prioq.h"
      nm_copy_sd_shared "src/basic/process-util.c"
      nm_copy_sd_shared "src/basic/process-util.h"
      nm_copy_sd_shared "src/basic/random-util.c"
      nm_copy_sd_shared "src/basic/random-util.h"
      nm_copy_sd_shared "src/basic/refcnt.h"
      nm_copy_sd_shared "src/basic/set.h"
      nm_copy_sd_shared "src/basic/signal-util.h"
      nm_copy_sd_shared "src/basic/siphash24.h"
      nm_copy_sd_shared "src/basic/socket-util.c"
      nm_copy_sd_shared "src/basic/socket-util.h"
      nm_copy_sd_shared "src/basic/sparse-endian.h"
      nm_copy_sd_shared "src/basic/stat-util.c"
      nm_copy_sd_shared "src/basic/stat-util.h"
      nm_copy_sd_shared "src/basic/stdio-util.h"
      nm_copy_sd_shared "src/basic/string-table.c"
      nm_copy_sd_shared "src/basic/string-table.h"
      nm_copy_sd_shared "src/basic/string-util.c"
      nm_copy_sd_shared "src/basic/string-util.h"
      nm_copy_sd_shared "src/basic/strv.c"
      nm_copy_sd_shared "src/basic/strv.h"
      nm_copy_sd_shared "src/basic/time-util.c"
      nm_copy_sd_shared "src/basic/time-util.h"
      nm_copy_sd_shared "src/basic/tmpfile-util.c"
      nm_copy_sd_shared "src/basic/tmpfile-util.h"
      nm_copy_sd_shared "src/basic/umask-util.h"
      nm_copy_sd_shared "src/basic/utf8.c"
      nm_copy_sd_shared "src/basic/utf8.h"
      nm_copy_sd_shared "src/basic/util.c"
      nm_copy_sd_shared "src/basic/util.h"
      8372c0e9
    • Thomas Haller's avatar
      shared/n-acd: minor change to make sources identical to upsteam · f6b6daa4
      Thomas Haller authored
      Partly revert the change from 35171b3c.
      It's not our place to patch sources that we import via git-subtree.
      f6b6daa4
    • Thomas Haller's avatar
      shared/n-acd: re-import from latest nettools/n-acd · a3fe99be
      Thomas Haller authored
        $ git subtree pull --prefix shared/n-acd/ git@github.com:nettools/n-acd.git master --squash
      
      Import commit '9eb7bf717309fefb253d87e6a1af6660e977d791'.
      a3fe99be
    • Thomas Haller's avatar
      Squashed 'shared/n-acd/' changes from a409492679..9eb7bf7173 · 7e776266
      Thomas Haller authored
      9eb7bf7173 trivial: fix spelling in code comments
      
      git-subtree-dir: shared/n-acd
      git-subtree-split: 9eb7bf717309fefb253d87e6a1af6660e977d791
      7e776266
    • Thomas Haller's avatar
      shared/c-siphash: re-import from latest c-util/c-siphash · cec7d2b0
      Thomas Haller authored
        $ git subtree pull --prefix shared/c-siphash/ git@github.com:c-util/c-siphash.git master --squash
      
      Import commit '211cfc5abc3813cddd10d237ba9d843b8d3a8995'.
      cec7d2b0
    • Thomas Haller's avatar
      Squashed 'shared/c-siphash/' changes from 24e301e329..211cfc5abc · 4dd7869b
      Thomas Haller authored
      211cfc5abc fix spelling in API documentation and code comment
      b24d2e2048 build: only run full matrix on default CI
      8f1fdb72a0 build: update build system
      
      git-subtree-dir: shared/c-siphash
      git-subtree-split: 211cfc5abc3813cddd10d237ba9d843b8d3a8995
      4dd7869b
    • Thomas Haller's avatar
      shared/c-rbtree: minor change to make sources identical to upsteam · cf43ce53
      Thomas Haller authored
      Partly revert the change from 35171b3c.
      It's not our place to patch sources that we import via git-subtree.
      cf43ce53
    • Thomas Haller's avatar
      shared/c-list: re-import from latest c-util/c-list · 84f1dac1
      Thomas Haller authored
        $ git subtree pull --prefix shared/c-list/ git@github.com:c-util/c-list.git master --squash
      
      Import commit 'dda36d30c7d655b4d61358519168fa7ce0e9dae9'.
      84f1dac1
    • Thomas Haller's avatar
      Squashed 'shared/c-list/' changes from 071841c28d..dda36d30c7 · cd9f57a1
      Thomas Haller authored
      dda36d30c7 build: update build system
      
      git-subtree-dir: shared/c-list
      git-subtree-split: dda36d30c7d655b4d61358519168fa7ce0e9dae9
      cd9f57a1
  4. 05 Feb, 2019 1 commit