From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH 2/2] catalyst: create namespaces for building
Date: Mon, 9 Nov 2015 22:55:14 -0800 [thread overview]
Message-ID: <20151109225514.5152edf2.dolsen@gentoo.org> (raw)
In-Reply-To: <20151110064907.GL5154@vapier.lan>
On Tue, 10 Nov 2015 01:49:07 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> On 09 Nov 2015 22:45, Brian Dolbec wrote:
> > On Tue, 6 Oct 2015 16:32:53 -0400 Mike Frysinger wrote:
> > > This helps isolate the catalyst builds from the rest of the system
> > > and allows us to build as non-root user in more cases. This might
> > > not work everywhere, but it's a start (snapshot generation works).
> > > ---
> > > catalyst/main.py | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > >
> > > diff --git a/catalyst/main.py b/catalyst/main.py
> > > index 65e1431..f984653 100644
> > > --- a/catalyst/main.py
> > > +++ b/catalyst/main.py
> > > @@ -10,6 +10,8 @@ import argparse
> > > import os
> > > import sys
> > >
> > > +from snakeoil.process import namespaces
> > > +
> > > __selfpath__ = os.path.abspath(os.path.dirname(__file__))
> > >
> > > from DeComp.definitions import (COMPRESS_DEFINITIONS,
> > > DECOMPRESS_DEFINITIONS, @@ -336,6 +338,13 @@ def main():
> > > if "target" not in addlargs:
> > > raise CatalystError("Required value \"target\"
> > > not specified.")
> > > + # Start off by creating unique namespaces to run in.
> > > + namespaces.simple_unshare(
> > > + mount=True, uts=True, ipc=True, pid=True,
> > > net=False, user=True,
> > > + hostname='catalyst')
> > > +
> > > + # We should be root now, either a real root, or in a
> > > userns as root.
> > > + # If we aren't, then we've failed, and need to abort.
> > > if os.getuid() != 0:
> > > # catalyst cannot be run as a normal user due to
> > > chroots, mounts, etc print "!!! catalyst: This script requires
> > > root privileges to operate"
> >
> > I was hoping to get a release out before merging much more, but, I
> > doubt this will affect stability.
>
> it does ;). i haven't fully debugged it yet, but i think the use of
> pid namespaces messes up signal handling. i'll follow up when i'm
> happy with its state.
> -mike
sounds good :) Thanks
--
Brian Dolbec <dolsen>
next prev parent reply other threads:[~2015-11-10 6:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 20:32 [gentoo-catalyst] [PATCH 1/2] snapshot: do not preserve owner/group Mike Frysinger
2015-10-06 20:32 ` [gentoo-catalyst] [PATCH 2/2] catalyst: create namespaces for building Mike Frysinger
2015-11-10 6:45 ` Brian Dolbec
2015-11-10 6:49 ` Mike Frysinger
2015-11-10 6:55 ` Brian Dolbec [this message]
2015-10-08 22:09 ` [gentoo-catalyst] [PATCH 1/2] snapshot: do not preserve owner/group Mike Frysinger
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=20151109225514.5152edf2.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-catalyst@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