Commit Graph
78563 Commits
Author SHA1 Message Date
Lennart Poettering bcd2764960 update TODO 2025-01-06 23:37:45 +01:00
Lennart Poettering 714b21da88 copy: port things over to XO_REGULAR 2025-01-06 23:37:45 +01:00
Lennart Poettering 237aca5fbe machine: switch to using cleanup handling for child process cleanup 2025-01-06 23:37:45 +01:00
Lennart Poettering c0381ba6e8 machine: transition back to host mount ns before copying files from/to container
When copying files from or to a container we so far opened the host side
fd first, then entered the container (specifically, joined it's mount
namespace) in a forked off child process, and opened the other side
there, followed by the (potentially slow) copying from inside the
container mount namespace.

This commit changes this so that we rejoin the host mount namespace
before doing the copying routine. This is relevant, so that we can rely
on /proc/self/fd/… to work, which is not the case otherwise, as we'll
see /proc/ from a pidns that is not our own, in wich case
/proc/self/fd/… is refused. By moving back to the host mount namespace
our own pidns and the pidns the /proc/ mount belongs to will be in sync
again, and all is good.

This is in particular preparation for the next commit, that makes the
copy routine strictly depending on /proc/ being accessible and working.
2025-01-06 23:37:45 +01:00
Lennart Poettering dffafa47ae fs-util: add XO_REGULAR flag for xopenat()
If this flag is set we guarantee that the fd returned refers to a
regular file. If the file exists and is not one, fails.
2025-01-06 23:20:09 +01:00
Daan De Meyer 2144b5dccf machine: introduce io.systemd.Machine.{CopyFrom, CopyTo} methods (#34913)
This PR introduces io.systemd.Machine.CopyFrom and CopyTo method which
are DBus alternatives of:
- CopyFromMachine
- CopyToMachine
- CopyFromMachineWithFlags
- CopyToMachineWithFlags

The PR also contain tests
2025-01-06 23:16:33 +01:00
Luca Boccassi d87dc74e8f core: fix assert when AddDependencyUnitFiles is called with invalid parameter
unit_file_add_dependency() asserts, so check before calling it that the
type is expected, or return EINVAL to the caller.

root@localhost:~# busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager AddDependencyUnitFiles "asssbb" 0 uwhatm8 After 1 1

Broadcast message from systemd-journald@localhost (Mon 2025-01-06 18:12:14 UTC):

systemd[1]: Caught <ABRT>, from our own process.

Fixes https://github.com/systemd/systemd/issues/35882
2025-01-06 21:38:55 +00:00
Arnaudv6 a7cdd7fe08 hwdb: WALTOP International Corp. Slim Tablet Stylus 2025-01-07 04:33:00 +09:00
Luca Boccassi 861d0c081a tree-wide: drop references to CentoS/RHEL 7 and 8 (#35881) 2025-01-06 18:38:05 +00:00
Luca Boccassi a712dd45ff Two fmf fixes (#35879) 2025-01-06 18:05:44 +00:00
Yu Watanabe 220f7aac8c test-network: drop workaround for old CentOS release 2025-01-07 02:06:04 +09:00
Yu Watanabe 1761c35275 test-network: nowadays it runs not only on CentOS 2025-01-07 02:06:04 +09:00
Yu Watanabe 066e603ac6 meson: drop workaround for CentOS 8
CentOS 8 and RHEL 8 reached EOL.
2025-01-07 02:06:04 +09:00
Yu Watanabe 7a0c3923fe docs: replace link to RHEL7 document with RHEL9 documents 2025-01-07 02:05:16 +09:00
Yu Watanabe a88b0eb4e7 tools: drop workaround for CentOS 7 2025-01-07 02:05:12 +09:00
Yu Watanabe 37b87a1690 README: CentOS Stream 8 reached EOL 2025-01-07 01:21:13 +09:00
Daan De Meyer 0eb7e29dfb fmf: Support being used downstream in dist-git tests
We can use our upstream fmf definitions to run downstream tests in
the Fedora systemd dist-git repository
(https://src.fedoraproject.org/rpms/systemd). To have access to the
dist-git sources when running the tests, we enable dist-git-source: true
downstream which makes the sources available in $TMT_SOURCE_DIR so
let's make sure we use those sources if they're available.
2025-01-06 16:30:23 +01:00
Daan De Meyer 9e76e9c9dc fmf: Insist on mkosi sha being available
Let's assume the workflow file containing the mkosi always being
available.

Also fix the detection while we're at it by not leaving the systemd
directory.
2025-01-06 16:29:28 +01:00
Ivan Kruglov 825fff7fac machine: move io.systemd.Machine.Map* tests into right position 2025-01-06 14:51:57 +01:00
Ivan Kruglov 24b7e0b894 machine: tests for io.systemd.Machine.{CopyFrom, CopyTo} methods 2025-01-06 14:51:57 +01:00
Ivan Kruglov 453f2359ff machine: introduce io.system.Machine.{CopyFrom, CopyTo} methods 2025-01-06 14:51:57 +01:00
Ivan Kruglov 8632e7ae23 machine: use machine_copy_from_to() in dbus implementation 2025-01-06 14:51:57 +01:00
Ivan Kruglov 9af9d66184 machine: introduce machine_copy_from_to() helper 2025-01-06 14:51:57 +01:00
Ivan Kruglov 347a1105a4 machine: split operation initialization into two steps 2025-01-06 14:41:49 +01:00
Ivan Kruglov ee71079aba machine: adjust operation callback logic for varlink
This is to simplyfy varlink callback. There is no use of this logic atm.
So, no harm.
2025-01-06 14:41:49 +01:00
Yu Watanabe 0f6d800b9f sd-varlink: add flag for sd_varlink_server for creating connections w… (#35841)
…ith fd passing enabled

Let's add a simple flag that enables fd passing for all connections of a
server. It's much easier to use this than to install a connect handler
which manually enables this for each connection.
2025-01-06 22:13:50 +09:00
Daan De Meyer 1b8c5bb267 mkosi: Migrate more deprecated options (#35873) 2025-01-06 13:42:21 +01:00
Luca Boccassi 0b5f926939 CI: add OBS workflow integration to build packages on push to main
When main is updated, packages for Arch/Debian/Ubuntu/SUSE will be built and published
on OBS:

https://download.opensuse.org/repositories/home:/bluca:/systemd/
https://build.opensuse.org/project/show/home:bluca:systemd
2025-01-06 11:20:56 +00:00
Daan De Meyer c5981510e9 ci: Rename qemu variable to vm 2025-01-06 12:08:33 +01:00
Daan De Meyer 28baef47a3 mkosi: Migrate more deprecated options 2025-01-06 12:07:53 +01:00
Luca Boccassi 807db92ab4 sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname() (#35863)
Devices under /sys/firmware/ do not have subsystems. Hence, the
validation in sd_device_new_from_subsystem_sysname() ->
device_new_from_path_join() always failed.

Fixes a bug introduced by cd7c71154c
(v257).
Fixes #35861.
2025-01-06 11:06:23 +00:00
Yu Watanabe d5cdcba928 mkosi: replace deprecated settings and command with new ones
Follow-up for c008b70370.

These settings and command were deprecated by the following commit.
https://github.com/systemd/mkosi/commit/ebcd2efa03af5c04de91434634f2e4a956f7e53c
2025-01-06 12:00:43 +01:00
Daan De Meyer eaf0f79293 machine: several follow-ups for #35066 (#35868)
Addresses the post-merge review comments.
2025-01-06 11:59:55 +01:00
Lennart Poettering 336acebc77 basic: port various pidfd/pidref helpers to PIDFD_GET_INFO and PIDFD_GET_*_NAMESPACE (#35242)
Supersedes #35308 (cherry-picked one commit and replaced the rest)

(I left a few comments that's folded by GitHub. Please make sure to
check them too.)
2025-01-06 11:23:08 +01:00
Lennart Poettering 7f72184f12 more pidref'ification (#35839)
This is split out of #35264, but makes a ton of sense on its own.
2025-01-06 11:21:43 +01:00
Lennart Poettering 6f84873096 mountfsd,networkd,nsresourced: port over to new fd passing varlink server flags 2025-01-06 10:31:40 +01:00
Daan De Meyer 65b603492d tty-ask-password-agent: if we're spawning further agents, grant them notify access (#35855)
Alternative to #35853
2025-01-06 10:05:29 +01:00
Lennart Poettering dd445d6e99 cgroup-util: add remoteness checks to all cg_pidref_get_xyz() calls 2025-01-06 09:54:41 +01:00
Lennart Poettering 1740d3e04b sd-login: make use of getpeerpidref() and cg_pidref_get_*() 2025-01-06 09:54:41 +01:00
Lennart Poettering 92d78966fd cgroup-util: add pidref counterparts for cg_pid_get_session() + cg_pid_get_owner_uid() 2025-01-06 09:54:41 +01:00
Lennart Poettering b2206fe514 socket-util: introduce getpeerpidref()
This combines getpeercred() and getpeerpidfd() and returns a PidRef
2025-01-06 09:45:57 +01:00
Lennart Poettering 6d4778f14f sd-varlink: add flag for sd_varlink_server for creating connections with fd passing enabled
Let's add a simple flag that enables fd passing for all connections of a
server. It's much easier to use this than to install a connect handler
which manually enables this for each connection.
2025-01-06 09:28:19 +01:00
Yu Watanabe c192d87d83 machine: comment source and destination must be absolute
Addresses the post-merge review comment:
https://github.com/systemd/systemd/pull/35066#discussion_r1901841247
2025-01-06 17:14:26 +09:00
Yu Watanabe 8551ac2092 machine: use json_dispatch_const_path() where applicable
Follow-up for #35066 and 3866e9ce9d.
2025-01-06 17:09:43 +09:00
Yu Watanabe 5eec51a6c1 packit: Move fmf metadata into upstream (#35700)
This moves https://src.fedoraproject.org/tests/systemd into upstream so
it's one less moving piece that we need to remember.
2025-01-06 10:37:56 +09:00
Daan De Meyer b0b88f18b3 packit: Move fmf metadata into upstream
This moves https://src.fedoraproject.org/tests/systemd into upstream
so it's one less moving piece that we need to remember. While we're at
it, do various cleanups as well:

- Remove non-packit logic
- Set NO_BUILD in mkosi.local.conf as it's not picked up from the
  process environment
- Don't set unused environment variables
- Remove workdir logic as we run in an ephemeral VM already
- Drop --verbose from meson test to reduce noise
  from passed tests
- Use mkosi sandbox and drop duplicated deps from metadata file
- Stop running the unit tests as they already run as part of the rpm
  build and as part of the integration tests.
- Various style fixes
2025-01-05 23:21:36 +01:00
Daan De Meyer 8a9b989cba mkosi: Make path exclude more generic
The systemd rpms we try to install in packit have /usr/bin/bash and
/usr/bin/python3 as dependencies which breaks dnf5 because mkosi
doesn't download filelists metadata and
https://bugzilla.redhat.com/show_bug.cgi?id=2263771 is still not fixed
almost a year after being reported.
2025-01-05 23:19:44 +01:00
Daan De Meyer c008b70370 mkosi: Update to latest 2025-01-05 21:18:32 +01:00
Yu Watanabe 3328d1e181 sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname()
Devices under /sys/firmware/ do not have subsystems. Hence, the
validation in sd_device_new_from_subsystem_sysname() ->
device_new_from_path_join() always failed.

Fixes a bug introduced by cd7c71154c (v257).
Fixes #35861.
2025-01-05 03:52:05 +09:00
Yu Watanabe 7e5238625e sd-device: add missing debugging log
It was unexpectedly dropped by 660087dc9c.
2025-01-05 03:09:57 +09:00