From 82c73a8d726d7f8e13276f0303655257d0e0fa58 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 4 Dec 2023 09:51:08 +0100 Subject: [PATCH 1/4] nixos/tests/kubo: disable broken FUSE test The FUSE functionality is completely broken in Kubo v0.24.0. See https://github.com/ipfs/kubo/issues/10242. --- nixos/tests/kubo/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/tests/kubo/default.nix b/nixos/tests/kubo/default.nix index 629922fc366d..d8c0c69dc1fb 100644 --- a/nixos/tests/kubo/default.nix +++ b/nixos/tests/kubo/default.nix @@ -1,5 +1,7 @@ { recurseIntoAttrs, runTest }: recurseIntoAttrs { kubo = runTest ./kubo.nix; - kubo-fuse = runTest ./kubo-fuse.nix; + # The FUSE functionality is completely broken since Kubo v0.24.0 + # See https://github.com/ipfs/kubo/issues/10242 + # kubo-fuse = runTest ./kubo-fuse.nix; } From 60781d9b2d23f1ca8c18d7d0582e5a2a54d32932 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 3 Dec 2023 00:50:53 +0100 Subject: [PATCH 2/4] nixos/tests/kubo: test socket activation for the Gateway Add a new test to check that accessing the Gateway socket also starts the daemon via socket activation. --- nixos/tests/kubo/kubo.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/tests/kubo/kubo.nix b/nixos/tests/kubo/kubo.nix index 7965ad277385..b8222c652b33 100644 --- a/nixos/tests/kubo/kubo.nix +++ b/nixos/tests/kubo/kubo.nix @@ -46,6 +46,13 @@ f"ipfs --api /unix/run/ipfs.sock cat /ipfs/{ipfs_hash.strip()} | grep fnord2" ) + machine.stop_job("ipfs") + + with subtest("Socket activation for the Gateway"): + machine.succeed( + f"curl 'http://127.0.0.1:8080/ipfs/{ipfs_hash.strip()}' | grep fnord2" + ) + with subtest("Setting dataDir works properly with the hardened systemd unit"): machine.succeed("test -e /mnt/ipfs/config") machine.succeed("test ! -e /var/lib/ipfs/") From 05b4972db0bf91462b1e01b0c1ad234ff29c37d7 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 14 Dec 2023 23:14:34 +0100 Subject: [PATCH 3/4] kubo: migrate to by-name --- .../networking/kubo/default.nix => by-name/ku/kubo/package.nix} | 0 .../networking => by-name/ku}/kubo/test-repoVersion.nix | 0 pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 2 deletions(-) rename pkgs/{applications/networking/kubo/default.nix => by-name/ku/kubo/package.nix} (100%) rename pkgs/{applications/networking => by-name/ku}/kubo/test-repoVersion.nix (100%) diff --git a/pkgs/applications/networking/kubo/default.nix b/pkgs/by-name/ku/kubo/package.nix similarity index 100% rename from pkgs/applications/networking/kubo/default.nix rename to pkgs/by-name/ku/kubo/package.nix diff --git a/pkgs/applications/networking/kubo/test-repoVersion.nix b/pkgs/by-name/ku/kubo/test-repoVersion.nix similarity index 100% rename from pkgs/applications/networking/kubo/test-repoVersion.nix rename to pkgs/by-name/ku/kubo/test-repoVersion.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 065be3200f7b..3902a037d765 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9902,8 +9902,6 @@ with pkgs; kubergrunt = callPackage ../applications/networking/cluster/kubergrunt { }; - kubo = callPackage ../applications/networking/kubo { }; - kubo-migrator-all-fs-repo-migrations = callPackage ../applications/networking/kubo-migrator/all-migrations.nix { }; kubo-migrator-unwrapped = callPackage ../applications/networking/kubo-migrator/unwrapped.nix { }; kubo-migrator = callPackage ../applications/networking/kubo-migrator { }; From 16a8b378b7e69e44cac785116cef061463b7f070 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 14 Dec 2023 20:05:42 +0100 Subject: [PATCH 4/4] kubo: 0.24.0 -> 0.25.0 https://github.com/ipfs/kubo/releases/tag/v0.25.0 --- pkgs/by-name/ku/kubo/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ku/kubo/package.nix b/pkgs/by-name/ku/kubo/package.nix index 117fbc850d06..ae20f84e8170 100644 --- a/pkgs/by-name/ku/kubo/package.nix +++ b/pkgs/by-name/ku/kubo/package.nix @@ -7,7 +7,7 @@ buildGoModule rec { pname = "kubo"; - version = "0.24.0"; # When updating, also check if the repo version changed and adjust repoVersion below + version = "0.25.0"; # When updating, also check if the repo version changed and adjust repoVersion below rev = "v${version}"; passthru.repoVersion = "15"; # Also update kubo-migrator when changing the repo version @@ -15,7 +15,7 @@ buildGoModule rec { # Kubo makes changes to its source tarball that don't match the git source. src = fetchurl { url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz"; - hash = "sha256-stSjLvg8G1EiXon3Qby4wLgbhX7Aaj9pnxcvE32/42k="; + hash = "sha256-+Mk3rDdtjhETmdaOOSXEFdLTJ0nX9G3qUxctsu5vrSc="; }; # tarball contains multiple files/directories