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

74492 Commits

Author SHA1 Message Date
Vladimir Panteleev
5cf0c45f64 man: improve ManagerEnvironment documentation
- Improve wording for explanation when these variables are inherited

- Clarify that these variables are not placed in the process environment block,
  so /proc/PID/environ cannot be used as a debugging tool

(cherry picked from commit 6c1e0823b0)
2024-08-15 13:08:37 +01:00
Jose Ignacio Tornos Martinez
0cdec6e1fe kernel-install: remove depmod generated file modules.weakdep
The new file, modules.weakdep, generated by depmod to get the weak
dpendencies information can be present
(05828b4a6e),
so remove it like the other similar files.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
(cherry picked from commit eef4cd51f9)
2024-08-15 13:08:37 +01:00
Ronan Pigott
b2cfeed1d5 resolved: Don't retry queries that indicate net error
This probably rarely helped anyway, but it also in some cases interferes
with auxiliary dnssec queries where the authoritative nameserver does
not support EDNS0/DNSSEC.

Fixes: ac6844460c ("resolved: support RFC 8914 EDE error codes")
(cherry picked from commit cd2ce31adb)
2024-08-15 13:08:37 +01:00
Michal Koutný
8ea1e6450c test: Fail cgroup delegation test when user cannot be created
It means: a) user cannot be created, something's wrong in the
test environment -> fail the test; b) user already exists, we shall not
continue and delete (foreign) user.

(cherry picked from commit 3e6e3e6d40)
2024-08-15 13:08:37 +01:00
Daan De Meyer
161286e989 resize-fs: Put minimal ext4 size in the same ballpark as the other filesystems
TEST-46-HOMED fails on ext4 because the filesystem is deemed to small
for activation by cryptsetup. Let's bump the minimal filesystem size for
ext4 a bit to be in the same ballpark as ext4 and btrfs to avoid weird
errors due to impossibly small filesystems.

Also use U64_MB while we're touching this.

(cherry picked from commit ae07feb401)
2024-08-15 13:08:37 +01:00
Michal Koutný
64b63f6cd0 test: Reorganize testcase of cgroup delegation
There are multiple subtests, just move them around into functions
(leveraging the testcase_* convention) to make space for new related
subtests.

(cherry picked from commit 4f0541dc59)
2024-08-15 13:08:37 +01:00
Daan De Meyer
67ad9221b7 TEST-54-CREDS: Specify SMBIOS creds via corresponding mkosi option
This allows mkosi to combine fstab.extra with its own fstab.extra so
that it doesn't override the one we pass for the test.

(cherry picked from commit ebe17e3f9e)
2024-08-15 13:08:37 +01:00
Yu Watanabe
84f0eda378 sd-event: change error code -EINVAL -> -EIO
EINVAL should be used when a function is called with an invalid
argument. Here, the signal is not a function argument.

Follow-up for 7a64c5f23e.

(cherry picked from commit ab9af70edb)
2024-08-15 13:08:37 +01:00
David Tardon
7a48ea958b sd-event: do not assert on invalid signal
The signalfd_siginfo struct is received from outside via a FD, hence
assert() is not appropriate way to check it. Just do a normal runtime
check.

(cherry picked from commit 7a64c5f23e)
2024-08-15 11:07:56 +01:00
David Tardon
b2df49a87b logind-dbus: check auth. for all inhibitor operations
Fixes #33834

(cherry picked from commit 639719e010)
2024-08-15 11:07:49 +01:00
Jeffrey Bosboom
bd8ba1dcd8 docs/CONTROL_GROUP_INTERFACE.md: document accounting information available via D-Bus
(cherry picked from commit f7fa632682)
2024-08-15 11:07:24 +01:00
Mike Yuan
4ad6b2631d basic/log: do not treat all negative errnos as synthetic
Currently, IS_SYNTHETIC_ERRNO() evaluates to true for all negative errnos,
because of the two's-complement negative value representation.
Subsequently, ERRNO= is not logged for most of our own code.
Let's fix this, by formatting all synthetic errnos as positive.
Then, treat all negative values as non-synthetic.

While at it, mark the evaluation order explicitly, and remove
unneeded comment.

Fixes #33800

(cherry picked from commit 268f58076f)
2024-08-15 11:07:16 +01:00
Luca Boccassi
277204f1a3 test: fix D-Bus policy override for TEST-73-LOCALE
We don't need to allow non-root, and the policy needs to specify destination
and interface too, to narrow it down

Follow-up for 7b5c38a91d

(cherry picked from commit a4c436c9d8)
2024-08-15 11:06:58 +01:00
Daan De Meyer
2f47f979ec test-fs-util: Modernize openat_report_new() test
(cherry picked from commit b91ad56228)
2024-08-15 11:06:45 +01:00
Daan De Meyer
e0b0a24a16 test-id128: Use new assertion macros
(cherry picked from commit 372e96a5a1)
2024-08-15 11:06:36 +01:00
Daan De Meyer
04c1439ee6 test: Add ASSERT_EQ_ID128() and ASSERT_NE_ID128()
(cherry picked from commit 60a4505da4)
2024-08-15 11:06:36 +01:00
Daan De Meyer
f40b0b101d test: Add ASSERT_FAIL()
(cherry picked from commit 8eb06fd162)
2024-08-15 11:06:36 +01:00
Daan De Meyer
32ff025c36 mkosi: Update to latest
Includes the required fix to make mkosi copy NOCOW disk images properly.

(cherry picked from commit 3d6c6f9b9e)
2024-08-15 11:06:08 +01:00
Daniel P. Berrangé
b077417713 man/systemd-detect-virt: fix row spanning for VM header
This fixes

  commit 9b0688f491
  Author: Yu Watanabe <watanabe.yu+github@gmail.com>
  Date:   Tue Jan 9 10:52:49 2024 +0900

    virt: add Google Compute Engine support

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 9ffdfc67c6)
2024-08-05 16:02:36 +02:00
Luca Boccassi
566210c272 meson: Bump version to 256.4 2024-07-24 13:49:39 +01:00
Luca Boccassi
16de138427 mkosi: update debian commit reference
* c004a150e7 Configure default DNS servers for upstream CI builds
* a27b1516c9 autopkgtest: set Release= in mkosi.local.conf to distinguish testing vs unstable
* dddce818b2 autopkgtest: add allow-stderr to timedated test
* 2a7b111506 Install valrinkctl zsh completion file
* 862497a139 d/t/control: add Depends: lib{systemd,udev}-dev for upstream
* cb78791b85 d/t/upstream: ensure correct ubuntu codename is used
* fe7445b94d d/t/boot-and-services: fix a couple python sytax warnings
* 2a875917cc d/t/boot-and-services: skip test_tmp_cleanup if tmp.mount is overridden
* 6fe81acbc9 Install zsh completion for run0
2024-07-24 14:26:49 +02:00
Luca Boccassi
b731debea9 hwdb: update to main@{2024-07-24}
git restore -s origin/main hwdb.d/ test/hwdb.d
2024-07-24 14:26:49 +02:00
vdovhanych
a78a524652 add udev rules for trezor hw wallet devices
(cherry picked from commit 2cf425ec57)
2024-07-24 14:26:49 +02:00
Mike Yuan
b825a8be0b core: reliably check if varlink socket has been deserialized
Follow-up for 6906c028e8

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 <bluca@debian.org>
(cherry picked from commit d4e5c66ed4)
2024-07-24 14:26:49 +02:00
Daan De Meyer
83c9043727 mkosi: Bump device timeout even more
I still manage to hit it in some cases so let's bump again.

(cherry picked from commit fffbfb4ed1)
2024-07-24 14:26:49 +02:00
Zbigniew Jędrzejewski-Szmek
e60d01bdbf man/systemd-repart: extend description and reword some sentences
The page was written when systemd-repart was primarily intended to be used on a
running system. But nowadays it's more often used to create images, so extend
that part of the description.

While at it, fix some whitespace issues and trim some overly complicated sentences.

(cherry picked from commit d202ea5754)
2024-07-24 14:26:49 +02:00
Steve Traylen
766af3f782 Document that MemorySwapMax supports % configuration
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 8af38e5b04)
2024-07-24 14:26:49 +02:00
Daan De Meyer
1922d49fd6 Make vcs-tag do something useful for non-developer mode as well
When building packages of arbitrary commits of systemd-stable,
distributors might want to include a git sha of the exact commit
they're on. Let's extend vcs-tag a little to make this possible.

If we're on a commit matching a tag, don't generate a git sha at all.
If we're not on a commit matching a tag, generate a vcs tag as usually.
However, if we're not in developer mode, don't append a '^' if the tree
is dirty to accomodate package builds applying various patches to the
tree which shouldn't be considered as "dirty" edits.

(cherry picked from commit 944faf6598)
2024-07-24 14:26:49 +02:00
Zbigniew Jędrzejewski-Szmek
5b9ad0bbb8 tools/fetch-distro: switch to the target branch
We switch opensuse from "factory" to "devel". I had an old checkout that was
using the stale branch.

(cherry picked from commit 1c85d56349)
2024-07-24 14:26:49 +02:00
Zbigniew Jędrzejewski-Szmek
8334be48a3 tools/fetch-distro: only fetch the configured branch
We don't need the other branches. This mostly cuts down on the
noise in output. But add '-v' to show what we're fetching.

(cherry picked from commit 8e84e15445)
2024-07-24 14:26:49 +02:00
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 82c459f910)
2024-07-24 14:26:49 +02:00
Daan De Meyer
1f079607f8
Merge pull request #33803 from bluca/v256-stable
v256 batch
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 4ecd6c3552)
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 1d8f16df90)
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 ebbae3d632)
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 762b23e86a)
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 733518b413)
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 5202ee42d5)
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 19a44dfe45

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 11b3775f51)
2024-07-22 14:27:30 +02:00
David Tardon
f81659f5f3 test: add a reproducer for #33672
(cherry picked from commit 8b6de9e638)
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 a408d44531)
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 60b218e36e)
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 7b5c38a91d)
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 8da20e3fe2)
2024-07-22 11:05:08 +01:00
Ronan Pigott
e274de4b74 zsh: add varlinkctl completions
(cherry picked from commit af63b4b769)
2024-07-22 11:05:08 +01:00
Daan De Meyer
cae58967a5 docs: Document how to do stable releases
(cherry picked from commit 518ea76ecd)
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 8c4aa0f1c6)
2024-07-22 11:05:08 +01:00
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