Commit graph

24163 commits

Author SHA1 Message Date
Iñigo Martínez 95abecb24d meson: Make use of gnome.mkenums_simple
There are different enum files created that make use of different
template files. However, `mkenums_simple` method allows the creation
of the same enum files without the need of template files.

The creation of the `nm-core-enum-types` and
`nm-core-tests-enum-types` use now `mkenums_simple` so template
files are now unnecessary.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 23b4dc5f77 meson: Rename variables related to pkg-config variables
Some variables belong to variables in their correspondent pkg-config
file.

These variables have been renamed to `dependency_variable` to
reflect the dependency and variables from pkg-config files they are
related to.

Some of these has also been fixed to use paths relative to
installation prefix.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 2172b885b4 meson: Improve the wwan test build file
The test unit name string is used in different place so it has been
replaced by a variable.

The `nm-service-providers.c` source file is appended by using a
`files` generated object.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 7e1aacaef2 meson: Remove tests related to check_so_symbols
These tests are already working since 19a718bc1 so `FIXME` comments
are not needed anymore.
2019-10-01 09:49:33 +02:00
Iñigo Martínez f0b7041063 meson: Improve api documentation build file
the `doc_module` variable has been removed. It was created because
its used in the autotools build file but actually `nm_name` variable
can be used easily.

Different objects used in the documentation target have been grouped
together.

The content file `version.xml`, and different build files are now
added properly.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 9d4e1ad5e3 meson: Improve libnm documentation build file
the `doc_module` variable has been removed. It was created because
its used in the autotools build file but actually `libnm_name`
variable can be used easily.

Different objects used in the documentation target have been grouped
together.

The content file `version.xml` is now added properly.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 700f6f6b5f meson: Improve Qt examples
Qt dependencies have been moved to the main build file where the
rest of dependencies are located. This makes it easier to find them.

The included directories has also reviewed and removed the
unnecessary ones.
2019-10-01 09:49:33 +02:00
Iñigo Martínez da40a6597f meson: Improve nmtui and libnmt-newt build
The dependencies used in the build of the `nmtui` executable and the
`libnmt-newt` library have been reviewed.

The compiler flags used in common by them has also been moved to a
`common_c_flags` variable to avoid any confussion.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 8a5a38f74a meson: Improve nmcli build
The dependencies used in the build of `nmcli` has been reviewed and
removed the unnecessary ones. The used compiler flags has also been
moved to one line.
2019-10-01 09:49:33 +02:00
Iñigo Martínez f5d74ce179 meson: Improve the client common test build file
The build file in the `client` `common` directory has been improved
by grouping the objects used in properties and by reviewing the
dependencies used by tests built. Finally the indentation has also
been fixed.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 83b760cf98 meson: Improve the client common build file
The build file in the `client` `common` directory has been improved
by grouping the objects used in properties and by reviewing the
dependencies used by libraries built in the file.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 25bb43f4db meson: Ease the use of the libnm-libnm-core-intern library
The dependency for the `libnm-libnm-core-intern` library has been
recovered to ease its use.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 60b2c8683f meson: Make one liner compiler flag 2019-10-01 09:49:33 +02:00
Iñigo Martínez 096748a196 meson: Rename cflags variable
The variable holding the compiler flags, `cflags`, has been renamed
to `c_flags` to be consistent with the rest of build files.

Different objects used in the `test-dispatcher-envp` target
have been grouped together.

The dependency over the `libnm` library has been removed as it is
unnecessary.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 70da6993c8 meson: Improve dispatcher test build file
Different objects used in the `test-dispatcher-envp` target
have been grouped together.

The dependency over the `libnm` library has been removed as it is
unnecessary.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 4e85fdcdb7 meson: Avoid the creation of extra variables
Extra variables are used for sources of targets in the `dispatcher`
build file. These have been moved to the `source` parameter because
using them directly avoiding the creation of extra variablse doesn't
hurt readibility.

The compiler flags `cflags` variable has also been renamed to be
consistent with the rest of build files.
2019-10-01 09:49:33 +02:00
Iñigo Martínez c5e80a23fe meson: Remove extra new line 2019-10-01 09:49:33 +02:00
Iñigo Martínez 509706b62b meson: Avoid the creation of an extra variable
An extra variable is used for sources of
`libnm-settings-plugin-ifupdown` module. However, it only contains
one source file and using it directly avoiding the creation of the
extra variable doesn't hurt readibility.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 146348199e meson: Remove unused variable 2019-10-01 09:49:33 +02:00
Iñigo Martínez a010fcb5f7 meson: Move network-config directory creation to main install file
The `ifcfg-rh` meson build file installs a new post install script
to create the `network-config` directory.

This has been moved to the main post install file so it's easier to
find because all post install steps are together and it avoids and
extra post install script execution.
2019-10-01 09:49:33 +02:00
Iñigo Martínez f5f9c071ba meson: Improve ifcfg-rh plugin build
The file has been fixed to be consistent with the rest of the files.
The data files to be installed have been grouped together. The
sourc files has been listed vertically and the link target in
`nm-settings-plugin-ifcfg-rh` does not use an array anymore.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 4e5b1e257e meson: Improve nm-initrd-generator target
The set of link targets used when building `nm-initrd-generator`
target has been grouped together.
2019-10-01 09:49:33 +02:00
Iñigo Martínez c4dc02c9bd meson: Avoid the use of unnecessary array
The linker flags used when building `libnm_wwan` target uses an
array even when it only uses one value.

When using only one value the array is unnecessary so it has been
removed.
2019-10-01 09:49:33 +02:00
Iñigo Martínez dababfa59e meson: Improve ppp build file
The set of c_flags used when building `ppp` targets has been grouped
together. Used dependencies have also been reviewed and removed
the unnecessary one.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 23bd02110c meson: Rename the compiler flags variable
Renamed the variable holding the compiler flags to be consistent
with different meson ports.

This naming pattern improves the use of different compiler flags
in environments with multiple languages.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 780585952d meson: Use variable for test program name
The name of the `monitor` test program is duplicated. A variable
has been used to avoid using the same string twice.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 31f1516760 meson: Improve the src build file
The targets that involve the use of the `NetworkManager` library,
built in the `src` build file have been improved by applying a set
of changes:

- Indentation has been fixed.
- Set of objects used in targets have been grouped together.
- Aritificial dependencies used to group dependencies and custom
  compiler flags have been removed and their use replaced with
  proper dependencies and compiler flags to avoid any confussion.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 1066ddb3a1 meson: Improve the systemd build file
The `systemd` build file has been improved by grouping together all
the objects used in the building of the `libnm-systemd-core`
library.
2019-10-01 09:49:33 +02:00
Iñigo Martínez caf470f788 meson: Improve targets involving libnm library
The targets that involve the use of the `libnm` library have been
improved by applying a set of changes:

- Generated enum sources variable `libnm_enum` has been renamed to
  `libnm_enum_sources` to clearly specify what it is holding.
- Indentation in the `libnm` build and test files has been fixed.
- Set of objects used in targets have been grouped together.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 1cd615288e meson: Improve the libnm-core test build file
All variables used in every test have been moved to the start of the
build file.

Generated enum sources variable has been renamed to `enum_sources`
to clearly specify what it is holding.
2019-10-01 09:49:33 +02:00
Iñigo Martínez f427f4771e meson: Improve the libnm-core build file
The `libnm-core` build file has been improved by applying a set of
changes:

- Indentation has been fixed to be consistent.
- Library variable names have been changed to `lib{name}` pattern
  following their filename pattern.
- `shared` prefix has been removed from all variables using it.
- Dependencies have been reviewed to store the necessary data.
- The use of the libraries and dependencies created in this file
  has been reviewed through the entire source code. This has
  required the addition or the removal of different libraries and
  dependencies in different targets.
- Some files used directly with the `files` function have been moved
  to their nearest path build file because meson stores their full
  path seamessly and they can be used anywhere later.
2019-10-01 09:49:33 +02:00
Iñigo Martínez ad4834009b meson: Improve crypto support build
There are multiple conditional steps for building encryption
support. This is because the support varies from `gnutls` or `nss`.

This has been improved to reduce the number of used conditions.
2019-10-01 09:49:33 +02:00
Iñigo Martínez de90fc0810 meson: Improve the shared utils test build file
A new variable has been created for the C compiler flags to avoid
polluting the target creation call so the flags are encapsulated.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 70a34c54fe meson: Use dependency for nm-default header
The `nm-default.h` header is used widely in the code by many
targets. This header includes different headers and needs different
libraries depending the compilation flags.

A new set of `*nm_default_dep` dependencies have been created to
ease the inclusion of different directorires and libraries.

This allows cleaner build files and avoiding linking unnecessary
libraries so this has been applied allowing the removal of some
dependencies involving the linking of unnecessary libraries.
2019-10-01 09:49:33 +02:00
Iñigo Martínez c74e428342 meson: Improve the shared build file
The `shared` build file has been improved by applying a set of
changes:

- Indentation has been fixed to be consistent.
- Unused libraries and dependencies have been removed.
- Dependencies have been reviewed to store the necessary data.
- Set of objects used in targets have been grouped together.
- Header files have been removed from sources lists as it's
  unnecessary.
- Library variable names have been changed to `lib{name}` pattern
  following their filename pattern.
- `shared` prefix has been removed from all variables using it.
- `version_header` its related configuration `version_conf`
  variables have been renamed to `nm_version_macro*` following
  its input and final file names.
2019-10-01 09:49:33 +02:00
Iñigo Martínez 31a2710f11 meson: Simplified WiFi detection when IWD is enabled 2019-10-01 09:49:33 +02:00
Iñigo Martínez 82e79e40a5 meson: Avoid the use of source_root and build_root methods
The way some directory paths are defined has also been changed to
avoid the use of the `source_root` and `build_root` functions
because they are discouraged[0]

[0] https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
2019-10-01 09:49:33 +02:00
Iñigo Martínez 48bb5b68e3 meson: Define meson information early
The used meson modules, default directories and includes have been
moved to the start of the build file, just after project related
information, so they are available early.
2019-10-01 09:49:33 +02:00
Iñigo Martínez bfbcf8f3fe meson: Use generators placeholders
Functions derived from generators as `configure_file`,
`custom_target` and `i18n.merge_file` can use placeholders like
`@BASENAME@` that removes the extension from the input filename
string.

The output string has been replaced by this placeholder that
allows in some cases the use of less variables.
2019-10-01 09:49:33 +02:00
Thomas Haller 50f146f6e3 libnm/tests: fix compiler warning about unused variable
Fixes: ad68f3f402 ('libnm/tests: assert that callers GMainContext is not iterated while nm_client_new()')
2019-10-01 09:31:14 +02:00
Thomas Haller 78acec9168 all: merge branch 'th/cleanup-file-header-comments'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/288
2019-10-01 07:52:41 +02:00
Thomas Haller abff46cacf all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
Thomas Haller 9683521521 libnm: spell "Author:" comment with upper case
Like it's done at all other places.
2019-10-01 07:50:52 +02:00
Thomas Haller 3c36231706 CONTRIBUTING: update comment about requiring LGPL-2.1+ license instead of LGPL-2.0+
Historically, libnm claimed to be LGPL-2.0+ licensed. But as keep mixing that
with LGPL-2.1+ code (e.g. from systemd), so probably even the parts that
claimed to be LGPL-2.0+, were not entirely correctly doing so.

Anyway, since we switched to SPDX license identifiers, we now claim
everywhere that the right license is LGPL-2.1+. Update the comment to
reflect that.
2019-10-01 07:50:52 +02:00
Francesco Giudici e150307ab5 artwork: introduce NetworkManager stickers 2019-09-30 17:36:59 +02:00
Francesco Giudici d5dbea05be artwork: fix the reversed NetworkManager logo
Slightly changed the size to have a perfect square.
2019-09-30 17:27:16 +02:00
Beniamino Galvani 3c4f70c5c2 dhcp: systemd: support DHCPv6 prefix delegation
Add support to the internal DHCP client for requesting a prefix and
distributing it to interfaces with 'shared' IPv6 mode.

The systemd-networkd API currently allows to request only a single
prefix and so there will be issues when the number of downstream
interfaces is greater than the number of /64 subnets available in the
returned prefix; but this is still an improvement over the previous
situation when no prefix was requested at all.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/247
2019-09-30 16:15:13 +02:00
Thomas Haller ad68f3f402 libnm/tests: assert that callers GMainContext is not iterated while nm_client_new()
Libraries must not iterate a GMainContext that they don't own.

Add an assertion that we don't do so during nm_client_new().

See https://developer.gnome.org/programming-guidelines/unstable/main-contexts.html.en#using-gmaincontext-in-a-library
2019-09-30 16:01:16 +02:00
Thomas Haller c1559dae3f shared: add nmtst_g_source_assert_not_called() helper 2019-09-30 16:00:45 +02:00
Thomas Haller e54047608e libnm: merge branch 'th/libnm-properties-override'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/283
2019-09-30 08:26:30 +02:00