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.
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com --- certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg + +$(obj)/pubring.gpg: + $(Q)touch $@ endif + obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
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/thread/O7...
Please let me know if you have any comment on it.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com
certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg
+$(obj)/pubring.gpg:
$(Q)touch $@
endif
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
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/thread/O7...
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
Cheers, Erik
Please let me know if you have any comment on it.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com
certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg
+$(obj)/pubring.gpg:
$(Q)touch $@
endif
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
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?
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Cheers, Erik
Please let me know if you have any comment on it.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com
certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg
+$(obj)/pubring.gpg:
$(Q)touch $@
endif
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
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 :)
Cheers, Erik
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Cheers, Erik
Please let me know if you have any comment on it.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com
certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg
+$(obj)/pubring.gpg:
$(Q)touch $@
endif
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
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.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Cheers, Erik
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Cheers, Erik
Please let me know if you have any comment on it.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli
Signed-off-by: Zhichang Yuan erik.yuan@arm.com Signed-off-by: Steve Capper Steve.Capper@arm.com
certs/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/certs/Makefile b/certs/Makefile index 5053e3c86c97..5e56f9405758 100644 --- a/certs/Makefile +++ b/certs/Makefile @@ -5,11 +5,12 @@
obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS -ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg) -$(shell touch certs/pubring.gpg) -endif -$(obj)/system_certificates.o: certs/pubring.gpg +$(obj)/system_certificates.o: $(obj)/pubring.gpg
+$(obj)/pubring.gpg:
$(Q)touch $@
endif
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o -- 2.23.0
IMPORTANT NOTICE: The contents of this email and any attachments
are
confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose
the
contents to any other person, use it for any purpose, or store or copy
the
information in any medium. Thank you. _______________________________________________ Kernel mailing list -- kernel@openeuler.org To unsubscribe send an email to kernel-leave@openeuler.org
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