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

v252 batch #409

Merged
merged 36 commits into from
May 28, 2024
Merged

v252 batch #409

merged 36 commits into from
May 28, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented May 28, 2024

No description provided.

DaanDeMeyer and others added 30 commits May 28, 2024 01:10
This can change between the call to homectl inspect and userdbctl
user so let's ignore it along with the other disk fields.

Fixes #32727

(cherry picked from commit 6c5d4f0)
(cherry picked from commit 868bcfa)
(cherry picked from commit 35a5826)
(cherry picked from commit f29426c)
This fixes build with old toolchains prior to Linux < 4.2 which do not
have a definition for NFPROTO_NETDEV.

(cherry picked from commit 41a94ae)
(cherry picked from commit d8d64ce)
(cherry picked from commit e977850)
(cherry picked from commit bb69618)
(cherry picked from commit e97bb36)
(cherry picked from commit 1f3313d)
(cherry picked from commit 25b4ce2)
(cherry picked from commit 858b666)
Also this makes several checks more strict.

(cherry picked from commit 24e3792)
(cherry picked from commit 6ad7d19)
(cherry picked from commit 5e10896)
(cherry picked from commit b38448d)
This should be useful when the test run as a service, e.g.
running on a mkosi image.

(cherry picked from commit e92d7b7)
(cherry picked from commit ebbc5e5)
(cherry picked from commit 70c1f11)
(cherry picked from commit 637093d)
This adds checks for the kernel bug caused by
torvalds/linux@3ddc223,
it will be fixed by
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

(cherry picked from commit d22f2fb)
(cherry picked from commit 90fda85)
(cherry picked from commit 4e69c36)
Follow-up for 9de324c.

(cherry picked from commit a937fa9)
(cherry picked from commit 29868fb)
(cherry picked from commit 6f2a7f0)
(cherry picked from commit 5ff7168)
The state might be "freezing-by-parent" as well so let's take that
into account.

Fixes #32746

(cherry picked from commit 034e85c)
(cherry picked from commit 33a8ea6)
(cherry picked from commit 3765072)
(cherry picked from commit 6d6282a)
… destroy a curl context on exit

If we destroy both an event loop and a curl contect object at the same
time, then we get into this weird situation where curl wants us to
reconfigure a timout event source right before destruction, which
sd-event will refuse however, since it is already being shutdown.

Hence, catch that and simply don't bother adjusting the timeout, since
we cannot get back from there anyway.

(cherry picked from commit c5ecf09)
(cherry picked from commit 73164d4)
(cherry picked from commit e892472)
(cherry picked from commit 0751a0d)
We want to eanble running tests as part of the build, but
our builds run in VMs with networking disabled.

(cherry picked from commit 19614a0)
(cherry picked from commit 1b75c51)
(cherry picked from commit 07a72ea)
(cherry picked from commit 65e24d1)
(cherry picked from commit f7a6418)
(cherry picked from commit 8d074b7)
(cherry picked from commit 6d913d0)
(cherry picked from commit 348261c)
(cherry picked from commit d02a41a)
(cherry picked from commit 9612ec0)
(cherry picked from commit 2692acb)
(cherry picked from commit 61030e5)
If tests are run during build time, without an already installed
systemd they fail to resolve the sysusersdir and tpmfilesdir pkg-config variables.

(cherry picked from commit 2aee829)
(cherry picked from commit 936576d)
(cherry picked from commit eec41b7)
(cherry picked from commit c495f85)
Otherwise we log a noisy error when we get ECONNRESET.

(cherry picked from commit 2540036)
(cherry picked from commit 51c2887)
(cherry picked from commit c61d11c)
(cherry picked from commit 45b7c72)
Fixes #32695.

(cherry picked from commit 71f0487)
(cherry picked from commit 8318972)
(cherry picked from commit e62ecc6)
(cherry picked from commit 552f337)
Follow-up for 6c2d47d.

Fixes the following unexpected skip:
```
[    6.163670] TEST-64-UDEV-STORAGE.sh[596]: + modinfo btrfs
[    6.164102] TEST-64-UDEV-STORAGE.sh[726]: /usr/lib/systemd/tests/testdata/units/TEST-64-UDEV-STORAGE.sh: line 726: modinfo: command not found
[    6.164683] TEST-64-UDEV-STORAGE.sh[727]: + echo 'This test requires the btrfs kernel module but it is not installed, skipping the test'
[    6.165069] TEST-64-UDEV-STORAGE.sh[728]: + tee --append /skipped
[    6.166801] TEST-64-UDEV-STORAGE.sh[728]: This test requires the btrfs kernel module but it is not installed, skipping the test
[    6.167177] TEST-64-UDEV-STORAGE.sh[596]: + exit 77
```

(cherry picked from commit 2569e79)
(cherry picked from commit 0868f29)
(cherry picked from commit 911a593)
(cherry picked from commit cdc86e4)
… to user operation

(cherry picked from commit ade0789)
(cherry picked from commit 920dbc7)
(cherry picked from commit 3b01bd3)
(cherry picked from commit e52232f)
The rationale is similar to 40e1f4e.

Currently, we only pass TTYPath=/dev/pts/... to
the transient service spawned by systemd-run.
This is a bit problematic though, when ExecStartPre=
or ExecStopPost= is used. Since when these control
processes get to run, the main process is not yet
started/has already exited, hence the slave suffers
from the same vhangup problem as the mentioned commit.

By passing the slave fd in, the service manager will
hold the fd open as long as the service is alive.

Fixes #32916

(cherry picked from commit 28459ba)
(cherry picked from commit 182b80b)
(cherry picked from commit 369d7d4)
(cherry picked from commit 903c71b)
Otherwise, ReadOnly DBus property in org.freedesktop.machine1.Image or
org.freedesktop.portable1.Image will not be updated by MarkReadOnly DBus
method.

(cherry picked from commit 608c321)
(cherry picked from commit c16f4aa)
(cherry picked from commit e268f14)
(cherry picked from commit 6808668)
Same as the previous commit, but for SetLimit DBus method vs Limit
property and friends.

(cherry picked from commit 96ac6d3)
(cherry picked from commit a2349e8)
(cherry picked from commit 77ec269)
(cherry picked from commit cd5bc64)
Preparation for the next commit. No functional change.

(cherry picked from commit 6d917da)
(cherry picked from commit aa6822f)
(cherry picked from commit cde3c5a)
(cherry picked from commit 35207df)
…he main interface is called

Previously, Image objects were only cached when reading properties or
methods in the org.freedesktop.machine1.Image interface are called.

This makes that, when a method in the main interface (org.freedesktop.machine1)
for an image is called, also acquire the Image object from the cache,
and if not cached, create Image object and put into the cache, like we
do for org.freedesktop.machine1.Image.

Otherwise, if some properties of an image are updated by methods in the main
interface, e.g. MarkImageReadOnly(), the changes do not applied to the cached
Image object, and subsequent read of proerties through the interface for the
image, e.g. ReadOnly property, may provide outdated values.

Follow-up for 1ddb263.

Fixes #32888.

(cherry picked from commit c6aeb9b)
(cherry picked from commit bf270a3)
(cherry picked from commit a898cb9)
(cherry picked from commit 38b52dc)
Fixes a bug introduced by 1ddb263.

Note, this requires the previous two commits, and cannot backport without them.

Note, before the previous commit, the use-after-free could be triggered
only by Rename() DBus method, and could not by RenameImage(), as we did not
cache Image object when RenameImage() method is called. And machinectl
always uses RenameImage(). Hence, the issue could be triggered only when
Rename() DBus method is explicitly called by e.g. busctl.

With the previous commit, the Image object passed to the function is
always cached. Hence, the issue could be triggered even with machinectl
command, and this fix is important.

(cherry picked from commit 3b1b2d4)
(cherry picked from commit c937169)
(cherry picked from commit 3102599)
(cherry picked from commit 141ccb2)
Makes it easier to switch for debuggin

(cherry picked from commit 5002b57)
(cherry picked from commit c64e960)
(cherry picked from commit 72e6c4b)
(cherry picked from commit c27b504)
Fixes systemd/systemd#32932 (comment).

(cherry picked from commit f8ef1df)
(cherry picked from commit d6f9c7b)
(cherry picked from commit 87054dc)
(cherry picked from commit bda9cb5)
(cherry picked from commit d735753)
(cherry picked from commit 867b5a7)
(cherry picked from commit 7f1f029)
(cherry picked from commit 93e1514)
Follow-up for ade0789

The change in behavior was partly intentional, as I think
if both --wait and --pty are used, manually disconnecting
from PTY forwarder should not result in systemd-run exiting
with "Finished with ..." log. But we should check for
--wait here.

Closes #32953

(cherry picked from commit 2b4a691)
(cherry picked from commit 4656130)
(cherry picked from commit 4e89a41)
(cherry picked from commit c26ff67)
…pipe, and --wait

(cherry picked from commit d73a47d)
(cherry picked from commit ce25cf6)
(cherry picked from commit d1e36e6)
(cherry picked from commit 94081ff)
On running cryptsetup, udevd detects two inotify events for the
underlying device. Running the test on enough fast host, the expected
symlinks based on UUID and disk label are created by the second event.

During processing a uevent for a device, udevd disables the inotify
watch for the device. If the test runs on slow system, the second
inotify event may comes during a udev worker processing the synthesized
uevent triggered by the first inotify event. Hence, no synthesized
uevent for the second inotify event will be generated, and the expected
symlinks will be never created.

To prevent the issue, we need to lock the device during cryptsetup
command is running.

Fixes #32913.

(cherry picked from commit be43c9b)
(cherry picked from commit 640dbad)
(cherry picked from commit b88915b)
(cherry picked from commit 0e46897)
When running in LXC with AppArmor we'll most likely get an error when creating
a network namespace due to a kernel regression in < v6.2 affecting AppArmor,
resulting in denials. Like other tests, avoid failing in case of permission
issues and handle it gracefully.

(cherry picked from commit 6ab21f2)
(cherry picked from commit ff35460)
(cherry picked from commit c3aa100)
(cherry picked from commit a347500)
keszybz and others added 6 commits May 28, 2024 01:19
Before:
/etc/kernel/install.conf:6: Unknown key name 'asdf' in section '(null)', ignoring.
After:
/etc/kernel/install.conf:6: Unknown key 'asdf', ignoring.

Also make the message a bit better.

(cherry picked from commit 600a740)
(cherry picked from commit a2f32b9)
(cherry picked from commit 1d83c17)
(cherry picked from commit a960063)
So, we need to try to read timezone several times.
Also, on failure, show journal of timedated instead of hostnamed,
as the timezone is handled by timedated.

Hopefully fixes #33007.

(cherry picked from commit 1ef586a)
(cherry picked from commit 91d31ca)
(cherry picked from commit 8b86ada)
(cherry picked from commit 64f9ef7)
See also: https://lore.kernel.org/r/[email protected]

(cherry picked from commit 100bed7)
(cherry picked from commit 41fb19e)
(cherry picked from commit 6426323)
(cherry picked from commit 242df73)
With torvalds/linux@430cc5d,
the value of GENHD_FL_NO_PART, previously named as GENHD_FL_NO_PART_SCAN,
is changed from 0x0200 to 0x0004. So, we need to check both flags.

(cherry picked from commit f0c2668)
(cherry picked from commit 49b0f0e)
(cherry picked from commit 7f19a34)
(cherry picked from commit d55fcd8)
With torvalds/linux@b9684a7 (v5.19),
we cannot check partition scanning is enabled for a loopback block device
without checking the attribute.

(cherry picked from commit bab8c85)
(cherry picked from commit ae7a07b)
(cherry picked from commit e2fe7d8)
(cherry picked from commit 8cc1fe9)
Follow-up for 677430b

(cherry picked from commit d8f5a31)
(cherry picked from commit 632b493)
(cherry picked from commit 10e36db)
(cherry picked from commit 6ee5aa1)
Copy link

We were not able to find or create Copr project packit/systemd-systemd-stable-409 specified in the config with the following error:

Cannot create a new Copr project (owner=packit project=systemd-systemd-stable-409 chroots=[]): chroots: '[]' is not a valid choice for this field.

Please check your configuration for:

  1. typos in owner and project name (groups need to be prefixed with @)
  2. whether the project name doesn't contain not allowed characters (only letters, digits, underscores, dashes and dots must be used)
  3. whether the project itself exists (Packit creates projects only in its own namespace)
  4. whether Packit is allowed to build in your Copr project
  5. whether your Copr project/group is not private

@bluca bluca merged commit bf4d97f into systemd:v252-stable May 28, 2024
31 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

8 participants