1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00
Commit Graph

74445 Commits

Author SHA1 Message Date
Léane GRASSER
d870f2335b l10n: fix credits for the French translation
(cherry picked from commit 0d8b38415c)
2024-07-22 11:05:08 +01:00
Lennart Poettering
8aa9e60f89 sd-device: remove debug log message when dirs are missing
This is a common case, and nothing noteworthy at all. For example, if we
establish an enumerator for listing all devices tagged by some tag, then
the per-tag dir is not going to exist if there are currently no devices
tagged that way, but that's a really common case, and doesn't really
deserve any mention, not even at debug level.

(cherry picked from commit a68c97a545)
2024-07-22 11:05:08 +01:00
Mike Yuan
86ec58a55c id128: refuse --app-specific= if we're listing GPT types
Prompted by #33737

The intention of b37e8184a5
is to expose sd_id128_get_app_specific() on command line.
But combining that with GPT type list makes little sense.

(cherry picked from commit fa96c55b7b)
2024-07-22 11:05:08 +01:00
Luca Boccassi
b60d5bc1b7 gpt: add more architecture aliases
Same as the other aliases. Allows chaining commands like:

$ systemd-id128 show -P root-$(dpkg-architecture --query DEB_HOST_ARCH)
4f68bce3e8cd4db196e7fbcaf984b709

(cherry picked from commit f0b151ce86)
2024-07-22 11:05:08 +01:00
Jörg Behrmann
b786185406 kernel-install: Remove existing loader entries and UKIs
When boot counting is enabled, adding a new loader entry or UKI can conflict
with an existing one that has booted successfully and therefore has its boot
counter removed. systemd-bless-boot will fail to bless the new successful boot,
since a file without a boot counter already exists. Since kernel-install will
clobber existing files without boot counting, we should therefore remove files
without a boot count as well, when we add a file with one.

Fixes: #33504
(cherry picked from commit 99d4575e54)
2024-07-22 10:32:31 +01:00
Lennart Poettering
e63ae80a89 bootspec: correct log level for fatal errors
(cherry picked from commit 7b7f4c2608)
2024-07-22 10:31:02 +01:00
Lennart Poettering
3736e21341 bootspec: implement sorting by tries left/done, to match what sd-boot does
(cherry picked from commit 35451a3204)
2024-07-22 10:31:02 +01:00
Lennart Poettering
18143edf3e boot: compare filename suffixes without case
This is VFAT world after all.

(cherry picked from commit 764faf6040)
2024-07-22 10:31:02 +01:00
Lennart Poettering
78fcf31f08 man: some fixes
Addons are called addons, say so. And some other fixes.

(cherry picked from commit 40d9c16d1e)
2024-07-22 10:26:01 +01:00
Kuntal Majumder
bcda6d4637 man: fix typo in unit options section
Fixes #32918

(cherry picked from commit f9572d2b89)
2024-07-22 10:26:01 +01:00
Luca Boccassi
1747350ffd fsck: do not pull down mount units on soft-reboot
Otherwise they will pull down the disk too, which we don't want on soft-reboot

(cherry picked from commit bbb0b72849)
2024-07-22 10:26:01 +01:00
ZHANG Yuntian
a68188e985 man: fix typo in the alias symlink name
Symlink created by Alias will use the value as the file name.

(cherry picked from commit 3f0e7fd4fd)
2024-07-22 10:26:01 +01:00
Henry Chen
15c236806c vmspawn: define default machines for mips targets
All mips variants of qemu-system default to malta.

Signed-off-by: Henry Chen <henry.chen@oss.cipunited.com>
Signed-off-by: Henry Chen <chenx97@aosc.io>
(cherry picked from commit 3bff57b765)
2024-07-22 10:26:01 +01:00
Ronan Pigott
fa2b2da146 path: drop IN_ATTRIB from parent directory watches
When watching a given pathspec, systemd unconditionally installs
IN_ATTRIB watches to track the link count of the resolved file. This
way, we are notified if the watched path disappears, even if the
resolved file inode is not removed.

Similarly, systemd installs inotify watches on each parent directory, to
be notified when the specified path appears. However, for these watches
IN_ATTRIB is an unnecessary addition to the mask. In inotify, IN_ATTRIB
on a directory is emitted whenever the attributes of any child changes,
which, for many paths, has the potential to cause a high number of
spurious wakeups in systemd. Let's remove IN_ATTRIB from the mask when
installing watches on the parent directories of the specified path.

(cherry picked from commit 8bf8c7d83d)
2024-07-22 10:26:01 +01:00
fwfy
35e2f62967 Remove extra period at the end of systemd-bsod's unit description. (#33632)
* Remove extra period at end of unit description.

Having an extra period at the end of this unit description makes log entries pertaining to it appear weirdly, as it seems the default expectation is that there is not to be a period at the end of a unit description.

e.g.: `systemd[1]: Started Displays emergency message in full screen..`

(cherry picked from commit 496b4fa0e9)
2024-07-22 10:26:01 +01:00
Daan De Meyer
a40eb432cb test: Set priority for TEST-73-LOCALE
I don't know why yet, but TEST-73-LOCALE can take more than 10
minutes. Until we figure out why, let's give it a higher priority
so it doesn't bottleneck the test run.

(cherry picked from commit 14963ea90d)
2024-07-22 10:26:01 +01:00
Daan De Meyer
172ffeb813 TEST-06-SELINUX: Disable RuntimeBuildSources=
Otherwise fixfiles will try to relabel it which could potentially
lead to disaster. We also change the recommendation in HACKING.md
to set the default so that TEST-06-SELINUX can override it.

(cherry picked from commit 575f954b5d)
2024-07-22 10:26:01 +01:00
Daan De Meyer
2fd3514456 test: Add missing --no-rebuild to doc
Otherwise meson will try to rebuild all targets.

(cherry picked from commit b5eaa52d49)
2024-07-22 10:26:01 +01:00
Daan De Meyer
69c9044525 meson: Bump version to 256.3 2024-07-20 00:33:14 +02:00
Mike Yuan
16b12506a6 core/cgroup: check root cgroup earlier for unit_get_memory_accounting
(cherry picked from commit d3d035395e)
2024-07-20 00:33:14 +02:00
Mike Yuan
06c2ee3979 core/cgroup: make unit_has_host_root_cgroup take const Unit*
(cherry picked from commit 4442aef08e)
2024-07-20 00:33:14 +02:00
Mike Yuan
15732ee31f core: unify reset_accounting handling
Since the introduction of CGroupRuntime, there's no need
to call *_reset_accounting in unit_new(), hence make those
static. While at it, refrain from hardcoding default values
in cgroup_runtime_new(), but call the corresponding funcs.

This also corrects the default value of io_accounting_base.

Fixes #33482

(cherry picked from commit bc347edfe0)
2024-07-20 00:33:14 +02:00
Mike Yuan
50a0a55066 core: do not drop CGroupRuntime when unit stops, but only on GC
Fixes #33149
Replaces #33145

(cherry picked from commit 4918f14ada)
2024-07-20 00:33:14 +02:00
Mike Yuan
b08b5996d3 core/cgroup: use > 0 comparison rather than == 1
(cherry picked from commit 8153be97c4)
2024-07-20 00:33:14 +02:00
Mike Yuan
ffd90200b2 core/cgroup: actually make use of the cached accounting values
If cgroup is already gone, i.e. CGRuntime.cgroup_path is NULL,
do not return -ENODATA prematurely, but check for cached values
first.

For #33149

(cherry picked from commit 3849d1f56b)
2024-07-20 00:33:14 +02:00
Mike Yuan
7684f52839 test-install-root: introduce test case for #33411
(cherry picked from commit 9fb5a8ca24)
2024-07-20 00:33:14 +02:00
Mike Yuan
a42db16a1c shared/install: correctly report changes in install_info_symlink_alias()
Follow-up for b2751cf039

Also make the conditions consistent for install_info_symlink_wants().

Fixes #33411

(cherry picked from commit 4441cf330b)
2024-07-20 00:33:14 +02:00
Mike Yuan
bb83650f96 shared/install: propagate all errors in install_info_apply()
Currently, install_info_apply() only updates r if it's 0,
meaning that if one of the earlier install_info_symlink_alias/wants()
calls returns > 0, errors generated by later calls will be discarded.
Fix that.

(cherry picked from commit a159aa07e1)
2024-07-20 00:33:14 +02:00
Mike Yuan
908edce5b6 shared/install: drop unneeded initialization
(cherry picked from commit dd6b325a05)
2024-07-20 00:33:14 +02:00
Mike Yuan
f414ca0ee3 systemctl: do not try to acquire triggering units for template units
(cherry picked from commit 09d6038d83)
2024-07-20 00:33:14 +02:00
Mike Yuan
67e0d09368 systemctl: skip triggering unit warning if unit vanished
(cherry picked from commit 701bd9d08a)
2024-07-20 00:33:14 +02:00
Mike Yuan
bb71d5dfb4 man/systemctl: --no-reload is honored by mask/unmask/preset too
(cherry picked from commit 399646faac)
2024-07-20 00:33:14 +02:00
Tom Yan
7122e226c3 logind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger
The mode switch from any to pin is currently done in create_session().
However, if no (pinning) session is created before (or after) linger
is disabled, the user will not be gc'd after that. Therefore, also
perform the mode switch when linger is being disabled.

(cherry picked from commit 1df981a74a)
2024-07-20 00:33:14 +02:00
Mike Yuan
5d6bf58cf2 logind-user: take gc_mode into account when reporting user state
Prompted by #33650

Previously, if a user manually starts user@.service (which is
something we support), we'd track it as 'manager' session.
However, since user_get_state() ignores all non-pinning sessions,
if lingering is not enabled, the user state would always be
reported as 'closing', which is spurious.

Let's instead take gc_mode into consideration, and ignore
non-pinning sessions only if USER_GC_BY_PIN.

(cherry picked from commit 56f4ab2906)
2024-07-20 00:33:14 +02:00
Zbigniew Jędrzejewski-Szmek
bcb13a3fa2 test_ukify: do not use files from /boot
They might not be readable to the unprivileged user running the tests
and it shouldn't really matter what is used. OTOH, we need a real kernel
because we look at the header.

(cherry picked from commit 987f4bce93)
2024-07-20 00:33:14 +02:00
Zbigniew Jędrzejewski-Szmek
88264411b6 test_ukify: use sha384 in the signing tests
On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed:

$ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign
  --linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
  --osrel=/tmp/tmp.osrelbl2sr77f
  --cmdline=/tmp/tmp.cmdlineouc7hqtj
  --uname=/tmp/tmp.unamecbjgesty
  --pcrpkey=/tmp/tmpufiadu8l
  --initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd
  --sbat=/tmp/tmp.sbataz9arpy0
  --private-key=/tmp/tmppyf0gx6w
  --public-key=/tmp/tmpufiadu8l
  --bank=sha1
Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
Loaded 'libtss2-esys.so.0' via dlopen()
Loaded 'libtss2-rc.so.0' via dlopen()
Loaded 'libtss2-mu.so.0' via dlopen()
PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7
Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest
Failed to sign PCR policy: Input/output error

(cherry picked from commit 87204601df)
2024-07-20 00:33:14 +02:00
Zbigniew Jędrzejewski-Szmek
8b3bedd821 test_ukify: add instructions
Copied directly from a1d6dbb1c9.

(cherry picked from commit a669091a43)
2024-07-20 00:33:14 +02:00
Lennart Poettering
168b788104 terminal-util: don't issue "ESC c" sequence on reset, but only when erasing the screen
ESC c is a (vaguely defined) "reset to initial state" ANSI sequence.
Many terminals clear the screen in this case, but that's a bit drastic I
think for most resets.

ESC c was added to the reset logic in
00bc83a275 (i.e. very recently), and I
don't think the effect was clear at that time.

Let's keep the ESC c in place however when we actually want to clear the
screen. Hence move it from reset_terminal_fd() into vt_disallocate().

Fixes: #33689
(cherry picked from commit 841eb9c186)
2024-07-20 00:33:14 +02:00
Daan De Meyer
5e4464bb64 mkosi: Bump default device timeout a little
We've been getting some integration test failures due to timeouts
on finding the root partition device. Let's bump the default device
timeout a little to see if it mitigates these failures.

(cherry picked from commit 70510bf282)
2024-07-20 00:33:14 +02:00
Daan De Meyer
0009ed8ee1 meson: Drop version from 256.3 to v256.2
Let's keep the stable version at the version of the previous release
until we do a new stable release. Unlike the main branch, there's no
need to immediately bump the version to the next version as the only
reason we do that in the main branch is to make sure the version from
the main branch sorts higher than any stable releases for the previous
version. This does not apply for stable releases and so we can safely
keep the old version in meson.version until we do a new stable release.
2024-07-19 14:51:47 +02:00
Daan De Meyer
1354f6194c meson: Drop ~devel suffix from systemd-stable version
Every commit in systemd-stable can be considered stable since CI has
to pass for every merge to stable and we don't do any RC releases or
extra testing when doing a new stable release. So let's reflect that
in the versioning by dropping the "~devel" suffix from meson.version.

This allows distributions to do releases from arbitrary commits in
systemd-stable without ending up with ~devel in their versions.
2024-07-19 13:30:40 +02:00
Daan De Meyer
fe37213c55
Merge pull request #33774 from DaanDeMeyer/mkosi-backport
v256-stable: Backport various mkosi changes
2024-07-18 22:35:11 +02:00
Daan De Meyer
677126d300 mkosi: Fix indentation
(cherry picked from commit 2315c6996f)
2024-07-18 21:14:47 +02:00
Daan De Meyer
4c25e572a9 mkosi: Fix typo
Our config parsing is flexible enough that this kind of worked surprisingly
enough.

(cherry picked from commit ac31804db7)
2024-07-18 21:14:41 +02:00
Daan De Meyer
400222fa1c mkosi: Drop util-linux from centos/fedora packages
It's already included in the packages list in mkosi.conf.

(cherry picked from commit 91cc65c5ad)
2024-07-18 21:14:33 +02:00
Daan De Meyer
dc3543a391 mkosi: Drop udev from Packages= list
It's pulled in via VolatilePackages=, no need to put it in Packages=.

(cherry picked from commit 1d914b268c)
2024-07-18 21:14:26 +02:00
Daan De Meyer
82e2a5f47f mkosi: Fix formatting
All of our lists start on the next line, so let's make KernelCommandLine=
fit that as well.

(cherry picked from commit 1250dc6a1d)
2024-07-18 21:14:20 +02:00
Daan De Meyer
11f065d3ee mkosi: Build CentOS Stream 10 images by default
CentOS Stream 10 has a newer util-linux which means the terminal
gets correctly resized to the size specified by mkosi. This is a
much nicer experience than CentOS Stream 9 where you're stuck on
80x24 so let's make CentOS Stream 10 the default release to build.

(cherry picked from commit 773f2e9633)
2024-07-18 21:14:11 +02:00
Daan De Meyer
c54eab5dd0 mkosi: Streamline running the integration tests without building systemd
Let's document in detail how to build the integration test image and run
the integration tests without building systemd. To streamline the process,
we stop automatically using binaries from build/ when invoking mkosi directly
and don't automatically use a tools tree anymore if systemd on the host is too
old. Instead, we document these options in HACKING.md and change the mkosi meson
target to automatically use the current build directory as an extra binary search
path for mkosi.

(cherry picked from commit d279ec4a50)
2024-07-18 21:14:03 +02:00
Daan De Meyer
3bde2db7a4 meson: Drop genkey target
In mkosi.images/system/mkosi.conf, we configure the certificate as
an extra tree so it's available inside the image. However, we pick up
the certificate from the top level repository directory and not from the
build directory where it is generated by the genkey meson target.

We currently have no way to access the build directory that mkosi was
invoked from when parsing the configuration file. Thus we have no way to
specify the correct location to the certificate when it's located in the
build directory.

For now, let's look for the key and certificate in the top level repository
root directory and drop the genkey target.

We don't have to change the Github Actions CI because it already runs genkey
manually before the image build (which is something we forgot to remove when
introducing the genkey target and is the reason this didn't cause issues before).

(cherry picked from commit b00f44c3cf)
2024-07-18 21:13:38 +02:00