1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

76706 Commits

Author SHA1 Message Date
Yu Watanabe
25999f868f test: add test cases for timestamp with time zone 2024-10-08 19:36:38 +09:00
Yu Watanabe
6d3012bab4 time-util: copy input string before fork()
Fixes #34670.
2024-10-08 19:15:54 +09:00
Yu Watanabe
eb87d3e1e9 time-util: fix parsing timestamp with NZ timezone
Fixes a bug caused by ef658a63f8.
2024-10-08 19:15:00 +09:00
Lennart Poettering
86eb9b4f38 resolved: use SOCKADDR_LEN() where appropriate 2024-10-08 12:09:34 +02:00
Lennart Poettering
5699e4c2d4 resolved: fix fastopen fallback
We should not invalidate the socket address size before we use it.

Fixes: #34579
2024-10-08 12:09:34 +02:00
Yu Watanabe
9f0d2d64cc core: use memdup_suffix0() at one more place 2024-10-08 14:43:23 +09:00
Yu Watanabe
858eac353b prioq: use GREEDY_REALLOC() and structured initializer
No functional change, just refactoring.
2024-10-08 14:43:23 +09:00
Yu Watanabe
bf34d642bc
Merge pull request #34669 from bluca/semaphore
Update mkosi debian ref and try to speed up semaphore build
2024-10-08 14:42:26 +09:00
Luca Boccassi
0d7f5a9ae6 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
2024-10-07 23:58:38 +01:00
Luca Boccassi
d58a904d35 semaphore: do not build docs
There are other CI runs that build manpages, speed up build which is close to 1hr limit
2024-10-07 19:40:58 +01:00
Luca Boccassi
3bc5480bac 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.
2024-10-07 19:38:45 +01:00
Luca Boccassi
ee2d86bd52 mkosi: update debian commit reference
* 51389fefca Upstream profile: skip dh_strip_nondeterminism
* 647fd0d40c Install kernel-install uki.conf example
* ddfeb24f55 autopkgtest: skip gdm3 on armel for smoke tests
2024-10-07 19:38:45 +01:00
Ryan Wilson
3543456f84 Add ExtraFileDescriptor property to StartTransientUnit dbus API
This adds the ExtraFileDescriptor property to StartTransient dbus API
with format "a(hs)" - array of (file descriptor, name) pairs. The FD
will be passed to the unit via sd_notify like Socket and OpenFile.

systemctl show also shows ExtraFileDescriptorName for these transient
units. We only show the name passed to dbus as the FD numbers will
change once passed over the unix socket and are duplicated, so its
confusing to display the numbers.

We do not add this functionality for systemd-run or general systemd
service units as it is not useful for general systemd services.
Arguably, it could be useful for systemd-run in bash scripts but we
prefer to be cautious and not expose the API yet.

Fixes: #34396
2024-10-07 09:01:48 -07:00
Daan De Meyer
a417592b06
Merge pull request #34472 from ikruglov/ikruglov/io-systemd-Machine
machine: implement varlink interfaces io.systemd.Machine.{List, Unregister, Terminate, Kill}
2024-10-07 17:22:31 +02:00
Luca Boccassi
0c7b5dad33 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
2024-10-07 15:54:54 +01:00
Ivan Kruglov
164af66f9a machine: tests for varlink interfaces
- io.systemd.Machine.List
- io.systemd.Machine.Kill
- io.systemd.Machine.Terminate
- io.systemd.Machine.Register
- io.systemd.Machine.Unregister
2024-10-07 14:50:17 +02:00
Ivan Kruglov
144128d317 machine: extend io.systemd.Machine.List output with sshPrivateKeyPath field
Effectivelly, this is an implementation of GetMachineSSHInfo in dbus.
2024-10-07 14:50:16 +02:00
Ivan Kruglov
0c3191a506 machine: use JSON_BUILD_PAIR_STRING_NON_EMPTY() in io.systemd.Machine.List output 2024-10-07 14:49:55 +02:00
Ivan Kruglov
17d9f172eb machine: introduce io.systemd.Machine.Kill varlink method 2024-10-07 14:45:49 +02:00
Ivan Kruglov
6bb6354b4f machine: introduce io.systemd.Machine.Terminate varlink method 2024-10-07 14:45:49 +02:00
Ivan Kruglov
7999aa2c79 machine: introduce io.systemd.Machine.Unregister varlink method 2024-10-07 14:45:49 +02:00
Ivan Kruglov
1bd979dddb machine: io.systemd.Machine.List supports 'pid' filter 2024-10-07 14:45:48 +02:00
Luca Boccassi
68f0c80bc4
Merge pull request #34644 from yuwata/udev-node-diskseq
udev-node: do not create stack directory for by-diskseq symlink
2024-10-07 12:17:28 +01:00
Thomas Blume
5540c37bb8 test: set TEST_NESTED_KVM as default 2024-10-07 11:40:17 +02:00
Daan De Meyer
12a1b02b52 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.
2024-10-07 10:55:05 +02:00
Yu Watanabe
14dde316c7 sd-json: use sd_json_dispatch_const_string() in sd_json_dispatch_string()
Also, do similar for json_dispatch_user_group_name().
2024-10-07 09:53:36 +02:00
Yu Watanabe
f769518c9a tree-wide: drop doubled empty lines 2024-10-07 09:51:37 +02:00
Yu Watanabe
1faf2e5332 network: use Network.name for bus path
No functional change, just refactoring.
2024-10-07 09:48:57 +02:00
Yu Watanabe
a02166297c networkctl: sort ifindexes in status command
Before:
$ networkctl status
● Interfaces: 372, 368, 373, 375, 376, 377, 378, 379, 381, 391, 3, 1201, 1202, 1184, 1610, 9, 8, 1340, 2, 1, 1256, 7

After:
$ networkctl status
● Interfaces: 1, 2, 3, 7, 8, 9, 368, 372, 373, 375, 376, 377, 378, 379, 381, 391, 1184, 1201, 1202, 1256, 1340, 1610
2024-10-07 09:48:00 +02:00
Yu Watanabe
dd9a02ce88 homectl: drop unnecessary brackets
Follow-up for 164ca24d74.
2024-10-07 09:01:57 +02:00
Yu Watanabe
ec846d9db3
Merge pull request #34491 from AdrianVovk/sysupdate-fixups
Quick sysupdate fixups
2024-10-07 15:38:58 +09:00
ButterflyOfFire
dd6db61a68 po: Translated using Weblate (Kabyle)
Currently translated at 3.1% (8 of 253 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main
2024-10-07 14:13:43 +09:00
Yu Watanabe
51e905b9fa
Merge pull request #34408 from Werkov/fix-device-limits
core/cgroup: Apply IODevice*= directives in configured order
2024-10-07 14:05:44 +09:00
Lukas Nykryn
da32cac8a0 core: warn if a generator is world-writable
... because that is obviously a security risk.
2024-10-07 11:02:37 +09:00
Joshua Grisham
db7903e4d4
hwdb: add SCAI SKU prefix for Samsung keyboard mapping (#34648) 2024-10-07 10:41:30 +09:00
Yu Watanabe
96067f7669 udev-node: introduce node_remove_symlink()
Also
- make the failure propagated,
- remove /dev/block or /dev/char if empty.

Hopefully, no effective functionality changed. Just refactoring.
2024-10-07 09:56:26 +09:00
Yu Watanabe
2a41b4b0f4 udev-node: rename node_symlink() -> node_create_symlink()
Also adds short comment for the NULL arguments.

No functional change, just refactoring.
2024-10-07 09:56:26 +09:00
Yu Watanabe
88d186e482 test: add test case for issue #34637 2024-10-07 09:56:26 +09:00
Yu Watanabe
09373c1a50 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.
2024-10-07 09:56:26 +09:00
Yu Watanabe
bba5f48acf TODO: fix typo
Follow-up for 26e6986527.
2024-10-07 09:54:00 +09:00
Yu Watanabe
ffe967c598
Merge pull request #34432 from YHNdnzj/path-lookup-refactor
path-lookup: several cleanups
2024-10-07 09:31:47 +09:00
Ryan Wilson
f88813b71a busctl: Support file descriptors in busctl
Previously using file descriptors as input arguments in busctl was
unsupported with "UNIX file descriptor not supported as type."

We fix this by parsing the file descriptor as an integer and verifying
it is an available file descriptor in busctl.

Fixes: #14954
Replaces: #34551
2024-10-06 14:11:31 -07:00
Benjamin ROBIN
615279f369 shutdown: In sync_with_progress(), log first then send SIGKILL
The order of these 2 lines was swapped in commit
758760a361. Put them in the right order,
and take yuwata's comment into account.
2024-10-06 19:56:49 +02:00
Zbigniew Jędrzejewski-Szmek
ac36c4dcd9
sd-json: reorder enum so that SD_JSON_FORMAT_OFF is first
This doesn't really matter, all bits in a word are created equal, but having
the "off" value in the middle seems strange.
2024-10-06 19:48:17 +02:00
Mike Yuan
0aae1a09a3
path-lookup: move xdg_user_dirs() to xdg-autostart-generator
This is the only place where xdg_user_dir() is needed and
makes sense. All other invocations have been replaced with
user_search_dirs() - see previous commits for details.
2024-10-06 19:42:39 +02:00
Mike Yuan
5ce4902249
path-lookup: refactor lookup_paths_init() search paths handling
* Rename user_dirs() -> user_unit_search_dirs() and port to
  user_search_dirs()
* Use STRV_IFNOTNULL to guard paths that could be NULL,
  assert otherwise
2024-10-06 19:42:39 +02:00
Mike Yuan
1f8eedba9d
path-lookup: introduce user_search_dirs() (shall replace xdg_user_dirs())
xdg_user_dirs() doesn't seem well-organized currently.
In all other xdg_user_*() funcs we assume /etc/xdg/systemd
to be a symlink to /etc/systemd/, hence it is the odd one out.
Also, when the relevant envvar is unset, it only returns
the global search dirs.

sd_path_lookup() actually covers this nicely with SD_PATH_SEARCH_*,
where the combined search paths (from user home and system) are used.
Therefore, let's introduce a wrapper for that, and deprecate xdg_user_dirs()
(would be removed in later commits).
2024-10-06 19:42:39 +02:00
Mike Yuan
546110ded9
path-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used in conjunction 2024-10-06 19:42:39 +02:00
Mike Yuan
cfda202fa9
path-lookup: unify *_generator_binary_paths() 2024-10-06 19:32:55 +02:00
Mike Yuan
536f6bd467
path-lookup: modernize get_paths_from_environ()
Use retval rather than additional param to indicate
whether the normal paths shall be appended.
2024-10-06 19:32:55 +02:00