[OE-core] oe-core recipe for defining directories in /

Mark Hatle mark.hatle at kernel.crashing.org
Wed Feb 19 15:46:30 UTC 2020



On 2/19/20 4:29 AM, Quentin Schulz wrote:
> Hi JH,
> 
> On Wed, Feb 19, 2020 at 09:12:08PM +1100, JH wrote:
>> Hi,
>>
>> Which recipe defines all directories in "/"? I need to make a bbapand
>> to add directories to /.
>>
> 
> None. Or all of them, depends on how one sees it.

He is correct, this is shared between all package users.  But with that said,
there is a base filesystem package and an associated 'syncing' file for all
other users.

The is a recipe called 'base-files', it builds up the core filesystem
infrastructure, as well as puts down a few basic files that all filesystems need.

The 'syncing' file is a corresponding file to used to coordinate permissions
between all recipes: meta/files/fs-perms.txt.  fs-perms.txt is always consulted
when building any recipe to ensure that all common directory, permissions,
owners and groups get a common configuration.

If you are going to bbappend to base-files then you should also to add to
fs-perms.txt (you can do this, like a bbappend, by adding your own file to your
own layer and updating the variable 'FILESYSTEM_PERMS_TABLES' in one of your
global configuration files (usually your distro configuration file.)

but, this isn't the recommended way...

If the directories you are adding are custom to your product, I would recommend
creating a new package to manage this, as well as a custom
fs-perms.txt/FILESYSTEM_PERMS_TABLE entry to coordinate it between recipes that
use this new custom directory structure.

(If only one recipe uses that directory, then all of the overhead is simply not
needed!  You only need this if multiple recipes are sharing a common directory
structure.)

--Mark

> You just create a directory in do_install of a recipe.
> 
> You then make sure this directory is part of a package by checking it's
> in one of the recipe's generated packages's FILES_<PACKAGE>.
> 
> Quentin
> 


More information about the Openembedded-core mailing list