Commit Graph

770 Commits

Author SHA1 Message Date
Thomas Haller
12299ee91e build: drop "check-python-black" check from autotools
Previously, autotools would detect whether we have "black"
in the path. And if so, it would check formatting during `make check`.

That's problematic. When I run `./contrib/fedora/rpm/build_clean.sh -w test`
in certain cases, it would pick up black, but then fail with

  Traceback (most recent call last):
    File "/usr/bin/black", line 5, in <module>
      from black import patched_main
    File "/usr/lib/python3.6/site-packages/black.py", line 42, in <module>
      from attr import dataclass, evolve, Factory
  ModuleNotFoundError: No module named 'attr'
  make[3]: *** [Makefile:21658: check-python-black] Error 1

That's an installation error of black, but still, during package build
there is no need to check the formatting. We could export
`NMTST_SKIP_PYTHON_BLACK=1` to prevent it, but it's still unnecessary.

We check proper formatting in gitlab-ci. That is enough, it doesn't
need to run during `make check`. In particular, because `black .`
takes 1.5 seconds on my machine.
2022-04-01 14:01:45 +02:00
Lubomir Rintel
bdcc85de76 release: bump version to 1.37.3 (development) 2022-03-24 21:36:26 +01:00
Thomas Haller
1c76c11b42 doc: rename "README" to "README.md"
By having a ".md" extension, gitlab renders a nice page instead of
showing as plain text.

Currently our README is pretty bad. Partly, because it doesn't get
shown nicely.

Rename. The file effectively was already markdown. The old file is
gone.

For this we also need to change the automake flavor to "foreign"
(See [1]).

[1] https://autotools.info/automake/options.html#automake.options.flavors
2022-03-21 17:19:47 +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
Beniamino Galvani
f018afcd53 build: remove unused variable from configure.ac 2022-03-06 09:12:06 +01:00
Thomas Haller
df94cb2116 man: add NetworkManager-wait-online.service.8 manual
NetworkManager-wait-online is a constant source of confusion,
as it seems to delay the boot (when it's often just the messenger
or either a network problem, a NetworkManager misconfiguration
or a misconfiguration of other systemd services).

Try to clear that up with a manual page.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1130
2022-03-02 16:09:16 +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
3d34f1b6b6 configure: determine the systemd unit directory from pkg-config
Ask systemd instead of hardcoding the path. While this is a bit nicer,
it should have precisely zero effect as the discovered path should be
the same as we were hard-coding.

We default to placing the unit file under the same $prefix as the user is
installing into. This seems to be the correct thing to do if the user is
installing to /usr/local (according to systemd-path(1),
/usr/local/lib/systemd/system is all right), but can install the unit
file into wrong path if the user chooses to install into some obscure
location. I guess it's their responsibility in the end.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1101
2022-02-17 10:44:28 +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
Lubomir Rintel
e37b8456ac build: remove NetworkManager.pc
It's not installed at least since libnm-glib was dropped.
2021-11-03 12:19:36 +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
bf86f51c9e build: rework libreadline detection in autotools
- `m4/ax_lib_readline.m4` was already aware of "$with_readline".
  Move the entire handling of the parameter inside the AX_LIB_READLINE
  macro.
  This lets our fork of ax_lib_readline.m4 further deviate from upstream
  version, but it's already so different that this is no new problem.

- raise an error if the user requested --with-readline=libreadline|libedit
  but the library was not found.

- only allow yes|no for --with-nmcli argument. But still default to
  "yes", which will always require one libreadline library to be
  detected. In particular, don't automatically disable nmcli if
  libreadline is not available, because building without nmcli
  should be an explicit choice. That is like before.

- update the "$with_readline" variable for the "auto" case to reflect
  what was detected.
2021-07-19 09:08:06 +02:00
Lukasz Majewski
8ea9da85b3 m4: cli: Add support for --with-readline=auto|libreadline|libedit|none configuration options
This commit provides support for --with-readline=auto|libreadline|libedit|none option
for the configure script.

It allows building the NetworkManager's nmcli tool with libedit instead
of libreadline.

With --with-readline=auto the system looks for any eligible readline library
to use.

Moreover, in this commit all required defines are provided (e.g.
HAVE_EDITLINE_READLINE) to allow correct buil of the code.
2021-07-14 17:16:45 +02:00
Javier Jardón
8c4e8d5beb configure.ac: Do not use AC_GNU_SOURCE
This macro is deprecated and replaced by AC_USE_SYSTEM_EXTENSIONS
(which is already being called)

See:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Posix-Variants.html#AC%5fUSE%5fSYSTEM%5fEXTENSIONS

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/912
2021-06-30 09:28:07 +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
orbea
3affccf29b tests: fix undefined references to pthread
When building NetworkManger with --enable-tests or using 'make check'
and slibtool the build will fail in many places with undefined references
to pthreads.

This is because -lpthread is never explicitly added to the appropriate
variable, src_core_libNetworkManagerTest_la_LIBADD. When analyzing the
build log with GNU libtool it can be seen that it silently adds -pthread
on its own which hides the issue.

To solve this ax_pthread.m4 from the autoconf-archives project can be
used which provides the $(PTHREAD_LIBS) linker flag.

Source: https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_pthread.m4
See-also: https://www.gnu.org/software/autoconf-archive/ax_pthread.html

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/804
2021-04-07 08:29:50 +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
91bf576a43 build: fix detection of python for autotools
The goal of this code is to detect python, but prefer python3 while
also allowing the user to override the path.

That did not work in all cases, due to what seems like a bug in
AM_PATH_PYTHON(). AM_PATH_PYTHON() is documented to ignore failure
if [action-if-not-found] is given. So one might assume that:

  AM_PATH_PYTHON([3], [], [PYTHON=])
  if test -z "$PYTHON"; then
    AM_PATH_PYTHON([], [], [PYTHON=python])
  fi

first tries to look for v3, and if that fails search for any python
interpreter. That did not work however with:

  $ ./configure PYTHON=/usr/bin/python2
  ...
  checking pkg-config is at least version 0.9.0... yes
  checking whether /usr/bin/python2 version is >= 3... no
  configure: error: Python interpreter is too old

because the first AM_PATH_PYTHON() is fatal.

Work around that.

Fixes: 54a1cfa973 ('build: prefer python3 over python2 in autotools's configure script')
2021-03-22 12:31:02 +01:00
Thomas Haller
9c0c0ac966 man: split NetworkManager-dispatcher(8) manual page out of NetworkManager(8)
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/784
2021-03-16 17:01:53 +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
Thomas Haller
fdf9614ba7 build: move "libnm-core/" to "src/" and split it
"libnm-core/" is rather complicated. It provides a static library that
is linked into libnm.so and NetworkManager. It also contains public
headers (like "nm-setting.h") which are part of public libnm API.

Then we have helper libraries ("libnm-core/nm-libnm-core-*/") which
only rely on public API of libnm-core, but are themself static
libraries that can be used by anybody who uses libnm-core. And
"libnm-core/nm-libnm-core-intern" is used by libnm-core itself.

Move "libnm-core/" to "src/". But also split it in different
directories so that they have a clearer purpose.

The goal is to have a flat directory hierarchy. The "src/libnm-core*/"
directories correspond to the different modules (static libraries and set
of headers that we have). We have different kinds of such modules because
of how we combine various code together. The directory layout now reflects
this.
2021-02-18 19:46:51 +01:00