From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8AlALxzpWWDzVgAA0tVLHw (envelope-from ) for ; Tue, 23 Mar 2021 13:11:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oNTsKhzpWWD6GwAAbx9fmQ (envelope-from ) for ; Tue, 23 Mar 2021 13:11:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2EB8A23F7E for ; Tue, 23 Mar 2021 14:11:56 +0100 (CET) Received: from localhost ([::1]:52790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOgp8-0003iz-Qq for larch@yhetil.org; Tue, 23 Mar 2021 09:11:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOgnK-0001hV-2G for guix-patches@gnu.org; Tue, 23 Mar 2021 09:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOgnJ-0004O2-Of for guix-patches@gnu.org; Tue, 23 Mar 2021 09:10:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOgnJ-0004QS-HO for guix-patches@gnu.org; Tue, 23 Mar 2021 09:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45905] [PATCH] IPFS service definition Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Mar 2021 13:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45905 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 45905@debbugs.gnu.org Received: via spool by 45905-submit@debbugs.gnu.org id=B45905.161650494916945 (code B ref 45905); Tue, 23 Mar 2021 13:10:01 +0000 Received: (at 45905) by debbugs.gnu.org; 23 Mar 2021 13:09:09 +0000 Received: from localhost ([127.0.0.1]:59846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOgmS-0004PF-Qt for submit@debbugs.gnu.org; Tue, 23 Mar 2021 09:09:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOgmP-0004Oh-8I for 45905@debbugs.gnu.org; Tue, 23 Mar 2021 09:09:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54500) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOgmJ-0003sE-2n; Tue, 23 Mar 2021 09:08:59 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54512 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lOgmH-0002rM-PQ; Tue, 23 Mar 2021 09:08:58 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874kh3w1j6.fsf@gnu.org> <36af87b3ec48ed159cc237dcac93320817c74f58.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Germinal an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 23 Mar 2021 14:08:55 +0100 In-Reply-To: <36af87b3ec48ed159cc237dcac93320817c74f58.camel@telenet.be> (Maxime Devos's message of "Mon, 22 Mar 2021 19:40:37 +0100") Message-ID: <871rc6koew.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616505116; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=lI+TwpezQNZ58rAM0A4W/gE8QuoHp4CQTzp1H+o8c5A=; b=eKHEkVnWLqwpCbkw4LqwOgdYu9V/ulHZ0RL5nm/zjnVuHdVkYEB5nwrGVnHREWtySZSeML 0fNBQIPWtG5f1b5VTu66U13yCgClUZkWyzpmUPFMu+O/t+6zvqlRl6crpb2/aKS0gWkO1y 1dAe/V2IG9ip/sjo949QZ4Bnis6iEgHLJKasC4rqn5wm/djFmTLOkkLCBmJc8AUcT8ZlNU Kp1eCUV37bUFEbwfgl8VdqZExYecz3sIYZZiYyLMZWmh4oT/1gS/QGvPg0I3gJtrtx8ZY7 JOpa8jzURhn0Ix4XNo5vISdVl9NFKKxbMsFKGONJsdu3ZCk/hsHGiCjMqpjOMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616505116; a=rsa-sha256; cv=none; b=pGygojU6sZ1ff+YqRDxzRVuekH1+pImZYQ4S3HHVi8Fnag6tg5/pO7RxodB4ZHZuFq5/6l oeNksg73zm/C54ILf3yIQLM8scbhiQlBvZe0VK431zvr638KXCkYsERXrJZzJXQicn9JtP tJMtixL/Gjolm4o9F/S8FxnAXPiSao8zsPFiYpZ+0Qr51akzthtzJxpVpnnSiUxGPCWc0W entx0jbiAOUufHn6rhFBsD3/sBTWfXYJiQSBvVbP/HaszuVM2+TNZpbSobFuqrCpEd7fc0 1UZrUvvrDBbexi7Gu3XfVoiigdxEtyLtWi9uouN1/0p49wGV6gic17Xgf3gl+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2EB8A23F7E X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: Jg/lUtAX/hT1 Hi Maxime! Maxime Devos skribis: >> OK. That doesn=E2=80=99t prevent one from using it, right? > > Nah, the REST API presumably works just fine and there is plenty to see on > the webui: > > http://localhost:5001/ipfs/bafybeif4zkmu7qdhkpf3pnhwxipylqleof7rl6ojbe7mq= 3fzogz6m4xk3i/#/ > > Not perfect, but it might suffice for your purposes. > That reminds me the configuration can be modified from there. > I didn't figure how to disable that. Not ideal from a security > perspective, but at least its only loopback & ipfs is in a container. Good. [...] > Yep! Also, this reminds me I'm not sure what the distinction between > #+ and #~ is in activation gexps, in shepherd services definitions, > etc. #+ is =E2=80=98ungexp-native=E2=80=99. It makes sense if you consider a cr= oss-compiled system. Code in an activation gexp is meant to run on the target system, so you want to use #$ (=E2=80=98ungexp=E2=80=99) there. You might want to use #+ when building things that can just as well be built natively. For instance, the background image for GRUB must be built by running Inkscape natively on the host system, so we use #+inkscape (or similar) to do that. I hope that makes sense. > Unfortunately, there are (non-container related) some more issues. > Last few weeks I've been seeing this error (/var/log/ipfs.log): > > (start snip) > Error: fs-repo requires migration > Initializing daemon... > go-ipfs version: 0.8.0 > Repo version: 11 > System version: amd64/linux > Golang version: go1.14.15 > Found outdated fs-repo, migrations need to be run. > Run migrations now? [y/N] Not running migrations of fs-repo now. > Please get fs-repo-migrations from https://dist.ipfs.io > > Error: fs-repo requires migration > (end snip) Bah, I remember seeing that. > Unfortunately "fs-repo-migrations" does not seem to be packaged in Guix. > Apparently there has been a change in repo format in the go-ipfs v0.7.0 > --> v0.8.0 upgrade. I believe for most users simply automatically running > the upgrades would be sufficient. Yes, I think so. We =E2=80=9Cjust=E2=80=9D need to package =E2=80=98fs-rep= o-migrations=E2=80=99 first. Perhaps it=E2=80=99d be okay, as a first step, to provide an IPFS service t= hat doesn=E2=80=99t handle migrations automatically. > Now, how could we do this safely from shepherd? Maybe before starting op= en > a pipe, write "y\n" to it an pass it as file descriptor 0 (stdin) would > be sufficient? But shepherd always closes /dev/stdin before exec IIRC .. You could have the =E2=80=98ipfs=E2=80=99 Shepherd service depend on, say, = a one-shot =E2=80=98ipfs-migration=E2=80=99 service. The =E2=80=98ipfs-migration=E2= =80=99 service would run =E2=80=98fs-repo-migrations=E2=80=99 if it=E2=80=99s necessary. >> The patch LGTM. However, we usually commit services along with a system >> test under (gnu tests =E2=80=A6). The manual has info on how to run ind= ividual >> system tests: >>=20 >> https://guix.gnu.org/manual/en/html_node/Running-the-Test-Suite.html >>=20 >> Could you write a test that ensures that basic functionality works? It >> could be as simple as waiting for the service to be up, then invoking >> =E2=80=98ipfs add=E2=80=99 and =E2=80=98ipfs get=E2=80=99. WDYT? > > Will look into it eventually, but I am currently occupied with other thin= gs > that have deadlines )-:. (Not feeling very inspired for a > writing/presentation assignment ...) (And I would rather hack on GNUnet > frankly; IPFS is more of a stop-gap to me for having some distributed > something for substitutes.) So feel free to beat me to it. I=E2=80=99m not offering to work on it :-), but hopefully you or maybe some fellow contributor can finish it up in the coming weeks! Thanks, Ludo=E2=80=99.