diff options
| author | David Howells <dhowells@redhat.com> | 2013-08-30 12:13:15 -0400 |
|---|---|---|
| committer | David Howells <dhowells@redhat.com> | 2013-09-25 12:17:01 -0400 |
| commit | 0fbd39cf7ffe3b6a787b66b672d21b84e4675352 (patch) | |
| tree | e7cbb7e4dfd5d344509d60208a27a1ecaae8a150 /kernel | |
| parent | f0e6d220a7cd93afa0260ac5e7849f00b05e035a (diff) | |
KEYS: Have make canonicalise the paths of the X.509 certs better to deduplicate
Have make canonicalise the paths of the X.509 certificates before we sort them
as this allows $(sort) to better remove duplicates.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index c34e5f993a21..2c24195249d5 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
| @@ -144,13 +144,19 @@ $(obj)/timeconst.h: $(obj)/hz.bc $(src)/timeconst.bc FORCE | |||
| 144 | ifeq ($(CONFIG_MODULE_SIG),y) | 144 | ifeq ($(CONFIG_MODULE_SIG),y) |
| 145 | ############################################################################### | 145 | ############################################################################### |
| 146 | # | 146 | # |
| 147 | # Roll all the X.509 certificates that we can find together and pull | 147 | # Roll all the X.509 certificates that we can find together and pull them into |
| 148 | # them into the kernel. | 148 | # the kernel. |
| 149 | # | ||
| 150 | # We look in the source root and the build root for all files whose name ends | ||
| 151 | # in ".x509". Unfortunately, this will generate duplicate filenames, so we | ||
| 152 | # have make canonicalise the pathnames and then sort them to discard the | ||
| 153 | # duplicates. | ||
| 149 | # | 154 | # |
| 150 | ############################################################################### | 155 | ############################################################################### |
| 151 | X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) | 156 | X509_CERTIFICATES-y := $(wildcard *.x509) $(wildcard $(srctree)/*.x509) |
| 152 | X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 | 157 | X509_CERTIFICATES-$(CONFIG_MODULE_SIG) += signing_key.x509 |
| 153 | X509_CERTIFICATES := $(sort $(X509_CERTIFICATES-y)) | 158 | X509_CERTIFICATES := $(sort $(foreach CERT,$(X509_CERTIFICATES-y), \ |
| 159 | $(or $(realpath $(CERT)),$(CERT)))) | ||
| 154 | 160 | ||
| 155 | ifeq ($(X509_CERTIFICATES),) | 161 | ifeq ($(X509_CERTIFICATES),) |
| 156 | $(warning *** No X.509 certificates found ***) | 162 | $(warning *** No X.509 certificates found ***) |
