Setting Environment Variables Into Mock Chroot

Ville Skyttä ville.skytta at iki.fi
Tue Dec 13 21:22:08 UTC 2011


On 12/13/2011 11:12 PM, Clark Williams wrote:
> On Tue, 13 Dec 2011 21:09:30 +0000
> Gordan Bobic <gordan at bobich.net> wrote:
> 
>> Is there a way to make mock explicitly set environment variables in the 
>> build chroot?
>>
>> Specifically, I want to set LD_PRELOAD explicitly during the build, but 
>> I cannot find any way of telling mock to do that. Is there a way to do this?
>>
>> Gordan
> 
> Not at present. I'll look at adding a per-config option that would
> allow you to add environment variables to the chroot environment.

Wouldn't something like this work?

config_opts['files']['etc/profile.d/mystuff.sh'] = """
export LD_PRELOAD=/some/thing.so
export FOO=bar
# ...
"""


More information about the buildsys mailing list