{% from "_helpers.html" import render_field, render_form_errors, copr_details_href, copr_url %} {% macro copr_form(form, view, copr = None, username = None, group = None) %} {# if using for updating, we need to pass name to url_for, but otherwise we need to pass nothing #} {{ render_form_errors(form) }}
{{ form.csrf_token }} {{ render_field(form.id, hidden = True) }}

1. Project information

{% if group %} {% endif %} {% if copr is none %} {{ render_field(form.name, label='Project Name', required = True, class="required") }} {% else %} {{ render_field(form.name, hidden = True) }} {{ render_field(form.name, label='Project Name', disabled = True) }} {% endif %} {{ render_field(form.description, rows=5, cols=50, placeholder='Optional - describe your project briefly.', info='You can use markdown syntax, inline HTML is forbidden.') }} {{ render_field(form.instructions, rows=5, cols=50, placeholder='Optional - describe how your project can be installed. Where users can report bugs and issues. Link to wiki is good as well.', info='You can use markdown syntax, inline HTML is forbidden.') }} {{ render_field(form.homepage, label='Homepage', placeholder='Optional - project homepage') }} {{ render_field(form.contact, label='Contact', placeholder='Optional - email address or contact url', info="Use e-mail address or a link to your issue tracker. This information will be shown publicly.") }}

2. Build options

{% if form.errors["chroots"] %}
{% else %}
{% endif %}
{% for group_set, chs in form.chroots_sets.items() %}{% for ch in chs %}
{% endfor %}{% endfor %} {% if form.errors["chroots"] %} {{ form.errors["chroots"] |join(". ") }} {% endif %}
{{ render_field(form.repos, rows=5, cols=50, placeholder='Optional - URL to additional yum repos, which can be used during build. Space separated. This should be baseurl from .repo file. E.g.: http://copr-be.cloud.fedoraproject.org/results/rhughes/f20-gnome-3-12/fedora-$releasever-$basearch/') }}
Available variables to expand (with example value):
  • $chroot (fedora-21-x86_64)
  • $releasever (21)
  • $basearch (x86-64)
  • $distname (fedora)

To reference another Copr use:
  • copr://user/project
{{ form.disable_createrepo }} Create repositories manually
Repository meta data is normally refreshed after each build. If you want to do this manually, check the option above.
{{ form.build_enable_net }} Enable internet access during builds
{% if g.user.admin %}
{{ form.auto_prune }} Old builds will be deleted automatically Build will be deleted only if there is a newer build (with respect to package version) and it is older than 14 days
{% endif %}
{{ form.unlisted_on_hp }} Project will not be listed on home page
{% if g.user.admin and not copr %} {# the following setting is available only for admins on creating a new project #}
{{ form.persistent }} Protect project and its builds against deletion
Project's builds and the project itself cannot be deleted by any means. This option is set once and for all.
{% endif %} {% if g.user.admin and copr %} {# let an admin see the status of the 'Persistent builds' field but do not let him change the preset value #}
{{ form.persistent(disabled=True) }} Protect project and its builds against deletion
This option cannot be altered after a project has been created.
{% endif %}
{{ form.use_bootstrap_container }} Enable mock's use_bootstrap_container experimental feature This will make the build slower but it has an advantage that the dnf _from_ the given chroot will be used to setup the chroot (otherwise host system dnf and rpm is used)
{% if copr is none %}{# we're creating the copr, so display initial builds area #}

3. (Optional) initial builds

{{ render_field(form.initial_pkgs, rows=5, cols=50, placeholder='Optional - list of src.rpm to build initially. Can be skipped and submitted later.') }}
{% endif %} {% endmacro %} {% macro copr_delete_form(form, copr) %}
{{ form.csrf_token }} {{ render_form_errors(form) }}
{{ form.verify(class="form-control") }}
{% endmacro %} {% macro copr_permissions_form(form, copr, permissions) %} {% if permissions %}
{{ form.csrf_token }} {% for perm in permissions %} {% endfor %}
Username Is Builder Is Admin
{{ perm.user.name }} {{ perm.copr_builder|perm_type_from_num }} {% if perm.copr_builder != 0 %} {{ form['copr_builder_{0}'.format(perm.user.id)] }} {% endif %} {{ perm.copr_admin|perm_type_from_num }} {% if perm.copr_admin != 0 %} {{ form['copr_admin_{0}'.format(perm.user.id)] }} {% endif %}
{% endif %} {% endmacro %} {% macro copr_legal_flag_form(form, copr) %} {% endmacro %} {% macro copr_fork_form(form, copr, confirm) %}
{% if confirm %} {% endif %} {{ render_field(form.source, disabled = True) }} {{ render_field(form.source, hidden = True) }} {{ render_field(form.owner) }} {{ render_field(form.name, info="If you enter the name of your existing project, then only new packages and builds from source project will be forked into yours.") }} {{ form.csrf_token }}
{% endmacro %}