]>
git.ipfire.org Git - thirdparty/systemd.git/log
Yu Watanabe [Sat, 12 Apr 2025 16:42:59 +0000 (01:42 +0900)]
network/l2tp: use hash_ops with destructor for managing sessions
Daan De Meyer [Wed, 16 Apr 2025 13:12:15 +0000 (15:12 +0200)]
mkosi: Two improvements (#37155)
Daan De Meyer [Wed, 16 Apr 2025 12:04:33 +0000 (14:04 +0200)]
mkosi: Reuse main image prepare scripts in subimages
In the subimages we also want to make sure all dependencies of the
systemd packages are cached so reuse the same prepare scripts from
the main image to do that.
We only want required dependencies in the subimages, not recommended
or suggested dependendencies, so add an environment variable
$SYSTEMD_REQUIRED_DEPS_ONLY which the prepare scripts can check for
and enable it for the subimages.
Daan De Meyer [Wed, 16 Apr 2025 12:20:41 +0000 (14:20 +0200)]
mkosi: Make sure coreutils is installed in initrd/exitrd
This is already installed but Fedora/CentOS systems are nudged towards
installing coreutils-single which then later causes issues when we try
to install coreutils as a dependency of systemd so let's make sure we
pick coreutils from the beginning.
Lennart Poettering [Tue, 15 Apr 2025 15:20:07 +0000 (17:20 +0200)]
bootctl: replace --no-variables by --variables=BOOL
I think the current behaviour of not doing EFI variables when we are run
in a container makes a ton of sense, but in some cases it's useful to
do EFI var setup even when a set of namespaces is set up for us, for
example to recover a hosed installation from a rescue disk.
While we are at it, let's remove some duplicate checks, and
systematically output information why we skip various operations.
Fixes: #36174 #35005
Daan De Meyer [Wed, 16 Apr 2025 10:00:06 +0000 (12:00 +0200)]
elf2efi: Add back python 3.7 compat
The walrus operator was introduced in python 3.9 so using it
accidentally bumped the minimum python version to 3.9 from 3.7 and
bluca still cares about keeping this working on 3.8 so let's remove
the usage of the walrus operator.
Follow up for
d6a29eee2be6ec8ef1473b8097f6d0a2b9e09f4b
Yu Watanabe [Wed, 16 Apr 2025 10:20:19 +0000 (19:20 +0900)]
use hashmap_dump_sorted() and friends at more several places (#37150)
Lennart Poettering [Wed, 16 Apr 2025 08:48:31 +0000 (10:48 +0200)]
update TODO
Yu Watanabe [Tue, 15 Apr 2025 23:30:25 +0000 (08:30 +0900)]
docs: fix mkosi section for Environment= setting
Yu Watanabe [Tue, 15 Apr 2025 20:49:24 +0000 (05:49 +0900)]
conf-files: use hashmap_dump_sorted() at one more place
Yu Watanabe [Tue, 15 Apr 2025 20:38:13 +0000 (05:38 +0900)]
resolve: use set_dump_sorted() at one more place
Yu Watanabe [Tue, 15 Apr 2025 20:28:22 +0000 (05:28 +0900)]
Luca Boccassi [Tue, 15 Apr 2025 21:44:24 +0000 (22:44 +0100)]
xattr: fix assert that breaks importctl (#37146)
getxattr_at_malloc() calls getxattr_pinned_internal() with size 0 to get
the size of the xattr, and then asserts because n > 0
```
Assertion '(size_t) n <= size' failed at src/basic/xattr-util.c:107, function getxattr_pinned_internal().
```
Follow-up for
b8df25dcfe674e37ceb3d54e00a31e1d33e96057
Yu Watanabe [Tue, 15 Apr 2025 21:22:46 +0000 (06:22 +0900)]
core: remove cgroup v1 properties (#37026)
Yu Watanabe [Mon, 14 Apr 2025 21:12:05 +0000 (06:12 +0900)]
cgroup-setup: use path_join() to get path to cgroup attribute
We already have the path to the cgroup. Hence, it is not necessary to
call cg_get_path() again.
Yu Watanabe [Sun, 6 Apr 2025 19:25:32 +0000 (04:25 +0900)]
cgroup-setup: drop unnecessary controller argument
This also removes unnecessary cg_{create,attach,trim}_everywhere(),
and rename cg_enable_everywhere() -> cg_enable().
Yu Watanabe [Sun, 6 Apr 2025 18:47:16 +0000 (03:47 +0900)]
cgroup-setup: drop cgroup v1 support
Yu Watanabe [Tue, 15 Apr 2025 18:39:24 +0000 (03:39 +0900)]
core: drop several more cgroup version check
Yu Watanabe [Tue, 8 Apr 2025 08:37:11 +0000 (17:37 +0900)]
core/bpf-foreign: drop unnecessary check for cgroup v1
Yu Watanabe [Sun, 6 Apr 2025 19:43:36 +0000 (04:43 +0900)]
core/bpf-devices: drop cgroup v1 support
Yu Watanabe [Tue, 15 Apr 2025 18:29:55 +0000 (03:29 +0900)]
core/cgroup: drop cgroup v1 specific code in unit_update_cgroup()
Yu Watanabe [Sun, 6 Apr 2025 18:16:53 +0000 (03:16 +0900)]
core/cgroup: drop unnecessary cgroup version check in several getters
After
2b61489e5a53eb2611e1e573519c209ca07de98e , these checks are not
necessary anymore.
Yu Watanabe [Tue, 8 Apr 2025 08:16:56 +0000 (17:16 +0900)]
core/cgroup: drop unnecessary _unified_ modifier from function names
Yu Watanabe [Tue, 15 Apr 2025 18:19:16 +0000 (03:19 +0900)]
core/cgroup: remove logic of CGroup v1 attribute assignment
Yu Watanabe [Sun, 6 Apr 2025 07:53:19 +0000 (16:53 +0900)]
core/cgroup: remove unused legacy parameters in CGroupContext
Yu Watanabe [Sun, 6 Apr 2025 01:02:19 +0000 (10:02 +0900)]
core/cgroup: remove CGroup v1 settings in dump message
Yu Watanabe [Sun, 6 Apr 2025 02:08:10 +0000 (11:08 +0900)]
bus-unit-util: refuse setting CGroup v1 properties through DBus
Yu Watanabe [Sun, 6 Apr 2025 01:22:12 +0000 (10:22 +0900)]
core: deprecate CGroup v1 DBus properties
Yu Watanabe [Sun, 6 Apr 2025 00:44:41 +0000 (09:44 +0900)]
core: remove deprecated CGroup v1 settings
Yu Watanabe [Sun, 6 Apr 2025 06:27:25 +0000 (15:27 +0900)]
test: replace deprecated CGroup v1 settings with v2 ones
Yu Watanabe [Tue, 15 Apr 2025 13:32:15 +0000 (22:32 +0900)]
journal: hash_ops related cleanups (#37115)
Yu Watanabe [Tue, 15 Apr 2025 13:31:57 +0000 (22:31 +0900)]
resolve: hash_ops related cleanups (#37116)
Yu Watanabe [Tue, 15 Apr 2025 13:31:40 +0000 (22:31 +0900)]
network-tools: hash_ops related cleanups (#37118)
Yu Watanabe [Tue, 15 Apr 2025 13:30:51 +0000 (22:30 +0900)]
journal: drop old kernels support (#37137)
This drops several codes for supporting old kernels.
Also, this cleanups code a bit.
Luca Boccassi [Mon, 14 Apr 2025 23:03:45 +0000 (00:03 +0100)]
import/export: add support for zstd
Yu Watanabe [Mon, 14 Apr 2025 20:09:28 +0000 (05:09 +0900)]
journal/kmsg: drop old kernels (<3.6) support
The flags field was added by kernel v3.6:
https://github.com/torvalds/linux/commit/
d39f3d77c9b1fe7cc33a14beb4a4849af0a4ac22
Now our baseline on the kernel is v5.4, so we can assume there exists
the flags field after the monotonic timestamp.
This also adds several short comments.
Yu Watanabe [Mon, 14 Apr 2025 19:46:58 +0000 (04:46 +0900)]
journal/kmsg: modernize server_open_dev_kmsg()
Let's assign fd and event source only on success.
Yu Watanabe [Mon, 14 Apr 2025 20:57:14 +0000 (05:57 +0900)]
journal/kmsg: drop Server.dev_kmsg_readable flag and use Server.read_kmsg
When /dev/kmsg is opened, the two flags have the same value.
This also adds an assertion in server_read_dev_kmsg().
Yu Watanabe [Mon, 14 Apr 2025 19:34:40 +0000 (04:34 +0900)]
journal/kmsg: drop support old kernels (<3.5) without reading /dev/kmsg support
/dev/kmsg is readable since kernel v3.5:
https://github.com/torvalds/linux/commit/
e11fea92e13fb91c50bacca799a6131c81929986
Now our baseline on the kernel is v5.4. Let's assume /dev/kmsg is always
readable.
Yu Watanabe [Mon, 14 Apr 2025 19:23:57 +0000 (04:23 +0900)]
journal: remove old kernels (<3.2) support in monitoring hostname
Similar to
cc983fc9dceb989f2cd7cb5ae393630b6c8c2f12 .
Yu Watanabe [Mon, 14 Apr 2025 13:31:53 +0000 (22:31 +0900)]
test: drop error conditions for old kernels (<3.2)
Now our baseline on the kernel is 5.4.
Yu Watanabe [Sun, 13 Apr 2025 20:56:09 +0000 (05:56 +0900)]
tree-wide: IFA_FLAGS is supported since kernel v3.14
Now our baseline on the kernel is v5.4.
Let's unconditionally use the IFA_FLAGS attribute, and drop the getter
and setter for the deprecated header element.
Continuation of
29c2d4e1587e03a4d7589d045b81f7bea91c283e .
Yu Watanabe [Sun, 13 Apr 2025 20:42:24 +0000 (05:42 +0900)]
sd-netlink,sd-device: drop old kernels (<4.2) support
NETLINK_LIST_MEMBERSHIPS is supported since kernel v4.2, specifically
https://github.com/torvalds/linux/commit/
b42be38b2778eda2237fc759e55e3b698b05b315
Our baseline on the kernel is v5.4. Let's drop unnecessary conditions.
Yu Watanabe [Sun, 13 Apr 2025 20:15:45 +0000 (05:15 +0900)]
udev-builtin-net_id: drop old kernels (<4.20) support
Since kernel v4.20, specifically since
https://github.com/torvalds/linux/commit/
9b8b2a323008aedd39a8debb861b825707f01420
IP-over-Infiniband driver also uses dev_port.
As our baseline on the kernel is v5.4. Let's remove the fallback code.
For more details about the fallback, see
https://github.com/systemd/systemd/pull/10082#issuecomment-
421416461
Yu Watanabe [Mon, 14 Apr 2025 11:33:08 +0000 (20:33 +0900)]
test-condition: drop cgroup version check
After
f74ca66e6833c340a1532578176e55cb494590d0 , we do not check the
cgroup version of the runtime environment, and unconditionally returns 0
for "v1", and 1 for "v2".
Yu Watanabe [Mon, 14 Apr 2025 11:46:27 +0000 (20:46 +0900)]
resolve: drop code for supporting old kernels (<3.2)
Now our baseline on the kernel is 5.4.
Note, the removed code triggered assert_return() in
sd_event_source_set_description().
Yu Watanabe [Sun, 13 Apr 2025 21:54:26 +0000 (06:54 +0900)]
loop-util: drop workaround for kernel older than v5.0
Now our baseline on the kernel is v5.4.
Yu Watanabe [Sun, 13 Apr 2025 18:17:26 +0000 (03:17 +0900)]
core: hash_ops related cleanups (#37114)
Yu Watanabe [Sun, 13 Apr 2025 18:17:01 +0000 (03:17 +0900)]
shared/condition: remove cgroup hierarchy check (#37101)
Mike Yuan [Fri, 11 Apr 2025 23:13:45 +0000 (01:13 +0200)]
oomd: it's safe to assume cgv2 now
Mike Yuan [Fri, 11 Apr 2025 23:16:34 +0000 (01:16 +0200)]
shared/condition: remove cgroup hierarchy check
Mike Yuan [Fri, 11 Apr 2025 23:10:12 +0000 (01:10 +0200)]
core/taint: decrease stage array size for "cgroupsv1" removal
Follow-up for
399791eaf0f53887e52488b9f4e966d71abeea6a
Yu Watanabe [Sun, 13 Apr 2025 05:10:28 +0000 (14:10 +0900)]
socket-proxy: fix use-after-free
Fixes a bug in
10e41cdddc45548cc5938a307a16711b47d68062 .
Fixes CID#
1609061 .
Luca Boccassi [Fri, 11 Apr 2025 13:44:30 +0000 (14:44 +0100)]
coredump: verify pidfd after parsing data in usermode helper
Ensure the pidfd is still valid before continuing
Follow-up for
313537da6ffdea4049873571202679734d49f0a1
Yu Watanabe [Sat, 12 Apr 2025 18:38:50 +0000 (03:38 +0900)]
network/wiphy: use hash_ops with destructor for managing Wiphy objects
Yu Watanabe [Sat, 12 Apr 2025 18:30:44 +0000 (03:30 +0900)]
network/link: use hash_ops with destructor for managing Link objects
Yu Watanabe [Sat, 12 Apr 2025 18:18:12 +0000 (03:18 +0900)]
network/network: use hash_ops with destructor for managing Network objects
Yu Watanabe [Sat, 12 Apr 2025 18:17:38 +0000 (03:17 +0900)]
hashmap: introduce ordered_hashmap_free_and_replace()
Yu Watanabe [Sat, 12 Apr 2025 18:08:31 +0000 (03:08 +0900)]
network/network: use hash_ops with destructor for managing stacked netdevs
Yu Watanabe [Sat, 12 Apr 2025 18:03:29 +0000 (03:03 +0900)]
network/bridge-fdb,mdb: use hash_ops with destructor
Yu Watanabe [Sat, 12 Apr 2025 17:54:06 +0000 (02:54 +0900)]
network/dhcp-server: use hash_ops with destructor for static lease
Yu Watanabe [Sat, 12 Apr 2025 17:34:16 +0000 (02:34 +0900)]
network/radv: use hash_ops with destructor for managing prefixes
Yu Watanabe [Sat, 12 Apr 2025 15:11:01 +0000 (00:11 +0900)]
network,udev: use hash_ops with destructor to manage SR-IOV configs
Yu Watanabe [Fri, 11 Apr 2025 02:13:26 +0000 (11:13 +0900)]
network/ndisc: replace set_free_free() with set_free()
They uses in_addr_prefix_hash_ops_free, hence set_free() is enough.
Yu Watanabe [Fri, 11 Apr 2025 02:04:16 +0000 (11:04 +0900)]
network: use in6_addr_hash_ops_free in Network.ipv6_proxy_ndp_addresses
This also one adjustment to network_adjust_ipv6_proxy_ndp().
Yu Watanabe [Fri, 11 Apr 2025 01:56:12 +0000 (10:56 +0900)]
network: use dns_name_hash_ops_free in dnssec negative trust anchors
Yu Watanabe [Fri, 11 Apr 2025 02:15:21 +0000 (11:15 +0900)]
test-networkd-conf: config_parse_ether_addrs() uses ether_addr_hash_ops_free
Hence, set_free() is enough to free the result.
Yu Watanabe [Sat, 12 Apr 2025 16:36:56 +0000 (01:36 +0900)]
network-generator: use hash_ops with destructor for Network, NetDev, and Link
Yu Watanabe [Sat, 12 Apr 2025 15:30:58 +0000 (00:30 +0900)]
wait-online: move manager_process_link() to link.c
Then, rename it to rtnl_process_link().
No functional change, just refactoring.
Yu Watanabe [Sat, 12 Apr 2025 15:20:29 +0000 (00:20 +0900)]
wait-online: use hash_ops with destructor for managing Link
Yu Watanabe [Sat, 12 Apr 2025 03:16:52 +0000 (12:16 +0900)]
sysv-generator: introduce hash_ops for SysvStub
This also renames free_sysvstub() -> sysvstub_free(), to follow our
usual coding style.
Yu Watanabe [Fri, 11 Apr 2025 02:37:14 +0000 (11:37 +0900)]
sysusers: use trivial_hash_ops_free for storing user/group name
Yu Watanabe [Sat, 12 Apr 2025 02:53:57 +0000 (11:53 +0900)]
sd-netlink: introduce custom hash_ops for GenericNetlinkFamily
Yu Watanabe [Sat, 12 Apr 2025 02:47:22 +0000 (11:47 +0900)]
sd-device-enumerator: use custom hash_ops with destructor
Yu Watanabe [Fri, 11 Apr 2025 01:48:32 +0000 (10:48 +0900)]
sd-device: replace set_free_free() with set_free()
These uses string_hash_ops_free, hence not set_free() is enough.
Yu Watanabe [Sat, 12 Apr 2025 02:16:26 +0000 (11:16 +0900)]
coredump: replace custom cleanup function with specific hash_ops with destructor
Yu Watanabe [Thu, 10 Apr 2025 23:42:52 +0000 (08:42 +0900)]
analyze: replace set_free_free() with set_free()
set_put_strdup() uses &string_hash_ops_free, hence set_free() also
frees stored contents.
Yu Watanabe [Sat, 12 Apr 2025 14:30:57 +0000 (23:30 +0900)]
resolved-dns-trust-anchor: use hash_ops with destructor for managing DnsAnswer
Yu Watanabe [Sat, 12 Apr 2025 14:24:21 +0000 (23:24 +0900)]
resolved-dns-trust-anchor: use hash_ops with destructor for managing RRs
Yu Watanabe [Sat, 12 Apr 2025 14:19:51 +0000 (23:19 +0900)]
resolved-dns-scope: use hash_ops with destructor for conflict_queue
Yu Watanabe [Fri, 11 Apr 2025 02:32:48 +0000 (11:32 +0900)]
resolve: use dns_name_hash_ops_free for dnssec negative trust anchor
Yu Watanabe [Sat, 12 Apr 2025 02:32:47 +0000 (11:32 +0900)]
journal-remote: introduce custom hash_ops with destructor for MHDDaemonWrapper
Then, we can move declaration of the type from journal-remote.c to
journal-remote-main.c, and drop several #if ... #endif.
Yu Watanabe [Sat, 12 Apr 2025 14:57:21 +0000 (23:57 +0900)]
sd-journal: use hash_ops with destructor that closes JournalFile
Yu Watanabe [Sat, 12 Apr 2025 14:49:45 +0000 (23:49 +0900)]
journal: use hash_ops with destructor that make JournalFile offline and close
Yu Watanabe [Fri, 11 Apr 2025 01:44:29 +0000 (10:44 +0900)]
journal: replace unnecessary use of set_free_free() with set_free()
These uses pcre2_code_hash_ops_free, hence set_free() is enough.
Yu Watanabe [Fri, 11 Apr 2025 02:39:49 +0000 (11:39 +0900)]
unit-file: use set_free() to free paths
As it uses path_hash_ops_free.
Yu Watanabe [Fri, 11 Apr 2025 01:40:20 +0000 (10:40 +0900)]
core/unit: use string_hash_ops_free for Unit.aliases
Yu Watanabe [Fri, 11 Apr 2025 01:28:54 +0000 (10:28 +0900)]
core,systemctl: unit_file_find_fragment() provides names with string_hash_ops_free
names are assigned with set_put_strdup(), hence string_hash_ops_free is
used and we can use set_free() rather than set_free_free().
Yu Watanabe [Fri, 11 Apr 2025 01:19:07 +0000 (10:19 +0900)]
core: replace unnecessary use of set_free_free() with set_free()
These variables are assigned with set_put_strv(), hence
string_hash_ops_free is used.
This also drops unnecessary call of set_ensure_allocated() with wrong
hash ops.
Yu Watanabe [Sat, 12 Apr 2025 13:41:25 +0000 (22:41 +0900)]
install: use hash_ops with destructor for InstallInfo
Yu Watanabe [Fri, 11 Apr 2025 02:47:53 +0000 (11:47 +0900)]
install: use path_hash_ops_free
Yu Watanabe [Sun, 13 Apr 2025 00:15:02 +0000 (09:15 +0900)]
locale-util,kbd-util: several cleanups (#37090)
Mike Yuan [Sat, 12 Apr 2025 22:17:54 +0000 (00:17 +0200)]
core/execute: set_get_strv() does not transfer ownership of strings
Prompted by #37090
Luca Boccassi [Sat, 12 Apr 2025 22:05:10 +0000 (23:05 +0100)]
fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/ (#37109)
Yu Watanabe [Sat, 12 Apr 2025 20:56:57 +0000 (05:56 +0900)]
socket-proxy: several cleanups (#37107)
Yu Watanabe [Sat, 12 Apr 2025 20:20:12 +0000 (05:20 +0900)]
stdio-bridge: minor coding style cleanup (#37110)
Yu Watanabe [Fri, 11 Apr 2025 02:43:32 +0000 (11:43 +0900)]
kbd-util: use string_hash_ops_free and set_to_strv()
Yu Watanabe [Fri, 11 Apr 2025 01:04:06 +0000 (10:04 +0900)]
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().
Yu Watanabe [Fri, 11 Apr 2025 00:57:07 +0000 (09:57 +0900)]
strv: constify arguments for strv_equal_ignore_order()
Follow-up for
5072f4268b89a71e47e59c434da0222f722c7f0e .
Yu Watanabe [Fri, 11 Apr 2025 00:54:21 +0000 (09:54 +0900)]
set: introduce set_to_strv()
It is similar to set_get_strv(), but invalidates the set on success.