1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-23 02:04:32 +03:00

74762 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
92890d56e8 tools/update-distro-hash: rename, fetch the repository if appropriate
Let's rename the tool to tools/fetch-distro. It's useful to be able to fetch
the distro directly. But when that functionality is added, the old name is
confusing.

Now --update/-u must be specified to update the commits.

--reference-if-able is used to speed up the clone of debian.
It saves about 75% of the download.

(cherry picked from commit 82c459f910c3036b22c9f41472b622ef4bfdab1d)
2024-07-24 14:26:49 +02:00
Daan De Meyer
1f079607f8
Merge pull request #33803 from bluca/v256-stable
v256 batch
v256.3
2024-07-22 17:10:11 +02:00
Daan De Meyer
e05f93b5c4 mkosi: update arch commit reference
* 1d577a6268 refresh the keys
* 12383ba712 make libarchive a regular optional dependency...
* f51d5e04bf ignore rc releases in nvchecker
* 0b096a2baa add nvchecker
* 5f0ced863c upgpkg: 256.2-1: new upstream release

(cherry picked from commit 4ecd6c3552aff72a40924560d7dfe2557b6e7c8e)
2024-07-22 14:27:30 +02:00
Daan De Meyer
c9d39eea98 mkosi: update fedora commit reference
* 00babccdea Simplify BFQ scheduler enablement
* ef8ddb130b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* 5b4a5461d6 Fix changelog
* a8c5c736f6 Only apply shorter shutdown timer changes on Fedora
*   f4e284cd7a Merge #150 `Deal with systemd-timesyncd backport in EPEL`
|\
| * 9378a0733a Deal with systemd-timesyncd backport in EPEL
* | 12d1f05029 Don't claim /sbin/installkernel if building for CentOS Stream 9
|/
* 79828f2753 spec: use "positive" conditions in conditionals
* c5d3af1638 Add build dependency on rsync on CentOS Stream 9
* 8d080fb5cb Backport udma buffer access patch
* 6084453807 Add support for building from a specific branch
* cb9d631ca0 Update PR patch metadata
* 3889da947e In standalone subpackages, suggest coreutils-single
* b7800e3e66 Drop versions from Conflicts for standalone packages

(cherry picked from commit 1d8f16df903a5567e2359bac3b8ca0caf937d333)
2024-07-22 14:27:30 +02:00
Daan De Meyer
dbeed95d76 mkosi: Use the Fedora Rawhide spec for CentOS
These are now practically identical, with the only differences between
the two having no effect on the rpm builds we do with mkosi, so let's
cut out the middle man and just use the Fedora Rawhide spec for CentOS
as well.

(cherry picked from commit ebbae3d6328725767e23afef8692596e03f9d3d1)
2024-07-22 14:27:30 +02:00
Daan De Meyer
6108f13fc0 mkosi: Switch back to PKG_SUBDIR instead of symlinks
Previously I thought it would make sense to allow running the build
scripts from within the VM/container to rebuild the packages. Instead
we ended up making it possible to rerun mkosi outside of the container/VM
to rebuild the packages, so let's switch back to $PKG_SUBDIR to tell the
build scripts where to look for the packaging sources.

(cherry picked from commit 762b23e86a8bd45879335af96006573a99884a71)
2024-07-22 14:27:30 +02:00
Collin L
fd2a6ea0a8 zsh/_networkctl: remove duplicated argument for completion (#31926)
It is unnecessary, which will mess the completion.

(cherry picked from commit 733518b41350ce781c7e41a4c866eafb9e549e1f)
2024-07-22 14:27:30 +02:00
Lennart Poettering
995c702a34 import-creds: when we hit ENOENT on SMBIOS 11 do not even debug log
We'll *always* hit ENEOENT when iterating through SMBIOS type #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)
2024-07-22 14:27:30 +02:00
Mike Yuan
6a3cb4cd11 core/unit: ignore dropins for masked units completely when checking need_reload
Follow-up for 19a44dfe4525ab01caf593a9c2beada4b412910d

If a drop-in is set from upper level, e.g. global unit_type.d/,
even if a unit is masked, its dropin_paths would still be partially
populated. However, unit_need_daemon_reload() would always
compare u->dropin_paths with empty strv in case of masked units,
resulting in it always returning true. Instead, let's ignore
dropins entirely here.

Fixes #33672

(cherry picked from commit 11b3775f514f521f353741ff6ac4d66cf0e928e8)
2024-07-22 14:27:30 +02:00
David Tardon
f81659f5f3 test: add a reproducer for #33672
(cherry picked from commit 8b6de9e6381b39f59c936d2b0c6ce47f1b70a19e)
2024-07-22 14:27:30 +02:00
Mauri de Souza Meneguzzo
7fcfb73d71 shared: log error when execve fail
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 <mauri870@gmail.com>
(cherry picked from commit a408d4453145621902b9a3ef78a552f83b09bd8d)
2024-07-22 14:27:30 +02:00
Mike Yuan
7da84cc154 test-execute: ExecStop= and friends should not get credentials
See #32583

(cherry picked from commit 60b218e36e96236e6ba386686f130fe34d3e1c2a)
2024-07-22 14:27:30 +02:00
Luca Boccassi
8f58652f5e test: override blocking localed policy in TEST-73-LOCALE
On Debian and derivatives writing calls to localed are blocked as other
tools are used to change settings, override that policy for the tests

(cherry picked from commit 7b5c38a91def6cf236605010a0a93a1cd4c137e9)
2024-07-22 14:27:30 +02:00
Dominique Martinet
d6f8575f1e meson: fix missing failure if bpf-framework was enabled
If building with clang and clang does not support bpf, then enabling
-Dbpf-framework=enabled would silently drop the feature (even printing
bpf-framework: enabled in the meson build recap, and no message anywhere
that'd hint at the failure!)

This is unexpected, so add check to fail hard in this case.

All other code paths (gcc, missing bpftool) properly check for the
option, but it is not as easy for a custom command so check explicitly

(cherry picked from commit 8da20e3fe2a544979922cea457de3031aa74d64c)
2024-07-22 11:05:08 +01:00
Ronan Pigott
e274de4b74 zsh: add varlinkctl completions
(cherry picked from commit af63b4b769bfb86ff7848af980268901e9c0b47d)
2024-07-22 11:05:08 +01:00
Daan De Meyer
cae58967a5 docs: Document how to do stable releases
(cherry picked from commit 518ea76ecdf4855a2db2c0d31ee45f4db48e3242)
2024-07-22 11:05:08 +01:00
Lucas Werkmeister
468b064634 man: Mention Type=oneshot timeout directive
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)
2024-07-22 11:05:08 +01:00
Léane GRASSER
d870f2335b l10n: fix credits for the French translation
(cherry picked from commit 0d8b38415c4b192c1a4e608da8dc16c7340e31ba)
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 a68c97a54527cacaeeac0c117493639fc455ef5e)
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 b37e8184a5a376749fbf68674ed6d7a4fc9901aa
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 fa96c55b7b0d19a7f72908ee7d3f8a1ef630be96)
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 f0b151ce864371da06a4d4a63a2a8b5282817b7e)
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 99d4575e541fa1fb00dc80f7aad572f3a66db461)
2024-07-22 10:32:31 +01:00
Lennart Poettering
e63ae80a89 bootspec: correct log level for fatal errors
(cherry picked from commit 7b7f4c26089ab7c34c854a2713f35ccd262cc15a)
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 35451a32043504013eed5725c8be46b36ccdf71a)
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 764faf60400bafb1764b728aafe0dcf4cbf07364)
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 40d9c16d1ee98c16af5804bab256b62c37feac3b)
2024-07-22 10:26:01 +01:00
Kuntal Majumder
bcda6d4637 man: fix typo in unit options section
Fixes #32918

(cherry picked from commit f9572d2b89341dfb224aa2c7222a316e59627bc9)
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 bbb0b72849ebbeeb8e252d9aeed94521df4f0ae8)
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 3f0e7fd4fd1d20e3f4be18f485c76d25ce10f41b)
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 3bff57b7651caab41021dbcdf658c1a92c8fdf52)
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 8bf8c7d83dcffffa55b5f534fb98db6b01315dc1)
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 496b4fa0e974d7a1b10b8af966da445a28f512c5)
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 14963ea90d72300d3e27b5776d1aa45594b10a94)
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 575f954b5d0e03d41fe08ce2a7d85b868e89b904)
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 b5eaa52d4958f24aba21a4a34e585156079d4abb)
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 d3d035395eeced715c9609aeb8bfac7157dd0aa9)
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 4442aef08e0fe8ba381b580455f7eb281c5a28a1)
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 bc347edfe075f36bada0e1e7aefd62b10fcad4a7)
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 4918f14adabba71913cf3abb8b5d50a8ca0fe844)
2024-07-20 00:33:14 +02:00
Mike Yuan
b08b5996d3 core/cgroup: use > 0 comparison rather than == 1
(cherry picked from commit 8153be97c46dec725fdfaa3358d518ce350bb2ec)
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 3849d1f56b7ff9db94656ca84156eb9fe1574ecb)
2024-07-20 00:33:14 +02:00
Mike Yuan
7684f52839 test-install-root: introduce test case for #33411
(cherry picked from commit 9fb5a8ca24e677e10f8c2b8973b5e2a11676bda0)
2024-07-20 00:33:14 +02:00
Mike Yuan
a42db16a1c shared/install: correctly report changes in install_info_symlink_alias()
Follow-up for b2751cf0394d36c24590b5f7b33e9f864b57ba0d

Also make the conditions consistent for install_info_symlink_wants().

Fixes #33411

(cherry picked from commit 4441cf330b3847d6c553fb230e8e4c86aa75ebb9)
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 a159aa07e1548367d2fde80cb0d45b869c591864)
2024-07-20 00:33:14 +02:00
Mike Yuan
908edce5b6 shared/install: drop unneeded initialization
(cherry picked from commit dd6b325a05c4caccd1a17dd4147f48a916eee386)
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 09d6038d833468ba7c24c658597387ef699ca4fd)
2024-07-20 00:33:14 +02:00
Mike Yuan
67e0d09368 systemctl: skip triggering unit warning if unit vanished
(cherry picked from commit 701bd9d08ac1d16f74e2b453ca0826e85b1c8491)
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 399646faac8ca91a46287e40280f56055c9e0fe8)
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 1df981a74ae19513b40167c6b320c30bd166ac34)
2024-07-20 00:33:14 +02:00