[0/4] Ensure a reasonable umask, and fix up permissions

Submitted by Mark Hatle on June 22, 2011, 11:23 p.m. | Patch ID: 6387


Message ID cover.1308784531.git.mark.hatle@windriver.com
State New, archived
Headers show


git://git.pokylinux.org/poky-contrib mhatle/perms

Commit Message

Mark Hatle June 22, 2011, 11:23 p.m.
A fairly global problem was discovered that depending on the build users
umask, the directories and files being generated ended up with different
permissions.  This lead to situations where the first package to be
installed setup the permissions and could have lead to bugs and security

This patch set resolves the problem in two ways.  First it sets the umask
to a sane value for distribution creation, 022.  Note: I intentionally left
the patches and reverted global umask in this patch set.  Without the 
corresponding changes to bitbake the "Add umask task control" won't do

The package.bbclass change is described within that specific commit.  Note
there is still one outstanding issue when one package uses a directory and
another defines the item in terms of a symlink.  I intend to enhance the
code to deal with that situation in a future commit.

The following changes since commit f40f936b3ba00e31cae49c22b2633d4deb825533:

  Revert "eglibc: Upgrade recipes from 2.13 -> 2.14" (2011-06-22 16:52:11 -0500)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib mhatle/perms

Mark Hatle (4):
  classes/base.bbclass: Add umask
  Revert "classes/base.bbclass: Add umask"
  Add umask task control
  classes/package.bbclass: Add fixup_perms

 meta/classes/base.bbclass                          |    4 +
 meta/classes/image.bbclass                         |    2 +
 meta/classes/package.bbclass                       |  168 ++++++++++++++++++--
 meta/classes/staging.bbclass                       |    1 +
 meta/files/fs-perms.txt                            |   39 +++++
 .../installer/adt-installer_1.0.bb                 |    2 +
 meta/recipes-kernel/linux/linux-tools.inc          |    2 +
 7 files changed, 208 insertions(+), 10 deletions(-)
 create mode 100644 meta/files/fs-perms.txt