From: Zdenek Kabelac Date: Thu, 11 Apr 2024 23:10:49 +0000 (+0200) Subject: spec: replace exists macro with plain shell test X-Git-Tag: v2_03_24~216 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=fcfbef26e4505d5c92b7de267f404b7c544f87aa;p=lvm2.git spec: replace exists macro with plain shell test seems this macro works only with recent rpm. --- diff --git a/spec/macros.inc b/spec/macros.inc index d4e99e6ae..4d8f77bdb 100644 --- a/spec/macros.inc +++ b/spec/macros.inc @@ -81,3 +81,13 @@ fi \ %%endif \ : \ %%{nil} + +############################################################# +# +# Disable event_activation when creating packages for system +# with installed lvm2-testsuite +# +# This is used for internal package testing to avoid +# updating lvm.conf after test suite installation. +# +%define lvm2_testsuite_build %( test -d /usr/share/lvm2-testsuite && echo 0 || echo 1 ) diff --git a/spec/source.inc b/spec/source.inc index 552752636..f55698015 100644 --- a/spec/source.inc +++ b/spec/source.inc @@ -15,19 +15,7 @@ %global enable_lvmlockd_dlm 0 %global enable_lvmlockd_sanlock 0 -############################################################# -# -# Disable event_activation when creating packages for system -# with installed lvm2-testsuite -# -# This is used for internal package testing to avoid -# updating lvm.conf after test suite installation. -# -%if %{exists:/usr/share/lvm2-testsuite/lib/lvm} - %with default-event-activation 0 -%else - %with default-event-activation 1 -%endif +%with default-event-activation %{lvm2_testsuite_build} %if %{enable_udev} %service lvmpolld 1