Patchwork [CONSOLIDATED,PULL,19/20] package_rpm.bbclass: make RPM use on-disk permissions

login
register
mail settings
Submitter Saul Wold
Date June 6, 2011, 6:44 a.m.
Message ID <093e7611b1d1821b1e1789de9c17bcd16fc2cfc8.1307342214.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/5443/
State New, archived
Headers show

Comments

Saul Wold - June 6, 2011, 6:44 a.m.
From: Scott Garman <scott.a.garman@intel.com>

Instruct RPM to use the on-disk permissions, owners, groups,
and directory permissions, instead of defaulting to root:root

Code changes suggested by Mark Hatle.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/package_rpm.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 3df66cc..d8e86c5 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -484,6 +484,7 @@  python write_specfile () {
 			else:
 				bb.note("Creating RPM package for %s" % splitname)
 				spec_files_top.append('%files')
+				spec_files_top.append('%defattr(-,-,-,-)')
 				if file_list:
 					spec_files_top.extend(file_list)
 				spec_files_top.append('')
@@ -570,6 +571,7 @@  python write_specfile () {
 		else:
 			bb.note("Creating RPM package for %s" % splitname)
 			spec_files_bottom.append('%%files -n %s' % splitname)
+			spec_files_bottom.append('%defattr(-,-,-,-)')
 			if file_list:
 				spec_files_bottom.extend(file_list)
 			spec_files_bottom.append('')