* [PATCH 1/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI
@ 2022-01-20 19:22 Masahiro Yamada
2022-01-20 19:22 ` [PATCH 2/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2022-01-20 19:22 UTC (permalink / raw)
To: linux-kbuild
Cc: Michal Kubecek, Masahiro Yamada, David Howells, David Woodhouse,
keyrings, linux-kernel
When CONFIG_MODULE_SIG_KEY is PKCS#11 URL (pkcs11:*), signing_key.x509
fails to build:
certs/Makefile:77: *** target pattern contains no '%'. Stop.
Due to the typo, $(X509_DEP) contains a colon.
Fix it.
Fixes: b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove config_filename macro")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
certs/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/certs/Makefile b/certs/Makefile
index f7041c29a2e0..0c459cfd09df 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -68,7 +68,7 @@ $(obj)/x509.genkey:
endif # CONFIG_MODULE_SIG_KEY
# If CONFIG_MODULE_SIG_KEY isn't a PKCS#11 URI, depend on it
-ifneq ($(filter-out pkcs11:%, %(CONFIG_MODULE_SIG_KEY)),)
+ifneq ($(filter-out pkcs11:%, $(CONFIG_MODULE_SIG_KEY)),)
X509_DEP := $(CONFIG_MODULE_SIG_KEY)
endif
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
2022-01-20 19:22 [PATCH 1/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI Masahiro Yamada
@ 2022-01-20 19:22 ` Masahiro Yamada
2022-01-20 20:50 ` Michal Kubecek
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2022-01-20 19:22 UTC (permalink / raw)
To: linux-kbuild
Cc: Michal Kubecek, Masahiro Yamada, David Howells, David Woodhouse,
keyrings, linux-kernel
Since b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove
config_filename macro"), when CONFIG_MODULE_SIG_KEY is empty,
signing_key.x509 fails to build:
CERT certs/signing_key.x509
Usage: extract-cert <source> <dest>
make[1]: *** [certs/Makefile:78: certs/signing_key.x509] Error 2
make: *** [Makefile:1831: certs] Error 2
Pass "" to the first argument of extract-cert to fix the build error.
Link: https://lore.kernel.org/linux-kbuild/20220120094606.2skuyb26yjlnu66q@lion.mk-sys.cz/T/#u
Fixes: b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove config_filename macro")
Reported-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
certs/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/certs/Makefile b/certs/Makefile
index 0c459cfd09df..3ea7fe60823f 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -75,7 +75,7 @@ endif
$(obj)/system_certificates.o: $(obj)/signing_key.x509
$(obj)/signing_key.x509: $(X509_DEP) $(obj)/extract-cert FORCE
- $(call if_changed,extract_certs,$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)))
+ $(call if_changed,extract_certs,$(if $(CONFIG_MODULE_SIG_KEY),$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)),""))
endif # CONFIG_MODULE_SIG
targets += signing_key.x509
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
2022-01-20 19:22 ` [PATCH 2/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty Masahiro Yamada
@ 2022-01-20 20:50 ` Michal Kubecek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Kubecek @ 2022-01-20 20:50 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, David Howells, David Woodhouse, keyrings, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]
On Fri, Jan 21, 2022 at 04:22:05AM +0900, Masahiro Yamada wrote:
> Since b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove
> config_filename macro"), when CONFIG_MODULE_SIG_KEY is empty,
> signing_key.x509 fails to build:
>
> CERT certs/signing_key.x509
> Usage: extract-cert <source> <dest>
> make[1]: *** [certs/Makefile:78: certs/signing_key.x509] Error 2
> make: *** [Makefile:1831: certs] Error 2
>
> Pass "" to the first argument of extract-cert to fix the build error.
>
> Link: https://lore.kernel.org/linux-kbuild/20220120094606.2skuyb26yjlnu66q@lion.mk-sys.cz/T/#u
> Fixes: b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove config_filename macro")
> Reported-by: Michal Kubecek <mkubecek@suse.cz>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Michal Kubecek <mkubecek@suse.cz>
Thank you for the quick fix.
Michal
> ---
>
> certs/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/certs/Makefile b/certs/Makefile
> index 0c459cfd09df..3ea7fe60823f 100644
> --- a/certs/Makefile
> +++ b/certs/Makefile
> @@ -75,7 +75,7 @@ endif
> $(obj)/system_certificates.o: $(obj)/signing_key.x509
>
> $(obj)/signing_key.x509: $(X509_DEP) $(obj)/extract-cert FORCE
> - $(call if_changed,extract_certs,$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)))
> + $(call if_changed,extract_certs,$(if $(CONFIG_MODULE_SIG_KEY),$(if $(X509_DEP),$<,$(CONFIG_MODULE_SIG_KEY)),""))
> endif # CONFIG_MODULE_SIG
>
> targets += signing_key.x509
> --
> 2.32.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-20 20:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 19:22 [PATCH 1/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI Masahiro Yamada
2022-01-20 19:22 ` [PATCH 2/2] certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty Masahiro Yamada
2022-01-20 20:50 ` Michal Kubecek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).