| |
@@ -92,10 +92,23 @@
|
| |
"_sourcedir {{tenv_workdir}}/" --define "_builddir {{srcdir}}"
|
| |
when: not fetch_only
|
| |
|
| |
+ # https://github.com/rpm-software-management/rpm/issues/3147#issuecomment-2154192419
|
| |
+ # handles rpm 4.20 adding another level of build directory nesting
|
| |
+ - name: Discover the build directory
|
| |
+ shell: |
|
| |
+ rpmbuild -bc --short-circuit --define "_builddir {{srcdir}}" \
|
| |
+ --define "__spec_build_pre echo XXX %{_builddir}; exit 0" \
|
| |
+ {{tenv_workdir}}/*.spec | grep XXX | cut -d" " -f2
|
| |
+ register: builddir
|
| |
+ when:
|
| |
+ - flatten
|
| |
+ - not fetch_only
|
| |
+
|
| |
- name: Flatten sources
|
| |
shell: |
|
| |
shopt -s dotglob
|
| |
- mv {{ srcdir }}/*/* {{ srcdir }}
|
| |
+ mv {{ builddir.stdout }}/*/*/* {{ builddir.stdout }}
|
| |
when:
|
| |
- flatten
|
| |
- not fetch_only
|
| |
+ - "rpm_vercheck.rc == 0"
|
| |
RPM 4.19.90 (4.20 alpha 1) introduced per-build directories,
which adds one more level to the build directory nesting that
this is trying to flatten out. This uses a trick provided by
@pmatilai to discover the true build directory; he says this
works on both old and new RPM. We then flatten relative to that
directory.
Signed-off-by: Adam Williamson awilliam@redhat.com