Luca Boccassi [Tue, 22 Oct 2024 16:04:41 +0000 (17:04 +0100)]
logind: allow read/write to char-hvc devices
virtio console uses /dev/hvc* so we need access to write wall
messages
(cherry picked from commit
5ff6841c2378ed83e645681cbd4ee145f68d72b7)
Yu Watanabe [Tue, 22 Oct 2024 06:32:12 +0000 (15:32 +0900)]
TEST-02-UNITTESTS: reuse $TEST_MATCH_SUBTEST to specify unit tests to be run
Then, we can easily test specific unit tests in qemu or container.
(cherry picked from commit
aa7507ea4a57508da0f2a7d1ae6e139793c5694a)
Yu Watanabe [Mon, 5 Jun 2023 05:18:47 +0000 (14:18 +0900)]
test-execute: update permission of credstore
Follow-up for
40fb9eebbc075ce1e63100386d2c5f177ad7d738.
(cherry picked from commit
c443f6924fa3b02113da2536dd816a15ee708510)
Luca Boccassi [Mon, 21 Oct 2024 16:31:09 +0000 (17:31 +0100)]
test: CET/EET are deprecated, use Europe/Berlin and Kyiv
The links moved to the legacy dataset so they won't be available by
default, so stop using them and just use the city ones instead
(cherry picked from commit
aa077884c13769ae3bd6aa98978b4ac9e64b5365)
Ronan Pigott [Thu, 25 Jan 2024 00:53:35 +0000 (17:53 -0700)]
test-dhcp6: terminate fqdn option
The encoded fqdn in this option must be properly terminated. We will
soon validate that this field is correctly encoded, so correct it in the
test.
(cherry picked from commit
2d9822b634680f1be1d20920aceddac76de110eb)
Daan De Meyer [Mon, 7 Oct 2024 15:39:27 +0000 (17:39 +0200)]
pcrlock: Take VirtualSize > SizeOfRawData into account
If VirtualSize > SizeOfRawData, measure extra zeros to take into
account the extra zeros also measured by the stub.
(cherry picked from commit
b53f2d5ed8ad0e537e9086daf84f9c2bf69fb72b)
Ronan Pigott [Fri, 11 Oct 2024 05:40:03 +0000 (22:40 -0700)]
test: exercise bypass mode on the sd-resolved stub
A basic test will verify that we provide the right flags.
(cherry picked from commit
b7b1c50c6afd2ab8c2c779df9b73c6dbbc773f70)
Lennart Poettering [Thu, 12 Sep 2024 15:05:24 +0000 (17:05 +0200)]
resolved: when adding names to packet fails, remove them from label compression hash table again
let's make sure we undo any pollution of the label compression hash
table.
Fixes: #33671
(cherry picked from commit
360105f1e748148ba17bdb3f47525f01aba4127f)
Lennart Poettering [Thu, 12 Sep 2024 15:00:04 +0000 (17:00 +0200)]
dns-domain: tweak hash table comparison function for DNS names
Currently, when comparing two DNS names when storing them in a
hashtable, and the DNS names are not actually valid we'll compare the
error codes.
This is not very smart however, since this means two invalid DNS names
that happen to be equally "invalid" will be considered identical, even
if their strings are entirely different.
Let's find a better solution for this niche case: let's simple compare
the domains as strings.
This matters in case of DNS label compression: if we already added added
an invalid DNS name into the label compression hash table, and lookup
any other invalid DNS name, this lookup will likely return what the
earlier one already returned, and that's confusing.
(cherry picked from commit
8ed2c62d46f93c2117d65a908c316a381073af16)
Ronan Pigott [Sat, 12 Oct 2024 17:00:56 +0000 (10:00 -0700)]
resolved: update condition for caching full packets
Previously a full packet was cached only if the CD bit was set, but this
no longer corresponds to the cases where bypass is enabled.
Update the cache to retain a full packet in the cases where it might
actually be useful.
(cherry picked from commit
fa02d04ee9a4787c2c39032185b6fe3e7146b26b)
Ronan Pigott [Sat, 19 Oct 2024 04:10:57 +0000 (21:10 -0700)]
resolved: enable CD bit without DO set
This is useful for a validating resolver to indicate to a non-validating
resolver when checking was disabled for the query. This matches the
behavior of the major public resovlers in response to queries with CD bu
tnot DO set.
(cherry picked from commit
36074e01499ea4fc89a0c642cef83bd650014e5a)
Ronan Pigott [Mon, 7 Oct 2024 18:05:18 +0000 (11:05 -0700)]
resolved: authenticate bypass queries
Following
13e15dae9f0b, resolved does not forward the AD bit for bypass
queries, but resolved also didn't do it's own validation, making these
replies appear to never be authentic. We should enable validation for
bypass queries.
Let's disable our own validation when processing a +cd query, and also
ensure that it skips the cache so that we don't accidentally fail to
return inauthentic replies from upstream.
Previously, when we had a bypass transaction without cd, a cached,
authenticated, reply with cd could be served, leaving the cd bit
erroneously set in the reply. Only reply with a CD bit if the client
requested it.
Fixes:
13e15dae9f0b (resolved: clear the AD bit for bypass packets)
(cherry picked from commit
008f23b7c5f255e48c71c3b4da74a85448667817)
Zbigniew Jędrzejewski-Szmek [Tue, 15 Oct 2024 16:53:00 +0000 (18:53 +0200)]
man/systemd-nspawn: emphasise that user namespaces are strongly recommended
(cherry picked from commit
9b1a5bc365e379b4b13849adacfde3427f55ca38)
Luca Boccassi [Fri, 18 Oct 2024 14:02:03 +0000 (15:02 +0100)]
test: customize /etc/os-release instead of /usr/lib/os-release
As per spec image builders can create a local /etc/os-release
with per-image IDs, so modify that one instead of the original
one in /usr/lib. For example we do this when we build debian
unstable images in mkosi.
(cherry picked from commit
2f6fe4e1131d39fcafa9e00a7902919efb5361e1)
Lennart Poettering [Fri, 18 Oct 2024 12:16:53 +0000 (14:16 +0200)]
dissect-image: generate better log message for EUCLEAN dissect error
Fixes: #31799
(cherry picked from commit
2186334e00acba6e6c1a4564bce60474eecfbf16)
Lennart Poettering [Fri, 18 Oct 2024 12:16:13 +0000 (14:16 +0200)]
dissect-image: uppercase first char of dissect error message systematically
Some of the log message stricts used proper uppercasing, others didn't.
Fix that to make it uniform.
(cherry picked from commit
620a03f669a9075f2d78c2fcf7db45f7046481bc)
Lennart Poettering [Fri, 18 Oct 2024 09:30:12 +0000 (11:30 +0200)]
resolved: refresh resolv.conf files when link goes away
This might have the effect that some DNS server or search domain
disappears, hence rewrite the relevant files.
See: #27543
(cherry picked from commit
562f7bde8872b4fd03db11bf25c9dd294fd2c186)
Lennart Poettering [Fri, 18 Oct 2024 07:19:23 +0000 (09:19 +0200)]
networkd: raise limits on number of address 8x
Limits should be enforced, but not in a way real setups collide with
them.
There have been multiple reports that current limits are too low, hence
raise them 8x.
Fixes: #24852
(cherry picked from commit
af7674f4ad30e83efc84f04c45f01e6eff137702)
Adrian Vovk [Wed, 4 Sep 2024 17:44:26 +0000 (13:44 -0400)]
GREEDY_REALLOC_APPEND: Make more type safe
Previously, GREEDY_REALLOC_APPEND would compile perfectly fine and cause
subtle memory corruption if the caller messes up the type they're passing
in (i.e. by forgetting to pass-by-reference when appending a Type* to an
array of Type*). Now this will lead to compilation failure
(cherry picked from commit
fafc3c2d5c7fae6bad0f6dc51611ae9390589ade)
Lennart Poettering [Thu, 17 Oct 2024 07:57:41 +0000 (09:57 +0200)]
udev: consider serial ports as unconfigured only if both port and iomem_base sysattr is zero
Various archs do not know the "io port" concept, hence check for the
"iomem" configuration, too.
Fixes: #34800
(cherry picked from commit
9da582984b632a75f562a304ff96dd1043281430)
Yu Watanabe [Wed, 16 Oct 2024 13:34:48 +0000 (22:34 +0900)]
TEST-60-MOUNT-RATELIMIT: disable journal ratelimiting
Otherwise, journal check in testcase_mount_ratelimit() may fail and we
need to wait 2 minutes.
(cherry picked from commit
73970cdcd1cebe49a2858ce016c0cd4ce6037b2e)
Yu Watanabe [Wed, 16 Oct 2024 13:32:09 +0000 (22:32 +0900)]
TEST-60-MOUNT-RATEMINIT: split into small test cases
Then, use run_testcases().
(cherry picked from commit
805d0eed0b51e2ef761fc522f092b71dc028f700)
Yu Watanabe [Wed, 16 Oct 2024 12:17:15 +0000 (21:17 +0900)]
TEST-60-MOUNT-RATELIMIT: wait for mount unit being started or stopped
(cherry picked from commit
c5928a768417b298eb2741107fa7492e93d637fc)
Luca Boccassi [Wed, 16 Oct 2024 10:42:06 +0000 (11:42 +0100)]
Fix maybe-uninitialized warnings with gcc 14.2
../src/resolve/resolved-bus.c: In function ‘call_link_method’:
../src/resolve/resolved-bus.c:1769:16: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
1769 | return handler(message, l, error);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1755:15: note: ‘l’ was declared here
1755 | Link *l;
| ^
../src/resolve/resolved-bus.c: In function ‘bus_method_get_link’:
../src/resolve/resolved-bus.c:1828:13: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
1828 | p = link_bus_path(l);
| ^~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1816:15: note: ‘l’ was declared here
1816 | Link *l;
| ^
(cherry picked from commit
5f911aca8434b4163514019fcb4c1c967a50617c)
Yu Watanabe [Wed, 16 Oct 2024 10:27:36 +0000 (19:27 +0900)]
journalctl: erase verify key before free
Even optarg is erased, copied string was not erased.
Let's erase the copied key for safety.
(cherry picked from commit
d0ad4e88d4e6b5e312c359a6505125f7e088f3e3)
Yu Watanabe [Wed, 16 Oct 2024 06:20:08 +0000 (15:20 +0900)]
TEST-55-OOMD: check slice property before stressing slice
(cherry picked from commit
a6092b532e1de0e1f9702f432c0c4c7de495bf4f)
Yu Watanabe [Wed, 16 Oct 2024 06:18:41 +0000 (15:18 +0900)]
TEST-55-OOMD: stop test units when unnecessary
Then, sleep becomes not necessary anymore. This greatly improve performance.
(cherry picked from commit
98a0bb8a6487a1bd0767223f3738525c2b3eae52)
Yu Watanabe [Wed, 16 Oct 2024 06:04:07 +0000 (15:04 +0900)]
TEST-55-OOMD: split into small testcases
Then, we can run each small test cases separately.
(cherry picked from commit
6bba058076cf4ce91fd470841d5ced47c8d32d6a)
Yu Watanabe [Wed, 16 Oct 2024 05:52:49 +0000 (14:52 +0900)]
TEST-55-OOMD: check global config earlier
'Default Memory Pressure Duration' field in oomctl, which can be configured
with DefaultMemoryPressureDurationSec= in oomd.conf, is a global config.
Let's check it earlier.
This also drops unnecessary cleanup at the beginning.
(cherry picked from commit
23fb9b63cd12f2040419dbc846d7a87e5193935c)
Yu Watanabe [Fri, 11 Oct 2024 07:09:11 +0000 (16:09 +0900)]
TEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in config
Fedora and friends has a drop-in config for the settings in
/usr/lib/systemd/user/slice.d/ . Hence, settings in the main .slice may be
overridden. Let's set below in a drop-in with higher decimal prefix.
Also, rename override.conf -> 99-managed-oom-preference.conf for the same reason.
(cherry picked from commit
1473836a1e3c528221439e3b0ce90e729b31adb3)
Yu Watanabe [Wed, 16 Oct 2024 05:31:16 +0000 (14:31 +0900)]
TEST-19-CGROUP: add test cases for IPAddressAllow=/IPAddressDeny=
(cherry picked from commit
5f3cfb9d5ee334c53cc407308ba677401a6ba1cd)
Yu Watanabe [Wed, 16 Oct 2024 03:45:34 +0000 (12:45 +0900)]
core/cgroup: fix IPAddressAllow=/IPAddressDeny= set through DBus
Fixes a regression caused by
84ebe6f01381c21b88e37e856956c9c9ee6781d6 (v250).
Fixes #34773.
(cherry picked from commit
77bbd9f1bd2b01bcb2a49ed42c6dc06613532bcf)
Michael Ferrari [Tue, 15 Oct 2024 16:42:20 +0000 (18:42 +0200)]
gpt-auto: remove directory check for ESP mount
Ensure that we always attempt to mount the `ESP` partition to `/boot`
when there is no `XBOOTLDR` partition.
Fixes an issue when booting without a `XBOOTLDR` partition and an empty
root partition, since it would mount the `ESP` partition to `/efi/`
unconditionally causing boot entries to not be under `/boot/` as
recommended by the Boot Loader Specification.
(cherry picked from commit
28dbee46d5bfdcfa601e80e248dbde22b8d65664)
Luca Boccassi [Tue, 15 Oct 2024 13:05:50 +0000 (14:05 +0100)]
core: do not fail if ignorable img.v/ vpick dir is missing
Do not fail if the directory is missing entirely, other than just empty
Follow-up for
00f546e25e8
Follow-up for
5e79dd96a88
Follow-up for
622efc544dc
(cherry picked from commit
e1efa9d8044a7564844b8d599eda4b59eb1152e9)
Luca Boccassi [Thu, 12 Sep 2024 16:46:04 +0000 (18:46 +0200)]
core: do not fail if ignorable img.v/ vpick dir is empty
If the vpick directory is configured to be ignored if missing, do not
fail and just skip ahead.
Follow-up for
5e79dd96a88
Follow-up for
622efc544dc
(cherry picked from commit
00f546e25e8e46e5e289e1f2fc2ed3dcc6999223)
John A. Leuenhagen [Tue, 15 Oct 2024 06:00:18 +0000 (02:00 -0400)]
TEST-74-AUX-UTILS: add tests for 'run0 -D'
(cherry picked from commit
4ca75488d935431e772c25eb6cf060ea85553158)
John A. Leuenhagen [Tue, 15 Oct 2024 04:57:52 +0000 (00:57 -0400)]
run: fix bug causing run0 to ignore `-D /`.
Since the root directory was being suppressed to NULL, the subsequent
check would erroneously think that no working directory was specified.
This caused the default working directory to be applied instead.
(cherry picked from commit
0054a2acc3894e45171806bd64887211820b8eaf)
Yu Watanabe [Sun, 15 Sep 2024 19:45:13 +0000 (04:45 +0900)]
Yu Watanabe [Mon, 14 Oct 2024 21:22:24 +0000 (06:22 +0900)]
udev: do not try to lock whole block device on remove event
As another device may be created with the same device node while udevd
is processing the remove event of the previous owner of the device node.
This also adds comment why we skip watching device node on remove.
(cherry picked from commit
e8df18c9e171c87aebb2df8ac3bdd8f116236892)
Gaël PORTAY [Mon, 14 Oct 2024 17:16:07 +0000 (19:16 +0200)]
docs: add a missing : character
This adds the missing colon character to the section systemd-sysusers.
(cherry picked from commit
8ef5ea2bf6d8c9ef12b00ab3838b9af81e30bf5d)
Lennart Poettering [Mon, 14 Oct 2024 09:55:59 +0000 (11:55 +0200)]
man: document preference for secure_getenv() in coding style
(cherry picked from commit
c9b477415a6293b74df67c8118bafb0ef8662819)
Yu Watanabe [Sat, 12 Oct 2024 22:24:08 +0000 (07:24 +0900)]
test: add test for local outbounds with preferred source address
(cherry picked from commit
0343ef97644c38e215e97ef9d1b6d942b08bb8ef)
Yu Watanabe [Sat, 12 Oct 2024 21:56:38 +0000 (06:56 +0900)]
local-addresses: honor RTA_PREFSRC field of gateway
Fixes #34739.
(cherry picked from commit
4adf2653e2a68d4d593b46734fd9e24721a8d449)
Yu Watanabe [Sat, 12 Oct 2024 21:30:58 +0000 (06:30 +0900)]
local-addresses: use FOREACH_ARRAY() macro
(cherry picked from commit
418641f73f78e651c6b0ecd05e055f790cb1eae7)
Yu Watanabe [Fri, 11 Oct 2024 18:09:10 +0000 (03:09 +0900)]
TEST-64-UDEV-STORAGE: insert udevadm settle more
Hopefully fixes #34073.
(cherry picked from commit
acadc9a84925fa725de1a4dbcfe2355432c0769a)
Yu Watanabe [Fri, 11 Oct 2024 05:08:49 +0000 (14:08 +0900)]
TEST-58-REPART: drop duplicated inclusion of util.sh
(cherry picked from commit
4ca7b553295315c759a622a47240af56e2d06b46)
Yu Watanabe [Fri, 11 Oct 2024 06:52:48 +0000 (15:52 +0900)]
mkosi: replace PackageManagerTrees= with SandboxTrees=
(cherry picked from commit
4e3f16b5ef122996f9545d883af74ff1235833eb)
Jörg Behrmann [Fri, 11 Oct 2024 12:34:15 +0000 (14:34 +0200)]
ukify: Require both key and cert be set in generate_keys
If either is None the write in this branch of the code will fail.
(cherry picked from commit
9ba53499b97d59cc57ce763b8ba7f272a876dd25)
Daan De Meyer [Fri, 11 Oct 2024 14:51:04 +0000 (16:51 +0200)]
systemd-update-helper: Show executed commands if debug logging is enabled
(cherry picked from commit
8b8668b9e71837cb541cd432bc37e4c9405e49cd)
Lennart Poettering [Fri, 11 Oct 2024 07:46:14 +0000 (09:46 +0200)]
seccomp: allowlist uretprobe() syscall
This is a new syscall provided by the kernel used to implement faster
uprobes. It's not supposed to be called by userspace, but only by kernel
generated uprobe code.
It should be fine to allow this, as the kernel authenticates the
invocation itself, and we shouldn't break compat with things.
Note that this allowlisting is not sufficient to make ureprobe() work.
libseccomp must be tought the syscall too, but this can happen
independently.
Fixes: #34615
(cherry picked from commit
d693c483a2bb3eae490fd78d68fc16d0a731fee2)
Daan De Meyer [Wed, 9 Oct 2024 12:49:07 +0000 (14:49 +0200)]
mkosi: Fix up ownership of testuser home directory on first boot
When building unprivileged, the testuser home directory ends up
owned by root:root because mkosi can't chown directories to other
owners when running unprivileged. So let's fix up the testuser
ownership on first boot with tmpfiles instead.
(cherry picked from commit
0d0ecaab000cf2768a3edf1e73119bf2fce952b0)
David Rheinsberg [Fri, 11 Oct 2024 08:46:05 +0000 (10:46 +0200)]
docs/DESKTOP_ENVIRONMENTS: clarify name aliases
Add a note to the service-file naming scheme that reminds developers
that those names might be aliases. Hence, when parsing such unit names,
the entire name-array of a unit must be parsed, rather than just the
unit ID.
The service-name of existing applications might be already part of their
API. Hence, not all applications can switch the service ID to this new
naming scheme, but can provide suitable aliases. Document this behavior.
(cherry picked from commit
b3b7cf8b7c35df14c6eb4f79da1a241dc0aa8c7e)
David Rheinsberg [Fri, 11 Oct 2024 08:07:40 +0000 (10:07 +0200)]
docs/DESKTOP_ENVIRONMENT: clarify <RANDOM> usage
The <RANDOM> part is optional in the naming scheme of application units.
However, this is only true for service files. Scope units must include
the <RANDOM> part, otherwise it would be impossible to parse:
The schema would be:
`app[-<launcher>]-<ApplicationID>[-<RANDOM>].scope`
in which case a two-part name would be impossible to parse, since it is
unclear whether the launcher of the random bit where omitted.
(cherry picked from commit
cbaebf811e6edb79279f72950b2d63189be314d3)
Lennart Poettering [Thu, 10 Oct 2024 09:49:47 +0000 (11:49 +0200)]
meson: sort includes
(cherry picked from commit
882032faaf9e2d2524936e82ccc770903d4c38d6)
Mike Yuan [Thu, 10 Oct 2024 19:16:05 +0000 (21:16 +0200)]
core/manager: still send out STATUS=Ready for user manager
This effectively reverts
37d15cd132f3a8a0bf42fb252c1604e804171ff2.
The offending commit wrongly assumed that the second READY=1
notification is for system scope only, but it also serves the purpose
of flushing out previous STATUS= containing user unit job status.
(cherry picked from commit
da81a108653e2ef19102698dbc0184bd18b084d9)
David Rheinsberg [Fri, 11 Oct 2024 07:53:25 +0000 (09:53 +0200)]
docs/DESKTOP_ENVIRONMENTS: fix formatting
The annotation about omittance is meant to be about the `RANDOM` string.
However, the current formatting makes it look like the entire naming
scheme is optional. Fix this.
(cherry picked from commit
5697bce82b1b37602255ac12e4a8f4a12305dc03)
Lennart Poettering [Fri, 11 Oct 2024 07:55:07 +0000 (09:55 +0200)]
docs: don't mention split-usr path anymore
We don't support split /usr/ anymore. Hence fix the paths. This
apparently matters because of PK validating the binary path.
Fixes: #34712
(cherry picked from commit
c28a13b5afcf021191494bfa565c55b784dc08fa)
Yu Watanabe [Thu, 10 Oct 2024 19:19:03 +0000 (04:19 +0900)]
Lennart Poettering [Mon, 7 Oct 2024 07:37:24 +0000 (09:37 +0200)]
man: reword comment a bit regarding ExecStartPre= multiple commands
The documentation claimed that ExecStartPre=/ExecStartPost= accepts
multiple command lines, in contrast to ExecStart=. This is half an
untruth, because ExecStart= allows that too – as long as Type=oneshot is
set.
Hence, reword this a bit, and do not emphasize the contrast.
Prompted by: #34570
(cherry picked from commit
c3069a6bfb454a0e02607ad21b5badf9847fe11a)
Jörg Behrmann [Thu, 10 Oct 2024 11:52:31 +0000 (13:52 +0200)]
ukify: Fix systemd-measure detection in tests
Fixes:
206fa93c854e3d5c94e56da9b53e107245f31503
(cherry picked from commit
e9984357ad60f087528fbdfd6f4577e93fca8cee)
WilliButz [Fri, 4 Oct 2024 17:59:10 +0000 (19:59 +0200)]
test/repart: add test case for hash size derived from max data size
(cherry picked from commit
e16153a40342b3da984ffbf4e382e16e713f447a)
WilliButz [Fri, 4 Oct 2024 17:51:57 +0000 (19:51 +0200)]
repart: derive hash partition size from SizeMaxBytes= of data sibling
This change makes it possible for repart to create dm-verity hash
partitions for a custom amount of protected data. When the property
`SizeMaxBytes=` is specified for a dm-verity data partition, the size
of the corresponding hash partition is set to accommodate hash data
for this maximum size, rather than the actual contents its data
sibling. However, the contained hash data continues to be generated
from said sibling.
(cherry picked from commit
d3032e651e2131c47d276e3fbdcbdf9fc51c8ef9)
Chen Guanqiao [Wed, 2 Oct 2024 05:10:21 +0000 (13:10 +0800)]
mount: optimize mountinfo traversal by decoupling device discovery
In mount_load_proc_self_mountinfo(), device_found_node() is synchronously called
during the traversal of mountinfo entries. When there are a large number of
mount points, and the device types are not significantly different, this results
in excessive time consumption during device discovery, causing a performance
bottleneck. This issue is particularly prominent on servers with a large number
of cores in IDC.
This patch decouples device discovery from the mountinfo traversal process,
avoiding redundant device operations. As a result, it significantly improves
performance, especially in environments with numerous mount points.
Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
(cherry picked from commit
00ad3f02275b507a753495ace5e5f84cb38b604d)
David Joaquín Shourabi Porcel [Tue, 8 Oct 2024 13:20:26 +0000 (15:20 +0200)]
man: `machinectl(1)`: Fix description of subcommand `poweroff`
(cherry picked from commit
a41da1e7037dc36a601d3428343bbc7f0eed3e20)
David Joaquín Shourabi Porcel [Fri, 12 Apr 2024 20:14:47 +0000 (22:14 +0200)]
man: `systemd-nspawn(1)`: Fix some typos
(cherry picked from commit
f4e3c6e5b318d22a9c40144c6d52ae68a70c264c)
Yu Watanabe [Tue, 8 Oct 2024 04:52:40 +0000 (13:52 +0900)]
test: add test cases for timestamp with time zone
(cherry picked from commit
25999f868fe0e9684af7a364224ac42071b70f74)
Yu Watanabe [Tue, 8 Oct 2024 04:50:02 +0000 (13:50 +0900)]
time-util: copy input string before fork()
Fixes #34670.
(cherry picked from commit
6d3012bab4ce4c1ed260598d05b4e9f2ea471658)
Yu Watanabe [Tue, 8 Oct 2024 09:59:37 +0000 (18:59 +0900)]
time-util: fix parsing timestamp with NZ timezone
Fixes a bug caused by
ef658a63f8163607d9e04f710cd26c0d36ff68ce.
(cherry picked from commit
eb87d3e1e9210d9387536cc3ece4e32aacdc5009)
Lennart Poettering [Mon, 7 Oct 2024 11:03:51 +0000 (13:03 +0200)]
resolved: fix fastopen fallback
We should not invalidate the socket address size before we use it.
Fixes: #34579
(cherry picked from commit
5699e4c2d470a12c922c4b7c86a8987837911626)
Vito Caputo [Sat, 21 Sep 2024 21:43:51 +0000 (14:43 -0700)]
mmap-cache: add some stats about files/windows/unused
Let's give some visibility into the ratio of files:windows:unused
by the time we're done using the cache.
(cherry picked from commit
284802c597aa0194dc1504db65ee24941d9721eb)
Vito Caputo [Sat, 21 Sep 2024 19:30:49 +0000 (12:30 -0700)]
mmap-cache: enforce an unused windows minimum
With many fds the global windows count generally exceeds the
minimum. This results in always reusing the unused entry if
there is one, which becomes a sort of degenerate case where we're
just constantly unmapping->mapping.
Instead let's try always have at least several unused windows on
the unused list before we resort to churning through it.
Fixes #34516
(cherry picked from commit
176f73272e6e3116caab3900eb553be54f520a68)
Daan De Meyer [Fri, 11 Oct 2024 18:40:07 +0000 (20:40 +0200)]
Merge pull request #34728 from DaanDeMeyer/backport-logging-improvements
Backport logging improvements to v256-stable
Daan De Meyer [Tue, 8 Oct 2024 14:28:25 +0000 (16:28 +0200)]
core: Log in more scenarios about which process initiated an operation
Exit/Reboot/Poweroff and similar operations are invasive enough that
logging about who initiated them is very useful to debug issues.
(cherry picked from commit
acb0f501f4291efce82bcf89d4ad92b6a895f4fa)
Daan De Meyer [Tue, 8 Oct 2024 14:25:52 +0000 (16:25 +0200)]
core: Bump log level of reexecute request to notice
A daemon-reload is important enough to deserve logging at notice
level.
(cherry picked from commit
4ee41be82507348fbbc9d3ab28aae6330eb51663)
Daan De Meyer [Tue, 8 Oct 2024 14:22:58 +0000 (16:22 +0200)]
bus-util: Log more information when connecting to a bus socket fails
Let's log about which bus we're trying to connect to and what transport
we're using to do it.
(cherry picked from commit
d8a77d55e6ad7f251ae0eb6758af6bba111095df)
Frantisek Sumsal [Wed, 18 Sep 2024 10:54:51 +0000 (12:54 +0200)]
test: drop removed SCSI passthrough feature
This feature has been deprecated since QEMU 5.0 and finally removed in
QEMU 9.1 [0] which now causes issues when running the storage tests on
latest Arch:
------ testcase_long_sysfs_path: BEGIN ------
...
qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,bus=pci_bridge25: Property 'virtio-blk-pci.scsi' not found
E: qemu failed with exit code 1
[0] https://github.com/qemu/qemu/commit/
a271b8d7b2f39275a05e49deb7c8edc20b7a8279
(cherry picked from commit
cd57920fbf6a8f7769a82cfc9bebc12965de0199)
Luca Boccassi [Tue, 10 Sep 2024 15:37:04 +0000 (17:37 +0200)]
doc-sync: strip point release from version before uploading
We create subdirectories for each major release, but not for point releases
so strip the suffix if it is present
(cherry picked from commit
59e6059513ea53954176096152b8c04f20198cbf)
Luca Boccassi [Tue, 8 Oct 2024 15:42:30 +0000 (16:42 +0100)]
meson: bump version to 256.7
Yu Watanabe [Thu, 5 Sep 2024 05:12:20 +0000 (14:12 +0900)]
test: add test cases for --volatile= with -U
For issue #34254.
(cherry picked from commit
48878074d69a558484348f14e8887ce132938377)
Yu Watanabe [Fri, 6 Sep 2024 04:18:59 +0000 (13:18 +0900)]
nspawn: only remount /usr/ with idmap when --volatile=yes
The root directory is already mounted with a picked UID shift, hence
it is not necessary to remount with idmap. However, /usr/ is a bind-mount,
hence it must be remounted with idmap.
With this change, now '-U --volatile=yes' works fine.
Fixes #34254.
(cherry picked from commit
025be2361b3ee7cc3732fb3963d36b8583842064)
Yu Watanabe [Fri, 6 Sep 2024 04:14:14 +0000 (13:14 +0900)]
nspawn: mount /var/ after remount_idmap() when --volatile=state
Previously, remount_idmap() failed as /var/ was already mounted, thus
remounting (strictly speaking, unmounting old root directory) failed
with -EBUSY.
As tmpfs /var/ is mounted with picked UID shift, it should not be
remounted with idmap, but needs to be mounted after the root directory
being remounted.
This makes '-U --volatile=state' work as expected.
(cherry picked from commit
2c2511aa734c507e04e06d273b474acacac9d486)
Yu Watanabe [Thu, 5 Sep 2024 04:56:33 +0000 (13:56 +0900)]
nspawn: use strv_extend() and friends to build directories passed to remount_idmap()
No functional change, just refactoring and preparation for later change.
(cherry picked from commit
21cd84df6931a358714af9d1f8cc54b26fef1a39)
Lennart Poettering [Mon, 9 Sep 2024 11:59:10 +0000 (13:59 +0200)]
meson: tweak meson conditionalization for ssh{d,}_config drop-ins
Let's make sure "no" is an acceptable setting for these paths.
(cherry picked from commit
a8ea7c19400363847bcd62f3b9ee533fbab0e658)
Ronan Pigott [Sun, 15 Sep 2024 03:21:39 +0000 (20:21 -0700)]
load-fragment: terminate the specifier table (#34421)
Otherwise an invalid specifier iterates over uninitialized data.
Fixes a bug introduced by
0b40688d1830abc6f59b1f1f67eccd757c23eb09 (v254).
(cherry picked from commit
32b8065e876c6f89f55b1bb30eeb442d3921fb3a)
Mike Yuan [Fri, 4 Oct 2024 19:05:21 +0000 (21:05 +0200)]
various: correct laccess() error check
laccess is our own macro that uses RET_NERRNO.
(cherry picked from commit
7c1dd9e288047a69d4a6a6dd6585725410cfdadd)
Daan De Meyer [Mon, 16 Sep 2024 19:45:55 +0000 (21:45 +0200)]
Fix generator logging
log_setup() overrides the previously set log target again so we
can't use it in log_setup_generator().
Follow-up for
aa976d87889ae22b7347787a1ebd03a31dcc0a9e
(cherry picked from commit
b3ebd480d6674ce4f66200858c88557595713bd5)
Luca Boccassi [Tue, 8 Oct 2024 10:20:01 +0000 (11:20 +0100)]
mkosi: update debian commit reference
*
cb00be93e5 Upstream profile: skip dh_strip_nondeterminism
*
c948e192a8 autopkgtest: skip gdm3 on armel for smoke tests
*
e12116becb initramfs-tools: ensure rules file exists before invoking chzdev
*
c8904f67e9 Filter out zdev rules in the initramfs hook (LP: #
2044104)
*
9967984fc8 salsa-ci: test the stage1 build profile
*
2c81f4a6cc d/e/checkout-upstream: undo quilt patches before switching debian branch
*
e75197fa10 d/e/checkout-upstream: do not rebase on main when building stable branches
*
7989319bca Drop patch merged upstream
*
b7127a0725 Depend on new linux-bpf-dev package where available
*
7966d2543f autopkgtest: use hint-testsuite-triggers to ensure other packages changes trigger our testsuite
*
777af76cae autopkgtest: run upstream test last
*
f257c53fe3 Stop installing legaly pkla file in upstream CI too
*
a4b54fd693 Use d/not-installed instead of manual removals
*
e0fdbb4496 Stop shipping empty /etc/init.d directory
*
202c7fc8f9 Use debian/clean instead of override in d/rules
*
ba81ea64a6 Drop redundant pot build
*
9152d0e064 autopkgtest: allow localectl in localed tests
*
319a078b8e Fix D-Bus policy for locale1 blocking
*
28daa8b37b Drop last patch, all merged upstream
*
7bf7bf6f4e Drop out-of-tree localed patch and use D-Bus policy instead
*
409028b7e6 Drop /etc/sysctl.d/99-sysctl.conf symlink
*
6f37d3cb3e d/e/checkout-upstream: switch packaging branch on upstream stable PRs
*
b7e53c00b2 d/e/checkout-upstream: do not fail if rebase fails
*
1364bb81d4 d/e/checkout-upstream: fix shellcheck warnings
*
796d133b0c initramfs-tools: copy network drop-ins too
Luca Boccassi [Mon, 7 Oct 2024 15:48:55 +0000 (16:48 +0100)]
mkosi: mark test as skipped when QEMU crashes
On Ubuntu/Debian infrastructure QEMU crashes a lot, so mark the test
as skipped in that case as there's nothing we can do about it and
we shouldn't mark runs as failed
(cherry picked from commit
0d7f5a9ae6f5fc70c5ad23398c2b7a515e9b1982)
Luca Boccassi [Mon, 7 Oct 2024 18:40:31 +0000 (19:40 +0100)]
semaphore: do not build docs
There are other CI runs that build manpages, speed up build which is close to 1hr limit
(cherry picked from commit
d58a904d35d3abcb7265b28b14aac596631e27d6)
Luca Boccassi [Mon, 7 Oct 2024 18:38:16 +0000 (19:38 +0100)]
semaphore: stop building and running extra unit tests
This slows down the build, which is often near the 1hr limit. There are
other jobs running the extra unit tests.
(cherry picked from commit
3bc5480bac474263881e4c5919d5cce0debf3c40)
Luca Boccassi [Mon, 7 Oct 2024 10:23:32 +0000 (11:23 +0100)]
Semaphore: switch from /tmp to /var/tmp to avoid disk space issues
Builds have been failing as we run out of space in /tmp/, move to
/var/tmp
(cherry picked from commit
0c7b5dad33ee01b7ff6b7a8c583a7e2c27ac0673)
Thomas Blume [Thu, 19 Sep 2024 10:02:27 +0000 (12:02 +0200)]
test: set TEST_NESTED_KVM as default
(cherry picked from commit
5540c37bb8b275cb58b1c936ff701d1c80503e9b)
Daan De Meyer [Mon, 7 Oct 2024 07:49:38 +0000 (09:49 +0200)]
mkosi: Switch to Fedora 41
It's due for release soon and will fix the flakyness of TEST-58-REPART
so let's bump the Fedora 40 job to Fedora 41.
(cherry picked from commit
12a1b02b528e1802025fdc7e3ac9de9426a14391)
Lukas Nykryn [Fri, 4 Oct 2024 08:51:02 +0000 (10:51 +0200)]
core: warn if a generator is world-writable
... because that is obviously a security risk.
(cherry picked from commit
da32cac8a014ddf048fc7bad84dafdbc204d4dc8)
Yu Watanabe [Sun, 6 Oct 2024 06:39:36 +0000 (15:39 +0900)]
test: add test case for issue #34637
(cherry picked from commit
88d186e4829bc7ef4a4253fe2bf4857903bca830)
Yu Watanabe [Sun, 6 Oct 2024 05:43:45 +0000 (14:43 +0900)]
udev-node: skip stack directory creation for diskseq
The disk/by-diskseq symlink should not be shared with multiple block
devices. Hence, it is not necessary to create stack directory for the
symlink that manages which device owns the symlink.
This is not just a optimization.
If a service unit tries to mount a disk image but the service fails, then
the diskseq of the loop device for the image may be continuously increased
during restart, and inodes in /run may increase rapidly, as the stack
directories are cleaned up only when udev queue is empty.
Fixes #34637.
(cherry picked from commit
09373c1a50297079e6b0447ea97af4e9a60f77fa)
Daniel Martinez [Sun, 6 Oct 2024 03:39:43 +0000 (23:39 -0400)]
Use case insensitive comparison for the machine's architechture
boot loader specification states:
architecture: refers to the architecture this entry is for. The argument
should be an architecture identifier, using the architecture vocabulary
defined by the EFI specification (i.e. IA32, x64, IA64, ARM, AA64, …).
If specified and it does not match the local system architecture this
entry should be hidden. The comparison should be done case-insensitively.
Example: architecture aa64
https://uapi-group.org/specifications/specs/boot_loader_specification/#type-1-boot-loader-entry-keys
(cherry picked from commit
f819a516dbbddb16724f33dcef5badcb6fe8b80b)
Michal Koutný [Fri, 4 Oct 2024 18:40:51 +0000 (20:40 +0200)]
test: Add test for per-device cgroup properties
Reported in #34126
(cherry picked from commit
321637743313f896e275fd038996b8cfb5a070b3)
Daan De Meyer [Fri, 4 Oct 2024 19:34:33 +0000 (21:34 +0200)]
chase: Fix shortcut
We can't shortcut chaseat() if CHASE_PARENT is set.
(cherry picked from commit
87333bd1dc69195b93e9aee9b91c06fb167b152e)
Daan De Meyer [Fri, 4 Oct 2024 19:33:52 +0000 (21:33 +0200)]
repart: Don't copy root directory mode from source file
If the source is a file, don't copy the mode and such from it to
the root directory, even if the target is /.
(cherry picked from commit
413d3ce1b76b42ba691eea54cd1704b14602442e)