From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
Date: Fri, 3 Jan 2014 05:03:25 +0000 (UTC) [thread overview]
Message-ID: <1388725245.54506fd5b861971098915a66827d0614aa8fd411.dol-sen@gentoo> (raw)
commit: 54506fd5b861971098915a66827d0614aa8fd411
Author: Douglas Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Wed Jan 1 21:18:22 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Jan 3 05:00:45 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=54506fd5
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
---
catalyst/targets/generic_stage_target.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 2ca3913..3d93405 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -30,7 +30,7 @@ SOURCE_MOUNTS_DEFAULTS = {
"portdir": "/usr/portage",
"port_tmpdir": "tmpfs",
"proc": "/proc",
- "shm": "/dev/shm",
+ "shm": "shmfs",
}
# for convienience
@@ -949,7 +949,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]
@@ -970,6 +970,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
next reply other threads:[~2014-01-03 5:03 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 5:03 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-29 17:20 [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-11 7:07 Brian Dolbec
2017-03-10 18:38 Brian Dolbec
2017-03-09 10:02 Brian Dolbec
2017-03-09 9:39 Brian Dolbec
2015-11-12 16:24 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21 1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01 5:59 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 19:25 Brian Dolbec
2015-01-01 5:59 Brian Dolbec
2015-01-01 5:59 Brian Dolbec
2014-09-11 3:08 Brian Dolbec
2014-09-02 23:10 Brian Dolbec
2014-09-02 7:12 Brian Dolbec
2014-09-02 5:54 Brian Dolbec
2014-09-02 5:54 Brian Dolbec
2014-09-02 2:43 Brian Dolbec
2014-09-02 2:43 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-14 5:58 Brian Dolbec
2014-06-14 5:58 Brian Dolbec
2014-05-05 19:17 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-05-05 19:15 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-03 6:41 Brian Dolbec
2014-01-03 6:12 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-01 22:27 Brian Dolbec
2014-01-01 22:13 Brian Dolbec
2013-12-31 18:56 Anthony G. Basile
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:22 Brian Dolbec
2013-12-31 4:22 Brian Dolbec
2013-12-31 4:22 Brian Dolbec
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=1388725245.54506fd5b861971098915a66827d0614aa8fd411.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