Custom actions for mock chroot init
by Michael Ivanov
Greetings!
I hope this is the right place to ask questions about 'mock' buildsystem.
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.
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.
I expected to find an option to specify post-init script to perform such actions,
but did not succeed
Best regards,
--
Michael Ivanov
5 years, 8 months
Mock 1.4.8
by Miroslav Suchý
Hi,
I just released mock 1.4.8. I just submitted it to bodhi. The karma is intentionally disabled so no one will be
surprised during the holidays. But you can test it if you want to. :)
From the release notes:
https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.8
Features:
* There is a new option --config-opts GH#138
You can run:
mock --config-opts yum_command=/usr/bin/yum-deprecated --enable-network
which will set:
config_opts['system_yum_command'] = '/usr/bin/yum'
or for a list:
mock --config-opts extra_chroot_dirs=/mnt/b --config-opts extra_chroot_dirs=/mnt/a
which will set
config_opts['extra_chroot_dirs'] = ['/mnt/b', '/mnt/a']
or list with a single item:
mock --config-opts extra_chroot_dirs=/mnt/b --config-opts extra_chroot_dirs=
which will set
config_opts['extra_chroot_dirs'] = ['/mnt/b']
It can detect boolean:
mock --config-opts nosync=False --debug-config |grep nosync
config_opts['nosync'] = False
A specialized option has priority. Therefore:
mock --config-opts rpmbuild_networking=False --enable-network --debug-config |grep rpmbuild_networking
config_opts['rpmbuild_networking'] = True
It is unable to set complicated variables. Like config_opts['plugin_conf']['package_state_opts'] or anything which has
dictionary as value.
* There is a new option. --enable-network which is equivalent to config_opts['rpmbuild_networking'] = True
Bugfixes:
* orphanskill now emits SIGKILL when SIGTERM is not enough RHBZ#1495214
* when mock tries to force umount, it will try umount recursively
* do not change to directory if nspawn is used GH#108
* when creating yum/dnf.conf, mock now copy timestamp from the host RHBZ#1293910
* We now mount /proc and /sys in chroot before executing any package manager command (outside of chroot)RHBZ#1467299
* Dependencies of mock-scm (git, cvs, tar, subversion) are now soft dependencies (Recommends) RHBZ#1515989
* Previously job control in mock shell does not work. RHBZ#1468837. This was a glibc bug and it is resolved in
rawhide now.
5 years, 9 months
New release of mock soon
by Miroslav Suchý
Hi,
I plan to resolve few mock issues next week and do the release before Christmas.
The plan is not to enable karma, so you will not be surprised by new version of mock on your stable servers.
If you have some patch in your private branch then now is the right time to send the PR.
Mirek
5 years, 9 months