From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yGNGLkvfYWAkoAAAgWs5BA (envelope-from ) for ; Mon, 29 Mar 2021 16:08:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4A45KEvfYWAcVwAAbx9fmQ (envelope-from ) for ; Mon, 29 Mar 2021 14:08:11 +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 3FEB12305C for ; Mon, 29 Mar 2021 16:08:11 +0200 (CEST) Received: from localhost ([::1]:44254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQsYs-0005pK-Cn for larch@yhetil.org; Mon, 29 Mar 2021 10:08:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQsYl-0005os-Gp for guix-patches@gnu.org; Mon, 29 Mar 2021 10:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQsYj-0002pr-RS 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 1lQsYj-00084E-ML for guix-patches@gnu.org; Mon, 29 Mar 2021 10:08: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: Mon, 29 Mar 2021 14:08: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.161702686730982 (code B ref 45905); Mon, 29 Mar 2021 14:08:01 +0000 Received: (at 45905) by debbugs.gnu.org; 29 Mar 2021 14:07:47 +0000 Received: from localhost ([127.0.0.1]:49162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQsYV-00083e-03 for submit@debbugs.gnu.org; Mon, 29 Mar 2021 10:07:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQsYS-00083J-DQ for 45905@debbugs.gnu.org; Mon, 29 Mar 2021 10:07:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44148) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQsYM-0002bI-OD; Mon, 29 Mar 2021 10:07:38 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48246 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQsYB-0007tE-Jq; Mon, 29 Mar 2021 10:07:35 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <4e1df2f011f5766d48c44d7231e562a889239e7a.camel@telenet.be> (Maxime Devos's message of "Sun, 28 Mar 2021 18:36:13 +0200") References: <874kh3w1j6.fsf@gnu.org> <36af87b3ec48ed159cc237dcac93320817c74f58.camel@telenet.be> <871rc6koew.fsf@gnu.org> <4e1df2f011f5766d48c44d7231e562a889239e7a.camel@telenet.be> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) 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:07:26 +0200 Message-ID: <877dlqoxy9.fsf@gnu.org> 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=1617026891; 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=rWoISmgxpVTBVPcqK2+H6/T2RSptUohSng71M0FgQrrWl4ctMQlxljfIWv1oqqHF78neJk dWYbAbI5t6o2aC8/E8kcaFP+lsAUgrR6XxAg+UKN42MbTPvcOzFt1lqkMY4ENeEZht7oAY uiY4Ms9Cb89NOfUOE4sGbN34LKcYxaCcbbRz2qxvpN2xVXlPAC/9luu8zgvCI8LsR/jVrv N8h/PlZdsOEFWKETU5Ajh4q1g9Q2Pq8a5jzLWPCJSBiZSVHgZ17WnCRPzHhrzToZJdoVz7 utG5T52tti9qkHZYIdLD1jfvI6rq4d16Eiay98CHClIuot+HDr7jWlf41liRbw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617026891; a=rsa-sha256; cv=none; b=qmSUfkbRUDwi5w702hZSVF+7btOvFJRIIkoGEYJcECza0Q6/vroSlpx7OE2tskoCTFIveY i6oOfII+89mkDi/1cVwXUmB9iNwaOZQdXvGbZql2hZ7fJfKHm/uzCumrM0acKG6wxneQ7d IRyMftEkbVwPRVCFcWlEGgL7e/CiDItfu/Vp/bCTKXZXiPNN5dIK/BGcg/xJo6Rkpox5RO /R8aTx4+jW+gOa2kY9yyOStxLsBIZ6C/E4ZnhglV5TXnPksyXRd8iNF7GP5L4yGRaQK3rg 7HaTC1uruJqoq6wXLSOWQtMO26JY2TBXFa3SLpAMnbxG2cB/Xgmq11LDw/u7Pg== 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: 3FEB12305C X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: HcN0LHUwntwi 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.