Commit graph

21 commits

Author SHA1 Message Date
Thomas Haller f7f0e18175
CONTRIBUTING: fix example command line about git-notes 2023-02-07 14:02:32 +01:00
Thomas Haller 037fdcaf20
CONTRIBUTING: add hint for using cscope 2023-01-17 16:29:06 +01:00
Frederic Martinsons c62d6fa84e
Correct meson command examples
The change directory option must be after subcommand.
Moreover use directly build directory (which is default showing
in 'Building from Source' section)
The install command must specify the build directory

Signed-off-by: Frederic Martinsons <frederic.martinsons@unabiz.com>
2023-01-02 09:29:16 +01:00
Thomas Haller 8c779a7d8b
docs: fix typo in docs for upstream mailing list
Fixes: f25a6aad93 ('all: update references to our mailing list')
2022-11-07 17:50:29 +01:00
Thomas Haller f25a6aad93
all: update references to our mailing list
The mailing list migrated from GNOME (networkmanager-list@gnome.org)
to freedesktop (networkmanager@list.freedesktop.org).

See also https://mail.gnome.org/archives/networkmanager-list/2022-November/msg00000.html.
2022-11-02 12:58:57 +01:00
Thomas Haller 231671fd02
all: add src/nm-compat-headers for patching included system headers
We already have src/linux-headers, where we have complete copies of linux
user space headers. Of course that exists, because we want to use certain
features and don't depend on the installed kernel headers. Which works
well, because kernel user space API is stable, and we anyway want to
support compiling against a newer kernel and run against an older (e.g.
in a container). So having our copy of newer kernel headers is merely
as if we compiled against as newer kernel.

Add "src/nm-compat-headers" which has a similar purpose, but a different
approach. Instead of replacing the included header entirely, include
the system header and patch it with #define.

Use this for "linux/if_addr.h". Of course, the approach here is that we
no longer include <linux/if_addr.h> directly, but instead include
"nm-compat-headers/linux/if_addr.h".
2022-09-23 11:43:33 +02:00
Thomas Haller 50dc71323b
CONTRIBUTING: document style guide about naming in header files 2022-01-20 08:14:48 +01:00
Thomas Haller e0cdbd733b
CONTRIBUTING: update "Coding Style" section 2022-01-11 15:18:08 +01:00
Thomas Haller 9ab22dbc80
CONTRIBUTING: clarify on the use/lack of curly braces around blocks
This is the style we have ever since. Spell it out. With the difference
that now single line statements may have braces.

Recently we were already sloppy about allowing curly braces for single line
statements. Maybe there was a point in that. Imagine you start with:

    if (condition)
        call(some, parameter);

Afterwards you change the code so that the line becomes too long and
clang-format wraps the line (requiring you to add braces):

    if (condition) {
        call(some,
             call_another_function(hey));
    }

The problem now is that this diff is larger than it would have been, if
you added curly braces from the start. Also, it means you have to go
back and forth to add/remove these braces, as clang-format reformats the
code.

Also, if you have if-else-if blocks, then mixing multi line statements
with single line statements is also cumbersome, because when something
needs to change, the diff is may be larger (and the change more
cumbersome).

So it might be convenient to just always add the braces, and the
documented style now allows for that.
2022-01-11 14:30:33 +01:00
Thomas Haller fefaab7d50
CONTRIBUTING: update style 2021-10-06 09:23:46 +02:00
Thomas Haller 2a07043489
std-aux: add "libnm-std-aux/nm-linux-compat.h" header to avoid build errors
We have a copy of a few linux user space headers in `src/linux-headers`.
The idea is that we want to use recent kernel API, and not depend on the
kernel UAPI headers installed on the build system (and not need to
workaround that).

However, we may not be able to simply compile them, because they too
have dependencies. For example,

  ../src/linux-headers/ethtool.h:1389:2: error: implicit declaration of function '__KERNEL_DIV_ROUND_UP' [-Werror=implicit-function-declaration]
    __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
    ^

As workaround, don't include headers from "linux-headers" directly,
but only include the new "libnm-std-aux/nm-linux-compat.h" adapter
header, which tries to solve these incompatibilities.

Fixes: 34d48d2596 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
2021-09-08 15:27:17 +02:00
Thomas Haller 5cd6eafb2a
CONTRIBUTING: add "Building from Source" section
And move sections around.
2021-08-27 14:33:39 +02:00
Thomas Haller 27427bad90
CONTRIBUTING: explain order of includes of header files 2021-08-26 14:50:16 +02:00
Thomas Haller 727bea99b6
CONTRIBUTING: explain which version of clang-format to use 2021-08-26 14:23:17 +02:00
Thomas Haller ea49b50651
all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
Thomas Haller 4d6edd8419
docs: explain GObject properties in CONTRIBUTING.md 2021-06-07 18:08:23 +02:00
Thomas Haller 95085acec3
update references from "freenode" to "Libera.Chat" 2021-05-25 11:09:37 +02:00
Thomas Haller 8e5374512e
CONTRIBUTING: add section about unit tests 2021-05-11 12:24:38 +02:00
Wen Liang 2e96cdfe5e CONTRIBUTIING: add chapter describing Cscope and code structure
Signed-off-by: Wen Liang <liangwen12year@gmail.com>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/792
2021-03-24 16:42:40 +01:00
Thomas Haller ed6621bdcd
CONTRIBUTING: style fixes and improve text 2021-03-16 14:29:08 +01:00
Thomas Haller fb66bb2bcb
CONTRIBUTING: rename file to have .md extension
We should write our CONTRIBUTING files in markdown syntax, because
it's nice to read a plain text and gets nicely rendered.

However, if the file doesn't have a ".md" extension, gitlab's
web interface shows it as plain text file.

Rename the file.

This possibly breaks links like [1], but referring to a branch name
(and not a commit ID or a tag) is anyway fragile. Hence, I don't try
to fix that by adding a symlink or similar, because I think that just
makes it more confusing.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/master/CONTRIBUTING
2021-03-16 14:00:01 +01:00
Renamed from CONTRIBUTING (Browse further)