[oe-commits] Mark Hatle : classes/package.bbclass: Add fixup_perms

git version control git at git.openembedded.org
Thu Jun 30 21:55:30 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: 8c720efa053f81dc8d2bb604cdbdb25de9a6efab
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8c720efa053f81dc8d2bb604cdbdb25de9a6efab

Author: Mark Hatle <mark.hatle at windriver.com>
Date:   Mon Jun 20 10:57:49 2011 -0500

classes/package.bbclass: Add fixup_perms

Add a new function that is responsible for fixing directory and file
permissions, owners and groups during the packaging process.  This will fix
various issues where two packages may create the same directory and end up
with different permissions, owner and/or group.

The issue being resolved is that if two packages conflict in their ownership
of a directory, the first installed into the rootfs sets the permissions.
This leads to a least potentially non-deterministic filesystems, at worst
security defects.

The user can specify their own settings via the configuration files
specified in FILESYSTEM_PERMS_TABLES.  If this is not defined, it will
fall back to loading files/fs-perms.txt from BBPATH.  The format of this
file is documented within the file.

By default all of the system directories, specified in bitbake.conf, will
be fixed to be 0755, root, root.

The fs-perms.txt contains a few default entries to correct documentation,
locale, headers and debug sources.  It was discovered these are often
incorrect due to being directly copied from the build user environment.

The entries needed to match the base-files package have also been added.

Also tweak a couple of warnings to provide more diagnostic information.

Signed-off-by: Mark Hatle <mark.hatle at windriver.com>

---

 meta/classes/package.bbclass |  253 ++++++++++++++++++++++++++++++++++++++++--
 meta/files/fs-perms.txt      |   69 ++++++++++++
 2 files changed, 312 insertions(+), 10 deletions(-)

Diff:   http://git.openembedded.org/?p=openembedded-core.git/?a=commitdiff;h=8c720efa053f81dc8d2bb604cdbdb25de9a6efab




More information about the Openembedded-commits mailing list