From caadae524360efe6953cd458d4e29172ac4eee58 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 26 Jan 2022 13:47:56 +0100 Subject: [PATCH] copr-builder: another rpkg-util v3+ fix Try to set the defaults according to the /etc/rpkg.conf. --- .../templates/provision/copr-rpmbuild/main.ini.j2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/copr/backend/templates/provision/copr-rpmbuild/main.ini.j2 b/roles/copr/backend/templates/provision/copr-rpmbuild/main.ini.j2 index 3c0ca5d1e9..41c39e411d 100644 --- a/roles/copr/backend/templates/provision/copr-rpmbuild/main.ini.j2 +++ b/roles/copr/backend/templates/provision/copr-rpmbuild/main.ini.j2 @@ -1,10 +1,12 @@ +{% if copr_builder_fedora_version == 34 %} +# rpkg-util v2 + [main] frontend_url = {{ frontend_base_url }} distgit_lookaside_url = {scheme}://{netloc}/repo/pkgs/%(ns1)s/%(name)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s distgit_clone_url = {scheme}://{netloc}/%(module)s rpm_vendor_copr_name = {{ rpm_vendor_copr_name }} -{% if copr_builder_fedora_version == 34 %} [distgit0] distgit_hostname_pattern = src.fedoraproject.org distgit_lookaside_url = https://src.fedoraproject.org/repo/pkgs/%(ns1)s/%(name)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s @@ -28,6 +30,12 @@ distgit_clone_url = https://src.stg.fedoraproject.org/%(module)s {% else %} # rpkg-util v3+ +[main] +frontend_url = {{ frontend_base_url }} +distgit_lookaside_url = https://${git_props:remote_netloc}/repo/pkgs/%(repo_path)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s +distgit_clone_url = {scheme}://{netloc}/%(repo_path)s +rpm_vendor_copr_name = {{ rpm_vendor_copr_name }} + [distgit0] distgit_hostname_pattern = src.fedoraproject.org distgit_lookaside_url = https://src.fedoraproject.org/repo/pkgs/%(repo_path)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s