kubo: 0.34.1 -> 0.35.0

https://github.com/ipfs/kubo/releases/tag/v0.35.0

This version introduces a new FUSE mount point, requiring some changes.
This commit is contained in:
Luflosi
2025-05-25 15:30:20 +02:00
parent cf02809424
commit 6af6c7ea8c
2 changed files with 12 additions and 5 deletions

View File

@@ -161,7 +161,7 @@ in
autoMount = lib.mkOption { autoMount = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Whether Kubo should try to mount /ipfs and /ipns at startup."; description = "Whether Kubo should try to mount /ipfs, /ipns and /mfs at startup.";
}; };
autoMigrate = lib.mkOption { autoMigrate = lib.mkOption {
@@ -236,6 +236,12 @@ in
default = "/ipns"; default = "/ipns";
description = "Where to mount the IPNS namespace to"; description = "Where to mount the IPNS namespace to";
}; };
Mounts.MFS = lib.mkOption {
type = lib.types.str;
default = "/mfs";
description = "Where to mount the MFS namespace to";
};
}; };
}; };
description = '' description = ''
@@ -356,6 +362,7 @@ in
${cfg.dataDir}.d = defaultConfig; ${cfg.dataDir}.d = defaultConfig;
${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig; ${cfg.settings.Mounts.IPFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig; ${cfg.settings.Mounts.IPNS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
${cfg.settings.Mounts.MFS}.d = lib.mkIf (cfg.autoMount) defaultConfig;
}; };
# The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself # The hardened systemd unit breaks the fuse-mount function according to documentation in the unit file itself
@@ -401,8 +408,8 @@ in
ipfs --offline config replace - ipfs --offline config replace -
''; '';
postStop = lib.mkIf cfg.autoMount '' postStop = lib.mkIf cfg.autoMount ''
# After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS and cfg.settings.Mounts.IPNS are locked # After an unclean shutdown the fuse mounts at cfg.settings.Mounts.IPFS, cfg.settings.Mounts.IPNS and cfg.settings.Mounts.MFS are locked
umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' || true umount --quiet '${cfg.settings.Mounts.IPFS}' '${cfg.settings.Mounts.IPNS}' '${cfg.settings.Mounts.MFS}' || true
''; '';
serviceConfig = { serviceConfig = {
ExecStart = [ ExecStart = [

View File

@@ -8,7 +8,7 @@
buildGoModule rec { buildGoModule rec {
pname = "kubo"; pname = "kubo";
version = "0.34.1"; # When updating, also check if the repo version changed and adjust repoVersion below version = "0.35.0"; # When updating, also check if the repo version changed and adjust repoVersion below
rev = "v${version}"; rev = "v${version}";
passthru.repoVersion = "16"; # Also update kubo-migrator when changing the repo version passthru.repoVersion = "16"; # Also update kubo-migrator when changing the repo version
@@ -16,7 +16,7 @@ buildGoModule rec {
# Kubo makes changes to its source tarball that don't match the git source. # Kubo makes changes to its source tarball that don't match the git source.
src = fetchurl { src = fetchurl {
url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz"; url = "https://github.com/ipfs/kubo/releases/download/${rev}/kubo-source.tar.gz";
hash = "sha256-wrAnmPfls7LFO3gQBISSmn4ucuUVmzvYEoz+eVc/A5M="; hash = "sha256-OubXaa2JWbEaakDV6pExm5PkiZ5XPd9uG+S4KwWb0xQ=";
}; };
# tarball contains multiple files/directories # tarball contains multiple files/directories