import ceph-12.2.7-9.el8

This commit is contained in:
CentOS Sources 2019-08-01 12:28:57 -04:00 committed by Stepan Oksanichenko
commit e8b5265cec
11 changed files with 1732 additions and 0 deletions

1
.ceph.metadata Normal file
View File

@ -0,0 +1 @@
b6c7dec0c286679225133c4d71d00c2ae9ccb846 SOURCES/ceph-12.2.7.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/ceph-12.2.7.tar.gz

View File

@ -0,0 +1,13 @@
--- ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-04-27 01:13:46.000000000 +0100
+++ ceph-12.1.1.orig/src/rocksdb/util/murmurhash.cc 2017-07-25 11:37:28.910266684 +0100
@@ -113,8 +113,8 @@ unsigned int MurmurHash2 ( const void *
switch(len)
{
- case 3: h ^= data[2] << 16;
- case 2: h ^= data[1] << 8;
+ case 3: h ^= data[2] << 16; // fallthrough
+ case 2: h ^= data[1] << 8; // fallthrough
case 1: h ^= data[0];
h *= m;
};

View File

@ -0,0 +1,127 @@
From 2f0a7153460acc3f21462236f470ec3471fa2ee1 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Mon, 31 Jul 2017 19:50:23 +0200
Subject: [PATCH] cmake: Support ppc64
The ppc64 support requires a couple of changes:
- adding the ppc64 support to cmake
- changing optimized crc32 code to compile on ppc64le only
- moving ifdef condition before crc32_align to avoid defined but not
used warning
Signed-off-by: Boris Ranto <branto@redhat.com>
---
cmake/modules/SIMDExt.cmake | 15 ++++++++++++++-
src/CMakeLists.txt | 4 +++-
src/arch/ppc.c | 8 ++++----
src/common/crc32c_ppc.c | 6 +++---
4 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/cmake/modules/SIMDExt.cmake b/cmake/modules/SIMDExt.cmake
index 5330835..c47667d 100644
--- a/cmake/modules/SIMDExt.cmake
+++ b/cmake/modules/SIMDExt.cmake
@@ -109,7 +109,20 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|amd64|x86_64|AMD64")
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64le")
set(HAVE_PPC64LE 1)
- message(STATUS " we are ppc64le")
+ message(STATUS " we are ppc64")
+ CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
+ if(HAS_ALTIVEC)
+ message(STATUS " HAS_ALTIVEC yes")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maltivec")
+ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -maltivec")
+ endif()
+ CHECK_C_COMPILER_FLAG("-mcpu=power8" HAVE_POWER8)
+ if(HAVE_POWER8)
+ message(STATUS " HAVE_POWER8 yes")
+ endif()
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(power|ppc)64")
+ set(HAVE_PPC64 1)
+ message(STATUS " we are ppc64")
CHECK_C_COMPILER_FLAG("-maltivec" HAS_ALTIVEC)
if(HAS_ALTIVEC)
message(STATUS " HAS_ALTIVEC yes")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 66f0c14..38d1913 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -568,7 +568,9 @@ if(HAVE_INTEL)
endif(HAVE_GOOD_YASM_ELF64)
elseif(HAVE_POWER8)
list(APPEND libcommon_files
- common/crc32c_ppc.c
+ common/crc32c_ppc.c)
+elseif(HAVE_PPC64LE)
+ list(APPEND libcommon_files
common/crc32c_ppc_asm.S
common/crc32c_ppc_fast_zero_asm.S)
endif(HAVE_INTEL)
diff --git a/src/arch/ppc.c b/src/arch/ppc.c
index f21e2fe..11d3a49 100644
--- a/src/arch/ppc.c
+++ b/src/arch/ppc.c
@@ -14,10 +14,10 @@ int ceph_arch_ppc_crc32 = 0;
#include <stdio.h>
-#if __linux__ && __powerpc64__
+#ifdef HAVE_PPC64LE
#include <sys/auxv.h>
#include <asm/cputable.h>
-#endif /* __linux__ && __powerpc64__ */
+#endif /* HAVE_PPC64LE */
#ifndef PPC_FEATURE2_VEC_CRYPTO
#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
@@ -31,9 +31,9 @@ int ceph_arch_ppc_probe(void)
{
ceph_arch_ppc_crc32 = 0;
-#if __linux__ && __powerpc64__
+#ifdef HAVE_PPC64LE
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) ceph_arch_ppc_crc32 = 1;
-#endif /* __linux__ && __powerpc64__ */
+#endif /* HAVE_PPC64LE */
return 0;
}
diff --git a/src/common/crc32c_ppc.c b/src/common/crc32c_ppc.c
index 43756e2..52fd1c4 100644
--- a/src/common/crc32c_ppc.c
+++ b/src/common/crc32c_ppc.c
@@ -20,6 +20,7 @@
#define VMX_ALIGN 16
#define VMX_ALIGN_MASK (VMX_ALIGN-1)
+#ifdef HAVE_PPC64LE
#ifdef REFLECT
static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
unsigned long len)
@@ -38,7 +39,6 @@ static unsigned int crc32_align(unsigned int crc, unsigned char const *p,
}
#endif
-#ifdef HAVE_POWER8
static inline unsigned long polynomial_multiply(unsigned int a, unsigned int b) {
vector unsigned int va = {a, 0, 0, 0};
vector unsigned int vb = {b, 0, 0, 0};
@@ -134,7 +134,7 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
return crc;
}
-#else /* HAVE_POWER8 */
+#else /* HAVE_PPC64LE */
/* This symbol has to exist on non-ppc architectures (and on legacy
* ppc systems using power7 or below) in order to compile properly
@@ -145,4 +145,4 @@ uint32_t ceph_crc32c_ppc(uint32_t crc, unsigned char const *data, unsigned len)
return 0;
}
-#endif /* HAVE_POWER8 */
+#endif /* HAVE_PPC64LE */
--
2.9.4

View File

@ -0,0 +1,31 @@
From 74a754690736f6608b0d4d9c807df0bd777a129d Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Fri, 8 Dec 2017 00:21:38 +0100
Subject: [PATCH] librbd: Conditionally import TrimRequest.cc
We include TrimRequest.cc in librbd tests at two places:
- operation/test_mock_TrimRequest.cc
- operation/test_mock_ResizeRequest.cc
That causes linking errors when doing the builds because some of the
structures are defined twice.
Signed-off-by: Boris Ranto <branto@redhat.com>
---
src/librbd/operation/TrimRequest.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/librbd/operation/TrimRequest.cc b/src/librbd/operation/TrimRequest.cc
index 28f2deb..929ca51 100644
--- a/src/librbd/operation/TrimRequest.cc
+++ b/src/librbd/operation/TrimRequest.cc
@@ -362,4 +362,6 @@ void TrimRequest<I>::send_finish(int r) {
} // namespace operation
} // namespace librbd
+#ifndef TEST_F
template class librbd::operation::TrimRequest<librbd::ImageCtx>;
+#endif
--
2.9.5

View File

@ -0,0 +1,26 @@
From 5ef603f388957b472326180a1e23ade61e80c163 Mon Sep 17 00:00:00 2001
From: "Adam C. Emerson" <aemerson@redhat.com>
Date: Tue, 8 May 2018 16:50:02 -0400
Subject: [PATCH] mount: Enlarge buffer to fix overflow warning
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
---
src/mount/canonicalize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mount/canonicalize.c b/src/mount/canonicalize.c
index 7561e41ac5..02efbbedff 100644
--- a/src/mount/canonicalize.c
+++ b/src/mount/canonicalize.c
@@ -154,7 +154,7 @@ canonicalize_dm_name(const char *ptname)
{
FILE *f;
size_t sz;
- char path[256], name[256], *res = NULL;
+ char path[268], name[256], *res = NULL;
snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname);
if (!(f = fopen(path, "r")))
--
2.14.3

View File

@ -0,0 +1,33 @@
diff -ur ceph-12.2.5/src/rocksdb/CMakeLists.txt ceph-12.2.5-mod/src/rocksdb/CMakeLists.txt
--- ceph-12.2.5/src/rocksdb/CMakeLists.txt 2018-03-12 02:58:51.000000000 +0100
+++ ceph-12.2.5-mod/src/rocksdb/CMakeLists.txt 2018-05-22 19:37:31.767465710 +0200
@@ -174,15 +174,6 @@
PROPERTIES COMPILE_FLAGS "-msse4.2")
endif()
-option(FAIL_ON_WARNINGS "Treat compile warnings as errors" ON)
-if(FAIL_ON_WARNINGS)
- if(MSVC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
- else() # assume GCC
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
- endif()
-endif()
-
option(WITH_ASAN "build with ASAN" OFF)
if(WITH_ASAN)
add_definitions(-DROCKSDB_TSAN_RUN)
diff -ur ceph-12.2.5/src/rocksdb/Makefile ceph-12.2.5-mod/src/rocksdb/Makefile
--- ceph-12.2.5/src/rocksdb/Makefile 2018-03-12 02:58:51.000000000 +0100
+++ ceph-12.2.5-mod/src/rocksdb/Makefile 2018-05-22 19:37:59.043996026 +0200
@@ -243,10 +243,6 @@
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter
-ifndef DISABLE_WARNING_AS_ERROR
- WARNING_FLAGS += -Werror
-endif
-
ifdef LUA_PATH

View File

@ -0,0 +1,72 @@
diff -ur ceph-12.2.5/src/brag/client/ceph-brag ceph-12.2.5-mod/src/brag/client/ceph-brag
--- ceph-12.2.5/src/brag/client/ceph-brag 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/brag/client/ceph-brag 2018-05-22 21:06:32.952813105 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import print_function
diff -ur ceph-12.2.5/src/ceph-create-keys ceph-12.2.5-mod/src/ceph-create-keys
--- ceph-12.2.5/src/ceph-create-keys 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-create-keys 2018-05-22 21:09:49.103398176 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import errno
import json
diff -ur ceph-12.2.5/src/ceph-detect-init/ceph_detect_init/main.py ceph-12.2.5-mod/src/ceph-detect-init/ceph_detect_init/main.py
--- ceph-12.2.5/src/ceph-detect-init/ceph_detect_init/main.py 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-detect-init/ceph_detect_init/main.py 2018-05-22 21:09:14.943993086 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2015 <contact@redhat.com>
# Copyright (C) 2015 SUSE LINUX GmbH
diff -ur ceph-12.2.5/src/ceph-disk/ceph_disk/main.py ceph-12.2.5-mod/src/ceph-disk/ceph_disk/main.py
--- ceph-12.2.5/src/ceph-disk/ceph_disk/main.py 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-disk/ceph_disk/main.py 2018-05-22 21:11:02.606118074 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2015, 2016, 2017 Red Hat <contact@redhat.com>
# Copyright (C) 2014 Inktank <info@inktank.com>
diff -ur ceph-12.2.5/src/ceph-rest-api ceph-12.2.5-mod/src/ceph-rest-api
--- ceph-12.2.5/src/ceph-rest-api 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-rest-api 2018-05-22 21:10:50.202334095 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# vim: ts=4 sw=4 smarttab expandtab
import argparse
diff -ur ceph-12.2.5/src/ceph-volume/bin/ceph-volume ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume
--- ceph-12.2.5/src/ceph-volume/bin/ceph-volume 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume 2018-05-22 21:07:43.104592535 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from ceph_volume import main
diff -ur ceph-12.2.5/src/ceph-volume/bin/ceph-volume-systemd ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume-systemd
--- ceph-12.2.5/src/ceph-volume/bin/ceph-volume-systemd 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/ceph-volume/bin/ceph-volume-systemd 2018-05-22 21:07:46.628531163 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from ceph_volume.systemd import main
diff -ur ceph-12.2.5/src/mount.fuse.ceph ceph-12.2.5-mod/src/mount.fuse.ceph
--- ceph-12.2.5/src/mount.fuse.ceph 2018-04-23 18:18:33.000000000 +0200
+++ ceph-12.2.5-mod/src/mount.fuse.ceph 2018-05-22 21:08:06.355187609 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''
Helper to mount ceph-fuse from /etc/fstab. To use, add an entry
like:

View File

@ -0,0 +1,49 @@
From 680066203eb1e4c7334d4ce84e4b42e97d990ad6 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Wed, 30 May 2018 08:58:47 +0200
Subject: [PATCH] Strip away python2
---
src/CMakeLists.txt | 4 ----
src/pybind/CMakeLists.txt | 3 +--
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2b59424f74..788e29c8a2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -243,10 +243,6 @@ if(WITH_CEPHFS_JAVA)
add_subdirectory(java)
endif()
-# Python stuff
-find_package(PythonInterp 2 REQUIRED)
-find_package(PythonLibs 2 REQUIRED)
-
option(WITH_PYTHON3 "build python3 bindings" "CHECK")
if(WITH_PYTHON3 MATCHES "check|CHECK")
find_package(Python3Interp 3 QUIET)
diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt
index dbdb23f1c5..1a14df972e 100644
--- a/src/pybind/CMakeLists.txt
+++ b/src/pybind/CMakeLists.txt
@@ -6,7 +6,6 @@ set(CYTHON_MODULE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules)
if(WITH_PYTHON3)
set(py_vers 3)
endif()
-list(APPEND py_vers 2)
foreach(python_version ${py_vers})
if(${python_version} EQUAL 2)
@@ -58,7 +57,7 @@ endforeach()
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/ceph_rest_api.py
- DESTINATION ${PYTHON_INSTDIR})
+ DESTINATION ${PYTHON${PYTHON_VERSION}_INSTDIR})
if(WITH_MGR)
# Location needs to match default setting for mgr_module_path, currently:
--
2.14.3

View File

@ -0,0 +1,23 @@
From f1d4451ab56bd8b13ffcbafd165d5038bc7a2b19 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Wed, 6 Jun 2018 21:38:47 +0200
Subject: [PATCH] Fix python executable
Signed-off-by: Boris Ranto <branto@redhat.com>
---
src/ceph.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ceph.in b/src/ceph.in
index 7c1eda2c09..5e0471cb74 100755
--- a/src/ceph.in
+++ b/src/ceph.in
@@ -1,4 +1,4 @@
-#!@PYTHON_EXECUTABLE@
+#!@PYTHON3_EXECUTABLE@
# -*- mode:python -*-
# vim: ts=4 sw=4 smarttab expandtab
#
--
2.14.3

1356
SPECS/ceph.spec Normal file

File diff suppressed because it is too large Load Diff