Mock and environment variables
Paul Howarth
paul at city-fan.org
Tue Jan 31 15:16:13 UTC 2006
Mike McGrath wrote:
> Paul Howarth wrote:
>
>
>>On Mon, 2006-01-30 at 23:25 -0600, Michael McGrath wrote:
>>
>>
>>
>>>Does anyone know what environmetn variables Mock uses when building a
>>>package? Specifically I'm interested in PATH
>>>
>>>
>>
>>I'd have thought it'd be the standard "non-root user" PATH, modified by
>>any /etc/profile.d/*.sh entries pulled in using BuildRequires. You could
>>test it by adding a line "echo PATH is $PATH" in %prep, %build etc. of a
>>spec file for something and look in the build.log.
>>
>>Paul.
>>
>>
>>
>
> Interesting mock :
>
> export
> PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"
>
> normal user:
>
> PATH="/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/mmcgrath/bin"
>
> Not what I'd expected either, it was causing one of my packages to
> compile with Mock but not with my normal user :-D
Hmm, mock appears to have picked up root's PATH (the sbin entries)
rather than a regular user environment, which is what I'd have expected
given that the "mockbuild" user is a regular account.
Paul.
More information about the fedora-extras-list
mailing list