From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Iy3rKlPfYWC3oAAAgWs5BA (envelope-from ) for ; Mon, 29 Mar 2021 16:08:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4Kq0JFPfYWCKKQAA1q6Kng (envelope-from ) for ; Mon, 29 Mar 2021 14:08:19 +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 5BFF72E181 for ; Mon, 29 Mar 2021 16:08:19 +0200 (CEST) Received: from localhost ([::1]:44466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQsYz-0005wI-8S for larch@yhetil.org; Mon, 29 Mar 2021 10:08:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQsYl-0005ot-H0 for guix-patches@gnu.org; Mon, 29 Mar 2021 10:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQsYk-0002pu-BL for guix-patches@gnu.org; Mon, 29 Mar 2021 10:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQsYk-00084L-52 for guix-patches@gnu.org; Mon, 29 Mar 2021 10:08:02 -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: Mon, 29 Mar 2021 14:08:02 +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.161702687330996 (code B ref 45905); Mon, 29 Mar 2021 14:08:02 +0000 Received: (at 45905) by debbugs.gnu.org; 29 Mar 2021 14:07:53 +0000 Received: from localhost ([127.0.0.1]:49164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQsYa-00083s-J4 for submit@debbugs.gnu.org; Mon, 29 Mar 2021 10:07:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQsYS-00083K-Dt for 45905@debbugs.gnu.org; Mon, 29 Mar 2021 10:07:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44138) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQsYJ-0002af-BY; Mon, 29 Mar 2021 10:07:35 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48244 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQsXR-0007qq-VB; Mon, 29 Mar 2021 10:07:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874kh3w1j6.fsf@gnu.org> <36af87b3ec48ed159cc237dcac93320817c74f58.camel@telenet.be> <871rc6koew.fsf@gnu.org> <4e1df2f011f5766d48c44d7231e562a889239e7a.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 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: Mon, 29 Mar 2021 16:06:40 +0200 In-Reply-To: <4e1df2f011f5766d48c44d7231e562a889239e7a.camel@telenet.be> (Maxime Devos's message of "Sun, 28 Mar 2021 18:36:13 +0200") Message-ID: <878s66oxzj.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=1617026899; 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=weWh118kk7YPdtKBvo7NJp8PJWfwp1b1iO+3sP2HRDk=; b=DyyWIf2fK8/WilWJDNhUiL39JquU+wTUrxmjez98DpK90mw2G/10BAVtTnMeyh5fG9LJhb 6zC3GR6JbWahLNhLQzmfF57OUDAmviS5woajHjl54aWpT8mPi8WS81b4EFD9lfEqfAsc6I Zjg63ThGuoZHwyjQcmzxcQOayYKdkP2RCgz+8Y4/v7ayEYMAT4uqUsGa5ns8wkSLR+wox5 /iAxDpD/O0WWE5vUbiJLGCm4jmN5Bjyl5RLkINrj3QaPAvpY8ag4Z25Xf8mpHa9/rizeLz 0yswHFyWBej0deJv6x8ULRZklYUR9WvYoA+KLAb8m0bT0PvJImB9mE4Sbe30hA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617026899; a=rsa-sha256; cv=none; b=AF9jlgfye+Z6zMhhzkrfAAEokuH7fxPFTFXoUHUAW846lhaQR/kemw301ybQ6T0KNgG1/l cdudRMdQhmxoy9ob6XfBKVF6Zz3LxzZFbcwq1iuMIRJYH7vMUqmixHMru/ubUJpAjUc+TB KHDSQ77GanmuXDYKhy/KB6wdBPJL0AsHl0g3lQ8VKE+WDLWxyr2nyjwn3ybyyoB7EfwM/9 hB+XbErbo497VH57CXxcJcucUq3fsS9XMcwn7SpSd/BkP3OgZCwlNSTApeFxjAIUzL542q lCA1fPLBPO7lC9n5wkvRM6M3VuNVOF3W4j9QPTLeY1gkRIfaRK6knJdwq6S1DQ== 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: -3.48 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: 5BFF72E181 X-Spam-Score: -3.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: gCb8HJN6lDyY Hi Maxime, Maxime Devos skribis: > TODO: this test isn't run for some reason: > > $ make && make check-system TESTS=3D"ipfs" >> [compilation bla bla] >> Compiling Scheme modules... >> Selected 1 system tests... >> (end of output) > > ??? why isn't the IPFS test executed? [...] > +(define (run-ipfs-test) > + (define os > + (marionette-operating-system %ipfs-os > + #:imported-modules '((gnu services herd) > + (guix ipfs)) > + #:requirements '(ipfs))) > + > + (define test > + (with-imported-modules '((gnu build marionette)) > + #~(begin > + (use-modules (gnu build marionette) > + (srfi srfi-64)) > + > + (define marionette > + (make-marionette (list #$(virtual-machine os)))) > + > + (define (ipfs-is-alive?) > + (marionette-eval > + '(begin > + (use-modules (gnu services herd) > + (srfi srfi-1)) > + (live-service-running > + (find (lambda (live) > + (memq 'ipfs > + (live-service-provision live))) > + (current-services)))) > + marionette)) > + > + ;; The default API endpoint port 5001 is used, > + ;; so there is no need to parameterize %ipfs-base-url. > + ;; By running this within the VM instead of outside the VM > + ;; this system test does not have to forward any ports.=20 > + (define (add-data data) > + (marionette-eval > + `((@ (guix ipfs) add-contents) ,data))) > + (define (read-contents object) > + (marionette-eval > + `((@ (guix ipfs) read-contents) ,object))) > + > + (test-begin "ipfs") [...] > + (gexp->derivation "ipfs-test" test)) You need to add: (mkdir #$output) (chdir #$output) right before (test-begin "ipfs"). Failing to do that, you create =E2=80=9Cipfs-test.drv=E2=80=9D as a zero-ou= tput derivation=E2=80=94i.e., a derivation that doesn=E2=80=99t produce any outp= ut. Since it produces nothing, the daemon doesn=E2=80=99t bother running its code. Nitpick: please avoid =E2=80=98@=E2=80=99. Instead, explicitly do: (marionette-eval '(use-modules (ipfs)) marionette) Alternatively, you can arrange to set up port forwarding for the VM and use the (ipfs) module from the host rather than from the guest. This is what (gnu tests ssh) does, for example. As it stands, the test fails because you need to: (define test (with-extensions (list guile-json) =E2=80=A6)) so that Guile-JSON is available, and probably also: (with-imported-modules '((ipfs)) =E2=80=A6) The rest LGTM. HTH! Ludo=E2=80=99.