On Feb 14, 2011, at 3:43 AM, Eric MSP Veith wrote:
> Am Sonntag, 13. Februar 2011, 21:07:45 schrieb Jeff Johnson:
>> Depends. --root (as wired in rpmbuild) isn't doing what you think
>> its doing. What rpmbuild --root is actually attempting is considerably
>> harder to explain, dates back to 2000 or so ...
> Hm, well, the manpage says it'll chroot() before running any scriptlets. But
> skimming through the sources, I found no call to chroot(2). Hum. Manpage
Yes but ... rpmbuild --root is not doing chroot(2), never has done chroot(2),
and cannot do chroot(2) unless uid == 0.
It in the man page because someone insisted:
Its a CLI option so it MUST be in the man page.
and it was easier to oblige than explain.
>> chroot /wherever rpmbuild ...
>> if you want/need single invocation functionality. But you
>> likely just want to enter the chroot, and use rpmbuild inside.
>> chroot /wherever
>> rpmbuild ...
> Which, however, will force me to install RPM with all deps inside the chroot,
> And without having tried it I guess that doing it programatically I could call
> chroot() before buildSpec() and it *should* work? If so, I'm back working on
> my small little build system... :-)
File path's get implicitly prefixed when chroot(2) is called.
There's harder issues, like readong configuration (from inside or outside the chroot?)
and finding the rpmdb (inside or outside?) and writing *.rpm output (inside or outside),
but otherwise yes.
73 de Jeff
Received on Mon Feb 14 13:26:41 2011
- application/pkcs7-signature attachment: smime.p7s