public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: modules/
Date: Mon,  6 Jan 2014 02:00:52 +0000 (UTC)	[thread overview]
Message-ID: <1388731171.e5a9e20376397f2714aa7a835b7f42f71fcc38d9.dol-sen@gentoo> (raw)

commit:     e5a9e20376397f2714aa7a835b7f42f71fcc38d9
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 23:57:28 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 06:39:31 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e5a9e203

catalyst/targets/generic_stage_target.py: mount /dev/shm on linux

Add shm targets defaults. Anthony G. Basile <blueness <AT> gentoo.org>
Some build systems require /dev/shm to be mounted, like python's
build system.  We make sure that on Linux systems, /dev/shm is
mounted in the stage chroots.  See bug #496328.

Douglas Freed <dwfreed <AT> mtu.edu> :
Mount /dev/shm in the chroot with the right options
Bind mounting /dev/shm into the chroot isn't a good idea, as there may
be collisions and result in weird side effects.  Instead, we can just
mount a new tmpfs there, with the right options to ensure security.

(Forward ported to pending branch from 2.X Brian Dolbec)
Conflicts:
	catalyst/targets/generic_stage_target.py

---
 modules/generic_stage_target.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 790e4da..3d66231 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -20,6 +20,7 @@ TARGET_MOUNTS_DEFAULTS = {
 	"port_tmpdir": "/var/tmp/portage",
 	"port_logdir": "/var/log/portage",
 	"proc": "/proc",
+	"shm": "/dev/shm",
 	}
 
 SOURCE_MOUNTS_DEFAULTS = {
@@ -29,6 +30,7 @@ SOURCE_MOUNTS_DEFAULTS = {
 	"portdir": "/usr/portage",
 	"port_tmpdir": "tmpfs",
 	"proc": "/proc",
+	"shm": "shmfs",
 	}
 
 
@@ -218,6 +220,7 @@ class generic_stage_target(generic_target):
 			#self.mountmap["portdir"] = None
 		if os.uname()[0] == "Linux":
 			self.mounts.append("devpts")
+			self.mounts.append("shm")
 
 		self.set_mounts()
 
@@ -938,7 +941,7 @@ class generic_stage_target(generic_target):
 				os.makedirs(target, 0755)
 
 			if not os.path.exists(self.mountmap[x]):
-				if not self.mountmap[x] == "tmpfs":
+				if self.mountmap[x] not in ["tmpfs", "shmfs"]:
 					os.makedirs(self.mountmap[x], 0755)
 
 			src=self.mountmap[x]
@@ -959,6 +962,9 @@ class generic_stage_target(generic_target):
 							self.settings["var_tmpfs_portage"] + "G " + \
 							src + " " + target
 						retval=os.system(cmd)
+				elif src == "shmfs":
+					cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
+					retval=os.system(cmd)
 				else:
 					cmd = "mount --bind " + src + " " + target
 					#print "bind(); cmd =", cmd


WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:pending commit in: modules/
Date: Fri,  3 Jan 2014 06:41:47 +0000 (UTC)	[thread overview]
Message-ID: <1388731171.e5a9e20376397f2714aa7a835b7f42f71fcc38d9.dol-sen@gentoo> (raw)
Message-ID: <20140103064147.hkcfHBjYzdIYPZqI6fFGIPgltcqZxq08BYh3iApYNio@z> (raw)

commit:     e5a9e20376397f2714aa7a835b7f42f71fcc38d9
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 23:57:28 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan  3 06:39:31 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e5a9e203

catalyst/targets/generic_stage_target.py: mount /dev/shm on linux

Add shm targets defaults. Anthony G. Basile <blueness <AT> gentoo.org>
Some build systems require /dev/shm to be mounted, like python's
build system.  We make sure that on Linux systems, /dev/shm is
mounted in the stage chroots.  See bug #496328.

Douglas Freed <dwfreed <AT> mtu.edu> :
Mount /dev/shm in the chroot with the right options
Bind mounting /dev/shm into the chroot isn't a good idea, as there may
be collisions and result in weird side effects.  Instead, we can just
mount a new tmpfs there, with the right options to ensure security.

(Forward ported to pending branch from 2.X Brian Dolbec)
Conflicts:
	catalyst/targets/generic_stage_target.py

---
 modules/generic_stage_target.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index 790e4da..3d66231 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -20,6 +20,7 @@ TARGET_MOUNTS_DEFAULTS = {
 	"port_tmpdir": "/var/tmp/portage",
 	"port_logdir": "/var/log/portage",
 	"proc": "/proc",
+	"shm": "/dev/shm",
 	}
 
 SOURCE_MOUNTS_DEFAULTS = {
@@ -29,6 +30,7 @@ SOURCE_MOUNTS_DEFAULTS = {
 	"portdir": "/usr/portage",
 	"port_tmpdir": "tmpfs",
 	"proc": "/proc",
+	"shm": "shmfs",
 	}
 
 
@@ -218,6 +220,7 @@ class generic_stage_target(generic_target):
 			#self.mountmap["portdir"] = None
 		if os.uname()[0] == "Linux":
 			self.mounts.append("devpts")
+			self.mounts.append("shm")
 
 		self.set_mounts()
 
@@ -938,7 +941,7 @@ class generic_stage_target(generic_target):
 				os.makedirs(target, 0755)
 
 			if not os.path.exists(self.mountmap[x]):
-				if not self.mountmap[x] == "tmpfs":
+				if self.mountmap[x] not in ["tmpfs", "shmfs"]:
 					os.makedirs(self.mountmap[x], 0755)
 
 			src=self.mountmap[x]
@@ -959,6 +962,9 @@ class generic_stage_target(generic_target):
 							self.settings["var_tmpfs_portage"] + "G " + \
 							src + " " + target
 						retval=os.system(cmd)
+				elif src == "shmfs":
+					cmd = "mount -t tmpfs -o noexec,nosuid,nodev shm " + target
+					retval=os.system(cmd)
 				else:
 					cmd = "mount --bind " + src + " " + target
 					#print "bind(); cmd =", cmd


             reply	other threads:[~2014-01-06  2:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06  2:00 Brian Dolbec [this message]
2014-01-03  6:41 ` [gentoo-commits] proj/catalyst:pending commit in: modules/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2014-01-06  2:00 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-01-06  2:00 Brian Dolbec
2014-01-06  2:00 Brian Dolbec
2014-01-03  6:12 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-01-03  5:03 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-01-06  2:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2013-12-15 21:33 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-12-15  4:19 Matt Turner
2013-08-08  5:38 Matt Turner
2013-08-02  5:59 Brian Dolbec
2013-05-27 20:26 Richard Farina
2013-05-27 20:26 Richard Farina
2013-05-27 20:15 Richard Farina
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-23  2:02 Matt Turner
2013-02-05  8:34 Matt Turner
2012-11-22  2:51 Jorge Manuel B. S. Vicetto
2012-11-22  2:51 Jorge Manuel B. S. Vicetto
2012-11-01 20:04 Richard Farina
2012-10-29 20:36 Anthony G. Basile
2012-10-29 20:35 Anthony G. Basile
2012-10-14  5:50 Matt Turner
2012-08-31  0:34 Jorge Manuel B. S. Vicetto
2012-08-29  4:17 Jorge Manuel B. S. Vicetto
2012-08-26 19:30 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto
2012-08-23  5:55 Jorge Manuel B. S. Vicetto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388731171.e5a9e20376397f2714aa7a835b7f42f71fcc38d9.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox