From b37aac3bf580faa19ce215f431aaccbf45111a89 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jan 13 2026 23:10:14 +0000 Subject: Make "Discover the build directory" work on RPM 4.14 (RHEL 8) The RPM on RHEL 8 errors otherwise. Without --define _sourcedir: error: Bad source: /root/rpmbuild/SOURCES/urllib3-1.24.2.tar.gz: No such file or directory Without --nodeps: error: Failed build dependencies: python3-devel is needed by python-urllib3-1.24.2-9.el8.noarch python3-mock is needed by python-urllib3-1.24.2-9.el8.noarch python3-nose is needed by python-urllib3-1.24.2-9.el8.noarch python3-pysocks is needed by python-urllib3-1.24.2-9.el8.noarch python3-pytest is needed by python-urllib3-1.24.2-9.el8.noarch python3-six is needed by python-urllib3-1.24.2-9.el8.noarch --- diff --git a/roles/standard-test-source/tasks/main.yml b/roles/standard-test-source/tasks/main.yml index a4c6a9a..dfd8515 100644 --- a/roles/standard-test-source/tasks/main.yml +++ b/roles/standard-test-source/tasks/main.yml @@ -96,7 +96,9 @@ # handles rpm 4.20 adding another level of build directory nesting - name: Discover the build directory shell: | - rpmbuild -bc --short-circuit --define "_builddir {{srcdir}}" \ + rpmbuild --nodeps -bc --short-circuit \ + --define "_builddir {{srcdir}}" \ + --define "_sourcedir {{tenv_workdir}}/" \ --define "__spec_build_pre echo XXX %{_builddir}; exit 0" \ {{tenv_workdir}}/*.spec | grep XXX | cut -d" " -f2 register: builddir