Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v254 batch #427

Merged
merged 28 commits into from
Jul 24, 2024
Merged

v254 batch #427

merged 28 commits into from
Jul 24, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Jul 24, 2024

No description provided.

bluca and others added 28 commits July 24, 2024 17:37
(cherry picked from commit bffd3c52ad7113f21523568120d84326151f4600)
(cherry picked from commit ab11d7e177378704859703f4821784462c8966a5)
(cherry picked from commit 4b05dc6)
This is only possible since a recent kernel version, and fails otherwise,
like on CentOS 9

(cherry picked from commit ff8c89aa5a84733dd777f3e9113df33ce6c1ab1e)
(cherry picked from commit a8a7a6716ef2a8e6f10410b9af92fafc3ce204d4)
(cherry picked from commit 29f4756)
(cherry picked from commit 399646faac8ca91a46287e40280f56055c9e0fe8)
(cherry picked from commit bb71d5dfb45bb96ce4a6e535e3a93c14b7074b62)
(cherry picked from commit 9b5cb42)
(cherry picked from commit 701bd9d08ac1d16f74e2b453ca0826e85b1c8491)
(cherry picked from commit 67e0d093682d763ff1d27027a5040571fc039193)
(cherry picked from commit 159d823)
(cherry picked from commit 09d6038d833468ba7c24c658597387ef699ca4fd)
(cherry picked from commit f414ca0ee3bed9b67f76a67d8eb569fda99f5fde)
(cherry picked from commit 633704b)
(cherry picked from commit dd6b325a05c4caccd1a17dd4147f48a916eee386)
(cherry picked from commit 908edce5b6d4fd5243eab3e7fc8ec57d0e8da130)
(cherry picked from commit f6ef5e6)
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 a159aa07e1548367d2fde80cb0d45b869c591864)
(cherry picked from commit bb83650f96af1a7f803696fab5dd06442c789b1c)
(cherry picked from commit 40b9bde)
Follow-up for b2751cf

Also make the conditions consistent for install_info_symlink_wants().

Fixes #33411

(cherry picked from commit 4441cf330b3847d6c553fb230e8e4c86aa75ebb9)
(cherry picked from commit a42db16a1cd0e080d972bd778ea44e981ea31dfc)
(cherry picked from commit 1f94ae4)
(cherry picked from commit 9fb5a8ca24e677e10f8c2b8973b5e2a11676bda0)
(cherry picked from commit 7684f528392ddb94455c924ec820be2c8de6989a)
(cherry picked from commit 8fc5213)
(cherry picked from commit 4442aef08e0fe8ba381b580455f7eb281c5a28a1)
(cherry picked from commit 06c2ee39799064a82d2af1bee7a5c72ebdd66090)
(cherry picked from commit 00b495a)
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 8bf8c7d83dcffffa55b5f534fb98db6b01315dc1)
(cherry picked from commit fa2b2da1466ff225363c1a0492b1b43c1d01dd8a)
(cherry picked from commit 2818d5a)
Symlink created by Alias will use the value as the file name.

(cherry picked from commit 3f0e7fd4fd1d20e3f4be18f485c76d25ce10f41b)
(cherry picked from commit a68188e985d29e46cfa6eb2e17419fad90f0b287)
(cherry picked from commit 4b8ce6a)
Otherwise they will pull down the disk too, which we don't want on soft-reboot

(cherry picked from commit bbb0b72849ebbeeb8e252d9aeed94521df4f0ae8)
(cherry picked from commit 1747350ffd05e2588b808d17befbc36072207c3c)
(cherry picked from commit 593a867)
Fixes #32918

(cherry picked from commit f9572d2b89341dfb224aa2c7222a316e59627bc9)
(cherry picked from commit bcda6d46373a7cf071d86e91917bbdd31a5597dd)
(cherry picked from commit 21e0842)
Addons are called addons, say so. And some other fixes.

(cherry picked from commit 40d9c16d1ee98c16af5804bab256b62c37feac3b)
(cherry picked from commit 78fcf31f08664371d2df58f9cf43d68a74a347ec)
(cherry picked from commit f1dd497)
This is VFAT world after all.

(cherry picked from commit 764faf60400bafb1764b728aafe0dcf4cbf07364)
(cherry picked from commit 18143edf3e582d6b8c2933f5c181c9b29146023a)
(cherry picked from commit 04cd06e)
… does

(cherry picked from commit 35451a32043504013eed5725c8be46b36ccdf71a)
(cherry picked from commit 3736e21341500d98d878b84a34cc5b9d7cd9125f)
(cherry picked from commit 0672a43)
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 99d4575e541fa1fb00dc80f7aad572f3a66db461)
(cherry picked from commit b78618540659a40c4c26aa588b3cd8b9c46116d1)
(cherry picked from commit 85ca158)
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 f0b151ce864371da06a4d4a63a2a8b5282817b7e)
(cherry picked from commit b60d5bc1b774f900dc5c5d45faed17e919bdf0b3)
(cherry picked from commit b4e43b5)
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 a68c97a54527cacaeeac0c117493639fc455ef5e)
(cherry picked from commit 8aa9e60f89f84a90fb364ee66cf62432a6b877ba)
(cherry picked from commit a321caf)
Make the warning for oneshot services (where RuntimeMaxSec= has no
effect) more actionable by pointing to the directive people can use
instead to effectively limit their runtime.

(cherry picked from commit 8c4aa0f1c6a78b35712fa6a7acf6d755d0c0bd86)
(cherry picked from commit 468b0646342986c6cc9bd797b4ba189dc488ee8d)
(cherry picked from commit 017d7fd)
If there is an error with the execv call in fork_agent the
program exits without any meaningful log message. Log the
command and errno so the user gets more information about
the failure.

Fixes: #33418

Signed-off-by: Mauri de Souza Meneguzzo <[email protected]>
(cherry picked from commit a408d4453145621902b9a3ef78a552f83b09bd8d)
(cherry picked from commit 7fcfb73d71ed1d4230f58de1a94790e0c28719ea)
(cherry picked from commit 76fe6eb)
We'll *always* hit ENEOENT when iterating through SMBIOS type systemd#11
fields, on the last one. it's very confusing to debug log about that,
let's just not do it.

(cherry picked from commit 5202ee42d5da0ae3a6655d2bc959a19d8c347e9d)
(cherry picked from commit 995c702a347d16cfad4605f3982d5278616ea1f8)
(cherry picked from commit f084959)
It is unnecessary, which will mess the completion.

(cherry picked from commit 733518b41350ce781c7e41a4c866eafb9e549e1f)
(cherry picked from commit fd2a6ea0a8d4b535e4ac3645772b946906e02c7d)
(cherry picked from commit 00df4de)
Certainly on systemd 252 at least a configuration of
```
MemorySwapMax=40%
```
is supported but this was missing from the man page.
Only MemoryMax was documented as supporting a %.

(cherry picked from commit 8af38e5b0475f514141d314088dcf9fffd7edc37)
(cherry picked from commit 766af3f782299a7cbfba24a4333444ac008c17d2)
(cherry picked from commit 69681c2)
Follow-up for 6906c02

The mentioned commit uses access() to check if varlink socket
already exists in the filesystem, but that isn't sufficient.

> Varlink sockets are not serialized until v252, so upgrading from
> v251 or older means we will not listen anymore on the varlink sockets.
>
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074789
> for more details as this was found when updating from Debian Bullseye to a new version.

After this commit, the set up of varlink_server is effectively
split into two steps. manager_varlink_init_system(), which is
called after deserialization, would no longer skip listening
even if Manager.varlink_server is in place, but actually
check if we're listening on desired sockets.
Then, manager_deserialize() can be switched back to using
manager_setup_varlink_server().

Alternative to #33817

Co-authored-by: Luca Boccassi <[email protected]>
(cherry picked from commit d4e5c66ed469c822ca5346c7a445ec1446b1d17f)
(cherry picked from commit b825a8be0b7b857a715e982cee861e8ae6995ee8)
(cherry picked from commit 3b3875e)
(cherry picked from commit 2cf425ec573b8f67025c5e74cd267015129e7349)
(cherry picked from commit a78a52465298e8f5a927da9c9fc56c41837018aa)
(cherry picked from commit e8fe599)
git restore -s origin/main hwdb.d/ test/hwdb.d

(cherry picked from commit b731debea9221ca43edc49f85be23db2fde79492)
(cherry picked from commit 6c260ee)
@bluca bluca merged commit 4c3f458 into systemd:v254-stable Jul 24, 2024
38 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.