On Mon, Dec 03, 2007 at 12:32:39PM -0600, Rex Dieter wrote:
Michael Schwendt wrote:
> On Mon, 03 Dec 2007 09:28:43 -0600, Rex Dieter wrote:
>
>> With recent versions of mock, (ie, mock-0.8 series), I've noticed change
>> in behavior, seemingly the mockbuild user doesn't include stuff
>> >from /etc/profile.d/* (my guess is that it's no longer being treated as
>> >a
>> login shell).
>>
>> I mention this because bunch of kde-related packages that once built
>> fine, no longer do, because /etc/profile.d/qt.sh apparently isn't getting
>> source'd into the build environment (and env vars QTDIR, QTLIB, QTINCLUDE
>> aren't getting set properly).
>>
>> Can anyone confirm/deny this?
Or more precisely, is this mock's intended behavior?
If so, please reconsider. :)
Yes, this is the intended behaviour.
The behaviour from 0.7 was a bug as it made builds non-reproduce-able,
becuase environment variables from the host leaked into the chroot
build.
If I run a mock 0.7 build of PKG_X and I have QT installed on my
local machine, PKG_X, then the mock build would see QT.
If you run a mock 0.7 build of PKG_X and *dont* have QT installed on
your box, then PKG_X build silently doesnt see QT.
This could lead to silently-differing output RPMs from two otherwise
identical builds.
The new mock scrubs the environment in the setuid wrapper such that when
we exec() rpmbuild it has a clean environment.
When we exec() rpmbuild, we do so with a clean environment. If you wish
to include dependencies, the proper way to do that is from the specfile.
--
Michael