package_rpm: Add optional improved directory handling
authorRonan Le Martret <ronan@fridu.net>
Fri, 29 Aug 2014 17:39:12 +0000 (18:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Sep 2014 15:00:28 +0000 (16:00 +0100)
commita51fbdc4bd6a73e1aac13d073fe48abe2cb5d8ff
treef360c198e2b4e00cf72c0c4b7ed52424c331077d
parenta28810d73317eb56c96df7989677b3e96afcd0a3
package_rpm: Add optional improved directory handling

During spec generation, ideally directories should not be auto
packaged under the %file section of rpm packages but take ownership of
specific directories.

* packages only empty directories or explict directory.
   See:
       - http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
       - "The %dir Directive"

* This will prevent the overlapping of security permission.
   For example, in Tizen the directory /etc have smack label 'System::Shared'
   So Only one package should own and set the label of /etc to prevent
   the overwriting of the smack label.

Existing behaviour is maintained if DIRFILES is not set. If it is set,
the modified behaviour is used. If can be set to an empty value by
core recipes to trigger the modified behaviour.

[RP: Modified to allow optional usage of DIRFILES]
(From OE-Core rev: 0e33d232916125ba5305ced7200cc00f8b5f7b22)

Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass