]>
git.ipfire.org Git - thirdparty/systemd.git/log
Yu Watanabe [Thu, 11 Apr 2024 05:02:21 +0000 (14:02 +0900)]
network/ndisc: fix updating valid lifetime of configured address
This makes the logic mostly follows RFC 4862 section 5.5.3 (e),
as draft-ietf-6man-slaac-renum-07 is deprecated.
Fixes #31449.
Yu Watanabe [Thu, 11 Apr 2024 03:00:52 +0000 (12:00 +0900)]
network/ndisc: set provider address in caller
Follow-up for
43d184682d640e438ad140b0743e2fd258455b12 .
No functional change, just refactoring.
Yu Watanabe [Thu, 11 Apr 2024 00:51:49 +0000 (09:51 +0900)]
Merge pull request #32202 from DaanDeMeyer/assert
tests: Improve assertion error messages
Luca Boccassi [Wed, 10 Apr 2024 22:15:56 +0000 (23:15 +0100)]
Merge pull request #32181 from YHNdnzj/open-file
Some fixes/improvements for OpenFile=
Luca Boccassi [Wed, 10 Apr 2024 22:12:21 +0000 (23:12 +0100)]
Merge pull request #32195 from yuwata/network-ndisc-mtu
network: several cleanups for IPv6 MTU
Luca Boccassi [Wed, 10 Apr 2024 21:59:01 +0000 (22:59 +0100)]
Merge pull request #32166 from yuwata/network-rfc7217-dad
network: generate another address on conflict
Yu Watanabe [Tue, 9 Apr 2024 19:03:46 +0000 (04:03 +0900)]
libsystemd-network: do not trigger assertion by sd_*_is_running() with NULL
If systemd is built with developer mode, previously they trigger
hard assertions. Even built with release mode, we should not log about
that. Let's silently accept NULL and return false.
Prompted by https://github.com/systemd/systemd/pull/32166#issuecomment-
2044710151 .
Luca Boccassi [Wed, 10 Apr 2024 21:52:45 +0000 (22:52 +0100)]
Merge pull request #32204 from DaanDeMeyer/post-rewrite
git: Add post-rewrite hook that invokes git submodule update
Luca Boccassi [Wed, 10 Apr 2024 21:52:11 +0000 (22:52 +0100)]
Merge pull request #32205 from YHNdnzj/bless-boot
Minor cleanup for bless-boot
Mike Yuan [Wed, 10 Apr 2024 19:57:34 +0000 (03:57 +0800)]
core/dbus-execute: fix potential memory leak
Mike Yuan [Wed, 10 Apr 2024 20:10:36 +0000 (04:10 +0800)]
core/execute: introduce exec_command_free
Mike Yuan [Wed, 10 Apr 2024 19:56:48 +0000 (03:56 +0800)]
core/dbus-execute: modernize a bit
Mike Yuan [Wed, 10 Apr 2024 19:21:41 +0000 (03:21 +0800)]
core/load-fragment: modernize config_parse_exec
Daan De Meyer [Wed, 10 Apr 2024 11:40:16 +0000 (13:40 +0200)]
docs: Add Tests section to coding style doc
Daan De Meyer [Wed, 10 Apr 2024 11:31:58 +0000 (13:31 +0200)]
Introduce ASSERT_OK_ERRNO()
ASSERT_OK() is for functions that return negative errno. Let's
introduce ASSERT_OK_ERRNO() for syscalls that return -1 and store
the error in errno.
Daan De Meyer [Wed, 10 Apr 2024 11:23:53 +0000 (13:23 +0200)]
tests: Improve assertion error messages
Mike Yuan [Wed, 10 Apr 2024 15:02:01 +0000 (23:02 +0800)]
units/systemd-boot-check-no-failures.service: drop unneeded dep on shutdown.target
Mike Yuan [Wed, 10 Apr 2024 14:51:31 +0000 (22:51 +0800)]
bless-boot-generator: use generator_add_symlink
Mike Yuan [Wed, 10 Apr 2024 15:01:47 +0000 (23:01 +0800)]
core: use FOREACH_ARRAY at 3 more places
Ivan Kruglov [Mon, 8 Apr 2024 15:12:48 +0000 (17:12 +0200)]
ASSERT_NULL/ASSERT_NOT_NULL
Frantisek Sumsal [Wed, 10 Apr 2024 14:54:37 +0000 (16:54 +0200)]
Merge pull request #32201 from aafeijoo-suse/test-minor-fixes
test: minor fixes
Mike Yuan [Wed, 10 Apr 2024 11:04:50 +0000 (19:04 +0800)]
test: merge TEST-77-OPENFILE into TEST-23-UNIT-FILE
And add coverage for #32179
Daan De Meyer [Wed, 10 Apr 2024 12:35:20 +0000 (14:35 +0200)]
git: Add post-rewrite hook that invokes git submodule update
git rebase does not support a --recurse-submodules switch to automatically
check out the submodules at their registered commits during or after a rebase.
Instead, let's use the post-rewrite git hook to do this ourselves.
Daan De Meyer [Wed, 10 Apr 2024 12:36:59 +0000 (14:36 +0200)]
Update submodules
Mike Yuan [Tue, 9 Apr 2024 13:54:30 +0000 (21:54 +0800)]
shared/open-file: use xescape to escape ':'
Fixes #32179
Mike Yuan [Wed, 10 Apr 2024 11:18:19 +0000 (19:18 +0800)]
shared/open-file: make open_file_free_many static inline
Mike Yuan [Tue, 9 Apr 2024 13:48:01 +0000 (21:48 +0800)]
core/exec-invoke: modernize get_open_file_fd a bit
Mike Yuan [Tue, 9 Apr 2024 13:38:16 +0000 (21:38 +0800)]
core/exec-invoke: modernize connect_unix_harder
Pablo Méndez Hernández [Wed, 10 Apr 2024 08:55:53 +0000 (10:55 +0200)]
man/journald: Add missing configuration files
The man page was missing:
- `/run/systemd/journald.conf`
- `/usr/lib/systemd/journald.conf`
as valid configuration files.
Fixes: https://github.com/systemd/systemd/issues/32199
Antonio Alvarez Feijoo [Wed, 10 Apr 2024 09:08:25 +0000 (11:08 +0200)]
tools/check-version-history: skip test if lxml is not installed
```
================================= 1070/1408 ==================================
test: systemd:dist / check-version-history
start time: 07:55:05
duration: 0.03s
result: exit status 1
...
----------------------------------- stderr -----------------------------------
Traceback (most recent call last):
File "/mnt/work/systemd/upstream-fork/main/tools/check-version-history.py", line 6, in <module>
import lxml.etree as tree
ModuleNotFoundError: No module named 'lxml'
==============================================================================
```
Follow-up for
3691e7fce70149ed19edc5d3003e2d7c936c147a
Antonio Alvarez Feijoo [Wed, 10 Apr 2024 09:07:32 +0000 (11:07 +0200)]
test: add missing header to test.h
```
../src/shared/tests.h:361:28: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
361 | int _pid = fork(); \
| ^~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
| ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: error: implicit declaration of function ‘_exit’ [-Werror=implicit-function-declaration]
369 | _exit(EXIT_SUCCESS); \
| ^~~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
| ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
369 | _exit(EXIT_SUCCESS); \
| ^~~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
1114 | ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
| ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
369 | _exit(EXIT_SUCCESS); \
| ^~~~~
../src/test/test-macro.c:1115:9: note: in expansion of macro ‘ASSERT_SIGNAL’
1115 | ASSERT_SIGNAL(ASSERT_OK(-ENOANO), SIGABRT);
| ^~~~~~~~~~~~~
../src/test/test-macro.c:1119:21: error: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Werror=implicit-function-declaration]
1119 | ASSERT_TRUE(getpid());
| ^~~~~~
```
Follow-up for #32189
Lennart Poettering [Tue, 9 Apr 2024 10:39:28 +0000 (12:39 +0200)]
secure-boot: tighten enrollment logic a bit regarding file sizes
It's OK the dbx file is not loaded, but let's explicitly check for that
(i.e. if the buffer is actually non-NULL), rather than the size of the
bufer, since empty files actually do exist.
Or in other words, let's not magically suppress enrollment of empty
files, but let uefi firmware handle these on their own.
Follow-up for:
57ea8012d6f0b9a3622d4a84d93020020a3aca3c
Lennart Poettering [Tue, 9 Apr 2024 10:39:01 +0000 (12:39 +0200)]
boot: re-align table
We like our tables aligned.
(Also suppres the final two fields, which are all zeroes anyway, to
declutter a bit)
Lennart Poettering [Tue, 9 Apr 2024 15:29:33 +0000 (17:29 +0200)]
resolved: dns_name_equal() can fail, handle that reasonably
Ignoring errors can be OK sometimes, but we should make this explicit.
Yu Watanabe [Wed, 10 Apr 2024 07:57:00 +0000 (16:57 +0900)]
Merge pull request #32189 from mrc0mmand/test-tweaks
Another batch of assorted test tweaks
Yu Watanabe [Wed, 10 Apr 2024 07:54:39 +0000 (16:54 +0900)]
Merge pull request #32191 from yuwata/network-persistent-storage-follow-ups
network: follow-ups for persistent storage
Lennart Poettering [Tue, 9 Apr 2024 16:45:56 +0000 (18:45 +0200)]
ndisc: use memzero() where appropriate
Lennart Poettering [Tue, 9 Apr 2024 15:51:54 +0000 (17:51 +0200)]
sd-journal: make sure sd_journal_add_match() also accepts SIZE_MAX as size
In many of our internal functions that take a pointer + a size we have
introduced the rule that SIZE_MAX as size means: take strlen().
sd_journal_add_match() has something similar, but the special value is
0, not SIZE_MAX. This is a bit ugly, since a zero size data block is
theoretically fine. The only reason sd_journal_add_match() gets away
with using this special value is because valid matches must consist of
at least 2 chars, hence cannot be zero.
But let's make this more robust and less surprising when compared to the
rest of our code, and *also* accept SIZE_MAX to mean strlen().
No actual code changes, just some clean-up.
Daan De Meyer [Fri, 5 Apr 2024 13:21:49 +0000 (15:21 +0200)]
core: Serialize both pid and pidfd
If we try to deserialize only a pidfd that points to a process that
has been reaped, creating the pidref object will fail, which means that
we'll try to create a pidref object from the serialized pid that comes
next. If the pid has already been reused, this will succeed and we'll
now have a pidref that points to a different process.
Let's avoid this issue by serializing both the pidfd and the pid and
creating the pidref object directly from both. This means we'll reuse
the deserialized pidfd instead of opening a new one. We'll then immediately
notice the pidfd is dead and do the appropriate follow up depending on
the unit type.
Yu Watanabe [Wed, 10 Apr 2024 02:14:13 +0000 (11:14 +0900)]
test-network: add test case for ndisc MTU option
Yu Watanabe [Wed, 10 Apr 2024 01:13:07 +0000 (10:13 +0900)]
network/ndisc: set IPv6 MTU through sysctl
Closes #31496.
Yu Watanabe [Wed, 10 Apr 2024 01:07:50 +0000 (10:07 +0900)]
network/sysctl: round IPv6 MTU with the current device MTU rather than the maximum MTU
Otherwise, writing IPv6 MTU may fail.
This also makes link_set_ipv6_mtu() take log level about rounding IPv6 MTU,
and downgrade the log level from LOG_WARNING -> LOG_INFO, as we usually
use LOG_WARNING for per-interface critical failure.
Yu Watanabe [Wed, 10 Apr 2024 02:47:09 +0000 (11:47 +0900)]
network: always set IPv6 MTU when we detect the device MTU is changed
Then, we can keep the IPv6 MTU even if the device MTU is changed by an
external tool, e.g. 'ip link set' command.
Yu Watanabe [Wed, 10 Apr 2024 02:35:21 +0000 (11:35 +0900)]
network/setlink: adjust requested MTU when it is ready to set
This should not change any effective behavior.
Just for safety, and making the logic consistent with others, e.g.
setting master ifindex.
Yu Watanabe [Tue, 9 Apr 2024 22:07:34 +0000 (07:07 +0900)]
po: update Japanese translation
Yu Watanabe [Tue, 9 Apr 2024 21:44:02 +0000 (06:44 +0900)]
meson: use headers in our code base when checking filesystem table
Note, GFS2_MAGIC is also defined in missing_magic.h, so
linux/gfs2_ondisk.h is not necessary anymore.
Yu Watanabe [Mon, 8 Apr 2024 00:54:19 +0000 (09:54 +0900)]
basic/missing_magic: drop unnecessary entries and update comments
Yu Watanabe [Tue, 9 Apr 2024 21:38:07 +0000 (06:38 +0900)]
home,resize-fs: replace XFS_SB_MAGIC -> XFS_SUPER_MAGIC
Yu Watanabe [Mon, 8 Apr 2024 00:27:17 +0000 (09:27 +0900)]
basic/linux: copy magic.h to our source code tree
Let's import kernel headers into our source code tree.
Yu Watanabe [Mon, 8 Apr 2024 00:29:21 +0000 (09:29 +0900)]
basic/linux: update linux headers
From Linux 6.9-rc3.
Yu Watanabe [Tue, 9 Apr 2024 19:55:59 +0000 (04:55 +0900)]
network/varlink: fix error cause
Follow-up for
e1254d0616f812d22753421bd791c4486c0a9128 .
Addresses https://github.com/systemd/systemd/pull/31811#discussion_r1557552244.
Yu Watanabe [Tue, 9 Apr 2024 19:51:27 +0000 (04:51 +0900)]
network: open persistent directory without O_PATH
Addresses https://github.com/systemd/systemd/pull/31811#discussion_r1557549629.
Frantisek Sumsal [Tue, 9 Apr 2024 19:16:41 +0000 (21:16 +0200)]
test: wait until the test container is fully booted up
TEST-69 still occasionally times out in CI and appears to be stuck on
boot, so let's see if this helps the situation a bit.
Frantisek Sumsal [Tue, 9 Apr 2024 19:11:26 +0000 (21:11 +0200)]
test: disable background color for nspawn containers
As it makes the logs really messy in certain tests.
Frantisek Sumsal [Tue, 9 Apr 2024 18:55:48 +0000 (20:55 +0200)]
test: set pexpect's logfile early
So we capture the container's boot as well.
Frantisek Sumsal [Tue, 9 Apr 2024 18:15:36 +0000 (20:15 +0200)]
test: give sd-resolved enough time to timeout
The timeout on sd-resolved's side is 5-10s (UDP or TCP), but dig's
default timeout is 5s. Let's give sd-resolved enough time to timeout
before either giving up or checking if it served stale data on dig's
side.
Resolves: #31639
Frantisek Sumsal [Tue, 9 Apr 2024 15:04:50 +0000 (17:04 +0200)]
test: let curl show a potential error in silent mode
I collected a couple of fails in this particular test, but without any
output they're impossible to debug. Let's make this slightly less
annoying and let curl show an error (if any) even in silent mode.
This patch uncovers that curl has been (silently) complaining about not
being able to write to the output destination, because `grep -q`
short-circuits on the first match and doesn't bother reading the rest,
so replace `grep -q` with `grep ... >/dev/null` to force grep to always
read the whole thing from curl.
Frantisek Sumsal [Tue, 9 Apr 2024 12:04:28 +0000 (14:04 +0200)]
test: forward journal to console in TEST-24-CRYPTSETUP
If we fail to mount the encrypted /var during boot we're left with
nothing to debug, so let's do the same thing we do for TEST-08-INITRD
and forward journal to the console.
Frantisek Sumsal [Mon, 8 Apr 2024 16:17:48 +0000 (18:17 +0200)]
test: add a couple of sanity tests for ASSERT_*() macros
Also, introduce ASSERT_SIGNAL() macro that should help us test failing
cases of mentioned macros (which usually end with calling abort()).
Frantisek Sumsal [Mon, 8 Apr 2024 18:32:10 +0000 (20:32 +0200)]
test: handle NULL correctly when passed to ASSERT_EQ()
strcmp() doesn't handle NULLs nicely, so switch to streq_ptr().
Yu Watanabe [Tue, 9 Apr 2024 02:28:20 +0000 (11:28 +0900)]
test-network: add test case for regenerating prefix stable address on conflict
For issue #31605.
Yu Watanabe [Tue, 9 Apr 2024 02:27:41 +0000 (11:27 +0900)]
network/address-generation: regenerate IPv6 prefix stable address on conflict
If a generated address with IPv6Token=prefixstable conflicts with the
one on another node or interface, let's generate another address and try
to assign it.
This improves support of RFC 7217.
Fixes #31605.
Frantisek Sumsal [Tue, 9 Apr 2024 10:44:46 +0000 (12:44 +0200)]
tree-wide: make sure net/if.h is included before any linux/ header
The linux/ headers include linux/libc-compat.h that makes sure the
linux/ headers won't redeclare symbols already declared by net/if.h, but
glibc's net/if.h doesn't do that, so if the include order is reversed
we'll end up with a bunch of errors about redeclared stuff:
[3/519] Compiling C object test-network-tables.p/src_network_test-network-tables.c.o
FAILED: test-network-tables.p/src_network_test-network-tables.c.o
cc -Itest-network-tables.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -Isrc/libsystemd-network -I../src/libsystemd-network -Isrc/network -I../src/network -I../src/network/netdev -I../src/network/tc -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -DTEST_CODE=1 -MD -MQ test-network-tables.p/src_network_test-network-tables.c.o -MF test-network-tables.p/src_network_test-network-tables.c.o.d -o test-network-tables.p/src_network_test-network-tables.c.o -c ../src/network/test-network-tables.c
In file included from ../src/basic/linux/if_bonding.h:47,
from ../src/network/netdev/bond.h:5,
from ../src/network/test-network-tables.c:3:
../src/basic/linux/if.h:111:41: error: redeclaration of enumerator ‘IFF_UP’
111 | #define IFF_UP IFF_UP
| ^~~~~~
../src/basic/linux/if.h:84:9: note: previous definition of ‘IFF_UP’ with type ‘enum net_device_flags’
84 | IFF_UP = 1<<0, /* sysfs */
| ^~~~~~
../src/basic/linux/if.h:112:41: error: redeclaration of enumerator ‘IFF_BROADCAST’
112 | #define IFF_BROADCAST IFF_BROADCAST
| ^~~~~~~~~~~~~
...
This also drops remaining workarounds from the last time this issue was
brought up (
6f270e6bd8 ) since they shouldn't be needed anymore if the
order of the includes is the "correct" one. I also added a comment to
each affected include when this is inevitably encountered again in the
future.
Resolves: #32160
Antonio Alvarez Feijoo [Tue, 9 Apr 2024 12:21:08 +0000 (14:21 +0200)]
test-date: add missing header
```
[587/2863] Compiling C object test-date.p/src_test_test-date.c.o
FAILED: test-date.p/src_test_test-date.c.o
cc -Itest-date.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -DTEST_CODE=1 -MD -MQ test-date.p/src_test_test-date.c.o -MF test-date.p/src_test_test-date.c.o.d -o test-date.p/src_test_test-date.c.o -c ../src/test/test-date.c
../src/test/test-date.c: In function ‘main’:
../src/test/test-date.c:86:13: error: implicit declaration of function ‘access’; did you mean ‘accept’? [-Werror=implicit-function-declaration]
86 | if (access("/usr/share/zoneinfo/Asia/Seoul", F_OK) >= 0) {
| ^~~~~~
| accept
../src/test/test-date.c:86:13: warning: nested extern declaration of ‘access’ [-Wnested-externs]
../src/test/test-date.c:86:54: error: ‘F_OK’ undeclared (first use in this function)
86 | if (access("/usr/share/zoneinfo/Asia/Seoul", F_OK) >= 0) {
| ^~~~
../src/test/test-date.c:86:54: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
```
Fixes
ae4088b23e1658a6f6e940d6e1c8d0a14f93449b
Lennart Poettering [Tue, 9 Apr 2024 10:16:08 +0000 (12:16 +0200)]
service: explicitly add comment about donated reference on parameter
Follow-up for:
d6a911e906e3fe0fdd357f2120209372574a8406
See my comment: https://github.com/systemd/systemd/pull/31916/commits/
d6a911e906e3fe0fdd357f2120209372574a8406 #r1557384101
Mike Yuan [Tue, 9 Apr 2024 17:45:12 +0000 (01:45 +0800)]
pidref: 0 -> NULL for pointer
Daan De Meyer [Tue, 9 Apr 2024 14:18:25 +0000 (16:18 +0200)]
mkosi; Fix permissions of mkosi.postinst script
Must be executable.
Luca Boccassi [Tue, 9 Apr 2024 12:30:59 +0000 (13:30 +0100)]
Merge pull request #32154 from DaanDeMeyer/mkosi
mkosi: Make scripts more generic
dependabot[bot] [Tue, 9 Apr 2024 09:45:45 +0000 (09:45 +0000)]
build(deps): bump pkg/fedora from `
2822a03 ` to `
3f8c38e `
Bumps pkg/fedora from `
2822a03 ` to `
3f8c38e `.
---
updated-dependencies:
- dependency-name: pkg/fedora
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Daan De Meyer [Tue, 9 Apr 2024 09:57:38 +0000 (11:57 +0200)]
mkosi: Drop out-of-date comment
Daan De Meyer [Mon, 8 Apr 2024 11:57:48 +0000 (13:57 +0200)]
mkosi: Unify initrd post-install scripts
Just like we already have $SYSTEMD_PACKAGES for systemd packages to
re-install in the main image, let's add $INITRD_PACKAGES for all
systemd packages to re-install in the initrd.
Daan De Meyer [Mon, 8 Apr 2024 11:42:22 +0000 (13:42 +0200)]
mkosi: Install openSUSE-release instead of distribution-release
distribution-release is a virtual package that is by default satisfied
by the openSUSE MicroOS-release package. Let's make sure we pull in the
generic openSUSE-release package instead by installing
patterns-base-minimal_base which has a Suggests dependency on
openSUSE-release which makes sure it takes priority over the MicroOS one.
Daan De Meyer [Mon, 8 Apr 2024 10:52:56 +0000 (12:52 +0200)]
mkosi: Make scripts more generic
We might want to run the build scripts outside of mkosi as well at
some point, e.g. to build an rpm after booting the image, so let's
make them more generic by using /usr/lib/os-release to figure out
which pkg specs we should use instead of $PKG_SUBDIR. To make ubuntu
use the debian pkg spec, we add a symlink pkg/ubuntu which points to
debian/ in the same directory.
Daan De Meyer [Mon, 8 Apr 2024 15:23:21 +0000 (17:23 +0200)]
mkosi: Update to latest
Daan De Meyer [Tue, 9 Apr 2024 08:24:06 +0000 (10:24 +0200)]
mkosi: Update pkg/arch to latest and install systemd-tests
The arch PKGBUILD now packages the tests when building for upstream
so let's make sure we install the new package.
Mike Yuan [Mon, 8 Apr 2024 20:04:21 +0000 (04:04 +0800)]
hibernate-resume-config: apply ENABLE_EFI ifdef correctly
Currently, validate_efi_hibernate_location is
fully conditioned out if !ENABLE_EFI, but
get_efi_hibernate_location() still calls it.
Daan De Meyer [Mon, 8 Apr 2024 17:56:36 +0000 (19:56 +0200)]
test: Various build environment fixes
All bets are off in build chroots, so let's handle more cases of
files or executables that might not be available in build chroots.
Specifically, these are all fixes to allow the unit tests to run
in the opensuse build chroot.
Ronan Pigott [Mon, 8 Apr 2024 19:45:01 +0000 (12:45 -0700)]
resolve: really always initialize aux
dns_transaction_request_dnssec_rr was already adjusted in
400171036592 ,
to allow for the return parameter to be passed uninitialized. However
this codepath was missed, meaning this function could sometimes return
success without having actually set the parameter.
Fixes: 400171036592 ("resolved: minor dnssec fixups")
Fixes: 47690634f157 ("resolved: don't request the SOA for every dns label")
Yu Watanabe [Tue, 9 Apr 2024 01:49:32 +0000 (10:49 +0900)]
network/dhcp6: return earlier if no lease acquired
Previously, even If an interface has not acquired a DHCPv6 lease,
networkd logs a misleading message:
===
Apr 09 10:44:57 systemd-networkd[
3970750 ]: veth99: DHCPv6 lease lost
===
The function should do nothing when no lease acquired. Let's return
earlier and suppress the log message.
Yu Watanabe [Tue, 9 Apr 2024 02:16:33 +0000 (11:16 +0900)]
network/address-generation: make generate_stable_private_address() optionally take the previously generated address
Currently, the argument is not used yet. The new argument will be used later
for regenerating prefix stable address on conflict.
Yu Watanabe [Tue, 9 Apr 2024 02:26:16 +0000 (11:26 +0900)]
network/address-generation: also provide used tokens when generating address
Then, assign the token to the corresponding Address object.
Yu Watanabe [Tue, 9 Apr 2024 02:22:00 +0000 (11:22 +0900)]
network/address: make Address object optionally take reference to IPv6Token
Currently, the element is unused. Preparation for later commits.
Yu Watanabe [Tue, 9 Apr 2024 02:13:33 +0000 (11:13 +0900)]
network/address-generation: expose IPv6Token and introduce new/ref/unref functions for the type
No functional change. Preparation for later commits.
Yu Watanabe [Tue, 9 Apr 2024 03:02:20 +0000 (12:02 +0900)]
network/ndisc: allow to call ndisc_request_address() without sd_ndisc_router object
Preparation for later commits.
Yu Watanabe [Tue, 9 Apr 2024 02:05:24 +0000 (11:05 +0900)]
network/dhcp-pd: split out dhcp_pd_request_address_one()
No functional change. Preparation for later commit.
Yu Watanabe [Mon, 8 Apr 2024 22:52:28 +0000 (07:52 +0900)]
Merge pull request #31997 from yuwata/network-ndisc-zero-lifetime
network: fixlets for zero lifetime
Antonio Alvarez Feijoo [Mon, 8 Apr 2024 15:08:52 +0000 (17:08 +0200)]
vmspawn: fix `sd_bus_message_append()` arguments and add missing error check
Daan De Meyer [Mon, 8 Apr 2024 21:17:33 +0000 (23:17 +0200)]
docs: Suggest soft-reboot to restart pid1 and all daemons in mkosi VM
Luca Boccassi [Mon, 8 Apr 2024 19:03:32 +0000 (20:03 +0100)]
Merge pull request #32104 from yuwata/network-ndisc-redirect
network/ndisc: add support for Redirect message
Mike Yuan [Mon, 8 Apr 2024 18:48:30 +0000 (02:48 +0800)]
Merge pull request #32156 from YHNdnzj/mountfsd-followup
Some cleanup for uid-range
Daan De Meyer [Mon, 8 Apr 2024 15:08:39 +0000 (17:08 +0200)]
mkosi: Fix debian submodule commit
This was accidentally changed in https://github.com/systemd/systemd/pull/32155
Usman Akinyemi [Mon, 8 Apr 2024 10:54:16 +0000 (06:54 -0400)]
I made more unit test to use the test macro
Mike Yuan [Mon, 8 Apr 2024 12:24:23 +0000 (20:24 +0800)]
userdbctl: correct uid_range_covers check
The third param should be the number of uids.
Mike Yuan [Mon, 8 Apr 2024 12:24:02 +0000 (20:24 +0800)]
userdbctl: use FOREACH_ARRAY more
Mike Yuan [Mon, 8 Apr 2024 12:19:57 +0000 (20:19 +0800)]
userdbctl: avoid NULL pointer deref
Error from uid_range_load_userns is ignored,
so 'p' could be NULL.
Mike Yuan [Mon, 8 Apr 2024 11:38:29 +0000 (19:38 +0800)]
uid-range: place 'ret' param at last
Mike Yuan [Mon, 8 Apr 2024 11:48:01 +0000 (19:48 +0800)]
uid-range: use FOREACH_ARRAY at one more place
Mike Yuan [Mon, 8 Apr 2024 12:09:54 +0000 (20:09 +0800)]
labeler: add mountfsd and nsresource
Daan De Meyer [Mon, 8 Apr 2024 10:14:47 +0000 (12:14 +0200)]
docs: Add note on RuntimeBuildSources= to hacking guide
Daan De Meyer [Mon, 8 Apr 2024 09:59:16 +0000 (11:59 +0200)]
Merge pull request #32141 from DaanDeMeyer/mkosi
Install build dependencies into final image