NetworkManager/src/libnm-systemd-shared
Thomas Haller 1673c995d9 build: use "-Wno-nonnull-compare" for building systemd
systemd uses that too. We cannot enable compiler warnings that
upstream doesn't want to support.

See-also: b59bce308d
(cherry picked from commit ad22a96da9)
(cherry picked from commit 4c66cce980)
(cherry picked from commit 24363ade54)
2024-09-26 10:14:21 +02:00
..
sd-adapt-shared systemd: drop invalid "user-util.h" compat header 2022-10-04 16:10:14 +02:00
src systemd: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
meson.build build: use "-Wno-nonnull-compare" for building systemd 2024-09-26 10:14:21 +02:00
nm-default-systemd-shared.h build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-sd-utils-shared.c systemd: drop unused nm_sd_hostname_is_valid() 2022-04-20 12:07:04 +02:00
nm-sd-utils-shared.h systemd: drop unused nm_sd_hostname_is_valid() 2022-04-20 12:07:04 +02:00
README.md systemd: describe import of systemd code in README.md 2022-04-04 21:33:06 +02:00

libnm-systemd-shared

This is a fork of systemd source files that are compiled as a static library with general purpose helpers.

We mainly need this for ../libnm-systemd-core/, which contains systemd library with network tools (like DHCPv6).

We should not use systemd directly from our sources, beyond what we really need to make get libnm-systemd-core working.

Reimport Upstream Code

We want to avoid deviations in our fork, and frequently re-import latest systemd version (every 4 to 8 weeks). The reason is that we frequently should check whether important fixes were done in upstream systemd, and the effort of doing that is half the work of just reimporting. Also, by reimporting frequently, we avoid deviating hugely (instead we only deviate largely).

Of course this is cumbersome. We should replace systemd code with something else.

To do a re-import, do:

  • checkout systemd branch.

  • Use the last commit message (git commit --allow-empty -C origin/systemd). Then modify the commit message (git commit --allow-empty --amend). The commit message contains a long script that is used to re-import the code. Adjust the script in the commit message, and run it. Commit the changes on systemd branch.

  • checkout main branch, and git merge systemd. Fix all issues, test, repeat.

  • open merge request, check that all tests pass. In particular, enable build on all test distributions.

  • push main and systemd branch.