mock chroot builds run as owner of /
Roland McGrath
roland at redhat.com
Sun Aug 7 09:38:03 UTC 2005
I've just figured out why a test in a build was failing in mock builds but
not in my normal rpmbuilds. The difference is that in the mock build,
`test -O /' succeeds for my uid (aka mockbuild), while in the real root
that fails. The test might as well have been test -w /, which tests
writability. It happens that I am the owner of /var/lib/mock/.../root,
not just able to write it.
Would there be a problem with mock making the / in the chroot be owned by
root? That way the build as a normal user (mockbuild) would match the
normal environment, in which "do I own / ?" or "can I write / ?" are ways
to check for being root (and thus e.g. expect that file permissions won't
be enforced in your tests). As things are, this yields a false positive
and fouls the package's logic that works around idiots who build as root.
Thanks,
Roland
More information about the fedora-extras-list
mailing list