* [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used
@ 2021-09-23 9:21 Antoine Tenart
2021-09-27 16:35 ` Yann E. MORIN
2021-10-06 14:32 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Antoine Tenart @ 2021-09-23 9:21 UTC (permalink / raw)
To: buildroot; +Cc: Antoine Tenart, José Pekkarinen
When parsing and adding modules the refpolicy build system checks their
validity using xmllint. By default the host system version is used and
if not found an error is displayed but the build is not stopped. This
leads to interesting issues where modules are not added correctly to
modules.conf[1] (other possible issues are likely).
Fix this by adding a dependency on host-libxml2 and explicitly use the
xmllint binary built by Buildroot.
[1] https://lore.kernel.org/buildroot/20210830114531.2285178-1-jose.pekkarinen@unikie.com/
Tested-by: José Pekkarinen <jose.pekkarinen@unikie.com>
Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
package/refpolicy/refpolicy.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/refpolicy/refpolicy.mk b/package/refpolicy/refpolicy.mk
index eb345d0f98c9..975c3b584c42 100644
--- a/package/refpolicy/refpolicy.mk
+++ b/package/refpolicy/refpolicy.mk
@@ -14,7 +14,8 @@ REFPOLICY_DEPENDENCIES = \
host-policycoreutils \
host-python3 \
host-setools \
- host-gawk
+ host-gawk \
+ host-libxml2
ifeq ($(BR2_PACKAGE_REFPOLICY_CUSTOM_GIT),y)
REFPOLICY_VERSION = $(call qstrip,$(BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_VERSION))
@@ -30,6 +31,7 @@ endif
# Cannot use multiple threads to build the reference policy
REFPOLICY_MAKE = \
PYTHON=$(HOST_DIR)/usr/bin/python3 \
+ XMLLINT=$(LIBXML2_HOST_BINARY) \
TEST_TOOLCHAIN=$(HOST_DIR) \
$(TARGET_MAKE_ENV) \
$(MAKE1)
--
2.31.1
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used
2021-09-23 9:21 [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used Antoine Tenart
@ 2021-09-27 16:35 ` Yann E. MORIN
2021-10-06 14:32 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-09-27 16:35 UTC (permalink / raw)
To: Antoine Tenart; +Cc: José Pekkarinen, buildroot
Antoine, All,
On 2021-09-23 11:21 +0200, Antoine Tenart spake thusly:
> When parsing and adding modules the refpolicy build system checks their
> validity using xmllint. By default the host system version is used and
> if not found an error is displayed but the build is not stopped. This
> leads to interesting issues where modules are not added correctly to
> modules.conf[1] (other possible issues are likely).
>
> Fix this by adding a dependency on host-libxml2 and explicitly use the
> xmllint binary built by Buildroot.
>
> [1] https://lore.kernel.org/buildroot/20210830114531.2285178-1-jose.pekkarinen@unikie.com/
>
> Tested-by: José Pekkarinen <jose.pekkarinen@unikie.com>
> Signed-off-by: Antoine Tenart <atenart@kernel.org>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/refpolicy/refpolicy.mk | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/package/refpolicy/refpolicy.mk b/package/refpolicy/refpolicy.mk
> index eb345d0f98c9..975c3b584c42 100644
> --- a/package/refpolicy/refpolicy.mk
> +++ b/package/refpolicy/refpolicy.mk
> @@ -14,7 +14,8 @@ REFPOLICY_DEPENDENCIES = \
> host-policycoreutils \
> host-python3 \
> host-setools \
> - host-gawk
> + host-gawk \
> + host-libxml2
>
> ifeq ($(BR2_PACKAGE_REFPOLICY_CUSTOM_GIT),y)
> REFPOLICY_VERSION = $(call qstrip,$(BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_VERSION))
> @@ -30,6 +31,7 @@ endif
> # Cannot use multiple threads to build the reference policy
> REFPOLICY_MAKE = \
> PYTHON=$(HOST_DIR)/usr/bin/python3 \
> + XMLLINT=$(LIBXML2_HOST_BINARY) \
> TEST_TOOLCHAIN=$(HOST_DIR) \
> $(TARGET_MAKE_ENV) \
> $(MAKE1)
> --
> 2.31.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used
2021-09-23 9:21 [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used Antoine Tenart
2021-09-27 16:35 ` Yann E. MORIN
@ 2021-10-06 14:32 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-10-06 14:32 UTC (permalink / raw)
To: Antoine Tenart; +Cc: José Pekkarinen, buildroot
>>>>> "Antoine" == Antoine Tenart <atenart@kernel.org> writes:
> When parsing and adding modules the refpolicy build system checks their
> validity using xmllint. By default the host system version is used and
> if not found an error is displayed but the build is not stopped. This
> leads to interesting issues where modules are not added correctly to
> modules.conf[1] (other possible issues are likely).
> Fix this by adding a dependency on host-libxml2 and explicitly use the
> xmllint binary built by Buildroot.
> [1] https://lore.kernel.org/buildroot/20210830114531.2285178-1-jose.pekkarinen@unikie.com/
> Tested-by: José Pekkarinen <jose.pekkarinen@unikie.com>
> Signed-off-by: Antoine Tenart <atenart@kernel.org>
Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-06 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 9:21 [Buildroot] [PATCH] package/refpolicy: make sure xmllint is used Antoine Tenart
2021-09-27 16:35 ` Yann E. MORIN
2021-10-06 14:32 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.