copr-builder: add cap_ipc_lock capability for systemd_nspawn in mock
This commit is contained in:
parent
8d9439d89e
commit
fac83ee9d9
2 changed files with 48 additions and 1 deletions
|
@ -0,0 +1,44 @@
|
||||||
|
include('/etc/mock/{{ chroot }}.cfg')
|
||||||
|
|
||||||
|
config_opts['root'] = '{{ task_id }}'
|
||||||
|
|
||||||
|
config_opts['nspawn_args'] = ['--capability=cap_ipc_lock']
|
||||||
|
|
||||||
|
{% if buildroot_pkgs %}
|
||||||
|
config_opts['chroot_additional_packages'] = '{{ buildroot_pkgs| join(" ") }}'
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if enable_net %}
|
||||||
|
config_opts['rpmbuild_networking'] = True
|
||||||
|
config_opts['use_host_resolv'] = True
|
||||||
|
{% else %}
|
||||||
|
config_opts['rpmbuild_networking'] = False
|
||||||
|
config_opts['use_host_resolv'] = False
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
config_opts['use_bootstrap_container'] = {{ 'True' if use_bootstrap_container else 'False' }}
|
||||||
|
|
||||||
|
{% if use_bootstrap_container %}
|
||||||
|
config_opts['bootstrap_chroot_additional_packages'] = []
|
||||||
|
config_opts['bootstrap_module_enable'] = []
|
||||||
|
config_opts['bootstrap_module_install'] = []
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if repos %}
|
||||||
|
config_opts['{{ pkg_manager_conf }}.conf'] += """
|
||||||
|
{% for repo in repos %}
|
||||||
|
[{{ repo["id"] }}]
|
||||||
|
name='{{ repo["name"] }}'
|
||||||
|
baseurl={{ repo["url"] }}
|
||||||
|
gpgcheck=0
|
||||||
|
enabled=1
|
||||||
|
skip_if_unavailable=1
|
||||||
|
metadata_expire=0
|
||||||
|
cost=1
|
||||||
|
best=1
|
||||||
|
{%- if "priority" in repo %}
|
||||||
|
priority={{ repo["priority"] }}
|
||||||
|
{%- endif %}
|
||||||
|
{% endfor %}
|
||||||
|
"""
|
||||||
|
{% endif %}
|
|
@ -67,9 +67,12 @@
|
||||||
- name: put copr-rpmbuild configuration file in the right place
|
- name: put copr-rpmbuild configuration file in the right place
|
||||||
copy: src=files/main.ini dest=/etc/copr-rpmbuild/main.ini
|
copy: src=files/main.ini dest=/etc/copr-rpmbuild/main.ini
|
||||||
|
|
||||||
- name: put rpkg configuration file in the right place
|
- name: put rpkg configuration file to the right place
|
||||||
copy: src=files/rpkg.conf dest=/etc/rpkg.conf
|
copy: src=files/rpkg.conf dest=/etc/rpkg.conf
|
||||||
|
|
||||||
|
- name: put mock child config template for copr-rpmbuild to the right place
|
||||||
|
copy: src=files/copr-rpmbuild/mock.cfg.j2 dest=/etc/copr-rpmbuild/mock.cfg.j2
|
||||||
|
|
||||||
- name: mockbuilder user
|
- name: mockbuilder user
|
||||||
user: name=mockbuilder groups=mock
|
user: name=mockbuilder groups=mock
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue