Dne 22.12.2017 v 14:18 Michael Ivanov napsal(a):
Greetings!
I hope this is the right place to ask questions about 'mock' buildsystem.
It is the right place :)
Is there a possibility to add custom actions to mock chroot tree
initialization?
I need a specific user and group to exist in rpm build environment. Currently I
do it manually using --shell command, but as soon as I run src package build
forgetting --no-clean option, everything is wiped away and recreated automatically.
No. Mock primary task is to make clean chroot so others can reproduce the build as well.
Any other customization of chroot goes against the spirit of mock.
But ... you can use lvm plugin
https://github.com/rpm-software-management/mock/wiki/Plugin-LvmRoot
do the customization (if you really need it) and take the snapshot using --snapshot and
then build on top of this snapshot.
BTW --chroot is slightly better than --shell for this because does not pass everything as
one argument.
And another one. Is it possible to request some files to be copied
into chroot
tree after initialization? I found 'files' config option, but it looks to me
that
file contents is to be embedded in cfg file: and this is possible only for short
text files.
See --copyin in man page.
Miroslav Suchy