First cut a new mock launcher

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Thu Jun 15 08:34:39 UTC 2006


mike at redhat.com (Mike McLean) writes:

>> Note that the program makes use of Linux namespaces. This *should*
>> make our handling of mount points within the chroot (/proc, /sys,
>> etc.) a bit easier to clean up, since when the process dies the mounts
>> should just go away. I haven't verified this though, so caveat emptor.
>
> Using namespaces does not relieve us of managing our mounts. For
> example, mock.py still needs to make sure the mounts are gone before
> attempting to remove a buildroot.

No; you can do

| $ mock foo.src.rpm
| -->
|   - enter new namespace
|   - cleanup buildroot
|   - mount /proc + /dev/pts
|   - rpm -U ... + rpmbuild ...
|   - exit()
| -->
|   kernel unmounts /proc + /dev/pts when last process in the newly
|   created namespace terminates

| $ mock bar.src.rpm
| -->
|   - enter new namespace
|   - cleanup buildroot

There is no need for an explicit 'umount(2)'; you have just to make sure
that no daemons or other programs are hanging around which were started
during the 'rpm -U ... + rpmbuild ...' phase.




Enrico




More information about the Fedora-buildsys-list mailing list