Commit graph

375 commits

Author SHA1 Message Date
Thomas Haller afe80171b2
ppp: move ppp code to "nm-pppd-compat.c"
Using the ppp code is rather ugly.

Historically, the pppd headers don't follow a good naming convention,
and define things that cause conflicts with our headers:

  /usr/include/pppd/patchlevel.h:#define VERSION          "2.4.9"
  /usr/include/pppd/pppd.h:typedef unsigned char  bool;

Hence we had to include the pppd headers in certain order, and be
careful.

ppp 2.5 changes API and cleans that up. But since we need to support
also old versions, it does not immediately simplify anything.

Only include "pppd" headers in "nm-pppd-compat.c" and expose a wrapper
API from "nm-pppd-compat.h". The purpose is that "nm-pppd-compat.h"
exposes clean names, while all the handling of ppp is in the source
file.
2023-04-17 18:27:50 +02:00
Eivind Næss 8469c09a50
ppp, adding support for compiling against pppd-2.5.0
This change does the following
* Adding in nm-pppd-compat.h to mask details regarding different
  versions of pppd.
* Fix the nm-pppd-plugin.c regarding differences in API between
  2.4.9 (current) and latet pppd 2.5.0 in master branch
* Additional fixes to the configure.ac to appropriately set defines used
  for compilation
2023-04-16 21:05:07 +02:00
Eivind Næss 0324098afa
build: detect pppd version via pkg-config for PPPD_PLUGIN_DIR
Ppp 2.5 adds a pkg-config file, so we can detect the version.
Use it.

[thaller@redhat.com: split out patch]
2023-04-16 21:05:01 +02:00
Lubomir Rintel 23beb28771 release: bump version to 1.43.5 (development) 2023-04-05 13:45:17 +02:00
Thomas Haller d001bae6bd
release: bump version to 1.43.4 (development) 2023-03-22 19:01:14 +01:00
Lubomir Rintel 17935511a5 release: bump version to 1.43.3 (development) 2023-03-08 15:20:37 +01:00
Thomas Haller dd5e769f24
build: add test for checking consistency of "nm-autoptr.h" 2023-02-28 16:33:07 +01:00
Thomas Haller fdec6a97e8
vapi: add test for consistency of "vapi/NM-1.0.metadata" 2023-02-28 13:05:47 +01:00
Fabrice Fontaine 3a3ac89b53
meson.build: fix build failure with -Dmodem_manager=false
Fix the following build failure with -Dmodem_manager=false raised since
commit 03ba04d478 ('build: meson: add option to set the
mobile-broadband-provider-info database').

  ../output-1/build/network-manager-1.40.10/meson.build:1060:0: ERROR: Unknown variable "mobile_broadband_provider_info_database".

http://autobuild.buildroot.org/results/896879c8e8ce022556ee834216ced2f962ff279c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Fixes: 03ba04d478 ('build: meson: add option to set the mobile-broadband-provider-info database')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1544
2023-02-21 14:56:15 +01:00
Heiko Thiery 03ba04d478
build: meson: add option to set the mobile-broadband-provider-info database
When building network-manager in cross-compile environment meson is not able
to detect the right location of the mobile-broadband-provider-info
database by using the pkg-config module.

By adding the option 'mobile_broadband_provider_info_database' to set the
correct path to the datafile this can be solved.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1519
2023-02-13 11:02:50 +01:00
Thomas Haller 72c0ae2efa
release: bump version to 1.43.2 (development) 2023-02-10 09:38:34 +01:00
Thomas Haller 119ed52038
release: bump version to 1.42.0 2023-02-10 09:14:28 +01:00
Thomas Haller 108885721e
meson: increase "default_test_timeout" to 3 minutes
Obviously, it would be nice if our unit tests are fast. However, with
valgrind and a busy machine, some of the tests can take a relatively
long time. In particular those, that are marked as "slow" (if you want
to skip them during development, do so via "NMTST_DEBUG=quick"
environment, or "CFLAGS=-DNMTST_TEST_QUICK=TRUE", see
"nm-test-utils.h").

Anyway. Our tests almost never hit the timeout, and if they do, the most
likely reason is that something was just slower then expected, and the
timeout is a bogus error.

Timeouts only act as last fail safe. It more important to avoid a false
(premature) timeout failure, than to minimize the wait time when the
test really hangs. Because a real hang is a bug anyway, that we will
discover and need to fix.

Increase the default test timeout for meson tests to 3 minutes.

Also, "test-route-linux" is known to take a long time. Increase that
timeout even further.

(cherry picked from commit 9ee42c0979)
2023-02-01 10:50:11 +01:00
Lubomir Rintel d976683417 release: bump version to 1.41.91 (1.42-rc2) (development) 2023-01-26 09:55:15 +01:00
Lubomir Rintel b36af7ce3f release: bump version to 1.43.1 (development) 2023-01-26 09:05:56 +01:00
Thomas Haller 9ee42c0979
meson: increase "default_test_timeout" to 3 minutes
Obviously, it would be nice if our unit tests are fast. However, with
valgrind and a busy machine, some of the tests can take a relatively
long time. In particular those, that are marked as "slow" (if you want
to skip them during development, do so via "NMTST_DEBUG=quick"
environment, or "CFLAGS=-DNMTST_TEST_QUICK=TRUE", see
"nm-test-utils.h").

Anyway. Our tests almost never hit the timeout, and if they do, the most
likely reason is that something was just slower then expected, and the
timeout is a bogus error.

Timeouts only act as last fail safe. It more important to avoid a false
(premature) timeout failure, than to minimize the wait time when the
test really hangs. Because a real hang is a bug anyway, that we will
discover and need to fix.

Increase the default test timeout for meson tests to 3 minutes.

Also, "test-route-linux" is known to take a long time. Increase that
timeout even further.
2023-01-20 13:22:38 +01:00
Thomas Haller 700cd20d4d
release: bump version to 1.43.0 (development) 2023-01-19 20:26:31 +01:00
Thomas Haller 093bbd0fcf
release: bump version to 1.41.90 (1.42-rc1) 2023-01-19 20:15:14 +01:00
Beniamino Galvani 58b7019b05 release: bump version to 1.41.8 (development) 2023-01-11 23:39:47 +01:00
Lubomir Rintel 9a67988f07 release: bump version to 1.41.7 (development) 2022-12-15 16:43:23 +01:00
Thomas Haller 68afa83c1c
build: enable "-Wcast-align" warning
It seems useful and might show something relevant.
2022-12-09 09:15:56 +01:00
Thomas Haller a14d65d06f
release: bump version to 1.41.6 (development) 2022-11-30 15:48:53 +01:00
Thomas Haller ac359371d7
release: bump version to 1.41.5 (development) 2022-11-18 07:48:32 +01:00
Thomas Haller abbacb1085
build: enable warnings "-Wint-conversion" and "-Wold-style-definition"
See https://lwn.net/Articles/913505/ .
2022-11-07 08:50:07 +01:00
Thomas Haller f3682588b2
build/meson: sort compiler flags in "meson.build"
Also remove duplicates.
2022-11-07 08:50:07 +01:00
Thomas Haller 311c97a83e
release: bump version to 1.41.4 (development) 2022-11-02 18:13:08 +01:00
Beniamino Galvani 48dbd02d08 release: bump version to 1.41.3 (development) 2022-10-11 14:21:03 +02:00
Thomas Haller cfc36db2b7
release: bump version to 1.41.2 (development) 2022-09-08 10:31:30 +02:00
Thomas Haller 7a0c2f8be9
release: bump version to 1.41.1 (development) 2022-08-26 19:28:11 +02:00
Ana Cabral 5d4802f7d8 release: bump version to 1.40.0 2022-08-26 16:41:39 +02:00
Ana Cabral 711f69fb73 release: bump version to 1.41.0 (development) 2022-08-15 18:18:45 -03:00
Ana Cabral b2a6b9fcc7 release: bump version to 1.39.90 (1.40-rc1) 2022-08-15 18:13:18 -03:00
Lubomir Rintel d7c82945b5 release: bump version to 1.39.12 (development) 2022-07-29 16:00:57 +02:00
Beniamino Galvani a5e81b4eed release: bump version to 1.39.11 (development) 2022-07-27 22:20:12 +02:00
Thomas Haller b38d180bc6
build/meson: fix autodetecting ifcfg_rh/ifupdown plugins
"-Difcfg_rh=false" did not work, we would always fallback to
autodetection. That is wrong, an explicit "false" should be honored.
It's also not what autotools does. Fix this.

While at it, drop "distro" variable. It's not a clear concept
that can be reused and it's unused otherwise.

Also, no longer let the autodetection be based on cross compilation.
When cross-compiling, it seems not entirely unreasonable that you cross
compile to a comparable distro, so let the autodetection be based on
what we detect on the host. In any case, a user can and is encouraged
to explicitly enable/disable the plugins via "-Difcfg_rh=" or
"-Difupdown=".

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1310
2022-07-25 10:32:10 +02:00
Adrian Freihofer be0daab3e3
build/meson: cross compile fix distro
In case of cross compilation the target distro is not the same as the
distro of the build machine.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1309
2022-07-22 12:40:26 +02:00
Lubomir Rintel 34c1497ee4 release: bump version to 1.39.10 (development) 2022-07-13 15:39:16 +02:00
Lubomir Rintel 880bec0f4f release: bump version to 1.39.9 (development) 2022-07-07 14:53:15 +02:00
Lubomir Rintel 02685e990e release: bump version to 1.39.8 (development) 2022-06-30 16:18:01 +02:00
Martin Blanchard 19a6affd3a build: stop relying on intltool for i18n
Recent gettext version can extract and merge back strings from and to
various file formats, no need for intltool anymore.

https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/133

https://github.com/NetworkManager/NetworkManager/pull/303
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/96

Clarification about the use of AM_GNU_GETTEXT_REQUIRE_VERSION:

In configure.ac, specify the minimum gettext version we require, rather
than the exact one. This fixes a situation where the autoconf macros
used for gettext will be the latest available on the system (for
example, 0.20); but the copied-in Makefile.in.in will be for the exact
version specified in configure.ac (in this case, 0.19).

In that situation, the gettext build rules will error out at `make` time
with the message:
   *** error: gettext infrastructure mismatch: using a Makefile.in.in
   from gettext version 0.19 but the autoconf macros are from gettext
   version 0.20

Avoid that by specifying a minimum version dependency rather than an
exact one. This should not cause problems as we haven’t committed any
generated or external gettext files into git, so each developer will end
up regenerating the build system for their system’s version of gettext,
as expected.

See the subsection of
https://www.gnu.org/software/gettext/manual/html_node/Version-Control-Issues.html
for more information.

Note that autoreconf currently doesn’t recognise
AM_GNU_GETTEXT_REQUIRE_VERSION, so we must continue also using
AM_GNU_GETTEXT_VERSION. autopoint will ignore the latter if the former
is present. See
https://lists.gnu.org/archive/html/autoconf-patches/2015-10/msg00000.html.

[lkundrak@v3.sk: Fixed the meson build, adjusted autogen.sh:
droped "|| exit 1", dropped call to aclocal,
dropped --copy from gtkdocize.]
2022-06-27 13:40:09 +02:00
Lubomir Rintel c861a7e1d8 release: bump version to 1.39.7 (development) 2022-06-15 17:49:23 +02:00
Beniamino Galvani 3d272d264c release: bump version to 1.39.6 (development) 2022-06-01 16:40:28 +02:00
Ana Cabral b5829c9ac1 release: bump version to 1.39.5 (development) 2022-05-19 11:17:27 +02:00
Thomas Haller e2476b1063
release: bump version to 1.39.4 (development) 2022-05-16 09:44:50 +02:00
Thomas Haller d4d001c771
build/meson: honor prefix for dbus_conf_dir
Otherwise, we will try to install "src/nm-dispatcher/nm-dispatcher.conf"
to "/usr/share/dbus-1/system.d", which is not correct, when we want a separate
prefix.
2022-05-13 15:46:55 +02:00
Thomas Haller 5704730a6c
release: bump version to 1.38.0 2022-05-13 11:13:34 +02:00
Thomas Haller 1a995325d5
build/meson: workaround meson bug related to ternary expression
On Debian 10, `apt-get install meson` gives meson-0.49.2-1.
That version doesn't like certain ternary expressions (while some
that we have are OK), which leads to a crash of meson.

Avoid that.

Fixes: bddffb1731 ('build/meson: honor prefix for udev_dir and don't use pkg-config')
2022-05-11 22:34:38 +02:00
Thomas Haller c840e56e0a
meson/build: fix using correct prefix for "systemdsystemunitdir"
We do the same with autotools.

Well, almost the same. Of course, meson's define_variable only
accepts a list of two strings, to define one variable. So we cannot
also redefine "prefix", unlike configure.ac.
2022-05-11 15:29:45 +02:00
Thomas Haller bddffb1731
build/meson: honor prefix for udev_dir and don't use pkg-config
When building with `mesond -Dprefix=/tmp/nm`, then we would expect
that udev files are installed there (wouldn't we?).

The user can already explicitly set "-Dudev_dir=", or even disable
installing the files with "-Dudev_dir=no".

Note that meson be default pre-populates `get_option("prefix")`, so there
is always something set. So we cannot just act on whether the user set a
prefix. It seems to default to /usr/local.

Note that package builds from Fedora spec file pass "-Dprefix=/usr".

I think we should honor the prefix. However, then it seems wrong to also
honor pkg-config at the same time.
In particular, because `pkg-config --variable=udevdir udev` gives /usr/lib/udev.
That means, if we would just prepend the default prefix "/usr" or "/usr/local"
to "/usr/lib/udev" we get the wrong result.

Note that we already to the same for autotools.
2022-05-11 10:38:32 +02:00
Thomas Haller 298784aa92
release: bump version to 1.39.3 (development) 2022-05-04 14:59:31 +02:00
Thomas Haller a845a3425f
release: bump version to 1.37.92 (1.38-rc3) (development) 2022-05-04 14:33:32 +02:00
Thomas Haller 47a46344c7
release: bump version to 1.39.2 (development) 2022-04-20 17:48:34 +02:00
Thomas Haller 5da17c689b
dns/unbound: drop deprecated "unbound" DNS plugin
The "unbound" DNS plugin was very rudimentary and is deprecated since
commit 4a2fe09853 ('man: mark [main].dns=unbound as deprecated') (Jun
2021).

It is part of dnssec-trigger tool, but the dnssec-trigger tool doesn't
actually use it. Instead it installs a dispatcher script
"/usr/lib/NetworkManager/dispatcher.d/01-dnssec-trigger".

Especially, since the plugin requires "/usr/libexec/dnssec-trigger-script",
which is provided by "dnssec-trigger" package on Fedora. At the same
time, the package provides the dispatcher script. So I don't this works
or anybody is using this.

https://mail.gnome.org/archives/networkmanager-list/2022-April/msg00002.html
2022-04-15 09:04:30 +02:00
Thomas Haller c20e3a72e2
release: bump version to 1.39.1 (development) 2022-04-14 13:42:16 +02:00
Thomas Haller fb5a1fa05e
release: bump version to 1.37.91 (1.38-rc2) (development) 2022-04-14 12:20:36 +02:00
Thomas Haller 5b6311ea07
release: bump version to 1.39.0 (development) 2022-04-06 18:51:55 +02:00
Thomas Haller 35f27f4511
release: bump version to 1.37.90 (1.38-rc1) 2022-04-06 18:39:01 +02:00
Thomas Haller 7e0a094187
build/meson: log enabled crypto libraries in summary
"autotools" also prints a similar output. It's useful to know
which libraries were enabled. Because, we run unit test against
all enabled libraries, even if they are actually used.
2022-03-29 11:56:02 +02:00
Lubomir Rintel bdcc85de76 release: bump version to 1.37.3 (development) 2022-03-24 21:36:26 +01:00
Beniamino Galvani 2ccfc86939 release: bump version to 1.37.2 (development) 2022-03-09 17:07:24 +01:00
Beniamino Galvani 392daa5dab core: fall back to loading all known settings plugins
Currently it is possible to specify a list of default settings plugins
to be used when configuration doesn't contain the main.plugins key.

We want to add a mechanism that allows to automatically load any
plugin found in the plugins directory without needing
configuration. This mechanism is useful when plugins are shipped in a
different, optional subpackage, to automatically use them.

With such mechanism, the actual list of plugins will be determined
(in order of evaluation):

 1. via explicit user configuration in /etc, if any
 2. via distro configuration in /usr, if any
 3. using the build-time default, if any
 4. looking for known plugins in /usr/lib
2022-03-06 09:12:06 +01:00
Lubomir Rintel 2c9d3ef6c7 release: bump version to 1.37.1 (development) 2022-02-24 19:31:09 +01:00
Lubomir Rintel ccb20e23e3 release: bump version to 1.36.0 2022-02-24 16:43:00 +01:00
Christian Eggers b26c9723d9
libnm-crypto: add new option for no cryptography
For some embedded systems, no cryptography is required at all (e.g when
only using Ethernet).

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1108
2022-02-21 19:12:27 +01:00
Lubomir Rintel 9024ff49a1 release: bump version to 1.35.92 (1.36-rc3) (development) 2022-02-19 14:00:08 +01:00
Lubomir Rintel 259999d55e release: bump version to 1.35.91 (1.36-rc2) (development) 2022-02-10 14:13:22 +01:00
Lubomir Rintel 51a182581f release: bump version to 1.37.0 (development) 2022-02-04 18:24:18 +01:00
Lubomir Rintel 7d0faf5077 release: bump version to 1.35.90 (1.36-rc1) 2022-02-04 18:14:15 +01:00
Thomas Haller ead18781ad
release: bump version to 1.35.7 (development) 2022-01-28 15:06:13 +01:00
Thomas Haller 2cf198d978
release: bump version to 1.35.6 (development) 2022-01-26 17:19:25 +01:00
Beniamino Galvani 0047d36fa2 release: bump version to 1.35.5 (development) 2022-01-14 09:55:53 +01:00
Beniamino Galvani 9133a30c9d release: bump version to 1.34.0 2022-01-13 16:33:22 +01:00
Thomas Haller 0cfaa63120
release: bump version to 1.35.4 (development) 2022-01-12 17:35:10 +01:00
James Hilliard edc37b3adf
build: allow configuring default for wifi.backend setting
Distributions may want to change the default wifi.backend, if for
example they are building without wpa_supplicant support.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/869

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1040
2022-01-04 06:41:37 +01:00
Beniamino Galvani 440e5a9941 release: bump version to 1.35.3 (development) 2021-12-15 18:48:54 +01:00
Lubomir Rintel 42307a6a67 release: bump version to 1.35.2 (development) 2021-12-01 16:46:47 +01:00
Ana Cabral 77d7b8287c release: bump version to 1.35.1 (development) 2021-11-18 18:01:49 +01:00
Ana Cabral 403acb1f80 release: bump version to 1.35.0 (development) 2021-11-18 16:04:42 +01:00
Ana Cabral d534170b21 release: bump version to 1.33.90 (1.34-rc1) 2021-11-18 15:58:22 +01:00
Ana Cabral 29380a0b09 release: bump version to 1.33.4 (development) 2021-10-21 00:58:35 +02:00
Beniamino Galvani 34e14341e3 release: bump version to 1.33.3 (development) 2021-09-22 11:39:14 +02:00
Thomas Haller 2d828bdbf9
release: bump version to 1.33.2 (development) 2021-09-08 16:49:22 +02:00
Thomas Haller ee91f1f9ab
build: define WITH_OPENVSWITCH in "config.h"
It will be used next.
2021-08-31 13:30:08 +02:00
Thomas Haller 55fa00f05b
build/meson: cleanup handling of libreadline build option
- add "required:false" to dependency() and find_library(),
  otherwise autodetection will fail.

- rename variable "enable_readline" to "with_readline" for
  consistency with autotools.

- with -Dlibreadline=auto, once we detect a library, update
  "with_readline" variable to reflect the detected choice.
  This will also be printed in the summary output.
  This is also important for the nmcli check
  `assert(with_readline != 'none', 'readline ...`.
2021-07-19 09:10:43 +02:00
Lukasz Majewski 85f3030e4b
cli: meson: Support building nmcli with libedit
After this change the nmcli program built with meson will have the
possibility to use libedit (BSD license) instead of libreadline
(GPLv3).

Meson configuration line:
meson configure -Dreadline=libedit -C ../nm-build/

or

meson --reconfigure -Dreadline=libedit ../nm-build/
ninja -C ../nm-build/

The new 'readline' option is set to 'auto' by default, so
the current behavior shall be preserved (and the libreadline is
used).

Two new config.h flags (always defined) have been introduced -
HAVE_EDITLINE_READLINE and HAVE_READLINE_HISTORY.
2021-07-14 17:16:45 +02:00
Thomas Haller 161cf11cb1
release: bump version to 1.33.1 (development) 2021-06-16 20:26:45 +02:00
Thomas Haller d9c0d43879
release: bump version to 1.32.0 2021-06-16 19:48:59 +02:00
Thomas Haller b92d8f5a2d
release: bump version to 1.33.0 (development) 2021-06-04 18:10:32 +02:00
Thomas Haller be89b39828
release: bump version to 1.31.90 (1.32-rc1) 2021-06-04 18:03:56 +02:00
Beniamino Galvani 481ccd2ad2 release: bump version to 1.31.5 (development) 2021-05-19 21:04:53 +02:00
Thomas Haller 1da1ad9c99
firewall: make firewall-backend configurable via "NetworkManager.conf"
"iptables" and "nftables" will be supported. Currently, the code is
unused and only "iptables" is supported.
2021-05-14 11:41:32 +02:00
Beniamino Galvani f3821b27dd release: bump version to 1.31.4 (development) 2021-05-05 21:17:53 +02:00
Beniamino Galvani 299a6af3ee build: install D-Bus service files to /usr by default
Service files shipped by distribution should be in /usr.
2021-04-30 17:00:50 +02:00
Beniamino Galvani 9b3fd5965b release: bump version to 1.31.3 (development) 2021-04-22 23:04:27 +02:00
Beniamino Galvani 80f63ae01a release: bump version to 1.31.2 (development) 2021-03-24 18:12:04 +01:00
Thomas Haller 54edfc6139
libnm: improve detection for C11 _Generic() support
Older gcc doesn't like this:

  ../src/libnm-core-impl/nm-setting-wired.c:132:49: error: controlling expression type 'const char *const [31]' not compatible with any generic association type
             && (nm_utils_strv_find_binary_search(valid_s390_opts,
                                                  ^~~~~~~~~~~~~~~
  ../src/libnm-glib-aux/nm-shared-utils.h:2033:60: note: expanded from macro 'nm_utils_strv_find_binary_search'
          const char *const *const _strv   = NM_CAST_STRV_CC(strv);     \
                                                             ^
  ../src/libnm-glib-aux/nm-macros-internal.h:706:21: note: expanded from macro 'NM_CAST_STRV_CC'
          (_Generic ((value), \
                      ^
2021-03-22 15:54:47 +01:00
Thomas Haller d8dd6e94e6
tui: move from "clients/tui/" to "src/nmtui/" 2021-03-15 17:10:54 +01:00
Thomas Haller 107861ff57
build: move "dispatcher/" to "src/nm-dispatcher/" 2021-02-28 18:56:09 +01:00
Thomas Haller 7b48d6bd31
build: remove shared/ directory 2021-02-24 12:49:13 +01:00
Thomas Haller 9bba4871f3
build: move "libnm/" to "src/" and split it
Like with "libnm-core/", split "libnm/" into different directories for
the public headers, for the implementation and for the helper "aux"
library.
2021-02-24 12:48:37 +01:00