[Tarantool-patches] [PATCH 2/2] build: update CMake minimal version to 3.1

Igor Munkin imun at tarantool.org
Thu Jan 21 03:48:45 MSK 2021


I faced another strangle behaviour in rpmbuild. I rebased my WIP branch
with the new LuaJIT testing machinery on this series and the build
failed[1]. After the fix below both CI are fine: this series[2] and
LuaJIT testing machinery WIP branch[3] (except the known problem with
ASAN job).

On 20.01.21, Igor Munkin wrote:

<snipped>

> diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
> index aae60f8dc..4167ca480 100644
> --- a/rpm/tarantool.spec
> +++ b/rpm/tarantool.spec

<snipped>

> @@ -115,7 +135,7 @@ Requires: openssl
>  # RHEL <= 7 doesn't support Recommends:
>  Recommends: tarantool-devel
>  Recommends: git-core
> -Recommends: cmake >= 2.8
> +Recommends: cmake >= 3.1
>  Recommends: make
>  Recommends: gcc >= 4.5
>  Recommends: gcc-c++ >= 4.5
> @@ -147,7 +167,14 @@ C and Lua/C modules.
>  
>  %build
>  # RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly
> -%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
> +# XXX: KISS, please. I can play with RPM macros to redefine %cmake
> +# macro for cmake3 usage, but it totally doesn't worth it.

If there is %cmake in *comment* then the branching below is ignored (I guess)
and the build is broken since the old CMake is used. Well, I can state nothing
with certainty, but if I remove % sign everything works. This is ridiculous.
Here is the iterative fix:

================================================================================

diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index 9774dca..f1ad949 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -168,7 +168,7 @@ C and Lua/C modules.
 
 %build
 # RHBZ #1301720: SYSCONFDIR an LOCALSTATEDIR must be specified explicitly
-# XXX: KISS, please. I can play with RPM macros to redefine %cmake
+# XXX: KISS, please. I can play with RPM macros to redefine cmake
 # macro for cmake3 usage, but it totally doesn't worth it.
 %if %use_cmake3
 %cmake3 \

================================================================================

Fixed, squashed, force pushed to the remote branches.

> +%if %use_cmake3
> +%cmake3 \
> +%else
> +%cmake \
> +%endif
> +       . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
>           -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
>           -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
>  %if %{with backtrace}
> -- 
> 2.25.0
> 

[1]: https://gitlab.com/tarantool/tarantool/-/pipelines/244558416
[2]: https://gitlab.com/tarantool/tarantool/-/pipelines/244656467
[3]: https://gitlab.com/tarantool/tarantool/-/pipelines/244657524

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list