From: Jesse Chan <jc@linux.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Jesse Chan <jc@linux.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] extract-cert: detect and warn if libssl is missing
Date: Sun, 19 Nov 2017 18:55:29 -0800 [thread overview]
Message-ID: <20171120025531.10413-1-jc@linux.com> (raw)
With CONFIG_SYSTEM_TRUSTED_KEYRING enabled, if the host system doesn't have
a development version of libssl installed, the build fails with
errors like:
extract-cert.c: fatal error: openssl/bio.h: No such file or directory
In this case, prompt to install libssl-dev(el).
Signed-off-by: Jesse Chan <jc@linux.com>
---
scripts/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/Makefile b/scripts/Makefile
index 25ab143cbe14..6c75a32aae12 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -35,6 +35,14 @@ PHONY += build_unifdef
build_unifdef: $(obj)/unifdef
@:
+ifdef CONFIG_SYSTEM_TRUSTED_KEYRING
+ has_libssl := $(call try-run,\
+ echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lssl -,1,0)
+ ifneq ($(has_libssl),1)
+ $(error "Cannot use CONFIG_SYSTEM_TRUSTED_KEYRING=y, please install libssl-dev or libssl-devel")
+ endif
+endif
+
subdir-$(CONFIG_MODVERSIONS) += genksyms
subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
--
2.14.1
reply other threads:[~2017-11-20 2:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171120025531.10413-1-jc@linux.com \
--to=jc@linux.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox