Luca Boccassi
de862276ed
sysext: stop storing under /usr/lib[/local]/extensions/
...
sysexts are meant to extend /usr. All extension images and directories are opened and merged in a
single, read-only overlayfs layer, mounted on /usr.
So far, we had fallback storage directories in /usr/lib/extensions and /usr/local/lib/extensions.
This is problematic for three reasons.
Firstly, technically, for directory-based extensions the kernel will reject
creating such an overlay, as there is a recursion problem. It actively
validates that a lowerdir is not a child of another lowerdir, and fails with
-ELOOP if it is. So having a sysext /usr/lib/extensions/myextdir/ would result
in an overlayfs config lowerdir=/usr/lib/extensions/myextdir/usr/:/usr which is
not allowed, as indicated by Christian the kernel performs this check:
/*
* Check if this layer root is a descendant of:
* - another layer of this overlayfs instance
* - upper/work dir of any overlayfs instance
*/
<...>
/* Walk back ancestors to root (inclusive) looking for traps */
while (!err && parent != next) {
if (is_lower && ovl_lookup_trap_inode(sb, parent)) {
err = -ELOOP;
pr_err("overlapping %s path\n", name);
Secondly, there's a confusing aspect to this recursive storage. If you
have /usr/lib/extensions/myext.raw which contains /usr/lib/extensions/mynested.raw
'systemd-sysext merge' will only pick up the first one, but both will appear in
the merged root under /usr/lib/extensions/. So you have two extension images, both
appear in your merged filesystem, but only one is actually in use.
Finally, there's a conceptual aspect: the idea behind sysexts and hermetic /usr
is that the /usr tree is not modified locally, but owned by the vendor. Dropping
extensions in /usr thus goes contrary to this foundational concept.
2023-03-30 11:25:17 +01:00
..
2022-07-05 14:40:01 +02:00
2022-07-12 22:54:39 +01:00
2022-07-20 13:15:37 +09:00
2022-07-12 22:54:39 +01:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2022-07-28 21:30:53 +02:00
2022-07-28 21:30:53 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-05-19 10:24:43 +09:00
2022-07-04 19:56:53 +02:00
2020-11-09 13:23:58 +09:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2022-03-14 22:39:32 +00:00
2021-07-02 18:29:54 +02:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2021-11-05 21:32:11 +00:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-04-20 19:11:07 +02:00
2022-08-18 10:27:44 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2022-09-15 14:59:11 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-04-20 18:26:17 +02:00
2021-04-20 18:26:17 +02:00
2021-10-15 10:19:54 -05:00
2021-10-15 10:19:54 -05:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2022-09-15 14:59:11 +02:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-09-30 12:27:06 +02:00
2023-03-10 11:41:03 +01:00
2022-06-21 18:15:34 +02:00
2020-11-09 13:23:58 +09:00
2022-05-21 14:29:14 +02:00
2022-05-21 14:29:14 +02:00
2022-05-21 14:29:14 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2021-06-30 13:25:16 +02:00
2021-06-30 13:25:16 +02:00
2022-07-04 19:56:53 +02:00
2022-07-04 19:56:53 +02:00
2021-05-19 10:24:43 +09:00
2021-05-19 10:24:43 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2021-10-14 12:17:02 -05:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-11-05 21:32:11 +00:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2022-07-04 19:56:53 +02:00
2022-07-04 19:56:53 +02:00
2022-07-04 19:56:53 +02:00
2022-07-04 19:56:53 +02:00
2022-09-15 14:59:11 +02:00
2020-11-09 13:23:58 +09:00
2021-04-09 10:38:09 +02:00
2022-09-15 14:59:11 +02:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2022-09-15 14:59:11 +02:00
2022-09-15 14:59:11 +02:00
2022-09-15 14:59:11 +02:00
2021-06-15 12:14:26 +01:00
2021-05-19 10:24:43 +09:00
2022-12-15 03:36:27 +09:00
2021-05-19 10:24:43 +09:00
2021-05-19 10:24:43 +09:00
2023-01-04 15:18:10 +01:00
2023-01-04 15:18:10 +01:00
2023-03-30 08:53:52 +09:00
2021-11-30 16:49:58 +00:00
2020-11-09 13:23:58 +09:00
2021-05-03 12:16:35 +09:00
2021-11-10 11:58:12 +01:00
2021-05-19 10:24:43 +09:00
2023-01-17 09:42:16 +01:00
2023-01-17 09:42:16 +01:00
2021-06-30 13:25:16 +02:00
2021-05-19 10:24:43 +09:00
2021-06-15 12:14:26 +01:00
2020-11-09 13:23:58 +09:00
2022-09-05 15:22:53 +02:00
2021-05-19 10:24:43 +09:00
2021-05-19 10:24:43 +09:00
2021-06-15 12:14:26 +01:00
2021-05-22 16:02:02 +09:00
2021-05-19 10:24:43 +09:00
2021-06-15 12:14:26 +01:00
2020-11-09 13:23:58 +09:00
2022-02-02 05:09:39 +09:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2021-05-19 10:24:43 +09:00
2023-01-11 17:18:57 +01:00
2022-07-01 14:17:33 +09:00
2020-11-09 13:23:58 +09:00
2023-03-16 11:22:58 +01:00
2022-07-01 14:17:33 +09:00
2021-06-09 12:30:22 +09:00
2020-11-09 13:23:58 +09:00
2021-06-15 12:14:26 +01:00
2021-05-19 10:25:26 +09:00
2023-01-10 18:28:38 +01:00
2020-11-09 13:23:58 +09:00
2022-09-16 19:50:52 +01:00
2021-05-19 10:24:43 +09:00
2022-09-15 14:59:11 +02:00
2023-01-05 21:44:45 +01:00
2022-11-29 16:56:07 +01:00
2023-01-10 18:28:38 +01:00
2021-04-19 11:25:33 +09:00
2022-12-23 17:26:48 +01:00
2021-09-20 13:53:11 +01:00
2021-09-20 13:53:11 +01:00
2023-02-09 12:04:21 +00:00
2023-02-09 12:04:21 +00:00
2023-02-09 12:04:21 +00:00
2023-02-09 12:04:21 +00:00
2023-02-09 12:04:21 +00:00
2023-02-09 12:04:21 +00:00
2021-05-19 10:24:43 +09:00
2021-06-30 13:25:16 +02:00
2022-09-14 05:30:03 +09:00
2021-05-19 10:24:43 +09:00
2023-01-04 15:18:10 +01:00
2021-06-30 13:25:16 +02:00
2021-05-19 10:24:43 +09:00
2022-12-23 17:26:57 +01:00
2023-01-05 18:52:15 +01:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2021-06-15 12:14:26 +01:00
2021-06-30 13:25:16 +02:00
2022-07-14 18:02:58 +02:00
2023-03-30 11:25:17 +01:00
2022-03-19 00:13:55 +01:00
2022-03-19 00:13:55 +01:00
2022-03-19 00:13:55 +01:00
2022-03-21 12:16:54 +01:00
2022-09-15 14:59:11 +02:00
2023-03-07 13:39:31 +01:00
2021-05-19 10:24:43 +09:00
2021-05-19 10:24:43 +09:00
2022-09-15 14:59:11 +02:00
2021-05-22 15:58:40 +09:00
2022-09-15 14:59:11 +02:00
2022-09-23 09:30:00 +02:00
2020-11-09 13:23:58 +09:00
2022-10-26 10:49:09 +02:00
2021-06-15 12:14:26 +01:00
2021-06-15 12:14:26 +01:00
2023-01-10 18:28:38 +01:00
2021-05-19 10:24:43 +09:00
2021-06-30 13:25:16 +02:00
2021-06-30 13:25:16 +02:00
2021-05-19 10:24:43 +09:00
2022-12-19 18:33:24 +01:00
2021-05-10 14:58:39 +02:00
2023-01-05 18:24:21 +01:00
2021-05-19 10:24:43 +09:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2021-06-30 13:25:16 +02:00
2022-02-23 06:54:54 +09:00
2020-11-09 13:23:58 +09:00
2020-11-09 13:23:58 +09:00
2022-07-12 22:54:39 +01:00
2020-11-09 13:23:58 +09:00
2023-03-18 15:05:43 +09:00
2020-11-09 13:23:58 +09:00
2021-10-14 12:17:02 -05:00
2021-10-14 12:17:02 -05:00