2021-08-19 15:26:16 +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/](../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.
|
2022-04-04 19:35:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
2023-06-26 09:47:20 +02:00
|
|
|
|
|
|
|
|
### Hints
|
|
|
|
|
|
|
|
|
|
- Eagerly commented out the unused function.
|
|
|
|
|
- Patching header is best avoided, #if 0 and #endif function patching should
|
|
|
|
|
only be used in the C source.
|
|
|
|
|
- We may create some dummy files in
|
|
|
|
|
`src/libnm-systemd-{shared,core}/sd-adapt-\*/` for resolving the compiling
|
|
|
|
|
error (missing header file)
|