~xdavidwu/saf-cephfs

0f4b874df87039f53cba70c06a86c7a64b1927cd — xdavidwu 2 years ago 1ea818c
tree: remove ceph.patch

this is unused since pacific rebase, which source is hosted in a new
standalone repo
1 files changed, 0 insertions(+), 242 deletions(-)

D ceph.patch
D ceph.patch => ceph.patch +0 -242
@@ 1,242 0,0 @@
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/cmake/modules/CephChecks.cmake ceph-15.2.5-android/cmake/modules/CephChecks.cmake
--- ceph-15.2.5/cmake/modules/CephChecks.cmake	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/cmake/modules/CephChecks.cmake	2020-10-09 15:54:41.488684672 +0800
@@ -74,7 +74,7 @@
 if(HAVE_POSIX_TIMERS)
   find_library(RT_LIBRARY NAMES rt)
 endif()
-check_symbol_exists(res_nquery "resolv.h" HAVE_RES_NQUERY)
+#check_symbol_exists(res_nquery "resolv.h" HAVE_RES_NQUERY)
 check_symbol_exists(F_SETPIPE_SZ "linux/fcntl.h" CEPH_HAVE_SETPIPE_SZ)
 check_symbol_exists(__func__ "" HAVE_FUNC)
 check_symbol_exists(__PRETTY_FUNCTION__ "" HAVE_PRETTY_FUNC)
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/CMakeLists.txt ceph-15.2.5-android/CMakeLists.txt
--- ceph-15.2.5/CMakeLists.txt	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/CMakeLists.txt	2020-10-09 17:40:39.627422756 +0800
@@ -260,7 +260,7 @@
   find_file(HAVE_LEVELDB_FILTER_POLICY leveldb/filter_policy.h PATHS ${LEVELDB_INCLUDE_DIR})
 endif(WITH_LEVELDB)
 
-find_package(snappy REQUIRED)
+#find_package(snappy REQUIRED)
 
 option(WITH_BROTLI "Brotli compression support" OFF)
 if(WITH_BROTLI)
@@ -319,10 +319,10 @@
   set(LIBTCMALLOC_MISSING_ALIGNED_ALLOC ON)
 endif()
 
-find_package(CURL REQUIRED)
-set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
-set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
-CHECK_SYMBOL_EXISTS(curl_multi_wait curl/curl.h HAVE_CURL_MULTI_WAIT)
+#find_package(CURL REQUIRED)
+#set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
+#set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
+#CHECK_SYMBOL_EXISTS(curl_multi_wait curl/curl.h HAVE_CURL_MULTI_WAIT)
 
 find_package(OpenSSL REQUIRED)
 set(CRYPTO_LIBS OpenSSL::Crypto)
@@ -429,8 +429,8 @@
 elseif(NOT WITH_PYTHON3 STREQUAL "3")
   set(find_python3_exact "EXACT")
 endif()
-find_package(Python3 ${WITH_PYTHON3} ${find_python3_exact} REQUIRED
-  COMPONENTS Interpreter Development)
+#find_package(Python3 ${WITH_PYTHON3} ${find_python3_exact} REQUIRED
+#  COMPONENTS Interpreter Development)
 unset(find_python3_exact)
 
 option(WITH_MGR "ceph-mgr is enabled" ON)
@@ -556,7 +556,7 @@
 # Boost::thread depends on Boost::atomic, so list it explicitly.
 set(BOOST_COMPONENTS
   atomic chrono thread system regex random program_options date_time
-  iostreams)
+  iostreams filesystem)
 set(BOOST_HEADER_COMPONENTS container)
 
 if(WITH_MGR)
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/client/Client.cc ceph-15.2.5-android/src/client/Client.cc
--- ceph-15.2.5/src/client/Client.cc	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/client/Client.cc	2020-10-09 15:42:09.299181519 +0800
@@ -1,3 +1,4 @@
+#define IFTODT(x) ((x) >> 12 & 017)
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 /*
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/CMakeLists.txt ceph-15.2.5-android/src/CMakeLists.txt
--- ceph-15.2.5/src/CMakeLists.txt	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/CMakeLists.txt	2020-10-09 17:39:35.463005918 +0800
@@ -374,7 +374,7 @@
   Boost::program_options
   Boost::date_time
   Boost::iostreams
-  StdFilesystem::filesystem
+  Boost::filesystem
   fmt::fmt
   ${BLKID_LIBRARIES}
   ${Backtrace_LIBRARIES}
@@ -505,7 +505,7 @@
   set(CEPH_BUILD_VIRTUALENV ${CMAKE_BINARY_DIR})
 endif()
 
-add_subdirectory(pybind)
+#add_subdirectory(pybind)
 add_subdirectory(ceph-volume)
 add_subdirectory(python-common)
 add_subdirectory(cephadm)
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/common/addr_parsing.c ceph-15.2.5-android/src/common/addr_parsing.c
--- ceph-15.2.5/src/common/addr_parsing.c	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/common/addr_parsing.c	2020-10-09 15:45:32.350180015 +0800
@@ -1,3 +1,4 @@
+#include <linux/in.h>
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/common/blkdev.cc ceph-15.2.5-android/src/common/blkdev.cc
--- ceph-15.2.5/src/common/blkdev.cc	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/common/blkdev.cc	2020-10-09 16:31:04.381488339 +0800
@@ -61,7 +61,7 @@
 
 #include "common/blkdev.h"
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 #include <libudev.h>
 #include <linux/fs.h>
 #include <linux/kdev_t.h>
@@ -104,7 +104,7 @@
   return 0;
 }
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
 
 const char *BlkDev::sysfsdir() const {
   return "/sys";
@@ -1168,12 +1168,12 @@
   return false;
 }
 
-int BlkDev::discard(int fd, int64_t offset, int64_t len) const
+int BlkDev::discard(int64_t offset, int64_t len) const
 {
   return -EOPNOTSUPP;
 }
 
-bool BlkDev::is_rotational(const char *devname) const
+bool BlkDev::is_rotational() const
 {
   return false;
 }
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/common/ConfUtils.cc ceph-15.2.5-android/src/common/ConfUtils.cc
--- ceph-15.2.5/src/common/ConfUtils.cc	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/common/ConfUtils.cc	2020-10-09 17:38:43.806680865 +0800
@@ -21,7 +21,7 @@
 #include <map>
 #include <sstream>
 
-#if __has_include(<filesystem>)
+/*#if __has_include(<filesystem>)
 #include <filesystem>
 namespace fs = std::filesystem;
 #elif __has_include(<experimental/filesystem>)
@@ -29,7 +29,10 @@
 namespace fs = std::experimental::filesystem;
 #else
 #error std::filesystem not available!
-#endif
+#endif*/
+
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
 
 #include <boost/algorithm/string.hpp>
 #include <boost/algorithm/string/trim_all.hpp>
@@ -122,7 +125,7 @@
       return -EINVAL;
     }
   } catch (const fs::filesystem_error& e) {
-    std::error_code ec;
+    boost::system::error_code ec;
     auto is_other = fs::is_other(fname, ec);
     if (!ec && is_other) {
       // /dev/null?
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/common/dns_resolve.cc ceph-15.2.5-android/src/common/dns_resolve.cc
--- ceph-15.2.5/src/common/dns_resolve.cc	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/common/dns_resolve.cc	2020-10-09 16:20:06.701513735 +0800
@@ -206,8 +206,13 @@
 
 }
 
+#ifdef HAVE_RES_NQUERY
 int DNSResolver::resolve_ip_addr(CephContext *cct, res_state *res, const string& hostname, 
     entity_addr_t *addr) {
+#else
+int DNSResolver::resolve_ip_addr(CephContext *cct, void *res, const string& hostname, 
+    entity_addr_t *addr) {
+#endif
 
   u_char nsbuf[NS_PACKETSZ];
   int len;
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/common/dns_resolve.h ceph-15.2.5-android/src/common/dns_resolve.h
--- ceph-15.2.5/src/common/dns_resolve.h	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/common/dns_resolve.h	2020-10-09 16:19:12.409285141 +0800
@@ -142,8 +142,13 @@
     /* this private function allows to reuse the res_state structure used
      * by other function of this class
      */
+#ifdef HAVE_RES_NQUERY
     int resolve_ip_addr(CephContext *cct, res_state *res,
         const std::string& hostname, entity_addr_t *addr);
+#else
+    int resolve_ip_addr(CephContext *cct, void *res,
+        const std::string& hostname, entity_addr_t *addr);
+#endif
 
     std::string srv_protocol_to_str(SRV_Protocol proto) {
       switch (proto) {
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/java/CMakeLists.txt ceph-15.2.5-android/src/java/CMakeLists.txt
--- ceph-15.2.5/src/java/CMakeLists.txt	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/java/CMakeLists.txt	2020-10-09 15:15:57.392846740 +0800
@@ -1,5 +1,5 @@
 find_package(Java COMPONENTS Development REQUIRED)
-find_package(JNI REQUIRED)
+#find_package(JNI REQUIRED)
 include(UseJava)
 
 set(java_srcs
@@ -58,4 +58,4 @@
 
 add_custom_target(java DEPENDS
   libcephfs.jar
-  libcephfs_jni)
+  cephfs_jni)
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/mds/CInode.h ceph-15.2.5-android/src/mds/CInode.h
--- ceph-15.2.5/src/mds/CInode.h	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/mds/CInode.h	2020-10-09 15:47:19.231593102 +0800
@@ -1,3 +1,4 @@
+#define IFTODT(x) ((x) >> 12 & 017)
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
 // vim: ts=8 sw=2 smarttab
 /*
diff '--color=auto' -Naur '--exclude=build' '--exclude=build-android-aarch64' '--exclude=boost' '--exclude=qa' '--exclude=90-ceph-osd.conf' ceph-15.2.5/src/msg/CMakeLists.txt ceph-15.2.5-android/src/msg/CMakeLists.txt
--- ceph-15.2.5/src/msg/CMakeLists.txt	2020-09-16 02:57:02.000000000 +0800
+++ ceph-15.2.5-android/src/msg/CMakeLists.txt	2020-10-09 18:04:20.807630744 +0800
@@ -20,13 +20,13 @@
   async/frames_v2.cc
   async/net_handler.cc)
 
-if(LINUX)
+if(LINUX OR ANDROID)
   list(APPEND msg_srcs
     async/EventEpoll.cc)
 elseif(FREEBSD OR APPLE)
   list(APPEND msg_srcs
     async/EventKqueue.cc)
-endif(LINUX)
+endif(LINUX OR ANDROID)
 
 if(HAVE_RDMA)
   list(APPEND msg_srcs