]> sourceware.org Git - lvm2.git/commitdiff
spec: replace exists macro with plain shell test
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 11 Apr 2024 23:10:49 +0000 (01:10 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 11 Apr 2024 23:27:26 +0000 (01:27 +0200)
seems this macro works only with recent rpm.

spec/macros.inc
spec/source.inc

index d4e99e6ae0a19cd17726709957cf980494a47840..4d8f77bdbffe4a45578f3c97f55bbd34d56293d7 100644 (file)
@@ -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 )
index 552752636124c48627bccde22118bbcb38367dea..f5569801572417f70a5c275c2a652a3169eb906f 100644 (file)
 %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
This page took 0.043362 seconds and 5 git commands to generate.