public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Kristian Benoit <kbenoit@opersys.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] Environment Whitelisting
Date: Mon, 22 Aug 2005 22:46:06 -0400	[thread overview]
Message-ID: <1124765166.6502.132.camel@localhost> (raw)
In-Reply-To: <200508230828.10810.jstubbs@gentoo.org>

On Tue, 2005-08-23 at 08:28 +0900, Jason Stubbs wrote:
> On Tuesday 23 August 2005 06:40, Brian Harring wrote:
> > On Mon, Aug 22, 2005 at 11:33:23PM +0200, Marius Mauch wrote:
> > > Theoretical discussions about this are pointless IMO without
> > > numbers/facts to back things up.
> >
> > I'd posit theroetical discussions about this are pointless without
> > getting ebuild dev's to give a yay/nay on whether they want it or not;
> > not much for trying to force it down their throats if they don't want
> > it (more work, essentially).
> 
> I don't really see what it has to do with ebuild devs... We're talking about 
> the user's environment leaking into the portage build environment, no? 
> Environment vars used by ebuilds can/should be set by users in a portage 
> configuration file rather than being added to the environment. The only 
> issue i see here is user customizations - fex, a hypothetical colorgcc that 
> gets its config info from the env.

That's exactly what I was saying, we filter the environment to let only
portage's variables (USE, FEATURE, ...) pass through. But the user may
specify a bunch variables that will pass through. Ex:

$ FOO=bar USE=X emerge vim

vim's ebuild wont see the variable FOO but will see USE.
But if someone run:

$ PORTAGE_USER_VARS="FOO" FOO=bar USE=X emerge vim

The ebuild will see both FOO and USE.
But suppose that foo has 10 depencies and I want FOO to be defined only
for vim. I can write /etc/portage/package.env.d/app-editors/vim:

BAR=$TMP/bar
FOO=$BAR/foo
PORTAGE_USER_VARS="$PORTAGE_USER_VARS FOO"

Then if I run:

$ TMP=/home/me USE=X emerge vim

The ebuild will see both USE and FOO but not BAR and TMP.

It could also be only one file (/etc/portage/package.env):

app-editors/vim  "FOO BAR"
app-...

then FOO and BAR will be defined when running the ebuild if defined in
the env.

Or:

app-editors/vim	 'FOO=bar BAR="bla bla"'


Which one do you prefer ?


I think this give more freedom to the user than white/blacklisting and
provide clean environment to the ebuilds. Plus no need for the package
managers to manage white/blacklist.


Kristian

-- 
gentoo-portage-dev@gentoo.org mailing list



  parent reply	other threads:[~2005-08-23  2:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-21 20:25 [gentoo-portage-dev] Environment Whitelisting Alec Warner
2005-08-22  1:24 ` Zac Medico
2005-08-22  3:52 ` [gentoo-portage-dev] " Drake Wyrm
2005-08-22  4:41   ` Zac Medico
2005-08-22 16:29     ` Kristian Benoit
2005-08-22 14:52   ` Jason Stubbs
2005-08-22 18:08     ` Zac Medico
2005-08-22 19:15       ` warnera6
2005-08-22 19:24         ` Zac Medico
2005-08-22 20:58           ` Brian Harring
2005-08-23  1:57           ` Kristian Benoit
2005-08-23  2:15             ` Brian Harring
2005-08-22 21:33 ` [gentoo-portage-dev] " Marius Mauch
2005-08-22 21:40   ` Brian Harring
2005-08-22 21:55     ` warnera6
2005-08-22 21:59     ` Marius Mauch
2005-08-22 22:19       ` Brian Harring
2005-08-22 22:36         ` Alec Warner
2005-08-22 22:41           ` Brian Harring
2005-08-22 23:01             ` [gentoo-portage-dev] Profiles [ was Environmental Whitelisting ] Alec Warner
2005-08-22 23:28     ` [gentoo-portage-dev] Environment Whitelisting Jason Stubbs
2005-08-22 23:56       ` Brian Harring
2005-08-23 10:50         ` Jason Stubbs
2005-08-23  0:27       ` Alec Warner
2005-08-23  2:46       ` Kristian Benoit [this message]
2005-08-23  3:40         ` Alec Warner
2005-08-23 16:19           ` Kristian Benoit

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=1124765166.6502.132.camel@localhost \
    --to=kbenoit@opersys.com \
    --cc=gentoo-portage-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