lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Creating a chroot for cross-building lmi


From: Greg Chicares
Subject: Re: [lmi] Creating a chroot for cross-building lmi
Date: Sat, 24 Sep 2016 16:40:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

On 2016-09-24 16:00, Vadim Zeitlin wrote:
> On Sat, 24 Sep 2016 13:20:48 +0000 Greg Chicares <address@hidden> wrote:
> 
[need to set $DISPLAY in chroot]
> 
>  As you already noticed, DISPLAY is, of course, necessary, but I'm not sure
> why would you need to export it explicitly, normally it's already part of
> the environment and should be inherited by chroot, as usual. Does schroot
> prune the environment perhaps?

Yes.

$ls -di /
2 /
$env |wc -l
36
$schroot --chroot=cross2
$ls -di /
21634478 /
env |wc -l
23

[inode of / is not 2 in a chroot]

Aside from variables set in ~/.zshrc or set by schroot, like
  SCHROOT_CHROOT_NAME=cross2
the environment contains only
  _ HOME LOGNAME SHELL TERM USER XDG_SESSION_COOKIE SHLVL PWD OLDPWD

Both "plain" and "directory" schroots have only those twenty-three
variables. This default behavior can be toggled:

https://linux.die.net/man/5/schroot.conf
preserve-environment= true|false
| By default, the environment will not be preserved inside the chroot,
| instead a minimal environment will be used. Set to true to always
| preserve the environment. This is useful for example when running X
| applications inside the chroot, which need the environment to
| function correctly. The environment may also be preserved using the
| --preserve-environment option.

but I don't want to toggle it, thereby leaking everything, merely
in order to get $DISPLAY.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]