From 673df1ccd51e77c2dc6ffc082638686a33d5750f Mon Sep 17 00:00:00 2001 From: clime Date: Wed, 18 Jan 2017 17:30:04 +0100 Subject: [PATCH] copr: stop using yum-deprecated and install python2-modulemd from official fedora repos Note that copr-backend is installed from @copr/copr repo. That however needs lighttpd to be already running unless package is retrieved from a local filepath. That's why we add additional local-filesystem path repofile for @copr/copr. --- .../yum/_copr_@modularity-modulemd.custom.repo | 12 ------------ roles/copr/backend/files/yum/copr_local.repo | 10 ++++++++++ roles/copr/backend/tasks/main.yml | 16 ++++------------ roles/copr/base/files/yum/copr.repo | 16 +++++++--------- 4 files changed, 21 insertions(+), 33 deletions(-) delete mode 100644 roles/copr/backend/files/yum/_copr_@modularity-modulemd.custom.repo create mode 100644 roles/copr/backend/files/yum/copr_local.repo diff --git a/roles/copr/backend/files/yum/_copr_@modularity-modulemd.custom.repo b/roles/copr/backend/files/yum/_copr_@modularity-modulemd.custom.repo deleted file mode 100644 index 3799020ba4..0000000000 --- a/roles/copr/backend/files/yum/_copr_@modularity-modulemd.custom.repo +++ /dev/null @@ -1,12 +0,0 @@ -[group_modularity-modulemd_custom] -name=Copr Modularity repo -failovermethod=priority -baseurl=file:///var/lib/copr/public_html/results/@modularity/modulemd/fedora-$releasever-x86_64/ - http://209.132.184.48/results/@modularity/modulemd/fedora-$releasever-x86_64/ - https://copr-be.cloud.fedoraproject.org/results/@modularity/modulemd/fedora-$releasever-x86_64/ - http://172.25.32.109/results/@modularity/modulemd/fedora-$releasever-x86_64/ - -gpgcheck=1 -gpgkey=https://copr-be.cloud.fedoraproject.org/results/@modularity/modulemd/pubkey.gpg -enabled=1 -skip_if_unavailable=1 diff --git a/roles/copr/backend/files/yum/copr_local.repo b/roles/copr/backend/files/yum/copr_local.repo new file mode 100644 index 0000000000..e7a27dcd19 --- /dev/null +++ b/roles/copr/backend/files/yum/copr_local.repo @@ -0,0 +1,10 @@ +[group_copr-copr_local] +name=group_copr-copr_local +baseurl=file:///var/lib/copr/public_html/results/@copr/copr/fedora-$releasever-x86_64/ +type=rpm-md +gpgcheck=1 +gpgkey=file:///var/lib/copr/public_html/results/@copr/copr/pubkey.gpg +enabled=1 +enabled_metadata=1 +skip_if_unavailable=True +priority=1 diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 18a1d34340..d049173cfe 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -5,24 +5,16 @@ - name: setup networking include: "network.yml" -- name: install copr modularity repofile - copy: src="yum/_copr_@modularity-modulemd.custom.repo" dest="/etc/yum.repos.d/_copr_@modularity-modulemd.custom.repo" +- name: install copr local path repo + copy: src="yum/copr_local.repo" dest="/etc/yum.repos.d/copr_local.repo" tags: - config -- name: install python2-modulemd - shell: yum-deprecated install -y python2-modulemd || yum install -y python2-modulemd - -# BZ 1241507 -- name: install copr-backend - shell: yum-deprecated install -y copr-backend || yum install -y copr-backend -- name: install copr-selinux - shell: yum-deprecated install -y copr-selinux || yum install -y copr-selinux - - name: add packages for copr backend dnf: state=present name={{ item }} with_items: - #- copr-backend + - copr-backend + - copr-selinux - python-novaclient - python-glanceclient - python-neutronclient diff --git a/roles/copr/base/files/yum/copr.repo b/roles/copr/base/files/yum/copr.repo index ec3d508573..93a7386cef 100644 --- a/roles/copr/base/files/yum/copr.repo +++ b/roles/copr/base/files/yum/copr.repo @@ -1,12 +1,10 @@ -[Copr] -name=Copr -failovermethod=priority -baseurl=file:///var/lib/copr/public_html/results/@copr/copr/fedora-$releasever-x86_64/ - http://209.132.184.48/results/@copr/copr/fedora-$releasever-x86_64/ - https://copr-be.cloud.fedoraproject.org/results/@copr/copr/fedora-$releasever-x86_64/ - http://172.25.32.109/results/@copr/copr/fedora-$releasever-x86_64/ - +[group_copr-copr] +name=Copr repo for copr owned by @copr +baseurl=https://copr-be.cloud.fedoraproject.org/results/@copr/copr/fedora-$releasever-$basearch/ +type=rpm-md +skip_if_unavailable=True gpgcheck=1 gpgkey=https://copr-be.cloud.fedoraproject.org/results/@copr/copr/pubkey.gpg +repo_gpgcheck=0 enabled=1 -skip_if_unavailable=1 +enabled_metadata=1