1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

69570 Commits

Author SHA1 Message Date
Yu Watanabe
7d11a20ee4
Merge pull request #30494 from keszybz/trivial-cleanups
Trivial cleanups
2023-12-18 08:25:02 +09:00
Topi Miettinen
f432aa9083
Revert "test: temporarily skip checking NFT sets in test_address_static"
This reverts commit e4a80de119.
2023-12-17 18:01:42 +02:00
Topi Miettinen
1ce2ffac6c
test-network: fix racy test for address_static
NFT sets must be installed before starting networkd, otherwise some sets may be
installed too late.

Closes #30427
2023-12-17 17:59:53 +02:00
QuonXF
6902da549b Add Bosto BT-12HD series to hwdb 2023-12-17 16:57:42 +09:00
Ronan Pigott
f5de77fa08 resolved-util: NUL-terminate host label
In case the host has a 63-byte hostname, we must have enough space for a
NUL terminator as well.
2023-12-17 16:56:43 +09:00
Diego Viola
e6267e832b meson: make lines more consistent 2023-12-16 13:43:44 +01:00
Mike Yuan
e18427642e
machine: also clean up gid_map fscanf error handling 2023-12-16 18:49:20 +08:00
Frantisek Sumsal
23eca16aad Revert "test: disable TEST-08-INITRD on ubuntu CI"
No longer necessary, as the test checks if systemd ran in the initrd.

This reverts commit 0d290cbcd6.
2023-12-15 16:51:25 +01:00
Frantisek Sumsal
57d61ff319 test: skip TEST-08-INITRD if systemd didn't run in the initrd
This test requires systemd in the initrd, which is not the case in
mkinitrd-based initrds (Ubuntu/Debian).

Resolves: #30481
2023-12-15 16:51:25 +01:00
Zbigniew Jędrzejewski-Szmek
88cc9cc7bc test-systemctl-enable: fix typo
Follow-up for fe6e0cfa19.
2023-12-15 16:22:24 +01:00
Zbigniew Jędrzejewski-Szmek
28fd1ba375 NEWS: fix version 2023-12-15 16:22:24 +01:00
Zbigniew Jędrzejewski-Szmek
ace3e93fee man: use <simplelist> for two more lists 2023-12-15 14:32:50 +01:00
Zbigniew Jędrzejewski-Szmek
73e97bb064 man: use <simplelist> for file lists in synopsis
With <para><filename>…</filename></para>, we get a separate "paragraph" for
each line, i.e. entries separated by empty lines. This uses up a lot of space
and was only done because docbook makes it hard to insert a newline. In some
other places, <literallayout> was used, but then we cannot indent the source
text (because the whitespace would end up in the final page). We can get the
desired result with <simplelist>.

With <simplelist> the items are indented in roff output, but not in html
output. In some places this looks better then no indentation, and in others it
would probably be better to have no indent. But this is a minor issue and we
cannot control that.

(I didn't convert all spots. There's a bunch of other man pages which have two
lines, e.g. an executable and service file, and it doesn't matter there so
much.)
2023-12-15 14:27:28 +01:00
Mike Yuan
7312c422f0
basic/uid-range: add uid_map_read_one helper 2023-12-15 21:22:51 +08:00
Mike Yuan
121b705426
cgroup-util: check ferror() first
Also, there's no need to set use errno_or_else(), since fscanf() is
documented to set errno on error.
2023-12-15 21:21:17 +08:00
Mike Yuan
674becc987
fsck: use correct errno 2023-12-15 21:21:15 +08:00
Luca Boccassi
1905d621db
Merge pull request #30484 from mrc0mmand/test-tweaks
A couple of test-related tweaks
2023-12-15 12:20:35 +01:00
Andrew Sayers
ff47602f5e Fix a typo in the org.freedesktop.systemd1 man page 2023-12-15 07:39:05 +09:00
Frantisek Sumsal
438c7cb20e test: tell delv to load anchors from /etc/bind.keys explicitly
Since [0] delv no longer does that automagically, so we have to that
explicitly with each delv invocation.

Resolves: #30477

[0] c144fd2871
2023-12-14 23:11:12 +01:00
Frantisek Sumsal
58bcbad86c test: don't check for -Dinstall-tests=true with NO_BUILD=1 2023-12-14 23:11:12 +01:00
Frantisek Sumsal
fdd380dde2 test: install empty directories with NO_BUILD=1
Resolves: #30478
2023-12-14 23:11:12 +01:00
Frantisek Sumsal
c15e51bde2 test: update comment style & drop one extraneous newline
Follow-up to 9fb2a61830.
2023-12-14 23:08:44 +01:00
Frantisek Sumsal
8f7c876bdc test: forward journal messages to console during sd-bsod tests
Since we nuke the journal multiple times during that, which makes
potential fails undebugable.
2023-12-14 23:08:44 +01:00
Richard Maw
566f1000d1 mkosi: make sysvinit path inference consistent
The integration tests use /etc/rc.d/init.d if it exists
or falls back to /etc/init.d,
while the mkosi.build.chroot script dereferenced /etc/init.d.

This produces inconsistent results, as sometimes an image can be made
that has systemd built to expect /etc/init.d but /etc/rc.d/init.d
also exists.
2023-12-14 16:26:23 +00:00
Richard Maw
e07bbb8290 mkosi: Install locales in fedora
locale files are not generated on-demand in Fedora like they are in
Debian-like systems and are typically installed from package instead.

This is necessary for the locale tests,
which expect en_US.UTF-8 to be available.
2023-12-14 16:26:23 +00:00
Yu Watanabe
ae3fb96d1f
Merge pull request #30440 from yuwata/network-nexthop-cleanups-2
network/nexthop: several cleanups
2023-12-14 21:44:02 +09:00
Zbigniew Jędrzejewski-Szmek
f36c796e0f man/tmpfiles: update summary
It hasn't been just about "volatile" and "files" for a long time.
2023-12-14 12:52:28 +01:00
Yu Watanabe
5f6ab79571 sd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_REPLACE
See insert_nexthop() in net/ipv4/nexthop.c of the kernel.
2023-12-14 18:58:26 +09:00
Yu Watanabe
68149118cb network/nexthop: check existing nexthop can be replaced with requested one 2023-12-14 18:58:26 +09:00
Yu Watanabe
cdf3bee6a2 network/nexthop: do not add NextHop object to Link on requesting
Then, all nexthops managed by networkd really exist (unless the kernel
silently removes a nexthop).

This is the same for nexthop already done by
3c283289ae and
0a0c2672db (for address), and
5d098f5d36 (for neighbor).
2023-12-14 18:58:26 +09:00
Yu Watanabe
352eba2e49 network/nexthop: manage all nexthops by manager
The kernel manages nexthops by their IDs. Previously networkd manages
nexthops in three ways:
- by the corresponding link, if a nexthop has ifindex,
- by the manager, if a nexthop does not have ifindex,
- by the manager with their IDs.

This unifies the three managements of nexthops into one, and use the
same way as the kernel uses.

This is the one for nexthop already done by
aa9626ee3b for neighbor.
2023-12-14 18:58:26 +09:00
Yu Watanabe
ac21790335 network/nexthop: rename manager_get_nexthop_by_id() -> nexthop_get_by_id() 2023-12-14 18:58:26 +09:00
Yu Watanabe
84faee4141 network/nexthop: rename nexthop_owned_by_link() -> nexthop_bound_to_link()
No functional change.
2023-12-14 18:58:19 +09:00
Yu Watanabe
a533473a48 network/nexthop: NextHop.id is always positive when nexthop_configure() is called
If a nexthop is requested without a valid ID, then nexthop_acquire_id()
assigns an unused ID. So, at the time nexthop_configure() is called, the
ID is always valid.
2023-12-14 18:57:43 +09:00
Yu Watanabe
c624143b59 network/nexthop: do not assign invalid ID
This also reduces the scope of the iterator.
2023-12-14 18:57:43 +09:00
Yu Watanabe
58830ef5eb network/nexthop: split-out nexthop_update_group()
No functional change, just refactoring and preparation for later
commits.
2023-12-14 18:57:43 +09:00
Yu Watanabe
c2aed12836 network: do not trigger assertion when link_get_by_index() called with an invalid ifindex
Should not change any behavior. Preparation for later commit.
2023-12-14 18:57:43 +09:00
Daan De Meyer
3d11b46bf7
Add $SYSTEMD_HWDB_UPDATE_BYPASS (#30463)
Same as $KERNEL_INSTALL_BYPASS, but for hwdb. This will speed up
cross architecture image builds in mkosi as I can disable package
managers from running the costly hwdb update stuff in qemu user
mode and run it myself with a native systemd-hwdb with --root=.
2023-12-14 18:57:05 +09:00
Mike Yuan
bd546b9b48 machine-credential: introduce MachineCredentialContext
This allows more straightforward memory management and
the use of static destructor.

Requested (by me) in https://github.com/systemd/systemd/pull/30143#discussion_r1401980763
2023-12-14 08:50:44 +00:00
Luca Boccassi
266e8d0eb6
Merge pull request #30417 from YHNdnzj/unit-log-resource
core/unit: clean up unit_log_resources
2023-12-14 08:45:26 +00:00
Artur Pak
5f1cc125a8 Add three Dell platforms to sensor accel location base 2023-12-14 08:41:28 +00:00
Daan De Meyer
9ce4dad81f
Merge pull request #30467 from poettering/loop-block-tweaks
various tweaks to block device ioctls, and loop device mgmt
2023-12-14 09:38:17 +01:00
Lennart Poettering
21c43631d7 rlimit-util: add pid_getrlimit() helper
This is gets the resource limits off a specified process, and is very
similar to prlimit() with a NULL new_rlimit argument. In fact, it tries
that first. However, it then falls back to use /proc/$PID/limits. Why?
Simply because Linux prohibits access to prlimit() for processes with a
different UID, but /proc/$PID/limits still works.

This is preparation to allow nspawn to run unprivileged.
2023-12-14 08:31:29 +00:00
Luca Boccassi
1845fccada
Merge pull request #30469 from poettering/userdbd-tweaks2
userdb: some smaller userdb tweaks
2023-12-14 08:19:51 +00:00
Colin Walters
47374e0601 docs/CREDENTIALS: Don't write authorized_keys with executable bits
No reason to make this file executable.
2023-12-14 07:58:30 +00:00
Lennart Poettering
bb59b92256 mount-util: make sure mount_switch_root() works as clean NOP when '/' is specified as target 2023-12-14 13:13:45 +09:00
Richard Maw
0947748555 mkosi: Add testuser and tar to system image
The integration tests are installed into the image
with the intention that it should be possible to run those tests,
but those tests require the named user testuser
and tar is needed for machined-import
2023-12-13 17:55:46 +00:00
Richard Maw
eae7ce2d61 mkosi: Allow the output directory to be overridden
For integration tests it would be preferable to operate on a copy
so tests can be run in parallel and avoid interfering.
2023-12-13 17:55:46 +00:00
Richard Maw
8799346862 test: mount overlayfs over /usr in some tests
Most of the integration tests have been made to not write to /usr
but some genuinely need to do so.

Because mkosi creates images with a read-only /usr
it is not normally writeable.

By mounting an overlayfs with /usr as the lower dir
and upper and working dirs in /var tests may write to /usr.
2023-12-13 17:55:45 +00:00
Lennart Poettering
3d33798803 userdbd: split out function to find listener fd
no actual code changes, just some refactoring and modernization
2023-12-13 18:25:10 +01:00