From: Scott Mayhew <smayhew@redhat.com>
To: kdevops@lists.linux.dev
Subject: [PATCH 2/2] gitr: Make gitr work on RHEL/CentOS
Date: Tue, 3 Sep 2024 10:48:47 -0400 [thread overview]
Message-ID: <20240903144847.355326-2-smayhew@redhat.com> (raw)
In-Reply-To: <20240903144847.355326-1-smayhew@redhat.com>
RHEL and CentOS do not ship cvsps or perl-TAP-Harness-Archive. For the
former, we'll have to build it from git. For the latter, we can install
it from CPAN, but we'll also have to install the perl-App-cpanminus
package to do so.
Also add 'make' and 'tar' to the dependencies list. These were
previously getting installed inadvertently by the "Install btrfs-progs"
task in playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml,
which was installing more than just btrfs-progs.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
playbooks/roles/gitr/defaults/main.yml | 3 ++
playbooks/roles/gitr/tasks/main.yml | 62 ++++++++++++++++++++++++++
playbooks/roles/gitr/vars/RedHat.yml | 7 ++-
3 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/playbooks/roles/gitr/defaults/main.yml b/playbooks/roles/gitr/defaults/main.yml
index bcfbaef..ff737ca 100644
--- a/playbooks/roles/gitr/defaults/main.yml
+++ b/playbooks/roles/gitr/defaults/main.yml
@@ -18,3 +18,6 @@ gitr_thread_single: false
gitr_thread_fast: false
gitr_thread_stress: false
gitr_thread_custom: false
+
+cvsps_git: https://github.com/andreyvit/cvsps.git
+cvsps_data: "{{ data_path }}/cvsps"
diff --git a/playbooks/roles/gitr/tasks/main.yml b/playbooks/roles/gitr/tasks/main.yml
index 330350c..2eafeaa 100644
--- a/playbooks/roles/gitr/tasks/main.yml
+++ b/playbooks/roles/gitr/tasks/main.yml
@@ -11,6 +11,11 @@
failed_when: false
tags: vars
+- name: Set up the /data mount point
+ tags: ['data_partition']
+ ansible.builtin.include_role:
+ name: create_data_partition
+
- name: Set the name of the test group
tags: vars
ansible.builtin.set_fact:
@@ -42,6 +47,20 @@
paths:
- 'vars'
+- name: Update gitr depencies for RHEL/Centos
+ tags: gitr
+ ansible.builtin.set_fact:
+ gitr_packages: "{{ gitr_packages + ['perl-App-cpanminus'] }}"
+ when:
+ - ansible_distribution != "Fedora"
+
+- name: Update gitr dependencies for Fedora
+ tags: gitr
+ ansible.builtin.set_fact:
+ gitr_packages: "{{ gitr_packages + ['cvsps', 'perl-TAP-Harness-Archive'] }}"
+ when:
+ - ansible_distribution == "Fedora"
+
- name: Install dependencies for gitr
tags: gitr
become: true
@@ -51,6 +70,49 @@
name: "{{ gitr_packages }}"
state: present
+- name: Install CPAN modules for gitr
+ tags: gitr
+ become: true
+ become_flags: 'su - -c'
+ become_method: ansible.builtin.sudo
+ community.general.cpanm:
+ name: "{{ item }}"
+ with_items: "{{ gitr_cpan_modules }}"
+ when:
+ - ansible_distribution != "Fedora"
+
+- name: git clone cvsps
+ tags: gitr
+ ansible.builtin.git:
+ repo: "{{ cvsps_git }}"
+ dest: "{{ cvsps_data }}"
+ update: true
+ retries: 3
+ delay: 5
+ register: result
+ until: not result.failed
+ when:
+ - ansible_distribution != "Fedora"
+
+- name: Build cvsps
+ tags: gitr
+ community.general.make:
+ chdir: "{{ cvsps_data }}"
+ jobs: "{{ ansible_processor_nproc }}"
+ when:
+ - ansible_distribution != "Fedora"
+
+- name: Install cvsps
+ tags: gitr
+ become: true
+ become_flags: 'su - -c'
+ become_method: ansible.builtin.sudo
+ community.general.make:
+ target: install
+ chdir: "{{ cvsps_data }}"
+ when:
+ - ansible_distribution != "Fedora"
+
- name: Set up an iSCSI initiator on the target node
ansible.builtin.include_role:
name: iscsi
diff --git a/playbooks/roles/gitr/vars/RedHat.yml b/playbooks/roles/gitr/vars/RedHat.yml
index 57f2f35..caf9840 100644
--- a/playbooks/roles/gitr/vars/RedHat.yml
+++ b/playbooks/roles/gitr/vars/RedHat.yml
@@ -1,7 +1,6 @@
---
gitr_packages:
- cvs
- - cvsps
- expat-devel
- gcc
- gettext
@@ -9,11 +8,15 @@ gitr_packages:
- git-email
- glibc-utils
- libcurl-devel
+ - make
- openssl-devel
- perl-Memoize
- - perl-TAP-Harness-Archive
- perl-Test-Harness
- perl-Test-Simple
- subversion
- subversion-perl
+ - tar
- zlib-devel
+
+gitr_cpan_modules:
+ - TAP::Harness::Archive
--
2.44.0
next prev parent reply other threads:[~2024-09-03 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 14:48 [PATCH 1/2] devconfig/redhat: Fix up a few issues with the install-deps playbook Scott Mayhew
2024-09-03 14:48 ` Scott Mayhew [this message]
2024-09-04 15:38 ` [PATCH 2/2] gitr: Make gitr work on RHEL/CentOS Chuck Lever
2024-09-04 18:07 ` Scott Mayhew
2024-09-04 18:38 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240903144847.355326-2-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox