ensure compatibility with rpm before and after 4.20

When backporting the gating changes in Fedora, I found out that they are
not backwards compatible with odl RPM. While I could just roll back the
incomptabile changes as I did in that older Fedora branch, I'm not going
to do that. Because this branch is supposed to be upstream of the eln
brnach with Fedora that includes the new RPM version, this should make
the testing run both with older and newer RPM versions.
This commit is contained in:
Michal Pospíšil 2025-08-28 00:00:54 +02:00
parent 39906cf8c3
commit 9c6cb5d965

View File

@ -4,6 +4,9 @@ set -eo xtrace
cd $TMT_SOURCE_DIR
# Use stamp file to abort if this script already ran
if [ -e tests-prepared-stamp ]; then exit 0; fi
# tmt patched the sources with rpmbuild, but RPM<4.20 still leaves the SPECPARTS
# folder, remove it
rm -rfv *SPECPARTS
# RPM 4.20 changed the builddir structure - unpacked sources go to *-build but
# tmt copies them back to pcs-*, so the pcs-*-build folder is empty
# Remove pcs-web-ui, pcs-*-build for "cd pcs-*" to have exactly one match
@ -12,8 +15,6 @@ cd pcs-*/
# Run autotools, use bundled dependencies from the system
export PYTHONPATH=/usr/lib/pcs/pcs_bundled/packages/
export GEM_HOME=/usr/lib/pcsd/vendor/bundle/
# We need to use cd pcs-* because when pcs-web-ui starts using autotools, running
# autogen and configure with expanded TMT_SOURCE_DIR will match that too
./autogen.sh
./configure --enable-local-build --enable-use-local-cache-only \
--enable-individual-bundling --enable-webui --with-pcs-lib-dir=/usr/lib