From 32e9bed060bf5f609ef00da90ef6546ffa828b05 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 25 Jul 2025 21:29:38 +0200 Subject: [PATCH] Fix wrongly generated config.h paths For some reason, external token path and tmpfilesdir uses a macro that generates entry in config.h, producing these #defines: DEFAULT_LUKS2_EXTERNAL_TOKENS_PATH DEFAULT_TMPFILESDIR Neiter one is used in C code, moreover, definitions are wrong, as variables are modified after entry is pushed to config. Remove the macro call and use AC_ARG_WITH directly. --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4bf0c09b..ddc0ba0f 100644 --- a/configure.ac +++ b/configure.ac @@ -802,8 +802,9 @@ CS_NUM_WITH([verity-hash-block], [hash block size for verity mode], [4096]) CS_NUM_WITH([verity-salt-size], [salt size for verity mode], [32]) CS_NUM_WITH([verity-fec-roots], [parity bytes for verity FEC], [2]) -CS_STR_WITH([tmpfilesdir], [override default path to directory with systemd temporary files], []) -test -z "$with_tmpfilesdir" && with_tmpfilesdir=$systemd_tmpfilesdir +AC_ARG_WITH([tmpfilesdir], + AS_HELP_STRING([--with-tmpfilesdir=DIR], [override default path to directory with systemd temporary files]), + [], [with_tmpfilesdir=$systemd_tmpfilesdir]) test "x$with_tmpfilesdir" = "xno" || { CS_ABSPATH([${with_tmpfilesdir}],[with-tmpfilesdir]) DEFAULT_TMPFILESDIR=$with_tmpfilesdir @@ -822,7 +823,9 @@ test -z "$with_luks2_lock_dir_perms" && with_luks2_lock_dir_perms=0700 DEFAULT_LUKS2_LOCK_DIR_PERMS=$with_luks2_lock_dir_perms AC_SUBST(DEFAULT_LUKS2_LOCK_DIR_PERMS) -CS_STR_WITH([luks2-external-tokens-path], [path to directory with LUKSv2 external token handlers (plugins)], [LIBDIR/cryptsetup]) +AC_ARG_WITH([luks2-external-tokens-path], + AS_HELP_STRING([--with-luks2-external-tokens-path=DIR], [path to directory with LUKSv2 external token handlers (plugins)]), + [], [with_luks2_external_tokens_path=""]) if test -n "$with_luks2_external_tokens_path"; then CS_ABSPATH([${with_luks2_external_tokens_path}],[with-luks2-external-tokens-path]) EXTERNAL_LUKS2_TOKENS_PATH=$with_luks2_external_tokens_path