Skip to content

Commit

Permalink
foundationdb: 7.1.32 -> 7.3.42 (#369145)
Browse files Browse the repository at this point in the history
  • Loading branch information
happysalada authored Dec 31, 2024
2 parents b9272ee + 3c5ffd9 commit c9482a5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 183 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/services/databases/foundationdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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
Expand Down
36 changes: 19 additions & 17 deletions pkgs/servers/foundationdb/cmake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 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
Expand Down Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -68,28 +68,30 @@ 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"
];

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
Expand Down
16 changes: 8 additions & 8 deletions pkgs/servers/foundationdb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

This file was deleted.

25 changes: 0 additions & 25 deletions pkgs/servers/foundationdb/patches/fix-open-with-O_CREAT.patch

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ mapAliases {
fmt_8 = throw "fmt_8 has been removed as it is obsolete and was no longer used in the tree"; # Added 2024-11-12
foldingathome = throw "'foldingathome' has been renamed to/replaced by 'fahclient'"; # Converted to throw 2024-10-17
forgejo-actions-runner = forgejo-runner; # Added 2024-04-04
foundationdb71 = throw "foundationdb71 has been removed; please upgrade to foundationdb73"; # Added 2024-12-28

fractal-next = fractal; # added 2023-11-25
framework-system-tools = framework-tool; # added 2023-12-09
Expand Down
4 changes: 2 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3400,10 +3400,10 @@ with pkgs;
fdbPackages = dontRecurseIntoAttrs (callPackage ../servers/foundationdb { });

inherit (fdbPackages)
foundationdb71
foundationdb73
;

foundationdb = foundationdb71;
foundationdb = foundationdb73;

fuse-ext2 = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/fuse-ext2 { };

Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/python-aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ mapAliases ({
foundationdb52 = throw "foundationdb52 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
foundationdb60 = throw "foundationdb60 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
foundationdb61 = throw "foundationdb61 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
foundationdb71 = throw "foundationdb71 has been removed, use foundationdb73 instead"; # added 2024-12-28
functorch = throw "functorch is now part of the torch package and has therefore been removed. See https://github.com/pytorch/functorch/releases/tag/v1.13.0 for more info."; # added 2022-12-01
functools32 = throw "functool32 was removed from nixpkgs, because python 2.7 has reach end of life in early 2020"; # added 2024-05-16
fritzprofiles = throw "fritzprofiles was removed from nixpkgs, because it was removed as dependency of home-assistant for which it was pacakged."; # added 2024-01-05
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4909,7 +4909,7 @@ self: super: with self; {

formulaic = callPackage ../development/python-modules/formulaic { };

foundationdb71 = callPackage ../servers/foundationdb/python.nix { foundationdb = pkgs.foundationdb71; };
foundationdb73 = callPackage ../servers/foundationdb/python.nix { foundationdb = pkgs.foundationdb73; };

fountains = callPackage ../development/python-modules/fountains { };

Expand Down

0 comments on commit c9482a5

Please sign in to comment.