[Buildroot] [PATCH v4 2/2] package/refpolicy/Config.in: depend on merged usr when selecting upstream
Yann E. MORIN
yann.morin.1998 at free.fr
Mon Oct 9 17:25:19 UTC 2023
Adam, All,
On 2023-10-09 19:04 +0200, Adam Duskett spake thusly:
> Refpolicy contexts expect a merged /usr file system. In fact, there
> are no references to /bin, /sbin, /lib, or /lib64 at all.
There is a file in the refpolicy upstream tree,
which cntains (abbreviated)
# This file can is used to configure base path aliases as in:
# /aliased_path /original_path_as_configured_in_file_contexts
# where original_path_as_configured_in_file_contexts is a base
# path being used in the main file_contexts configuration file.
/bin /usr/bin
/lib /usr/lib
[...]
So, to me, it looks like it means something like: treat paths that
starts with /lib as if they were starting with /sur/lib, and then check
the context associated with the new path.
But maybe that no longer works? Or maybe we need to take action to make
that work?
Matter for more thoughts...
> However, if a user
> wants to go through the trouble of creating a policy that works with a
> non-merged system, they should be free to do so. As such, only select
> BR2_ROOTFS_MERGED_USR if using BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION.
This last sentence is still incorrect now: not seelct, but depends on.
;-)
Regards,
Yann E. MORIN.
> Signed-off-by: Adam Duskett <adam.duskett at amarulasolutions.com>
> ---
> v3 -> v4: Remove accidental removal of upstream patch in this patch.
>
> package/refpolicy/Config.in | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/package/refpolicy/Config.in b/package/refpolicy/Config.in
> index 0e72b895df..d2fe391d8d 100644
> --- a/package/refpolicy/Config.in
> +++ b/package/refpolicy/Config.in
> @@ -36,9 +36,13 @@ choice
>
> config BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION
> bool "Upstream version"
> + depends on BR2_ROOTFS_MERGED_USR
> help
> Use the refpolicy as provided by Buildroot.
>
> +comment "Upstream refpolicy requires a merged /usr filesystem"
> + depends on !BR2_ROOTFS_MERGED_USR
> +
> config BR2_PACKAGE_REFPOLICY_CUSTOM_GIT
> bool "Custom git repository"
> help
> --
> 2.41.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at 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. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list