push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 185b721eb..6752ff32d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,7 +185,6 @@ endif()
add_subdirectory(fdbbackup)
add_subdirectory(contrib)
add_subdirectory(tests)
-add_subdirectory(flowbench EXCLUDE_FROM_ALL)
if(WITH_PYTHON AND WITH_C_BINDING)
add_subdirectory(bindings)
endif()
--
2.38.1

View File

@@ -0,0 +1,27 @@
From 1a217164f8086137ce175da09329745d5ea63027 Mon Sep 17 00:00:00 2001
From: Jente Hidskes Ankarberg <jente@griffin.sh>
Date: Tue, 7 Feb 2023 17:17:16 +0100
Subject: Don't use static Boost libs
We cannot override this in our CMake flags, hence we have to patch it in the source.
---
cmake/CompileBoost.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git cmake/CompileBoost.cmake cmake/CompileBoost.cmake
index 3bc47c776..62b448421 100644
--- a/cmake/CompileBoost.cmake
+++ b/cmake/CompileBoost.cmake
@@ -85,7 +85,7 @@ if(USE_SANITIZER)
endif()
# since boost 1.72 boost installs cmake configs. We will enforce config mode
-set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_STATIC_LIBS OFF)
# Clang and Gcc will have different name mangling to std::call_once, etc.
if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
--
2.37.1 (Apple Git-137.1)

View File

@@ -0,0 +1,39 @@
From d4b022955e049793a5eac573f6eb2931686a81ab Mon Sep 17 00:00:00 2001
From: Emily <hello@emily.moe>
Date: Mon, 15 Sep 2025 22:09:00 +0100
Subject: [PATCH] Fix the build with toml11 4.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In toml11 3.0, comments were discarded by default, so this declaration
was redundant. In toml11 ≥ 4.0, they are preserved by default,
but opting out is more baroque. It doesnt seem clear to me why
discarding comments is specifically relevant here, so Ive opted
to simplify the code by using the default uniformly, but a version
conditional would be possible if this is important.
Many major Linux distributions have already moved to toml11 ≥ 4.0,
so this simplifies packaging.
(cherry picked from commit 432a9562573828cc45e3475e53feba48c79a8342)
---
fdbserver/SimulatedCluster.actor.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fdbserver/SimulatedCluster.actor.cpp b/fdbserver/SimulatedCluster.actor.cpp
index 89d4508ad..4cc11a7bf 100644
--- a/fdbserver/SimulatedCluster.actor.cpp
+++ b/fdbserver/SimulatedCluster.actor.cpp
@@ -116,7 +116,7 @@ bool destructed = false;
// environment details
class TestConfig : public BasicTestConfig {
class ConfigBuilder {
- using value_type = toml::basic_value<toml::discard_comments>;
+ using value_type = toml::value;
using base_variant = std::
variant<int, float, double, bool, std::string, std::vector<int>, std::vector<std::string>, ConfigDBType>;
using types =
--
2.51.0

View File

@@ -0,0 +1,176 @@
{
stdenv,
fetchFromGitHub,
lib,
fetchpatch,
cmake,
ninja,
python3,
openjdk,
mono,
openssl,
boost186,
pkg-config,
msgpack-cxx,
toml11,
jemalloc,
doctest,
}:
let
boost = boost186;
# Only even numbered versions compile on aarch64; odd numbered versions have avx enabled.
avxEnabled =
version:
let
isOdd = n: lib.trivial.mod n 2 != 0;
patch = lib.toInt (lib.versions.patch version);
in
isOdd patch;
in
stdenv.mkDerivation rec {
pname = "foundationdb";
version = "7.3.42";
src = fetchFromGitHub {
owner = "apple";
repo = "foundationdb";
tag = version;
hash = "sha256-jQcm+HLai5da2pZZ7iLdN6fpQZxf5+/kkfv9OSXQ57c=";
};
patches = [
./disable-flowbench.patch
./don-t-use-static-boost-libs.patch
# <https://github.com/apple/foundationdb/pull/12373>
./fix-toml11-4.0.patch
# GetMsgpack: add 4+ versions of upstream
# https://github.com/apple/foundationdb/pull/10935
(fetchpatch {
url = "https://github.com/apple/foundationdb/commit/c35a23d3f6b65698c3b888d76de2d93a725bff9c.patch";
hash = "sha256-bneRoZvCzJp0Hp/G0SzAyUyuDrWErSpzv+ickZQJR5w=";
})
# Add a dependency that prevents bindingtester to run before the python bindings are generated
# https://github.com/apple/foundationdb/pull/11859
(fetchpatch {
url = "https://github.com/apple/foundationdb/commit/8d04c97a74c6b83dd8aa6ff5af67587044c2a572.patch";
hash = "sha256-ZLIcmcfirm1+96DtTIr53HfM5z38uTLZrRNHAmZL6rc=";
})
];
hardeningDisable = [ "fortify" ];
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 '
'';
buildInputs = [
boost
jemalloc
msgpack-cxx
openssl
toml11
];
checkInputs = [ doctest ];
nativeBuildInputs = [
cmake
mono
ninja
openjdk
pkg-config
python3
];
separateDebugInfo = true;
cmakeFlags = [
"-DFDB_RELEASE=TRUE"
# Disable CMake warnings for project developers.
"-Wno-dev"
# CMake Error at fdbserver/CMakeLists.txt:332 (find_library):
# > Could not find lz4_STATIC_LIBRARIES using the following names: liblz4.a
"-DSSD_ROCKSDB_EXPERIMENTAL=FALSE"
"-DBUILD_DOCUMENTATION=FALSE"
# LTO brings up overall build time, but results in much smaller
# binaries for all users and the cache.
"-DUSE_LTO=ON"
# Gold helps alleviate the link time, especially when LTO is
# enabled. But even then, it still takes a majority of the time.
"-DUSE_LD=GOLD"
# FIXME: why can't openssl be found automatically?
"-DOPENSSL_USE_STATIC_LIBS=FALSE"
"-DOPENSSL_CRYPTO_LIBRARY=${openssl.out}/lib/libcrypto.so"
"-DOPENSSL_SSL_LIBRARY=${openssl.out}/lib/libssl.so"
];
# the install phase for cmake is pretty wonky right now since it's not designed to
# coherently install packages as most linux distros expect -- it's designed to build
# packaged artifacts that are shipped in RPMs, etc. we need to add some extra code to
# cmake upstream to fix this, and if we do, i think most of this can go away.
postInstall = ''
mv $out/sbin/fdbmonitor $out/bin/fdbmonitor
mkdir $out/libexec && mv $out/usr/lib/foundationdb/backup_agent/backup_agent $out/libexec/backup_agent
mv $out/sbin/fdbserver $out/bin/fdbserver
rm -rf $out/etc $out/lib/foundationdb $out/lib/systemd $out/log $out/sbin $out/usr $out/var
# move results into multi outputs
mkdir -p $dev $lib
mv $out/include $dev/include
mv $out/lib $lib/lib
# python bindings
# NB: use the original setup.py.in, so we can substitute VERSION correctly
cp ../LICENSE ./bindings/python
substitute ../bindings/python/setup.py.in ./bindings/python/setup.py \
--replace 'VERSION' "${version}"
rm -f ./bindings/python/setup.py.* ./bindings/python/CMakeLists.txt
rm -f ./bindings/python/fdb/*.pth # remove useless files
rm -f ./bindings/python/*.rst ./bindings/python/*.mk
cp -R ./bindings/python/ tmp-pythonsrc/
tar -zcf $pythonsrc --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
# java bindings
mkdir -p $lib/share/java
mv lib/fdb-java-*.jar $lib/share/java/fdb-java.jar
'';
outputs = [
"out"
"dev"
"lib"
"pythonsrc"
];
meta = {
description = "Open source, distributed, transactional key-value store";
homepage = "https://www.foundationdb.org";
license = lib.licenses.asl20;
platforms = [ "x86_64-linux" ] ++ lib.optionals (!(avxEnabled version)) [ "aarch64-linux" ];
# Fails when cross-compiling with "/bin/sh: gcc-ar: not found"
broken = stdenv.buildPlatform != stdenv.hostPlatform;
maintainers = with lib.maintainers; [
thoughtpolice
lostnet
];
};
}