]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto-generator: do not fail on missing libcryptsetup when verity
authorNandakumar Raghavan <naraghavan@microsoft.com>
Tue, 21 Apr 2026 13:14:17 +0000 (13:14 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 23 Apr 2026 09:45:22 +0000 (11:45 +0200)
is not used

add_veritysetup() is called unconditionally  from add_root_mount() and
add_usr_mount() whenever in_initrd() is true, to generate units that
only activate if verity devices appear. However, when compiled without
libcryptsetup, this function returned a hard error, causing the entire
generator to fail even when no verity protection is in use.

Change the #else fallback to log a debug message and return 0, matching
the pattern already used by add_root_cryptsetup().

src/gpt-auto-generator/gpt-auto-generator.c

index 6716a8d1aaf7c5547866538cb80bbe12291201cc..abbb955e5992e137ec6f5b5b311a0558cdc1d824 100644 (file)
@@ -295,8 +295,8 @@ static int add_veritysetup(
 
         return 0;
 #else
-        return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
-                               "Partition is Verity protected, but systemd-gpt-auto-generator was compiled without libcryptsetup support.");
+        log_warning("Compiled without libcryptsetup support, skipping verity setup for '%s'.", id);
+        return 0;
 #endif
 }
 #endif