1. 08 Jan, 2019 3 commits
  2. 07 Jan, 2019 31 commits
    • Thomas Haller's avatar
      contrib/rpm: remove unused 00-server-dhcp-client-id.conf configuration snippet · 1ffa4087
      Thomas Haller authored
      Now that the default for the internal client is "mac", we don't need
      this snippet anymore. Drop it.
      
      Don't renumber the source files but leave the gap at Source3. Everytime
      we add config snippets the numbers need to be shuffled, so don't fill
      the gap and maybe use it in the future.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1661165
      1ffa4087
    • Thomas Haller's avatar
      dhcp: default ipv4.dhcp-client-id of internal plugin to "mac" · cfd696cc
      Thomas Haller authored
      The "ipv4.dhcp-client-id" is configurable per-profile and the default
      value can be overwritten via connection defaults in NetworkManager.conf.
      
      For "dhclient" DHCP plugin, the ultimate default for "ipv4.dhcp-client-id"
      is determined by dhclient itself, or possibly by user configuration from
      "/etc/dhcp".
      
      For the "internal" DHCP plugin, the default must be decided by
      NetworkManager. Also, the default here is important, as we preferably
      won't change it anymore. That is because a changing the client-id
      will result in different IP addresses after upgrade of NetworkManager
      version. That should be avoided.
      
      Still, change it now. If a downstream does not want this, it either needs
      to patch the sources or add a configuration snippet like:
      
          [connection-internal-dhcp-client-id-duid]
          match-device=dhcp-plugin:internal
          ipv4.dhcp-client-id=duid
      
      The reason to change from the previous default "duid" to "mac" are the
      following:
      
      - "duid" is an RFC 4361 compatible client-id ([1]) and "mac" is defined
      in RFC 2132.
      
      - "duid" cannot (easily) be predicated a-priori as it is a hash of the
      interface-name and "/etc/machine-id". In particular in cloud and server
      environments, admins often prefer "mac" as they do know the MAC address
      and pre-configure the DHCP server accordingly.
      
      - with "dhclient" plugin, the default is decided by dhclient package or
      user configuration in "/etc/dhcp". However, in fact the default is often
      "client-identifier hardware" (for example on RHEL/CentOS).
      
      - for RHEL/CentOS we require a way to select "mac" as default. That was
      done by installing a configuration snippet via the NetworkManager-config-server
      package. It's confusing to have the default depend on a package. Avoid
      that. Also, users required "mac" in certain scenarios, but no users
      explicitly asked for "duid" as default.
      
      - our "duid" implementation generates a 32 bit IAID based on a hash of the
      interface-name, and only 8 bytes entropy that contains a hash
      of "/etc/machine-id". The point is, that is not a lot of entropy to
      avoid conflicting client-ids. Another point is, that the choosen algorithm
      for "duid" is suitable for RFC 4361, but it's only one of many possibly
      implementations. Granted, each possibility has up and downsides but selecting
      one of them as default seems wrong (given that it has obvious downsides
      already). For "mac" there is only one straight-forward way to implement
      it.
      
      - RFC 7844 (Anonymity Profiles for DHCP Clients) is not yet supported by
      NetworkManager. But we should not select a default client-id which
      counteracts anonymit. Choosing "mac" does not reveal information which
      is not already exposed.
      
      [1] https://tools.ietf.org/html/rfc4361#section-4
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1661165
      cfd696cc
    • Thomas Haller's avatar
      dhcp: move nm_utils_dhcp_client_id_mac() to "nm-core-utils.c" · 2ef9a089
      Thomas Haller authored
      We will need it outside of "src/devices/nm-device.c".
      2ef9a089
    • Thomas Haller's avatar
      core/trivial: rename nm_utils_detect_arp_type_from_addrlen() to... · 3bce451c
      Thomas Haller authored
      core/trivial: rename nm_utils_detect_arp_type_from_addrlen() to nm_utils_arp_type_detect_from_hwaddrlen()
      
      Rename the function so that the function name's prefix is
      the topic what this is about: arp-type.
      3bce451c
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      dhcp: fix generating MAC based client-id for infiniband · 4523a376
      Thomas Haller authored
      For infiniband, only the last 8 bytes for the 20 bytes hardware address
      are relevant. At least, with respect to the settings
      
        - ipv4.dhcp-client-id=mac
        - ipv4.dhcp-client-id=perm-mac
        - ipv6.dhcp-duid=ll
        - ipv6.dhcp-duid=llt
        - ipv6.dhcp-duid=stable-ll
        - ipv6.dhcp-duid=stable-llt
      
      This is also what ISC dhclient on Fedora/RHEL does ([1], [2]).
      
      [1] https://bugzilla.redhat.com/show_bug.cgi?id=660681
      [2] https://src.fedoraproject.org/rpms/dhcp/blob/3ccf3c8d815df4b8e11e1a04850975f099273d5d/f/dhcp-lpf-ib.patch
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1658057
      4523a376
    • Thomas Haller's avatar
      libnm: fix introspection for NMSettingWirelessSecurityWpsMethod · e99deb39
      Thomas Haller authored
      This is a flags type, not an enum.
      
      This affects the generated glib-mkenums type, changing it from GEnum to
      GFlags. That is possibly a change in behavior for language bindings, but
      hopefully nobody is badly affected by this.
      
      Fixes: e6f95b50
      e99deb39
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      libnm-core: add _nm_setting_secret_flags_valid() helper · a5b20ba2
      Thomas Haller authored
      Secret-flags are flags, but most combinations don't actually make sense
      and maybe should be rejected. Anyway, that is not done, and most places
      just check that there are no unknown flags set.
      
      Add _nm_setting_secret_flags_valid() to perform the check at one place
      instead of having the implementation at various places.
      a5b20ba2
    • Thomas Haller's avatar
      libnm/keyfile: don't use nm_setting_enumerate_values() in keyfile reader/writer · 038d5096
      Thomas Haller authored
      - nm_setting_enumerate_values() cannot handle non-GObject based
        properties as it cannot abstract them. That means, for gendata
        based settings, we need already a special case, and future ways
        of handling settings (WireGuard peers) also won't work without
        special casing.
      
      - nm_setting_enumerate_values() needs to fetch all properties, although
        some properties will not be actually used. E.g. secret properties will
        be ignored depending on the flag.
      
        Or compare the read-side with read_one_setting_value(). The reader doesn't
        care about the (unset) GObject property. It really just cares about the
        GType of the proeprty. Still, nm_setting_enumerate_values() fetches all
        (empty) properties.
      
        Or consider, route_writer() as called by nm_setting_enumerate_values()
        always needs to deep-clone the entire list of routes in the property
        getter for NM_SETTING_IP_CONFIG_ROUTES, then unpack it. This is
        unnecesary overhead. This is not yet fixed, but would now be easy to
        improve.
      
      - a for-each function like nm_setting_enumerate_values() does make code
        harder to read, gives less possibility for optimization, and is in
        general less flexible. Don't use it.
      038d5096
    • Thomas Haller's avatar
      libnm: rework nm_setting_duplicate() without nm_setting_enumerate_values() · 0e09da4e
      Thomas Haller authored
      Drop another use of nm_setting_enumerate_values().
      
      Using nm_setting_enumerate_values() to duplicate a setting already
      didn't work for gendata based settings.
      
      Also, nm_setting_enumerate_values() would iterate the properties
      in a particular order. We don't need that, the default order
      (asciibetical sorted) is fine.
      0e09da4e
    • Thomas Haller's avatar
      libnm: move sorting of settings out of nm_setting_enumerate_values() and cache it · 7cc24629
      Thomas Haller authored
      The property infos are already sorted by name. As nm_setting_enumerate_values()
      now uses that information, in most cases there is nothing to sort.
      
      The only instance is NMSettingConnection, which has a different
      sort-order. At least for some purposes, not all:
      
        - nm_setting_enumerate_values(), obviously.
      
        - nm_setting_enumerate_values() is called by keyfile writer. That
          means, keyfile writer will persist properties in a sorted way.
      
      Cache the property list with alternative sorting also in the
      setting-meta data, instead of calculating it each time.
      
      Beside caching the information, this has the additional benefit that
      this kind of sorting is now directly available, without calling
      nm_setting_enumerate_values(). Meaning, we can implement keyfile writer
      without using nm_setting_enumerate_values().
      7cc24629
    • Thomas Haller's avatar
      libnm,core: add _nm_connection_aggregate() to replace nm_connection_for_each_setting_value() · 7771473f
      Thomas Haller authored
      We should no longer use nm_connection_for_each_setting_value() and
      nm_setting_for_each_value(). It's fundamentally broken as it does
      not work with properties that are not backed by a GObject property
      and it cannot be fixed because it is public API.
      
      Add an internal function _nm_connection_aggregate() to replace it.
      
      Compare the implementation of the aggregation functionality inside
      libnm with the previous two checks for secret-flags that it replaces:
      
      - previous approach broke abstraction and require detailed knowledge of
        secret flags. Meaning, they must special case NMSettingVpn and
        GObject-property based secrets.
        If we implement a new way for implementing secrets (like we will need
        for WireGuard), then this the new way should only affect libnm-core,
        not require changes elsewhere.
      
      - it's very inefficient to itereate over all settings. It involves
        cloning and sorting the list of settings, and retrieve and clone all
        GObject properties. Only to look at secret properties alone.
      
      _nm_connection_aggregate() is supposed to be more flexible then just
      the two new aggregate types that perform a "find-any" search. The
      @arg argument and boolean return value can suffice to implement
      different aggregation types in the future.
      
      Also fixes the check of NMAgentManager for secret flags for VPNs
      (NM_CONNECTION_AGGREGATE_ANY_SYSTEM_SECRET_FLAGS). A secret for VPNs
      is a property that either has a secret or a secret-flag. The previous
      implementation would only look at present secrets and
      check their flags. It wouldn't check secret-flags that are
      NM_SETTING_SECRET_FLAG_NONE, but have no secret.
      7771473f
    • Thomas Haller's avatar
      libnm: cleanup secret-flags setter and getter · 4a5514dc
      Thomas Haller authored
      There are 3 kinds of secret flag implementations:
      
      1) regular properties have a GObject property and a corresponding
        "-flags" property.
      
      2) NMSettingVpn handles this entirely differently
      
      3) NMSettingWirelessSecurity's WEP keys, where the secret keys
         share a flags property that does not follow the same naming
         scheme as 1).
      
      The getter and setter had a boolean "verifiy_secret", only to
      handle 3). Drop that parameter. Don't let NMSettingWirelessSecurity
      call the parent's implementation for WEP keys. Just let it handle
      it directly.
      4a5514dc
    • Thomas Haller's avatar
      libnm: cleanup NMSettingVpn's get_secret_flags() · 9c139b2c
      Thomas Haller authored
      - most of the time, the secret-name is short and fits in a
        stack-allocated buffer.
        Optimize for that by using nm_construct_name_a().
      
      - use _nm_utils_ascii_str_to_int64() instead of strtoul().
      
             tmp = strtoul ((const char *) val, NULL, 10);
             if ((errno != 0) || (tmp > NM_SETTING_SECRET_FLAGS_ALL)) {
      
        is not the right way to check for errors of strtoul().
      
      - refactor the code to return-early on errors.
      
      - since commit 9b96bfaa "setting-vpn: whatever is in vpn.secrets always
        is a secrets", we accept secrets without secret-flags as valid too.
        However, only do that, when we at least have a corresponding key in
        priv->secrets hash. If the secret name is not used at all, it's
        clearly not a secret.
      
      - if the secret flags are not a valid number, pretend that the flags
        are still set to "none" (zero). That is because we use the presence
        of the "*-flags" data item as indication that this is in fact a
        secret. The user cannot use data items with such a name for another
        purpose, so on failure, we still claim that this is in fact a secret.
      9c139b2c
    • Thomas Haller's avatar
      libnm: use property metadata in nm-settings.c instead of GObject property list · 88da1375
      Thomas Haller authored
      We have a concept of setting and property meta-data that extends plain
      GObject properties. While most properties are indeed backed by an
      implemented as a GObject property, some are not.
      
      Reuse the object property meta-data instead of fetching the list of
      properties. Note that there is not much change in behavior, because
      at all places where this is done, properties which are not backed by a
      GObject property are skipped for the moment.
      
      If nothing else, we save needlessly cloning the property list.
      
      Later possibly we may no longer want to do that and add virtual
      functions that can handle all properties.
      88da1375
    • Thomas Haller's avatar
      keyfile: rework handling of GObject properties from keyfile · 75e42847
      Thomas Haller authored
      - previously, writer would use nm_keyfile_plugin_kf_set_integer() for
        G_TYPE_UINT types.
        That means, values larger than G_MAXINT would be stored as negative
        values. On the other hand, the reader would always reject negative
        values.
        Fix that, by parsing the integer ourself.
        Note that we still reject the old (negative) values and there is no
        compatibility for accepting such values. They were not accepted by
        reader in the past and so they are still rejected.
        This affects for example ethernet.mtu setting (arguably, the MTU
        is usually set to small values where the issue was not apparent).
        This is also covered by a test.
      
      - no longer use nm_keyfile_plugin_kf_set_integer().
        nm_keyfile_plugin_kf_set_integer() calls g_key_file_get_integer(), which
        uses g_key_file_parse_integer_as_value(). That one has the odd
        behavior of accepting "<number><whitespace><bogus>" as valid. Note how that
        differs from g_key_file_parse_value_as_double() which rejects trailing data.
        Implement the parsing ourself. There are some changes here:
      
        - g_key_file_parse_value_as_integer() uses strtol() with base 10.
          We no longer require a certain the base, so '0x' hex values are allowed
          now as well.
      
        - bogus suffixes are now rejected but were accepted by g_key_file_parse_value_as_integer().
          We however still accept leading and trailing whitespace, as before.
      
      - use nm_g_object_set_property*(). g_object_set() asserts that the value
        is in range. We cannot pass invalid values without checking that they
        are valid.
      
      - emit warnings when values cannot be parsed. Previously they would
        have been silently ignored or fail an assertion during g_object_set().
      
      - don't use "helpers" like nm_keyfile_plugin_kf_set_uint64(). These
        merely call GKeyFile's setters (taking care of aliases). The setters
        of GKeyFile don't do anything miraculously, they merely call
        g_key_file_set_value() with the string that one would expect.
        Convert the numbers/boolean ourselfs. For one, we don't require
        a heap allocation to convert a number to string. Also, there is
        no point in leaving this GKeyFile API, because even if GKeyFile
        day would change, we still must continue to support the present
        format, as that is what users have on disk. So, even if a new
        way would be implemented by GKeyFile, the current way must forever
        be accepted too. Hence, we don't need this abstraction.
      75e42847
    • Thomas Haller's avatar
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      70fab489
    • Thomas Haller's avatar
      libnm: pass serialization flags to settings synth_func() · e8bf89a9
      Thomas Haller authored
      We will need access to the serialization flags from within the synth_func().
      
      That will be for WireGuard's peers. Peers are a list of complex, structured
      elements, and some fields (the peer's preshared-key) are secret and
      others are not. So when serializing the peers, we need to know whether
      to include secrets or not.
      
      Instead of letting _nm_setting_to_dbus() check the flags, pass them
      down.
      
      While at it, don't pass the property_name argument. Instead, pass the
      entire meta-data information we have. Most synth functions don't care
      about the property or the name either way. But we should not pre-filter
      information that we have at hand. Just pass it to the synth function.
      If the synth function would be public API, that would be a reason to be
      careful about what we pass. But it isn't and it only has one caller.
      So passing it along is fine. Also, do it now when adding the flags
      argument, as we touch all synth implementations anyway.
      e8bf89a9
    • Thomas Haller's avatar
      Revert "libnm-core: don't serialize synthetic properties in nm_setting_to_string()" · 1b361aae
      Thomas Haller authored
      We shall not shortcut the synth function. If the synth function is
      unhappy about a missing NMConnection argument, then that needs to be
      fixed.
      
      So, revert 395c385b and fix the issue in nm_setting_wireless_get_security()
      differently. I presume that is the only place that caused problems,
      since the history of the patch does not clealy show what the problem
      was.
      
      This reverts commit 395c385b.
      1b361aae
    • Thomas Haller's avatar
      shared: add typed nm_g_object_set_property*() helpers · 33bf73f2
      Thomas Haller authored
      Add helper wrappers around nm_g_object_set_property() that take a
      native value, construct a GValue of the according type, and call
      nm_g_object_set_property().
      33bf73f2
    • Thomas Haller's avatar
      04c6c912
    • Thomas Haller's avatar
      b93a2cf7
    • Thomas Haller's avatar
      shared: add NM_STR_HAS_PREFIX() macro · e3ea8ecd
      Thomas Haller authored
      Commonly, the prefix is a string constant. We don't need to call
      g_str_has_prefix() for that, which first requires strlen() on
      the prefix. All the information is readily available.
      
      Add a macro for that.
      e3ea8ecd
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · 22dc8272
      Thomas Haller authored
      22dc8272
    • Thomas Haller's avatar
      systemd: update code from upstream (2019-01-06) · 19a64c09
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=4a2c3dc318fab4e3cbe33e9835372f67e5114d54
      
      (
        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_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"
      19a64c09
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · 69760946
      Thomas Haller authored
      After reorganizing the systemd sources, merge again with systemd's
      import branch.
      69760946
    • Thomas Haller's avatar
      systemd: reorganize source files · 00628758
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=8eab766804ef4fa21d26c00fd0baab3f1a47bb5c
      
      (
        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_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"
      00628758
  3. 04 Jan, 2019 5 commits
  4. 02 Jan, 2019 1 commit