1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

76584 Commits

Author SHA1 Message Date
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
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 164ca24d7464253e5f8375226b792ef8f6eaffd0.
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 26e6986527fe553edf35a442a520deb10c45a155.
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
Benjamin ROBIN
615279f369 shutdown: In sync_with_progress(), log first then send SIGKILL
The order of these 2 lines was swapped in commit
758760a3610e3c6674de8a1d51b12b991eafef7c. 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
Mike Yuan
b8018297a8
path-lookup: shortcut patch_root_prefix() if no root_dir 2024-10-06 19:32:54 +02:00
Mike Yuan
716fab66ab
path-lookup: unify acquire_{config,control,attached}_dir()
Note that -ENXIO reported by xdg_user_config_dir() is now properly
propagated rather than ignored, as unlike XDG_RUNTIME_DIR, XDG_CONFIG_HOME
has a default value hence ENXIO is not really expected.
2024-10-06 19:32:54 +02:00
Mike Yuan
bd79a88f34
path-lookup: use path_strv_contains() rather than strv_contains() 2024-10-06 19:32:54 +02:00
Mike Yuan
0e0e20bfb1
path-lookup: clean up acquire_{generator,transient}_dirs() a bit 2024-10-06 19:32:54 +02:00
Mike Yuan
8cff087d27
path-lookup: modernize runtime_directory() too 2024-10-06 19:32:53 +02:00
Mike Yuan
60cd6deb06
path-lookup: deduplicate xdg_user_*() with sd_path_lookup()
While at it, place ret param at last.
2024-10-06 19:27:12 +02:00
Mike Yuan
f005e267bc
path-lookup: move from basic/ to libsystemd/
So that sd_path_lookup() can be utilized to replace
duplicate functions.
2024-10-06 19:27:12 +02:00
Mike Yuan
feae34d64e
path-lookup: move find_portable_profile() to portable-util 2024-10-06 19:27:11 +02:00
Mike Yuan
cd7d732dc5
path-lookup: move NETWORK_DIRS to network-util.h 2024-10-06 19:27:11 +02:00
Mike Yuan
1a7627f4e1
unit-file: make unit_type_may_{alias_template} static inline 2024-10-06 19:27:11 +02:00
Mike Yuan
2bf5b262b5
basic/unit-file: move to shared/
Preparation for later commits, where path-lookup would be
moved into libsystemd.

Note that it currently includes sd-id128.h, hence shared/
seems more appropriate anyway.
2024-10-06 19:27:00 +02:00
Daniel Martinez
f819a516db 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
2024-10-06 14:19:43 +01:00
Yu Watanabe
61c7f38f10
Merge pull request #34638 from YHNdnzj/laccess-error-check
various: correct laccess() error check
2024-10-06 13:50:11 +09:00
Daan De Meyer
a407aaa6ff
Merge pull request #34639 from DaanDeMeyer/repart-fix
Two repart fixes
2024-10-05 08:36:14 +02:00
Mike Yuan
3f8999a76e
fs-util: rename laccess to access_nofollow
In order to distinguish it from libc function naming.
2024-10-05 01:30:43 +02:00
Michal Koutný
3216377433 test: Add test for per-device cgroup properties
Reported in #34126
2024-10-04 22:04:46 +02:00
Daan De Meyer
87333bd1dc chase: Fix shortcut
We can't shortcut chaseat() if CHASE_PARENT is set.
2024-10-04 21:34:33 +02:00
Daan De Meyer
413d3ce1b7 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 /.
2024-10-04 21:33:52 +02:00
Mike Yuan
7c1dd9e288
various: correct laccess() error check
laccess is our own macro that uses RET_NERRNO.
2024-10-04 21:26:04 +02:00
Daan De Meyer
598bb6fde4
Merge pull request #34608 from DaanDeMeyer/ukify
ukify: Rework multi-profile UKIs
2024-10-04 13:57:16 +02:00
Jörg Behrmann
56f32d9e78 man: Use proper conjunction and remove superfluous or 2024-10-04 12:45:21 +01:00
Daan De Meyer
7cd56ec951 repart: Handle empty arg_copy_source in file_is_denylisted() 2024-10-04 12:47:01 +02:00