diff --git a/roles/copr/dist_git/files/patches/python3-rpkg-autospec.patch b/roles/copr/dist_git/files/patches/python3-rpkg-autospec.patch new file mode 100644 index 0000000000..bda337f09f --- /dev/null +++ b/roles/copr/dist_git/files/patches/python3-rpkg-autospec.patch @@ -0,0 +1,10 @@ +--- /usr/lib/python3.10/site-packages/pyrpkg/utils.py 2022-09-06 20:05:35.000000000 +0000 ++++ /usr/lib/python3.10/site-packages/pyrpkg/utils.py 2022-09-22 19:08:16.328405267 +0000 +@@ -323,6 +323,7 @@ + + + def spec_file_processed_by_rpmautospec(file_name, dir_path=None): ++ return False + file_path = os.path.join(dir_path or "", file_name) + + try: diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index 291d405b57..cb32c54223 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -31,6 +31,11 @@ - dist-git-selinux - copr-dist-git +- name: re-allow importing autospec pre-generated srpms, https://pagure.io/copr/copr/issue/2317 + patch: src=patches/python3-rpkg-autospec.patch + dest=/usr/lib/python3.10/site-packages/pyrpkg/utils.py + tags: patches + - name: switch selinux to enforcing selinux: policy=targeted state=enforcing