On 2021/3/5 20:08, Roberto Sassu wrote:
From: Erik Yuan [mailto:Erik.Yuan@arm.com] Sent: Friday, March 5, 2021 12:48 PM On 3/5/2021 5:47 PM, Roberto Sassu wrote:
From: Erik Yuan [mailto:Erik.Yuan@arm.com] Sent: Friday, March 5, 2021 9:13 AM Hi Roberto,
On 3/4/2021 6:24 PM, Roberto Sassu wrote:
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
From: Zhichang Yuan [mailto:erik.yuan@arm.com] Sent: Thursday, March 4, 2021 3:22 AM openEuler inclusion category: bugfix bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=6 CVE: NA
When performing the out-of-tree kernel 4.19 building, some error happened saying: cannot touch 'certs/pubring.gpg'. The detail can be checked in Gitee issue #I39160 or Bug 6 of openeuler bugzilla.
This patch will fix that build error.
Hi Zhichang
few days ago, I sent a patch to solve this issue:
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/thre
ad/O757JXTICKHGWSCV6XJ3USYCGTKGLQ4M/
I know what is the original touch operation for now. Thanks for your information!
Compared with this patch, I prefer the idea of previous implementation. Just because I personally don't like the checking on the existence of 'certs/pubring.gpg' with 'ls' :)
of-course, your patch keeps the certs directory untouched. So, your patch is also OK for me. Otherwise, we probably need to add
the
empty 'pubring.gpg' to variable of 'clean-files'.
With a small suggestion, what about to use inline command of 'test'?
ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS have_pubring_gpg := $(if $(shell test -s $(srctree)/certs/pubring.gpg), - DHAVE_PUBRING_GPG) ifdef have_pubring_gpg AFLAGS_system_certificates.o += $(have_pubring_gpg) $(obj)/system_certificates.o: $(srctree)/certs/pubring.gpg endif endif
Hi Erik
thanks for the suggestion. It seems that the second check is not evaluated as true if pubring.gpg exists. Could you please check?
Yes. Sorry for the noise! The 'if' function doesn't work in the way I thought:(
I updated with this line:
have_pubring_gpg := $(if $(shell test -s $(srctree)/certs/pubring.gpg && echo $$?), -DHAVE_PUBRING_GPG)
Then, it works.
That is my snippet in Makefile for checking:
ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS have_pubring_gpg := $(if $(shell test -s $(srctree)/certs/pubring.gpg && echo $$?), -DHAVE_PUBRING_GPG) ifdef have_pubring_gpg AFLAGS_system_certificates.o += $(have_pubring_gpg) $(obj)/system_certificates.o: certs/pubring.gpg endif
It is just my suggestion for discussioin only, you don't have to apply this :)
Probably using shell commands is better. Anyway, given that my patch works too, I would keep that since the same modification is already in openEuler 21.03.
OK, thank you, will apply Roberto's patch.
Thanks Hanjun