1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

73130 Commits

Author SHA1 Message Date
Mike Yuan
48fb49f1bd
shared/verbs: minor modernization 2024-04-22 20:35:51 +08:00
Luca Boccassi
f64222b748
Merge pull request #32347 from yuwata/sd-radv-reachable-time
sd-radv: allow to configure reachable time
2024-04-22 14:04:25 +02:00
Daan De Meyer
1b889631ed core: Check for TERM=dumb in show_status()
We shouldn't try to use any ANSI escape sequences if TERM=dumb.
Also, the "\r\n" we output can get interpreted as a double newline
(for example by Github Actions), so let's output just "\n" when
TERM=dumb to clean up the CI logs.
2024-04-22 13:27:27 +02:00
Luca Boccassi
c3411932b1
Merge pull request #32389 from keszybz/bin-sbin-merge
Try PATH without sbin even if compiled with split-bin=true
2024-04-22 13:07:48 +02:00
Lennart Poettering
21a3bc6b9f tpm2-util: add generic wrapper tpm2_context_new_or_warn() that wrpas tpm2_context_new and logs about errors
We so far just print a short log message that is not very useful, let's
add some recognizable error codes, and output better log messages if we
can't get TPM stuff to work.

Fixes: #31925
2024-04-22 12:40:09 +02:00
Yu Watanabe
2fa480592d sd-event: fix fd leak when fd is owned by IO event source
When an IO event source owns relevant fd, replacing with a new fd leaks
the previously assigned fd.
===
sd_event_add_io(event, &s, fd, ...);
sd_event_source_set_io_fd_own(s, true);
sd_event_source_set_io_fd(s, new_fd);  <-- The previous fd is not closed.
sd_event_source_unref(s);  <-- new_fd is closed as expected.
===

Without the change, valgrind reports the leak:
==998589==
==998589== FILE DESCRIPTORS: 4 open (3 std) at exit.
==998589== Open file descriptor 4:
==998589==    at 0x4F119AB: pipe2 (in /usr/lib64/libc.so.6)
==998589==    by 0x408830: test_sd_event_source_set_io_fd (test-event.c:862)
==998589==    by 0x403302: run_test_table (tests.h:171)
==998589==    by 0x408E31: main (test-event.c:935)
==998589==
==998589==
==998589== HEAP SUMMARY:
==998589==     in use at exit: 0 bytes in 0 blocks
==998589==   total heap usage: 33,305 allocs, 33,305 frees, 1,283,581 bytes allocated
==998589==
==998589== All heap blocks were freed -- no leaks are possible
==998589==
==998589== For lists of detected and suppressed errors, rerun with: -s
==998589== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
2024-04-22 18:30:12 +08:00
dependabot[bot]
3ee5e3d046 build(deps): bump pkg/arch from ccc32ea to 124b1da
Bumps pkg/arch from `ccc32ea` to `124b1da`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 12:02:16 +02:00
Yu Watanabe
4f52944054 man: fix typo
Follow-ups for 418f2dc755.
2024-04-22 18:44:48 +09:00
Yu Watanabe
0fe4a1c870 test-network: add test for [IPv6SendRA] ReachableTimeSec= and RetransmitSec= 2024-04-22 18:42:56 +09:00
Yu Watanabe
5d8b72e1e0 man: slightly rephrase RetransmitSec= setting 2024-04-22 18:42:46 +09:00
Yu Watanabe
59d475ba40 network/radv: introduce ReachableTimeSec= setting
To make the reachable time in the RA header sent by networkd
configurable.
2024-04-22 18:41:37 +09:00
Yu Watanabe
bc50700c7e sd-radv: allow to configure reachable time in RA header 2024-04-22 18:40:10 +09:00
Luca Boccassi
77db149c73
Merge pull request #32391 from DaanDeMeyer/optimization
mkosi: Add environment variable to set the optimization level
2024-04-22 11:21:04 +02:00
Lennart Poettering
b7866fa6aa
Merge pull request #31987 from flatcar-hub/krnowak/usr-perm-check
sysext: Fix issues with merged hierarchy mode
2024-04-22 11:14:35 +02:00
Daan De Meyer
4c38aa446c
Merge pull request #32387 from DaanDeMeyer/unit-test-fixes
Various unit test improvements
2024-04-22 10:51:45 +02:00
Daan De Meyer
8308fcfec3 mkosi: Explicitly disable fortify for debian/ubuntu
We do the same for the other distributions, so let's do so for
debian/ubuntu as well.
2024-04-22 10:49:32 +02:00
Zbigniew Jędrzejewski-Szmek
2e8e26c32f NEWS: reword a few sentences 2024-04-22 10:49:09 +02:00
Daan De Meyer
4ccc28b8a8 mkosi: Use awk to avoid dpkg-buildpackage warning
Let's strip unnecessary whitespace to avoid a dpkg-buildpackage
warning.
2024-04-22 10:48:52 +02:00
Daan De Meyer
4de750ce90 mkosi: Add environment variable to set the optimization level 2024-04-22 10:29:21 +02:00
Zbigniew Jędrzejewski-Szmek
c1fa6427f2 sd-path: rename output param
As requested in review.
2024-04-22 09:55:17 +02:00
Zbigniew Jędrzejewski-Szmek
0f36a4c897 Try path without sbin even if compiled with split-bin=true
I'm working on the transition to merged sbin in Fedora. While the transition is
happening (and probably for a while after), we need to compile systemd with
split-bin=true to support systems upgraded from previous versions. But when the
system has been upgraded and already has /usr/sbin that is a symlink, be nice
and give $PATH without sbin.

We check for both /usr/sbin and /usr/local/sbin. If either exists and is not a
symlink to ./bin, we retain previous behaviour. This means that if both are
converted, we get the same behaviour as split-bin=false, and otherwise we
get the same behaviour as before.

sd-path uses the same logic. This is not a hot path, so I got rid of the nulstr
macros that duplicated the logic.
2024-04-22 09:53:24 +02:00
Daan De Meyer
7a7d7a2e22 test: Don't allocate scope if already running in unit with delegated cgroup
If we're already running in a unit with delegation turned on, let's
skip allocation of a scope unit and cgroup subroot. This allows journald
to correctly attribute the logs of all subprocesses spawned by tests such
as test-execute to the test-execute service when the test is running in a service.
2024-04-22 09:42:29 +02:00
Daan De Meyer
b8c6c35804 test: Use log_setup()
Specifically, this will make tests log to the journal if stderr is
connected to the journal. This means we get proper log priorities
and such compared to if we just logged to stderr.
2024-04-22 09:42:29 +02:00
Daan De Meyer
26d79ab86d test-execute: Use new assertion macros 2024-04-22 09:42:29 +02:00
Daan De Meyer
dd8e82f0d6 test: Add ASSERT_ERROR() and ASSERT_ERROR_ERRNO()
For when we expect something to fail with a specific error.
2024-04-22 09:42:29 +02:00
Daan De Meyer
949d967964 test: Make sure test_fdset_close_others does not affect logging fds 2024-04-22 09:42:29 +02:00
Daan De Meyer
4b3e5fd91f test-bpf-restrict-fs: Add @application to allowed filesystems as well
We might be booting from virtiofs which is fuse so we need @application
as well.
2024-04-22 09:42:28 +02:00
Daan De Meyer
cbfc550000 test-bpf-firewall: Skip if ping is not available 2024-04-22 09:42:28 +02:00
Daan De Meyer
d714891f05
Merge pull request #32386 from DaanDeMeyer/mkosi
Various mkosi improvements
2024-04-22 09:26:59 +02:00
Daan De Meyer
fa15d444be mkosi: Install various system users/groups in opensuse images
These don't get pulled in automatically and there doesn't seem to
be a "system-users" package so install the ones we need for the
integration tests manually.
2024-04-22 09:09:32 +02:00
Daan De Meyer
9fd52adacf mkosi: Backport Fedora basic users/groups sysusers files to CentOS
CentOS does not ship these sysusers dropins which set up basic system
users and groups. Until we can move to CentOS Stream 10, let's add the
dropins ourselves to make sure the base system users/groups are available
on CentOS.
2024-04-22 09:09:32 +02:00
Daan De Meyer
245387721b mkosi: Install procps-ng in all images
Required for TEST-01-BASIC.
2024-04-22 09:09:32 +02:00
Daan De Meyer
4edc85a6c9 mkosi: Make sure systemd-libs is updated on Arch
The Arch Linux PKGBUILD does not (yet) have versioned dependencies
between the systemd packages, causing systemd-libs to not get updated
to 256-devel if systemd 256-devel is installed. Let's explicitly install
the newer version of systemd-libs as well for now until this problem is
fixed.
2024-04-22 09:09:32 +02:00
Daan De Meyer
27e7b633bb mkosi: Make sure ping is installed
Required for test-bpf-firewall.
2024-04-22 09:09:32 +02:00
Daan De Meyer
865f67701c mkosi: Disable rpm package notes
This introduces dependencies on various environment variables set
by rpmbuild which will not be set when rerunning meson inside the
VM/container so let's disable package notes to avoid these dependencies,
as the package notes aren't terribly useful in this scenario anyway.
2024-04-22 09:09:32 +02:00
Daan De Meyer
1531413efa mkosi: Make sure serial console line wrapping is re-enabled 2024-04-22 09:09:30 +02:00
Daan De Meyer
a32d6161bb mkosi: Update to latest 2024-04-22 09:08:16 +02:00
Luca Boccassi
8f0de5c433
Merge pull request #32372 from yuwata/sd-radv-trivial-cleanups
sd-radv: several trivial cleanups
2024-04-20 15:24:02 +02:00
Luca Boccassi
cefbfd3f0f NEWS: fix typo 2024-04-20 14:09:48 +01:00
Mike Yuan
f8598699e7
Merge pull request #32370 from YHNdnzj/vpick-check-early
shared/vpick: some minor cleanups
2024-04-20 21:02:37 +08:00
Luca Boccassi
6e6deacc61
Merge pull request #32359 from poettering/vmspawn-hyperv-enlight
some hyperv related enhancement in detect-virt + vmspawn
2024-04-20 14:40:14 +02:00
Frantisek Sumsal
49c11c789a ci: fix systemd-machined component name
Follow-up for d762f4d52d.
2024-04-20 14:38:54 +02:00
Luca Boccassi
af46138f39
Merge pull request #32276 from yuwata/network-global-use-domains-setting
network: introduce protocol-independent UseDomains= setting
2024-04-20 13:30:00 +02:00
Yu Watanabe
cb7e892c22 sd-journal: downgrade log message "Unused data (entry_offset==0)"
This happens when journal is rotated after a data is written but before
an entry that linked to the data is not written yet.
This is neither data corruption, nor program error. Let's downgrade the
log level.

Closes #32153.
2024-04-20 13:27:37 +02:00
Yu Watanabe
f0297ea097 test: add test case for sd_journal_{get,seek,test}_cursor()
For issue #31516.
2024-04-20 13:26:57 +02:00
Lennart Poettering
8653ef5ca2 update NEWS 2024-04-20 12:13:13 +02:00
Lennart Poettering
895cf7015d update TODO 2024-04-20 12:10:42 +02:00
Lennart Poettering
9573c0ba56 vmspawn: enable vmgenid for all VMs
This passes an ID derived from the vmgenid down to all VMs. This is
useful to have an identifier for this VM generation id. We derive it
from the invocation ID, if we have one, otherwise we randomize it.

Eventually we should make use of the vmgenid changing to re-acquire MAC
addresses, DHCP leases as such. Let's for now enable the VMM side of the
concept as first step towards that.
2024-04-20 12:10:42 +02:00
Lennart Poettering
615906cdcf sd-id128: add an app-specific flavour of the invocation ID too 2024-04-20 12:10:42 +02:00
Lennart Poettering
6f9a1adf6d vmspawn: add env var that can extend the qemu cmdline
This is a bit hackish, but really useful sometimes to play around with
some qemu switches.
2024-04-20 12:10:42 +02:00