Commit graph

532 commits

Author SHA1 Message Date
Vincent Lefevre a938f4f018
man: fix a typo
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/594
2020-07-30 17:52:12 +02:00
Charlie Getzen e7d2ea95ba
man: update nmcli.xml wording
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/582
2020-07-21 09:14:16 +02:00
Yuri Chornoivan 4e33f8cd89
all: fix minor typos
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/565
2020-07-07 11:33:46 +02:00
Sayed Shah 7337ab8959
all: fix typo in man pages
There should be a comma after 'Otherwise' and 'Currently'.

https://bugzilla.redhat.com/show_bug.cgi?id=1852452

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/560
2020-07-03 10:48:04 +02:00
Beniamino Galvani dbfe219d5b all: add ap-isolation property to wifi setting
Add a new 'ap-isolation' property to the wifi setting, useful to
prevent communication between wireless clients.
2020-07-01 17:36:20 +02:00
Beniamino Galvani 639f2e36b0 docs: fix build with meson
Fix the following build error with meson:

/usr/bin/python3 /home/bgalvani/work/NetworkManager/tools/generate-docs-nm-settings-docs-merge.py man/nm-settings-docs-nmcli.xml --only-from-first clients/cli/generate-docs-nm-settings-nmcli.xml libnm/nm-propery-infos-nmcli.xml libnm/nm-settings-docs-gir.xml
Traceback (most recent call last):
  File "/home/bgalvani/work/NetworkManager/tools/generate-docs-nm-settings-docs-merge.py", line 120, in <module>
    xml_roots = list([ET.parse(f).getroot() for f in gl_input_files])
  File "/home/bgalvani/work/NetworkManager/tools/generate-docs-nm-settings-docs-merge.py", line 120, in <listcomp>
    xml_roots = list([ET.parse(f).getroot() for f in gl_input_files])
  File "/usr/lib64/python3.8/xml/etree/ElementTree.py", line 1202, in parse
    tree.parse(source, parser)
  File "/usr/lib64/python3.8/xml/etree/ElementTree.py", line 584, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '--only-from-first'

Fixes: 3c11116c48 ('docs: in "generate-docs-nm-settings-docs-merge.py" only take properties from first setting')
2020-06-12 16:01:45 +02:00
Thomas Haller 125cbf5737
docs: show aliases for settings in man nm-settings-nmcli 2020-06-12 14:01:26 +02:00
Thomas Haller 3347278799
docs: don't show properties in man nm-settings-nmcli as table 2020-06-12 13:05:53 +02:00
Thomas Haller a1161781bd
docs: drop "property aliases" section from man nmcli
The aliases are now shown in `man nm-settings-nmcli`. Also the list there
gets generated and isn't hardcoded.
2020-06-12 13:02:02 +02:00
Thomas Haller a3b9b661d4
docs: add "Alias" column to man nm-settings-nmcli 2020-06-12 12:09:30 +02:00
Thomas Haller 3c11116c48
docs: in "generate-docs-nm-settings-docs-merge.py" only take properties from first setting
Especially for "nm-settings-docs-nmcli.xml", the first XML to merge is
"clients/cli/generate-docs-nm-settings-nmcli.xml". That file is
generated with the meta data from nmcli, and it contains all the
properties that are supported. Properties from other XML files,
that are passed as additional arguments should not be merged.

In most cases, there is no difference. It only matters for
"ipv6.dad-timeout" and "user.data". For example, "ipv6.dad-timeout"
is supported by GObject (part of "libnm/nm-settings-docs-gir.xml"),
but not by nmcli. Don't include it in the manual.

This also drops the now empty settings "dummy", "user", and "generic".
2020-06-12 10:26:27 +02:00
Thomas Haller 10020a9466
docs: generate nm-settings-docs-nmcli.xml based on nmcli meta data
We have the correct meta-data of supported properties for nmcli. It is
in clients/common. Use that for generating the manual page instead of
the properties that are part of libnm (some properties may be in libnm
but not supported by nmcli, or some properties may not be GObject
properties, and not detected as by GObject introspection).
2020-06-11 10:53:50 +02:00
Thomas Haller 87edf2f298
docs: move generate-docs scripts from "libnm/" to "tools/"
They are not only used in "libnm/" directory. Move to "tools/".
2020-06-11 10:53:50 +02:00
Thomas Haller d2f8d5a4fa
docs: move "nm-settings-docs-{dbus,nmcli}.xml" from "libnm/" to "man/"
"nm-settings-docs-nmcli.xml" will be generated by a tool that depends on
"clients/common/". The file should thus not be in libnm directory, otherwise
there is a circular dependency.

Move the file to "man/" directory.

For consistency, also move "nm-settings-docs-dbus.xml". Note that we
cannot move "nm-settings-docs-gir.xml" to "man/", because that one is
needed for building clients.
2020-06-11 10:53:50 +02:00
Thomas Haller 98f3d68cbe
docs: unify "nm-property-infos-*.xml" and "nm-settings-docs-*.xml" (root element)
There is no need that two XML files that essentially hold similar
information are fundamentally different. Make them more alike.
This way, we can use the same tools that operate on either of
these input files.
2020-06-11 10:53:50 +02:00
Thomas Haller 09f484ae9f
docs: update documentation for nm-settings-nmcli manual 2020-06-11 10:53:49 +02:00
Thomas Haller 47d39a7fb7
docs: add more nm-settings manpages (dbus,nmcli,keyfile,ifcfg-rh)
A significant part of NetworkManager's API are the connection profiles, documented
in `man nm-settings*`. But there are different aspects about profiles, depending
on what you are interested. There is the D-Bus API, nmcli options, keyfile format,
and ifcfg-rh format. Additionally, there is also libnm API.

Add distinct manual pages for the four aspects. Currently the two new manual
pages "nm-settings-dbus" and "nm-settings-nmcli" are still identical to the
former "nm-settings.5" manual. In the future, they will diverge to
account for the differences.

There are the following aspects:

 - "dbus"
 - "keyfile"
 - "ifcfg-rh"
 - "nmcli"

For "libnm" we don't generate a separate "nm-settings-libnm" manual
page. That is instead documented via gtk-doc.

Currently the keyfile and ifcfg-rh manual pages only detail settings
which differ. But later I think also these manual pages should contain
all settings that apply.
2020-06-11 10:53:49 +02:00
Thomas Haller d8992ce931
docs: rename "nm-settings-docs.xml" to "nm-settings-docs-dbus.xml"
"nm-settings-docs-dbus.xml" is "nm-settings-docs-gir.xml" merged with
"nm-property-infos-dbus.xml". The name should reflect that, also because
we will get more files with this naming scheme.
2020-06-11 10:53:49 +02:00
Thomas Haller a9001261fb
docs: rename "nm-property-infos" doc files
The naming was inconsistent. Rename.

- all the property infos of this kind a now consistently called
  "libnm/nm-property-infos-$TAG.xml".

- the script to generate files "libnm/nm-property-infos-$TAG.xml" is
  now called "libnm/generate-docs-nm-property-infos.pl".
2020-06-11 10:53:49 +02:00
Benjamin Porter f6e41c19ff
man: extents -> extends in man page
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/497
2020-05-08 08:06:33 +02:00
Beniamino Galvani 2035353dab man: initrd: describe differences from network-legacy module 2020-05-06 10:33:42 +02:00
Beniamino Galvani fbf54ab182 initrd: parse 'rd.net.timeout.dhcp' option 2020-05-06 10:32:25 +02:00
Beniamino Galvani f14cc584d5 initrd: add command line option to specify initrd data directory 2020-05-06 10:32:25 +02:00
Thomas Haller 0b168f7b99
dispatcher: clarify documentation about first argument to dispatcher scripts for "connectivity-change"
The manual page claimed that for "connectivitiy-change" actions, the dispatcher
scripts would get as first argument (the device name) "none". That was not done,
only for "hostname" actions.

For consistency, maybe that should be adjusted to also pass "none" for connectivity
change events. However, "none" is really an odd value, if there is no device. Passing
an empty word is IMO nicer. So stick to that behavior, despite being inconsistent.
Also fix the documentation about that.
2020-04-30 21:50:28 +02:00
Thomas Haller e468b48ab7
nm-online: allow configuring timeout via NM_ONLINE_TIMEOUT environment
https://bugzilla.redhat.com/show_bug.cgi?id=1828458

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/484
2020-04-30 21:46:59 +02:00
Thomas Haller 9b295f0df5 dhcp: make connection.mud-url configurable as global connection default
Conceptionally, the MUD URL really depends on the device, and not so
much the connection profile. That is, when you have a specific IoT
device, then this device probably should use the same MUD URL for all
profiles (at least by default).

We already have a mechanism for that: global connection defaults. Use
that. This allows a vendor drop pre-install a file
"/usr/lib/NetworkManager/conf.d/10-mud-url.conf" with

  [connection-10-mud-url]
  connection.mud-url=https://example.com

Note that we introduce the special "connection.mud-url" value "none", to
indicate not to use a MUD URL (but also not to consult the global connection
default).
2020-04-28 13:01:18 +02:00
Beniamino Galvani 25583de20b man: mention the meaning of may-fail in the nm-online man page
Commit b2a0738765 ('man: improve manual page for nm-online') removed
the explanation of how may-fail can be used to wait for a specific
address family during boot. I found that part useful. Add it again,
adapting it to the new behavior introduced by 1e5206414a ('device:
don't delay startup complete for pending-actions "autoconf", "dhcp4"
and "dhcp6"').

https://bugzilla.redhat.com/show_bug.cgi?id=1825666
2020-04-23 17:31:11 +02:00
Thomas Haller 2f20878dbf man: fix obsolete references to monitor-connection-files in manual pages
monitor-connection-files was deprecated and disabled by default for a long
time. In the meantime, it has no effect at all.

Remove references from the manual pages.
2020-04-10 15:02:20 +02:00
Thomas Haller 3477d764d3 man: clarify description of keyfiles in man nm-settings-keyfile
Before:

  It writes files out in a .ini-style format in
  /etc/NetworkManager/system-connections/.
  ...
  For security, it will ignore files that are readable or
  writable by any user or group other than 'root' since private
  keys...

After:

  The files are in a .ini-style format and located in
  /etc/NetworkManager/system-connections/,
  /usr/lib/NetworkManager/system-connections/ and
  /run/NetworkManager/system-connections/.
  ...
  For security, it will ignore files that are readable or
  writable by any user other than 'root' since private keys...

https://bugzilla.redhat.com/show_bug.cgi?id=1819259
2020-04-01 16:01:55 +02:00
Thomas Haller 46dd4d0fbf meson: merge branch 'inigomartinez/meson-license'
Add SPDX license headers for meson files.

As far as I can tell, according to RELICENSE.md file, almost everybody
who contributed to the meson files agreed to the LGPL-2.1+ licensing.
This entails the vast majority of code in question.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/397
2020-03-28 12:45:19 +01:00
Beniamino Galvani 2334a27692 cli: support setting removal 2020-03-23 11:42:57 +01:00
Thomas Haller b2a0738765 man: improve manual page for nm-online
https://bugzilla.redhat.com/show_bug.cgi?id=1706646
2020-03-17 13:33:51 +01:00
Thomas Haller a8442c8243 man: show example for nmcli --ask device wifi connect in nmcli-example manual 2020-03-06 09:48:58 +01:00
Auke Kok 425293b13c man: show example for nmcli device wifi connect in nmcli-example manual
Add the only important example that this file should have

All other examples are nice. But when you install a console-only
machine and read the NM man pages, you are none the wiser, because
something as simple like this isn't covered in the man pages.

I've seen other users complain about it, and I've torn my hair out
over this several times.

[thaller@redhat.com: changed subject line of patch]
2020-03-06 09:48:58 +01:00
Thomas Haller 9dde86d02c ndisc: implement "ipv6.ra-timeout" property 2020-02-17 14:43:13 +01:00
Iñigo Martínez 648155e4a1 license: Add license using SPDX identifiers to meson build files
License is missing in meson build files. This has been added using
SPDX identifiers and licensed under LGPL-2.1+.
2020-02-17 13:16:57 +01:00
Antonio Cardace 1ccdce0c1d man: fix missing tag 2020-01-29 17:32:47 +01:00
Antonio Cardace 7ef684b1b3 man: add dnsmasq option documentation on added dns servers 2020-01-29 17:25:21 +01:00
Thomas Haller 655e1aa97f man: document connectivity.enabled option in NetworkManager.conf manual 2019-12-28 15:20:06 +01:00
Thomas Haller 6d7446e52f core: add main.auth-polkit option "root-only"
We always build with PolicyKit support enabled, because it has no
additional dependencies, beside some D-Bus calls.

However, in NetworkManager.conf the user could configure
"main.auth-polkit" to disable PolicyKit. However, previously it would
only allow to disable PolicyKit while granting access to all users.

I think it's useful to have an option that disables PolicyKit and grants
access only to root. I think we should not go too far in implementing
our own authorization mechanisms beside PolicyKit (e.g. you cannot
disable PolicyKit and grant access based on group membership of the
user). However, disabling PolicyKit can be useful sometimes, and it's
simple to implement a "root-only" setup.

Note one change is that when NetworkManager now runs without a D-Bus
connection (in initrd), it would deny all non-root requests. Previously
it would grant access. I think there should be little difference in
practice, because if we have no D-Bus we also don't have any requests to
authenticate.
2019-12-11 11:52:05 +01:00
Thomas Haller 3d07708f59 doc: clarify default values for ipv4.mdns and ipv4.llmnr settings
LLMNR and mDNS settings can have their global default value configured
in "NetworkManager.conf".

Global default values should work the way that all regular values of the property
can be configured explicitly in the connection profile. The special "default" value
only indicates to allow lookup of the global default, but it should not have a
meaning of its own.

Note that if mDNS/LLMNR settings are left unspecified, we will set the
argument to SetLinkMulticastDNS() and SetLinkLLMNR() functions to "",
which means that systemd-resolved decides on a default. Also, depending
on the DNS plugin, the default value differs. This is all fine however.
In this case, the ultimate default value depends on other things (like
the DNS plugin), but each possible value is in fact explicitly
configurable. We also do that for "ipv6.ip6-privacy".

Anyway, cleanup the documentation a bit and try to better explain what
the default is.
2019-12-10 16:49:23 +01:00
Beniamino Galvani 316ff68bfa dhcp: support FQDN flags in the dhclient backend
Make the dhclient backend honor the ipv4.dhcp-fqdn-flags setting.
2019-11-28 17:56:35 +01:00
Thomas Haller 6d7270e222 build/meson: cleanup configuration_data() for paths
We don't need such data duplicated. The build setup should
have only one configuration_data() for patching such values.

Now we only have one global, immutable data_conf dictionary with
configuration values. Note that none of the users of data_conf uses all
entries, but as the entries are basically only dependent on the
meson/configure option and valid for the entire project, this simplifies
to handling.
2019-11-22 15:59:31 +01:00
Beniamino Galvani 6f16e524be core: support ipvX.dhcp-iaid properties 2019-11-11 10:31:36 +01:00
Lubomir Rintel 7061341a41 cli: add "nmcli d wifi show"
A quick overview of the currently connected Wi-Fi network, including
credentials. Comes handy if someone wants to connect more devices to
their Hotspot or the same network as they are connected to.
2019-10-18 17:38:57 +02:00
Thomas Haller 597e4b2d1e cli: honor NO_COLOR environment variable to prevent automatic ASCII colors
See-also: https://no-color.org/
2019-10-08 12:18:20 +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 a5bc4cb785 man: add examples how to configure bluetooth devices to man nmcli-examples. 2019-09-22 16:05:50 +02:00
Lubomir Rintel 25fadf8f92 cli: add kill switch indication to "nmcli" output
There is some guess work done on the client side. Perhaps the
o.fd.NM.Device could be extended to indicate which kill switch is the
device disabled by. This could be good enough for now though.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/271/commits
2019-09-20 12:49:21 +02:00
Thomas Haller cec39d76bd man/cli: better explain modifying properties regarding +/- modifiers 2019-08-16 08:16:02 +02:00