Unverified Commit c9482a54 authored by Yt's avatar Yt Committed by GitHub
Browse files

foundationdb: 7.1.32 -> 7.3.42 (#369145)

parents b9272eee 3c5ffd9f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -151,6 +151,8 @@

- `ente-auth` now uses the name `enteauth` for its binary. The previous name was `ente_auth`.

- `foundationdb` was upgraded to 7.3.

- `fluxus` has been removed, as it depends on `racket_7_9` and had no updates in 9 years.

- `sm64ex-coop` has been removed as it was archived upstream. Consider migrating to `sm64coopdx`.
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ To enable FoundationDB, add the following to your
```nix
{
  services.foundationdb.enable = true;
  services.foundationdb.package = pkgs.foundationdb71; # FoundationDB 7.1.x
  services.foundationdb.package = pkgs.foundationdb73; # FoundationDB 7.r3.x
}
```

@@ -68,7 +68,7 @@ necessary Python modules).
```ShellSession
a@link> cat fdb-status.py
#! /usr/bin/env nix-shell
#! nix-shell -i python -p python pythonPackages.foundationdb71
#! nix-shell -i python -p python pythonPackages.foundationdb73

import fdb
import json
+19 −17
Original line number Diff line number Diff line
# This builder is for FoundationDB CMake build system.

{ lib, fetchFromGitHub
, cmake, ninja, python3, openjdk8, mono, pkg-config
, msgpack-cxx, toml11
, cmake, ninja, python3, openjdk, mono, pkg-config
, msgpack-cxx, toml11, jemalloc, doctest

, gccStdenv, llvmPackages
, useClang ? false
@@ -37,9 +37,11 @@ let
          inherit rev hash;
        };

        buildInputs = [ ssl boost msgpack-cxx toml11 ];
        buildInputs = [ ssl boost msgpack-cxx toml11 jemalloc ];

        nativeBuildInputs = [ pkg-config cmake ninja python3 openjdk8 mono ]
        checkInputs = [ doctest ];

        nativeBuildInputs = [ pkg-config cmake ninja python3 openjdk mono ]
          ++ lib.optionals useClang [ llvmPackages.lld ];

        separateDebugInfo = true;
@@ -55,9 +57,7 @@ let
            # >   Could not find lz4_STATIC_LIBRARIES using the following names: liblz4.a
            "-DSSD_ROCKSDB_EXPERIMENTAL=FALSE"

            # FoundationDB's CMake is hardcoded to pull in jemalloc as an external
            # project at build time.
            "-DUSE_JEMALLOC=FALSE"
            "-DBUILD_DOCUMENTATION=FALSE"

            # LTO brings up overall build time, but results in much smaller
            # binaries for all users and the cache.
@@ -68,8 +68,8 @@ let
            # Same with LLD when Clang is available.
            (lib.optionalString useClang    "-DUSE_LD=LLD")
            (lib.optionalString (!useClang) "-DUSE_LD=GOLD")
          ] ++ lib.optionals (lib.versionOlder version "7.2.0")
          [ # FIXME: why can't openssl be found automatically?

            # FIXME: why can't openssl be found automatically?
            "-DOPENSSL_USE_STATIC_LIBS=FALSE"
            "-DOPENSSL_CRYPTO_LIBRARY=${ssl.out}/lib/libcrypto.so"
            "-DOPENSSL_SSL_LIBRARY=${ssl.out}/lib/libssl.so"
@@ -77,19 +77,21 @@ let

        hardeningDisable = [ "fortify" ];

        env.NIX_CFLAGS_COMPILE = toString [
          # Needed with GCC 12
          "-Wno-error=missing-template-keyword"
          # Needed to compile on aarch64
          (lib.optionalString stdenv.hostPlatform.isAarch64 "-march=armv8-a+crc")
        ];

        inherit patches;

        # allow using any msgpack-cxx version
        postPatch = ''
          # allow using any msgpack-cxx version
          substituteInPlace cmake/GetMsgpack.cmake \
            --replace-warn 'find_package(msgpack-cxx 6 QUIET CONFIG)' 'find_package(msgpack-cxx QUIET CONFIG)'

          # Use our doctest package
          substituteInPlace bindings/c/test/unit/third_party/CMakeLists.txt \
            --replace-fail '/opt/doctest_proj_2.4.8' '${doctest}/include'

          # Upstream upgraded to Boost 1.86 with no code changes; see:
          # <https://github.com/apple/foundationdb/pull/11788>
          substituteInPlace cmake/CompileBoost.cmake \
            --replace-fail 'find_package(Boost 1.78.0 EXACT ' 'find_package(Boost '
        '';

        # the install phase for cmake is pretty wonky right now since it's not designed to
+8 −8
Original line number Diff line number Diff line
@@ -8,30 +8,30 @@
  cmake,
  ninja,
  python3,
  openjdk8,
  openjdk,
  mono,
  openssl,
  boost178,
  boost,
  pkg-config,
  msgpack-cxx,
  toml11,
  jemalloc,
  doctest,
}@args:

let
  cmakeBuild = import ./cmake.nix args;
in
{
  foundationdb71 = cmakeBuild {
    version = "7.1.32";
    hash = "sha256-CNJ4w1ECadj2KtcfbBPBQpXQeq9BAiw54hUgRTWPFzY=";
    boost = boost178;
  foundationdb73 = cmakeBuild {
    version = "7.3.42";
    hash = "sha256-jQcm+HLai5da2pZZ7iLdN6fpQZxf5+/kkfv9OSXQ57c=";
    inherit boost;
    ssl = openssl;

    patches = [
      ./patches/disable-flowbench.patch
      ./patches/don-t-run-tests-requiring-doctest.patch
      ./patches/don-t-use-static-boost-libs.patch
      ./patches/fix-open-with-O_CREAT.patch
      # GetMsgpack: add 4+ versions of upstream
      # https://github.com/apple/foundationdb/pull/10935
      (fetchpatch {
+0 −128
Original line number Diff line number Diff line
From 10c502fd36df24f1fdbdeff446982ff5247ba20e Mon Sep 17 00:00:00 2001
From: Jente Hidskes Ankarberg <jente@griffin.sh>
Date: Thu, 9 Feb 2023 12:40:21 +0100
Subject: [PATCH] Don't run tests requiring doctest

Doctest is unconditionally pulled in as an external project, which we can't do
---
 bindings/c/CMakeLists.txt | 59 ---------------------------------------
 1 file changed, 59 deletions(-)

diff --git bindings/c/CMakeLists.txt bindings/c/CMakeLists.txt
index b1a187b99..25b626819 100644
--- a/bindings/c/CMakeLists.txt
+++ b/bindings/c/CMakeLists.txt
@@ -84,7 +84,6 @@ if(NOT WIN32)
     test/mako/mako.h
     test/mako/utils.c
     test/mako/utils.h)
-  add_subdirectory(test/unit/third_party)
   find_package(Threads REQUIRED)
   set(UNIT_TEST_SRCS
     test/unit/unit_tests.cpp
@@ -93,10 +92,6 @@ if(NOT WIN32)
 
   set(UNIT_TEST_VERSION_510_SRCS test/unit/unit_tests_version_510.cpp)
   set(TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS test/unit/trace_partial_file_suffix_test.cpp)
-  set(DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS
-    test/unit/disconnected_timeout_tests.cpp
-    test/unit/fdb_api.cpp
-    test/unit/fdb_api.hpp)
 
   set(API_TESTER_SRCS
     test/apitester/fdb_c_api_tester.cpp
@@ -128,11 +123,7 @@ if(NOT WIN32)
     add_library(fdb_c_txn_size_test OBJECT test/txn_size_test.c test/test.h)
     add_library(fdb_c_client_memory_test OBJECT test/client_memory_test.cpp test/unit/fdb_api.cpp test/unit/fdb_api.hpp)
     add_library(mako OBJECT ${MAKO_SRCS})
-    add_library(fdb_c_setup_tests OBJECT test/unit/setup_tests.cpp)
-    add_library(fdb_c_unit_tests OBJECT ${UNIT_TEST_SRCS})
-    add_library(fdb_c_unit_tests_version_510 OBJECT ${UNIT_TEST_VERSION_510_SRCS})
     add_library(trace_partial_file_suffix_test OBJECT ${TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS})
-    add_library(disconnected_timeout_unit_tests OBJECT ${DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS})
     add_library(fdb_c_api_tester OBJECT ${API_TESTER_SRCS})
   else()
     add_executable(fdb_c_performance_test test/performance_test.c test/test.h)
@@ -140,11 +131,7 @@ if(NOT WIN32)
     add_executable(fdb_c_txn_size_test test/txn_size_test.c test/test.h)
     add_executable(fdb_c_client_memory_test test/client_memory_test.cpp test/unit/fdb_api.cpp test/unit/fdb_api.hpp)
     add_executable(mako ${MAKO_SRCS})
-    add_executable(fdb_c_setup_tests test/unit/setup_tests.cpp)
-    add_executable(fdb_c_unit_tests ${UNIT_TEST_SRCS})
-    add_executable(fdb_c_unit_tests_version_510 ${UNIT_TEST_VERSION_510_SRCS})
     add_executable(trace_partial_file_suffix_test ${TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS})
-    add_executable(disconnected_timeout_unit_tests ${DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS})
     add_executable(fdb_c_api_tester ${API_TESTER_SRCS})
     strip_debug_symbols(fdb_c_performance_test)
     strip_debug_symbols(fdb_c_ryw_benchmark)
@@ -155,20 +142,7 @@ if(NOT WIN32)
   target_link_libraries(fdb_c_ryw_benchmark PRIVATE fdb_c Threads::Threads)
   target_link_libraries(fdb_c_txn_size_test PRIVATE fdb_c Threads::Threads)
   target_link_libraries(fdb_c_client_memory_test PRIVATE fdb_c Threads::Threads)
-
-  add_dependencies(fdb_c_setup_tests doctest)
-  add_dependencies(fdb_c_unit_tests doctest)
-  add_dependencies(fdb_c_unit_tests_version_510 doctest)
-  add_dependencies(disconnected_timeout_unit_tests doctest)
-  target_include_directories(fdb_c_setup_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
-  target_include_directories(fdb_c_unit_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
-  target_include_directories(fdb_c_unit_tests_version_510 PUBLIC ${DOCTEST_INCLUDE_DIR})
-  target_include_directories(disconnected_timeout_unit_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
-  target_link_libraries(fdb_c_setup_tests PRIVATE fdb_c Threads::Threads)
-  target_link_libraries(fdb_c_unit_tests PRIVATE fdb_c Threads::Threads fdbclient)
-  target_link_libraries(fdb_c_unit_tests_version_510 PRIVATE fdb_c Threads::Threads)
   target_link_libraries(trace_partial_file_suffix_test PRIVATE fdb_c Threads::Threads flow)
-  target_link_libraries(disconnected_timeout_unit_tests PRIVATE fdb_c Threads::Threads)
 
 if(USE_SANITIZER)
   target_link_libraries(fdb_c_api_tester PRIVATE fdb_c toml11_target Threads::Threads fmt::fmt boost_asan)
@@ -203,46 +177,13 @@ endif()
     DEPENDS fdb_c
     COMMENT "Copy libfdb_c to use as external client for test")
   add_custom_target(external_client DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so)
-  add_dependencies(fdb_c_unit_tests external_client)
-  add_dependencies(disconnected_timeout_unit_tests external_client)
   add_dependencies(fdb_c_api_tester external_client)
 
-  add_fdbclient_test(
-    NAME fdb_c_setup_tests
-    COMMAND $<TARGET_FILE:fdb_c_setup_tests>)
-  add_fdbclient_test(
-    NAME fdb_c_unit_tests
-    COMMAND $<TARGET_FILE:fdb_c_unit_tests>
-            @CLUSTER_FILE@
-            fdb)
-  add_fdbclient_test(
-    NAME fdb_c_unit_tests_version_510
-    COMMAND $<TARGET_FILE:fdb_c_unit_tests_version_510>
-            @CLUSTER_FILE@
-            fdb)
   add_fdbclient_test(
     NAME trace_partial_file_suffix_test
     COMMAND $<TARGET_FILE:trace_partial_file_suffix_test>
             @CLUSTER_FILE@
             fdb)
-  add_fdbclient_test(
-    NAME fdb_c_external_client_unit_tests
-    COMMAND $<TARGET_FILE:fdb_c_unit_tests>
-            @CLUSTER_FILE@
-            fdb
-            ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so
-            )
-  add_unavailable_fdbclient_test(
-    NAME disconnected_timeout_unit_tests
-    COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
-            @CLUSTER_FILE@
-            )
-  add_unavailable_fdbclient_test(
-    NAME disconnected_timeout_external_client_unit_tests
-    COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
-            @CLUSTER_FILE@
-            ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so
-            )
   add_fdbclient_test(
     NAME fdb_c_api_tests
     DISABLE_LOG_DUMP
-- 
2.37.1 (Apple Git-137.1)
Loading