Skip to content

Commit

Permalink
spec: Correct setting -DENABLE_SELINUX cmake argument
Browse files Browse the repository at this point in the history
%{?need_selinux:ON} always expanded to "ON" because %{?} tests whether
a macro is defined. Not whether it is true.

The fixed problem is so far only cosmetic becasue CMakeLists.txt
ignores ENABLE_SELINUX if USE_GPGME cannot be enabled.
  • Loading branch information
ppisar committed Jul 11, 2024
1 parent cdfdbb6 commit 63de114
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion librepo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ Python 3 bindings for the librepo library.
-DWITH_ZCHUNK=%{?with_zchunk:ON}%{!?with_zchunk:OFF} \
-DUSE_GPGME=%{?with_use_gpgme:ON}%{!?with_use_gpgme:OFF} \
-DUSE_RUN_GNUPG_USER_SOCKET=%{?with_run_gnupg_user_socket:ON}%{!?with_run_gnupg_user_socket:OFF} \
-DENABLE_SELINUX=%{?need_selinux:ON}%{!?need_selinux:OFF}
%if %{need_selinux}
-DENABLE_SELINUX=ON
%else
-DENABLE_SELINUX=OFF
%endif
%cmake_build

%check
Expand Down

0 comments on commit 63de114

Please sign in to comment.