Accepting request 1134049 from home:dimstar:cmake
- Add ceph-cmake-3.28.patch: Fix build with cmake 3.28 and no git command found (https://github.com/ceph/ceph/pull/54963). OBS-URL: https://build.opensuse.org/request/show/1134049 OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=354
This commit is contained in:
parent
7b72fb8725
commit
c2218001dc
38
ceph-cmake-3.28.patch
Normal file
38
ceph-cmake-3.28.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
commit 8615731637a116f7b9299c6122a0e058d43a4f6d
|
||||||
|
Author: Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
Date: Tue Dec 19 13:28:29 2023 +0100
|
||||||
|
|
||||||
|
cmake: Ensure git exists before executing it
|
||||||
|
|
||||||
|
CMake 3.28 has turned stricter when executing string(REPLACE …) and
|
||||||
|
expects four or more commands. In case of distro package builds from
|
||||||
|
tarball, it happens that git is not present. CTags.cmake tries to
|
||||||
|
catch that by veriying the exit status of the command, but as there
|
||||||
|
is in fact git | awk, awk returns 0 even when git does not exist.
|
||||||
|
|
||||||
|
Ensure that the variable submodules has been defined before trying
|
||||||
|
to replace substrings in this variable.
|
||||||
|
|
||||||
|
Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
diff --git a/cmake/modules/CTags.cmake b/cmake/modules/CTags.cmake
|
||||||
|
index c3e1b3799b0..772f647f947 100644
|
||||||
|
--- a/cmake/modules/CTags.cmake
|
||||||
|
+++ b/cmake/modules/CTags.cmake
|
||||||
|
@@ -3,13 +3,14 @@ find_program(CTAGS_EXECUTABLE ctags)
|
||||||
|
function(add_tags name)
|
||||||
|
cmake_parse_arguments(TAGS "" "SRC_DIR;TAG_FILE" "EXCLUDE_OPTS;EXCLUDES" ${ARGN})
|
||||||
|
set(excludes ${TAGS_EXCLUDES})
|
||||||
|
+ find_package(Git)
|
||||||
|
if(TAGS_EXCLUDE_OPTS)
|
||||||
|
# always respect EXCLUDES_OPTS
|
||||||
|
list(APPEND excludes ${TAGS_EXCLUDE_OPTS})
|
||||||
|
- else()
|
||||||
|
+ elseif(Git_FOUND)
|
||||||
|
# exclude the submodules under SRC_DIR by default
|
||||||
|
execute_process(
|
||||||
|
- COMMAND git config --file .gitmodules --get-regexp path
|
||||||
|
+ COMMAND ${GIT_EXECUTABLE} config --file .gitmodules --get-regexp path
|
||||||
|
COMMAND awk "/${TAGS_SRC_DIR}/ { print $2 }"
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE result_code
|
@ -155,6 +155,8 @@ Group: System/Filesystems
|
|||||||
%endif
|
%endif
|
||||||
URL: http://ceph.com/
|
URL: http://ceph.com/
|
||||||
Source0: %{?_remote_tarball_prefix}ceph-16.2.14-66-g7aa6ce9419f.tar.bz2
|
Source0: %{?_remote_tarball_prefix}ceph-16.2.14-66-g7aa6ce9419f.tar.bz2
|
||||||
|
# PATCH-FIX-UPSTREAM ceph-cmake-3.28.patch -- Fix build with cmake 3.28 but without git
|
||||||
|
Patch0: ceph-cmake-3.28.patch
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
Source92: ceph-rpmlintrc
|
Source92: ceph-rpmlintrc
|
||||||
Source93: checkin.sh
|
Source93: checkin.sh
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 19 12:33:41 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Add ceph-cmake-3.28.patch: Fix build with cmake 3.28 and no git
|
||||||
|
command found (https://github.com/ceph/ceph/pull/54963).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 11 09:06:12 UTC 2023 - Tim Serong <tserong@suse.com>
|
Mon Sep 11 09:06:12 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||||
|
|
||||||
|
@ -155,6 +155,8 @@ Group: System/Filesystems
|
|||||||
%endif
|
%endif
|
||||||
URL: http://ceph.com/
|
URL: http://ceph.com/
|
||||||
Source0: %{?_remote_tarball_prefix}ceph-16.2.14-66-g7aa6ce9419f.tar.bz2
|
Source0: %{?_remote_tarball_prefix}ceph-16.2.14-66-g7aa6ce9419f.tar.bz2
|
||||||
|
# PATCH-FIX-UPSTREAM ceph-cmake-3.28.patch -- Fix build with cmake 3.28 but without git
|
||||||
|
Patch0: ceph-cmake-3.28.patch
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# _insert_obs_source_lines_here
|
# _insert_obs_source_lines_here
|
||||||
ExclusiveArch: x86_64 aarch64 ppc64le s390x riscv64
|
ExclusiveArch: x86_64 aarch64 ppc64le s390x riscv64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user