Gentoo Archives: gentoo-portage-dev

From: Alec Warner <warnera6@×××××××.edu>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Environment Whitelisting
Date: Tue, 23 Aug 2005 03:41:01
Message-Id: 430A9AAB.2000709@egr.msu.edu
In Reply to: Re: [gentoo-portage-dev] Environment Whitelisting by Kristian Benoit
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Kristian Benoit wrote:
5 > On Tue, 2005-08-23 at 08:28 +0900, Jason Stubbs wrote:
6 >
7 >>On Tuesday 23 August 2005 06:40, Brian Harring wrote:
8 >>
9 >>>On Mon, Aug 22, 2005 at 11:33:23PM +0200, Marius Mauch wrote:
10 >>>
11 >>>>Theoretical discussions about this are pointless IMO without
12 >>>>numbers/facts to back things up.
13 >>>
14 >>>I'd posit theroetical discussions about this are pointless without
15 >>>getting ebuild dev's to give a yay/nay on whether they want it or not;
16 >>>not much for trying to force it down their throats if they don't want
17 >>>it (more work, essentially).
18 >>
19 >>I don't really see what it has to do with ebuild devs... We're talking about
20 >>the user's environment leaking into the portage build environment, no?
21 >>Environment vars used by ebuilds can/should be set by users in a portage
22 >>configuration file rather than being added to the environment. The only
23 >>issue i see here is user customizations - fex, a hypothetical colorgcc that
24 >>gets its config info from the env.
25 >
26 >
27 > That's exactly what I was saying, we filter the environment to let only
28 > portage's variables (USE, FEATURE, ...) pass through. But the user may
29 > specify a bunch variables that will pass through. Ex:
30 >
31 > $ FOO=bar USE=X emerge vim
32 >
33 > vim's ebuild wont see the variable FOO but will see USE.
34 > But if someone run:
35 >
36 > $ PORTAGE_USER_VARS="FOO" FOO=bar USE=X emerge vim
37 >
38 > The ebuild will see both FOO and USE.
39 > But suppose that foo has 10 depencies and I want FOO to be defined only
40 > for vim. I can write /etc/portage/package.env.d/app-editors/vim:
41 >
42 > BAR=$TMP/bar
43 > FOO=$BAR/foo
44 > PORTAGE_USER_VARS="$PORTAGE_USER_VARS FOO"
45 >
46 > Then if I run:
47 >
48 > $ TMP=/home/me USE=X emerge vim
49 >
50 > The ebuild will see both USE and FOO but not BAR and TMP.
51 >
52 > It could also be only one file (/etc/portage/package.env):
53 >
54 > app-editors/vim "FOO BAR"
55 > app-...
56 >
57 > then FOO and BAR will be defined when running the ebuild if defined in
58 > the env.
59 >
60 > Or:
61 >
62 > app-editors/vim 'FOO=bar BAR="bla bla"'
63 >
64 >
65 > Which one do you prefer ?
66 >
67 >
68 > I think this give more freedom to the user than white/blacklisting and
69 > provide clean environment to the ebuilds. Plus no need for the package
70 > managers to manage white/blacklist.
71 >
72 >
73 > Kristian
74 >
75
76 In either kind of list editing of this type would have to be allowed.
77 However black/whitelists are still necessary IMHO. You don't know what
78 vars destroy builds, but the maintainer does. Why wouldn't you want him
79 blocking out a variable that is KNOWN to break a build? Modifying the
80 API to print things blacklisted would be easy and if the maintainer has
81 blacklisted something important for you you can always remove it via
82 some setting ( /etc/portage or otherwise ).
83
84 Alec Warner (antarus)
85 -----BEGIN PGP SIGNATURE-----
86 Version: GnuPG v1.4.1 (GNU/Linux)
87 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
88
89 iQIVAwUBQwqaq2zglR5RwbyYAQKz+g//TQTaZCV+oXw/R6tLzSQhe0qhZcxDfSMz
90 Kdy8q6FHsXxwJ4QSVudszQnvmLBKVlSXXGHMFAmbOHq/ATyesnFG+bGjRPHxiPfV
91 ZW+PDRNJ/1LvInMVa6LyhjrSyKVz3XlqPIfCNoo9AdWM8s38lonG8zapsolkLs2b
92 sA5v40xQVCA1PhvYMdCOeNdfK2PJSqh9wLj8NTdSJOqffZWBpLGd50TFgLVSXbhd
93 u5hCoXK/kivWJ9pYCBgKwffEC78OOHSjmhkslxQR5luVJcn5ijs8P2fQUbPM5YGS
94 2BfGDRthj0lNTlo2Jt4QhnjkdQTPXMzRAbhLuVWsYYJl6+1ngMgWkM2jKV9P1WuE
95 gilDrAuU83pl4vRX2Gh5jtYlzDScRQqe/vwzKaXXjEjQNfwCUmhh82tDgGSDmSo7
96 bMLrDGA6xj7ptqMLDOqewpwVvqCR2FQ9Qq/ZgQidmnjNcX83wd1cJZBKyszP5KIG
97 YMztpKAb9TsGgdfHo0yV694vVoTlpBQ9B2wv+47FJReSw0bCWvUbqIsuAOGcGJzk
98 8HczKv/ySWc20pm6muBLrC63HAcGa0siE1ZQLTmyCLfN7G6yeFrK4Si9e5qQzF05
99 QVQCXLORq84v2cLJgiEkhysYEMFDSYkYBPZJ831eWuab/yrXAdT7IvoEPDmnRsM2
100 0ocP3wXhSGA=
101 =t2n9
102 -----END PGP SIGNATURE-----
103 --
104 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] Environment Whitelisting Kristian Benoit <kbenoit@×××××××.com>