1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-02 12:58:35 +03:00

78728 Commits

Author SHA1 Message Date
Yu Watanabe
2bef5d187d machine: update log message and comments
Follow-up for 9af9d66184caf565805d0cabc1dd99de5469931e and
453f2359ffcafaafe10297319dd8f85a11a4e1c4.
2025-01-07 09:11:09 +01:00
Lennart Poettering
56a07d10a5
xopenat(): introduce new XO_REGULAR flag (#35834)
This is something I think we should have added a long time ago: a
flavour of open() that safely ensures the inode we are opening is a
regular file, before we open it. It does this by means of pinning the
inode via O_PATH first, and after verification actually opening it.

This ports some code over to this, but sooner or later we should
probably use this a lot more, so that we don't accidentally open weird
stuff such as device nodes or pipes, where we should not.
2025-01-07 08:55:56 +01:00
Lennart Poettering
20785351b1 pretty-print: drop extra ';' from progress reporting end sequence
This corrects the closing sequence for the ConEmu progress reporting
final sequence. We by mistake sent two final ;;, where only one was
expected. The terminals I tested this with didn't care, but Ghostty
apparently does. Let's fix things and generate the closing sequence as
per doc:

https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
2025-01-07 08:55:36 +01:00
Lennart Poettering
9ed2725867 process-util: a process from a foreign pidns is definitely not our child
Addresses: https://github.com/systemd/systemd/pull/35242#pullrequestreview-2531712318
2025-01-07 08:55:21 +01:00
Yu Watanabe
62e9cd6b09 basic/linux: update kernel headers from v6.13-rc6
This also removes README and moves the explanation about the header
modification to the script.
2025-01-06 23:35:14 +00:00
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 cd7c71154cd62d3f50c07ce387edd9c20aebd7bc
(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 c008b703701e676a88e16de4c867b9fc4818070d.

These settings and command were deprecated by the following commit.
ebcd2efa03
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 3866e9ce9d34328460aee5ca01f6f1becfa200eb.
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