Skip to content

Commit

Permalink
Reverted RocksDB arm7.patch based on main branch one & created conan …
Browse files Browse the repository at this point in the history
…package

After reverting RocksDB arm7.patch back to the one based on MiNiFi main branch, verified
I could still create custom RocksDB conan package using Fuzzy patching. Fuzzy patching
allows us to proceed creating a conan package like RocksDB where even if there is a minor
difference between patch code and actual source code, we can still apply the patch. This
fuzzy patching was key in us being able to successfully apply arm7.patch when creating
a custom RocksDB conan package. Previously we used apply_conandata_patches() when creating
the custom RocksDB conan package and it was too strict, so we'll stick with the fuzzy
patching approach.

Then I verified I could build MiNiFi using the conan build approach and then the standalone
CMake approach. Afterward, I verified I could create the MiNiFi conan package.

Finally, I double checked that 218 out of 219 CTEST cases passed for building MiNiFi
using conan build and then standalone CMake approaches. 218 out of 219 CTEST cases passed
after creating the MiNiFi conan package.
  • Loading branch information
james94 committed Oct 4, 2024
1 parent 816a882 commit 374fff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions thirdparty/rocksdb/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ patches:
patch_description: "Fix for missing equality operator in DBOptions and make DBOptions configurable"
patch_type: "portability"
patch_source: "https://github.com/apache/nifi-minifi-cpp/commit/545236fd06b613f2d2b38f74ff9ee85df9190d59"
- patch_file: "patches/cstdint.patch"
6 changes: 3 additions & 3 deletions thirdparty/rocksdb/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rm, rmdir
from conan.tools.files import patch, collect_libs, copy, export_conandata_patches, get, rm, rmdir
from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime
from conan.tools.scm import Version

Expand Down Expand Up @@ -96,7 +96,6 @@ def requirements(self):
self.requires("zlib/[>=1.2.11 <2]")
if self.options.with_bz2:
self.requires("bzip2/1.0.8")
# self.requires("bzip2/1.0.8@minifi/dev") # prebuilt with minifi bz2 patch
if self.options.with_zstd:
self.requires("zstd/1.5.2")
if self.options.get_safe("with_tbb"):
Expand Down Expand Up @@ -174,7 +173,8 @@ def generate(self):
deps.generate()

def build(self):
apply_conandata_patches(self)
for patch_data in self.conan_data.get("patches", {}).get(self.version, []):
patch(self, patch_file=patch_data["patch_file"], base_path=self.source_folder, strip=1, fuzz=True)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/rocksdb/all/patches/arm7.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 225e3fa72..cd5f935f1 100644
+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
@@ -131,6 +131,10 @@ static inline tokutime_t toku_time_now(void) {
uint64_t result;
__asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result));
__asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result));
return result;
+#elif defined(__arm__)
+ uint32_t lo, hi;
Expand Down

0 comments on commit 374fff2

Please sign in to comment.