From 1a1fdf642ac4a004bf742bbdd338932728879d0d Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Mon, 8 Sep 2025 22:54:40 -0400 Subject: [PATCH] raft-canonical: remove Only exists in Nixpkgs as an LXD dependency --- .../disable-missing-dir-test.patch | 23 ------ .../ra/raft-canonical/disable-net-tests.patch | 16 ---- pkgs/by-name/ra/raft-canonical/package.nix | 75 ------------------- 3 files changed, 114 deletions(-) delete mode 100644 pkgs/by-name/ra/raft-canonical/disable-missing-dir-test.patch delete mode 100644 pkgs/by-name/ra/raft-canonical/disable-net-tests.patch delete mode 100644 pkgs/by-name/ra/raft-canonical/package.nix diff --git a/pkgs/by-name/ra/raft-canonical/disable-missing-dir-test.patch b/pkgs/by-name/ra/raft-canonical/disable-missing-dir-test.patch deleted file mode 100644 index ddfec9b22e14..000000000000 --- a/pkgs/by-name/ra/raft-canonical/disable-missing-dir-test.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/test/unit/test_uv_fs.c b/test/unit/test_uv_fs.c -index 638c39c..c8758d2 100644 ---- a/test/unit/test_uv_fs.c -+++ b/test/unit/test_uv_fs.c -@@ -40,18 +40,6 @@ TEST(UvFsCheckDir, exists, DirSetUp, DirTearDown, 0, NULL) - return MUNIT_OK; - } - --/* If the directory doesn't exist, it an error is returned. */ --TEST(UvFsCheckDir, doesNotExist, DirSetUp, DirTearDown, 0, NULL) --{ -- const char *parent = data; -- char errmsg[RAFT_ERRMSG_BUF_SIZE]; -- char dir[128]; -- sprintf(errmsg, "%s/sub", parent); -- sprintf(errmsg, "directory '%s' does not exist", dir); -- CHECK_DIR_ERROR(dir, RAFT_NOTFOUND, errmsg); -- return MUNIT_OK; --} -- - /* If the process can't access the directory, an error is returned. */ - TEST(UvFsCheckDir, permissionDenied, NULL, NULL, 0, NULL) - { diff --git a/pkgs/by-name/ra/raft-canonical/disable-net-tests.patch b/pkgs/by-name/ra/raft-canonical/disable-net-tests.patch deleted file mode 100644 index 7c8be29feafd..000000000000 --- a/pkgs/by-name/ra/raft-canonical/disable-net-tests.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index 2137932..93abdb6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -198,11 +198,7 @@ test_integration_uv_SOURCES = \ - test/integration/test_uv_bootstrap.c \ - test/integration/test_uv_load.c \ - test/integration/test_uv_recover.c \ -- test/integration/test_uv_recv.c \ -- test/integration/test_uv_send.c \ - test/integration/test_uv_set_term.c \ -- test/integration/test_uv_tcp_connect.c \ -- test/integration/test_uv_tcp_listen.c \ - test/integration/test_uv_snapshot_put.c \ - test/integration/test_uv_truncate.c \ - test/integration/test_uv_work.c diff --git a/pkgs/by-name/ra/raft-canonical/package.nix b/pkgs/by-name/ra/raft-canonical/package.nix deleted file mode 100644 index 86c4156fafd5..000000000000 --- a/pkgs/by-name/ra/raft-canonical/package.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - autoreconfHook, - pkg-config, - file, - libuv, - lz4, - lxd-lts, -}: - -stdenv.mkDerivation rec { - pname = "raft-canonical"; - version = "0.18.1"; - - src = fetchFromGitHub { - owner = "canonical"; - repo = "raft"; - tag = "v${version}"; - hash = "sha256-ogTw0+ZFhMRaLAxAAXzHSlLRYFuX8W/zjqglXHfvUv4="; - }; - - nativeBuildInputs = [ - autoreconfHook - file - pkg-config - ]; - buildInputs = [ - libuv - lz4 - ]; - - enableParallelBuilding = true; - - patches = [ - # network tests either hang indefinitely, or fail outright - ./disable-net-tests.patch - - # missing dir check is flaky - ./disable-missing-dir-test.patch - ]; - - preConfigure = '' - substituteInPlace configure --replace /usr/bin/ " " - ''; - - doCheck = true; - - outputs = [ - "dev" - "out" - ]; - - passthru.tests = { - inherit lxd-lts; - }; - - meta = with lib; { - description = '' - Fully asynchronous C implementation of the Raft consensus protocol - ''; - longDescription = '' - The library has modular design: its core part implements only the core - Raft algorithm logic, in a fully platform independent way. On top of - that, a pluggable interface defines the I/O implementation for networking - (send/receive RPC messages) and disk persistence (store log entries and - snapshots). - ''; - homepage = "https://github.com/canonical/raft"; - license = licenses.asl20; - platforms = platforms.linux; - maintainers = [ ]; - }; -}