All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package_ipk: apply umask to control and conffiles
@ 2012-03-10  2:15 Andreas Oberritter
  2012-03-12 15:29 ` Mark Hatle
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Oberritter @ 2012-03-10  2:15 UTC (permalink / raw)
  To: openembedded-core

* Explicitly set umask to 022. Otherwise the build system's
  umask leaks into the image.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
* I tried do_package_ipk[umask] = "022" first, but it didn't work.

 meta/classes/package_ipk.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 565ef93..e7da07a 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -317,7 +317,9 @@ python do_package_ipk () {
 		controldir = os.path.join(root, 'CONTROL')
 		bb.mkdirhier(controldir)
 		try:
+			mask = os.umask(022)
 			ctrlfile = file(os.path.join(controldir, 'control'), 'w')
+			os.umask(mask)
 		except OSError:
 			bb.utils.unlockfile(lf)
 			raise bb.build.FuncFailed("unable to open control file for writing.")
@@ -410,7 +412,9 @@ python do_package_ipk () {
 		conffiles_str = localdata.getVar("CONFFILES", True)
 		if conffiles_str:
 			try:
+				mask = os.umask(022)
 				conffiles = file(os.path.join(controldir, 'conffiles'), 'w')
+				os.umask(mask)
 			except OSError:
 				bb.utils.unlockfile(lf)
 				raise bb.build.FuncFailed("unable to open conffiles for writing.")
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-04-04 17:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-10  2:15 [PATCH] package_ipk: apply umask to control and conffiles Andreas Oberritter
2012-03-12 15:29 ` Mark Hatle
2012-03-12 15:53   ` Richard Purdie
2012-03-12 16:27     ` Andreas Oberritter
2012-03-23 20:17     ` Andreas Oberritter
2012-03-26 11:34       ` Richard Purdie
2012-03-26 15:47         ` Andreas Oberritter
2012-04-04 16:56           ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.