Yu Watanabe
765ffa12ee
sysusers: use trivial_hash_ops_free for storing user/group name
2025-04-13 10:00:57 +09:00
Yu Watanabe
5f43554f90
sd-netlink: introduce custom hash_ops for GenericNetlinkFamily
2025-04-13 10:00:57 +09:00
Yu Watanabe
70669fa2fe
sd-device-enumerator: use custom hash_ops with destructor
2025-04-13 10:00:57 +09:00
Yu Watanabe
f92fac7e9b
sd-device: replace set_free_free() with set_free()
...
These uses string_hash_ops_free, hence not set_free() is enough.
2025-04-13 10:00:57 +09:00
Yu Watanabe
855800aaec
coredump: replace custom cleanup function with specific hash_ops with destructor
2025-04-13 10:00:57 +09:00
Yu Watanabe
f8b0277101
analyze: replace set_free_free() with set_free()
...
set_put_strdup() uses &string_hash_ops_free, hence set_free() also
frees stored contents.
2025-04-13 10:00:57 +09:00
Yu Watanabe
e2603934d5
locale-util,kbd-util: several cleanups ( #37090 )
2025-04-13 09:15:02 +09:00
Mike Yuan
7065494e7e
core/execute: set_get_strv() does not transfer ownership of strings
...
Prompted by #37090
2025-04-13 09:14:18 +09:00
Luca Boccassi
5935d74613
fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/ ( #37109 )
2025-04-12 23:05:10 +01:00
Yu Watanabe
fd7f760338
socket-proxy: several cleanups ( #37107 )
2025-04-13 05:56:57 +09:00
Yu Watanabe
549898c6e4
stdio-bridge: minor coding style cleanup ( #37110 )
2025-04-13 05:20:12 +09:00
Yu Watanabe
002ff90d8c
kbd-util: use string_hash_ops_free and set_to_strv()
2025-04-13 04:59:26 +09:00
Yu Watanabe
21d84e8905
locale-util: use string_hash_ops_free and set_to_strv()
...
Then we can drop hackish combination of use of set_free_free() and
set_free().
2025-04-13 04:59:26 +09:00
Yu Watanabe
3f23b37c5a
strv: constify arguments for strv_equal_ignore_order()
...
Follow-up for 5072f4268b .
2025-04-13 04:59:26 +09:00
Yu Watanabe
24655047b0
set: introduce set_to_strv()
...
It is similar to set_get_strv(), but invalidates the set on success.
2025-04-13 04:59:26 +09:00
Yu Watanabe
4da43aeb0c
locale-util: coding style cleanups
2025-04-13 04:59:26 +09:00
Yu Watanabe
a4a5ee4cd1
locale-util: filter out non-UTF-8 locales even when failed to parse $SYSTEMD_LIST_NON_UTF8_LOCALES
2025-04-13 04:59:26 +09:00
Yu Watanabe
90abb64fd5
locale-util: fix argument for munmap()
2025-04-13 04:59:26 +09:00
Yu Watanabe
41c817e772
socket-proxy: reset connection only in callback functions
...
This makes connection_complete(), connection_start(), and friends not
reset connection on failure.
2025-04-13 04:28:35 +09:00
Yu Watanabe
37edefb33f
socket-proxy: use event_source_hash_ops for managing event sources
2025-04-13 04:28:35 +09:00
Yu Watanabe
94dd3a569c
event-util: use DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR() to define event_source_hash_ops
...
Currently, the hash_ops is only used by set, so this does not change
anything. But, there are several benefits,
- we can drop cast in the definition,
- the hash_ops can be also used by hashmap.
2025-04-13 04:28:35 +09:00
Yu Watanabe
f4a717aa4d
socket-proxy: use hash_ops with destructor for managing Connection
...
This also renames context_clear() -> context_done(), to follow our
recent coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe
234b86a444
socket-proxy: make connection_free() return NULL
...
To make it follow our coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe
10e41cdddc
socket-proxy: use event_reset_time_relative()
...
Also, split out context_reset_timer() from connection_release().
No functional change. Preparation for later change.
2025-04-13 04:28:35 +09:00
Mike Yuan
c89802b5ce
stdio-bridge: use DEFAULT_SYSTEM_BUS_ADDRESS
2025-04-12 19:15:10 +02:00
Mike Yuan
6989688a51
stdio-bridge: minor modernization for parse_argv()
2025-04-12 19:15:10 +02:00
Mike Yuan
e844ee0752
fstab-generator: honor x-systemd.validatefs from kernel cmdline too
2025-04-12 16:33:22 +02:00
Mike Yuan
7369c037e2
fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/
...
We carry a special logic for /usr/ in initrd that it initially gets
mounted to /sysusr/usr/ and later bind mounted to /sysroot/usr/.
When hooking up validatefs it is hence necessary to wait for
the bind mount and validate that, rather than the /sysusr/usr/
established as intermediate transport.
Alternative to #37102
2025-04-12 16:33:22 +02:00
Mike Yuan
39642b0130
gpt-auto: do not add /sysusr/usr/ -> /sysroot/usr/ after switch-root
...
Follow-up for 7852e301e0
2025-04-12 16:33:22 +02:00
Luca Boccassi
9f091f098a
TODO: drop getenv item, done where needed
2025-04-12 11:49:00 +01:00
Busayo Dada
a51804a5ff
Use secure_getenv() instead of getenv() where appropriate
2025-04-12 11:48:22 +01:00
Luca Boccassi
a681435015
busctl: several cleanups for introspect command ( #37103 )
2025-04-12 11:46:58 +01:00
Yu Watanabe
c63899c149
busctl: use table to format result of introspect command
2025-04-12 12:23:13 +09:00
Yu Watanabe
b2bba933b6
busctl: use set_dump_sorted() and FOREACH_ARRAY()
2025-04-12 12:23:13 +09:00
Yu Watanabe
922828a4e2
busctl: use strdup_to() and set_consume()
2025-04-12 12:23:13 +09:00
Yu Watanabe
d48966ccd1
busctl: set destructor to member_hash_ops
...
Then, we can drop the custom destructor of 'Set *mmebers'.
2025-04-12 12:23:13 +09:00
Yu Watanabe
67bdb6bee0
network/netdev: remove support of netdevsim
...
netdevsim device creation by networkd was deprecated by
59a9ef1022 (v246), and it does not work
since kernel v5.2:
https://github.com/torvalds/linux/commit/e05b2d141fef22cfac1928cf0eb6890e5dae4216
Now our baseline for the kernel is v5.4. Let's completely kill the
feature.
2025-04-12 09:23:27 +09:00
Yu Watanabe
012d76ab79
test: also wait for all queued events being processed
...
Otherwise, if already 'remove' uevent for the device is queued, then
the device node may not exist any more when 'udevadm wait' command succeeds.
Follow-up for 90941d458a .
2025-04-12 09:22:27 +09:00
Yu Watanabe
644c934348
core: drop cgroup v1 synthetic empty event logic ( #37099 )
2025-04-12 09:21:29 +09:00
Luca Boccassi
386b94e6f6
fido2: hook up with plymouth for notifications ( #37089 )
...
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-12 01:06:31 +01:00
Luca Boccassi
633f07e7c9
mkosi: update debian commit reference to 91a4d114e0b5a01385477f8862caedc1056fa68b
...
* 91a4d114e0 Install new file for upstream profile
2025-04-11 23:07:38 +01:00
Luca Boccassi
988fae8024
mkosi: enable autologin also with --console=gui
2025-04-11 23:07:38 +01:00
Luca Boccassi
fc35f5280f
fido2: hook up with plymouth for notifications
...
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-11 23:07:38 +01:00
Mike Yuan
66f83537f9
core: unit_watch_pidref() gracefully handles EEXIST
...
No need to check that at callsite.
2025-04-11 23:50:50 +02:00
Mike Yuan
55e4df21ef
core: drop cgroup v1 synthetic empty event logic
...
cgroup v2's empty events are reliable, hence we'd not bother
with validating it again in unit_add_to_cgroup_empty_queue()
either.
2025-04-11 23:50:50 +02:00
Yu Watanabe
1dcdad57ce
udev-rules: add more verbose messages for ATTR{} and ATTRS{}
...
This also makes udevd/udevadm mention that the parent device rules
also tested with the device currently processing.
With the following rules file:
```
ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff", MODE="0666", GROUP="input",
```
Before:
```
event0: /tmp/hoge.rules:1 Checking conditions for parent devices: ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff"
event0: /tmp/hoge.rules:1 No parent device passed parent conditions.
```
After:
```
event0: /tmp/hoge.rules:1 Checking conditions for parent devices (including self): ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff"
event0: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
input0: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
PNP0C0E:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
LNXSYBUS:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
LNXSYSTM:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
event0: /tmp/hoge.rules:1 No parent device passed parent conditions.
```
Prompted by #37063 .
2025-04-12 06:48:09 +09:00
Yu Watanabe
09e98a3d74
udev: support reverting/serializing/deserializing configurations set by 'udevadm control' ( #37067 )
...
Previously, log level, properties, maximum number of worker processes,
and so on set by 'udevadm control' are discarded on restart. This makes
the configuration serialized on stop and deserialized in next
invocation. Also, this introduces 'udevadm control --revert' to clear
previous configurations.
2025-04-12 06:47:16 +09:00
Mike Yuan
c9eff0bcfc
core/cgroup: drop v1 handling in unit_attach_pids_to_cgroup()
2025-04-11 23:44:24 +02:00
Mike Yuan
512e89e750
mount-setup: swap MountMode and condition_fn in struct
...
To avoid unnecessary 'NULL's in structured initializer.
2025-04-11 23:44:24 +02:00
Yu Watanabe
c50606aa56
TEST-17-UDEV: add test cases for reverting/serializing/deserializing config
2025-04-12 05:08:20 +09:00