mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: dhowells@redhat.com
Cc: torvalds@linux-foundation.org, aricart@memnix.com,
	linux-kernel@vger.kernel.org, sedat.dilek@gmail.com,
	keyrings@linux-nfs.org, rusty@rustcorp.com.au,
	linux-security-module@vger.kernel.org, james.l.morris@oracle.com,
	dwmw2@infradead.org
Subject: [PATCH 2/3] MODSIGN: Use filechk to generate .x509.list
Date: Wed, 20 May 2015 09:08:39 +0800	[thread overview]
Message-ID: <1432084120-7918-2-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <1432084120-7918-1-git-send-email-mmarek@suse.cz>

From: Linus Torvalds <torvalds@linux-foundation.org>

Use the filechk Kbuild function instead of manually comparing the
content of the generated file.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 kernel/Makefile | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index dc78819..3177160 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -136,13 +136,6 @@ ifeq ($(X509_CERTIFICATES),)
 $(warning *** No X.509 certificates found ***)
 endif
 
-ifneq ($(wildcard $(obj)/.x509.list),)
-ifneq ($(shell cat $(obj)/.x509.list),$(X509_CERTIFICATES))
-$(info X.509 certificate list changed)
-$(shell rm $(obj)/.x509.list)
-endif
-endif
-
 kernel/system_certificates.o: $(obj)/x509_certificate_list
 
 quiet_cmd_x509certs  = CERTS   $@
@@ -152,9 +145,12 @@ targets += $(obj)/x509_certificate_list
 $(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list
 	$(call if_changed,x509certs)
 
+define filechk_x509_list
+	echo $(X509_CERTIFICATES)
+endef
 targets += $(obj)/.x509.list
-$(obj)/.x509.list:
-	@echo $(X509_CERTIFICATES) >$@
+$(obj)/.x509.list: Makefile FORCE
+	$(call filechk,x509_list)
 endif
 
 clean-files := x509_certificate_list .x509.list
-- 
2.1.4


  reply	other threads:[~2015-05-20  1:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18832.1432044859.1@warthog.procyon.org.uk>
2015-05-20  1:08 ` [PATCH 1/3] X.509: Fix certificate gathering again Michal Marek
2015-05-20  1:08   ` Michal Marek [this message]
2015-05-20  1:08   ` [PATCH 3/3] MODSIGN: Split user-supplied and autogenerated signing key Michal Marek
2015-05-26 16:15 ` [PATCH 1/3] X.509: Fix certificate gathering again David Howells
2015-05-26 19:49   ` Petko Manolov
2015-05-26 21:56   ` David Howells
2015-05-28  5:18   ` Michal Marek
2015-05-28  8:33     ` David Woodhouse
2015-05-28  9:58     ` David Howells
2015-05-28 10:05       ` David Woodhouse

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=1432084120-7918-2-git-send-email-mmarek@suse.cz \
    --to=mmarek@suse.cz \
    --cc=aricart@memnix.com \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=james.l.morris@oracle.com \
    --cc=keyrings@linux-nfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sedat.dilek@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®