From 7fed2599294558cb7a21cf1a88cd832735d3efd3 Mon Sep 17 00:00:00 2001
From: Fabien Boucher <fboucher@redhat.com>
Date: Nov 16 2021 09:53:12 +0000
Subject: [PATCH 1/3] Remove usage of ansible_user_dir from rpm-lint role


---

diff --git a/roles/rpm-lint/tasks/main.yaml b/roles/rpm-lint/tasks/main.yaml
index 3501c35..545bd66 100644
--- a/roles/rpm-lint/tasks/main.yaml
+++ b/roles/rpm-lint/tasks/main.yaml
@@ -8,19 +8,21 @@
 - name: Fetch rpms
   get_url:
     url: "{{ item }}"
-    dest: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/"
+    dest: "{{ zuul.project.src_dir }}/"
   loop: "{{ rpms }}"
 
 - name: Fetch srpm
   get_url:
     url: "{{ srpm }}"
-    dest: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/"
+    dest: "{{ zuul.project.src_dir }}/"
   when: srpm is defined
 
 - name: Get rpmlintrc path
-  shell: ls {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/*.rpmlintrc
+  shell: ls *.rpmlintrc
   register: rpmlintrc_check
   ignore_errors: yes
+  args:
+    chdir: "{{ zuul.project.src_dir }}"
 
 - name: Set rpmlintrc path fact
   set_fact:
@@ -30,4 +32,4 @@
 - name: Run rpmlint
   shell: rpmlint {% if rpmlintrc | default("") %} --file {{ rpmlintrc }} {% endif %} ./*.spec ./*.rpm
   args:
-    chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
+    chdir: "{{ zuul.project.src_dir }}"

From 161f01e9af41223f175f73ad42d10636b0ee9ee6 Mon Sep 17 00:00:00 2001
From: Fabien Boucher <fboucher@redhat.com>
Date: Nov 16 2021 14:46:20 +0000
Subject: [PATCH 2/3] Remove usage of ansible_user_dir in rpminspect role


---

diff --git a/roles/rpminspect/defaults/main.yaml b/roles/rpminspect/defaults/main.yaml
index 6500c43..6284714 100644
--- a/roles/rpminspect/defaults/main.yaml
+++ b/roles/rpminspect/defaults/main.yaml
@@ -4,7 +4,7 @@ koji_cmd: koji
 rpminspect_cmd: rpminspect
 rpminspect_opts: ""
 rpminspect_data_pkg: rpminspect-data-fedora
-# If set to true a valid koji client config must be stored in {{ ansible_user_dir }}/koji.conf
+# If set to true a valid koji client config must be stored in {{ ansible_env.HOME }}/koji.conf
 use_alternate_koji_config: false
 zuul_output_dir: "{{ ansible_user_dir }}/zuul-output"
 check_previous_build_enabled: false
diff --git a/roles/rpminspect/tasks/main.yaml b/roles/rpminspect/tasks/main.yaml
index e238c29..9b8dbad 100644
--- a/roles/rpminspect/tasks/main.yaml
+++ b/roles/rpminspect/tasks/main.yaml
@@ -16,7 +16,7 @@
 
 - name: Set alternate koji command configuration file
   set_fact:
-    koji_config: "-c {{ ansible_user_dir }}/koji.conf"
+    koji_config: "-c {{ ansible_env.HOME }}/koji.conf"
   when: use_alternate_koji_config
 
 - name: Update ClamAV virus database
@@ -30,7 +30,7 @@
     - name: Discover package name from specfile name
       shell: ls *.spec | sed 's/\.spec$//'
       args:
-        chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
+        chdir: "{{ zuul.project.src_dir }}"
       register: get_package_name
 
     - set_fact:
@@ -77,11 +77,11 @@
   shell: test -f rpminspect.yaml && cat rpminspect.yaml
   failed_when: false
   args:
-    chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
+    chdir: "{{ zuul.project.src_dir }}"
 
 - name: Run rpminspect
   command: |
     {{ rpminspect_cmd }} {{ rpminspect_opts }} -w {{ workdir }} -Dv -k -t BAD -a {{ arches }} -o {{ zuul_output_dir }}/logs/result.json -F json
     {{ previous_build_path }} {{ workdir }}/{{ baserpmname }}
   args:
-    chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
+    chdir: "{{ zuul.project.src_dir }}"
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index 590bed6..8d1a21b 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -147,7 +147,6 @@
     description: |
       Job to run rpminspect on rpms from a repo artifact
     requires: repo
-    pre-run: playbooks/ensure-output-dirs.yaml
     run: playbooks/rpm/rpminspect.yaml
     post-run:
       - playbooks/rpm/rpminspect-json2html.yaml

From b2359d110617c6870cd8f2c3d77af504dcdd2563 Mon Sep 17 00:00:00 2001
From: Fabien Boucher <fboucher@redhat.com>
Date: Nov 16 2021 14:46:21 +0000
Subject: [PATCH 3/3] Change nodeset for extra tests


---

diff --git a/zuul-extra.d/jobs.yaml b/zuul-extra.d/jobs.yaml
index 9c572ce..dea11a8 100644
--- a/zuul-extra.d/jobs.yaml
+++ b/zuul-extra.d/jobs.yaml
@@ -12,4 +12,4 @@
     nodeset:
       nodes:
         - name: fedora-node
-          label: cloud-fedora-30-small
+          label: cloud-fedora-34-small

