Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: Antoine Tenart <atenart@kernel.org>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 2/2] package/refpolicy/Config.in: depend on merged usr when selecting upstream
Date: Mon, 9 Oct 2023 19:25:19 +0200	[thread overview]
Message-ID: <20231009172519.GF14234@scaer> (raw)
In-Reply-To: <20231009170428.2836853-2-adam.duskett@amarulasolutions.com>

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@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@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

  reply	other threads:[~2023-10-09 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 17:04 [Buildroot] [PATCH v4 1/2] package/refpolicy: bump version to 2.20231002 Adam Duskett
2023-10-09 17:04 ` [Buildroot] [PATCH v4 2/2] package/refpolicy/Config.in: depend on merged usr when selecting upstream Adam Duskett
2023-10-09 17:25   ` Yann E. MORIN [this message]
2023-10-09 20:05     ` Yann E. MORIN
2023-11-04 17:33 ` [Buildroot] [PATCH v4 1/2] package/refpolicy: bump version to 2.20231002 Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231009172519.GF14234@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=atenart@kernel.org \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox