Skip to content

Commit f1e54dd

Browse files
ppisarkontura
authored andcommitted
spec: Work around a bug in ctest macro on RHEL 9
Building the RPM package on RHEL 9 failed like this: error: /builddir/build/originals/libdnf.spec: line 238: Unknown option V in ctest(:-:) The failure was introduced with commit a067e64 ("spec: Consistently use CMake RPM macros"). The cause is a bug in a defintion of the ctest macro provided with cmake-rpm-macros-3.26.5-2.el9.noarch by RHEL 9 <https://issues.redhat.com/browse/RHEL-120543>. This patch works around the bug by redefining the macro while accepting any options.
1 parent 771c409 commit f1e54dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libdnf.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ popd
226226
%endif
227227

228228
%check
229+
%if 0%{?rhel} == 9 && %{defined ctest}
230+
# Work around broken passing options to ctest macro, RHEL-120543
231+
%global ctest(-) %{expand:%{macrobody:ctest}}
232+
%endif
229233
%if %{with python2}
230234
pushd build-py2
231235
%ctest -V

0 commit comments

Comments
 (0)