From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yOCHOGu9SmByRQAA0tVLHw (envelope-from ) for ; Fri, 12 Mar 2021 01:01:31 +0000 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 IN08NGu9SmDdRgAAbx9fmQ (envelope-from ) for ; Fri, 12 Mar 2021 01:01:31 +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 2C3F126EFA for ; Fri, 12 Mar 2021 02:01:31 +0100 (CET) Received: from localhost ([::1]:54492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKWBG-0005hp-AF for larch@yhetil.org; Thu, 11 Mar 2021 20:01:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKWB5-0005hU-2e for help-guix@gnu.org; Thu, 11 Mar 2021 20:01:19 -0500 Received: from mout02.posteo.de ([185.67.36.66]:48525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKWAz-0007Id-R5 for help-guix@gnu.org; Thu, 11 Mar 2021 20:01:18 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 12A1A240269 for ; Fri, 12 Mar 2021 02:01:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1615510871; bh=ntzpGP6V8uSGHlxbnvK68FQaeRNxc/4Pc09d0d3MQic=; h=From:To:Subject:Date:From; b=CApqDhKzXiqriYoocDKLcXjvUKzlNrK73vNVMgWIrcUnaPlaW+7n8i3GPbYzWxy1W OEXcgHarkNZaiQ83fb0UWARvjklDTCCKFPlaTAXQuD5w4nqc7oUH+/sMcc34v6Ia2b I4rz9pc5oKn27xfibglnVvUKCvGUaj/Cd9lyHyWtrQ7HLQyR6NzZJbzqLdBdUc7wit Ad9Q/fgAH6KF8AJt+tjMVGB2456iu+3c5sCoYDB+TMTZkxVvLp8X3n1u0h5cHjVUGY nstOncHf4oUjlu1DOKBvTXgqQq4S+QhhwKKZ4ZenEFzFS/CHBb6QTB76KZEV7TcmTY kdDNkfXSJiY0w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DxSDj3VRlz9rxN; Fri, 12 Mar 2021 02:01:09 +0100 (CET) From: Fredrik Salomonsson To: Zelphir Kaltstahl , help-guix Subject: Re: Setting up guix source tree for testing a package In-Reply-To: <7698a9df-6fe6-9581-a513-456f8058ad3b@posteo.de> References: <7698a9df-6fe6-9581-a513-456f8058ad3b@posteo.de> Date: Thu, 11 Mar 2021 17:01:07 -0800 Message-ID: <87im5xkwx8.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615510891; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yqUWL+4Lv8iETAPmJ2kTn/7Qahg92OnY3BpAW7FV6BE=; b=RKuTlRA/9rnk5AdEOkN73+DA4LE1nD9utm0fMIbFt/mDzeF11cfrh8PRfN8xcbPrGFPmcY lExCDAUFcEgI+EYlUQ2yYUn1WdGA/UB8FFkNECAQuLHNZzk6WPRlAvdgTAf+S+za9Quh7b DAOuzPa7n0pfB8HTlnSOvFVz6sDyvbBvuyRlJTWGT6gbOduN4FW2wNb4xnlixmhWfqA6Wc Tnem6jhfNK958yNBGP4FLrwgt5zXcP+EG5cfNl8IVmUFBxJGQUfdE0fe5neIh22FGrtH/n 4WDa7ZYC859A/DsMo3kKD98cWbfqXGZOo9PKnkL8GmIcdiyFS8EToH4f8yfoug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615510891; a=rsa-sha256; cv=none; b=mV0MZEQaygynM2ra+2z6BfVHJM9LW/au3TgE3rCxQYeXcytFkdWMITeq1YpoGBidsQ1kfT 9eUlevcKPvdA2YIeAM0sTT83ycr1IIJ1g7l96ihCvYQCi3/VVVyWbaZo/sA16TsUkDn+et JefbV4XpTH3psF7zwAIs3ZaSgrPYC8tKrHDIPE55ugoWRXkWnu8vQF1uS+UWij7IQLs+47 o1zlgfDX5FbXEg+L2JLJivbZQ2+MJ3nrNly5hDleKb8oCDkvOLqNjUSt9qWDs55fanYyqm h6cYtS2GwF5lF2MRBnLr4SSQE3nX1CLvrFeAG2GibZPGnxQvLAclx5Yis2IaPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CApqDhKz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CApqDhKz; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 2C3F126EFA X-Spam-Score: -3.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: vPaCt0gXYNGf Hi Zelphir, Zelphir Kaltstahl writes: > Hello Guix Users, > > I am trying to set up GNU Guix for package testing, as I want to test a p= ackage > before sending in a patch to add it to GNU Guix. > > I'll describe the steps I am taking and where I am seeing them in the doc= s in > the following. > > All is happening inside a VM, which runs a Debian 10. The VM is almost fr= esh, > except for guest additions and git and vim and such things. > > > I start at https://guix.gnu.org/manual/en/html_node/Packaging-Guidelines.= html > , whe= rein I > find a link to https://guix.gnu.org/manual/en/html_node/Defining-Packages= .html > . > > Next the packaging guidelines tell me, that I may run for example: > > ~~~~ > ./pre-inst-env guix build gnew --keep-failed > ~~~~ > > inside the Guix build tree. > > I clone Guix, so that I have a source tree of Guix. > > I define my package inside `guix/gnu/packages/guile.scm`. > > In packaging guidelines, there is a link to > https://guix.gnu.org/manual/en/html_node/Running-Guix-Before-It-Is-Instal= led.html > . > I am supposed to run the test inside a fresh Guix, to make sure, that the > package will work fine for others, if I understand correctly. > > On > https://guix.gnu.org/manual/en/html_node/Running-Guix-Before-It-Is-Instal= led.html > > I am told, that I need to generate a pre-installation script to run guix = without > installing it (running stuff in the Guix build tree, as far as I understa= nd). To > generate it, I need Guix again. The docs direct me to > https://guix.gnu.org/manual/en/html_node/Building-from-Git.html > . > > On https://guix.gnu.org/manual/en/html_node/Building-from-Git.html > the dil= emma is > finally uncovered, that I need Guix to build the pre-installation script,= to use > that, to build a package in the Guix source tree. > > As you can see, there is a chicken-and-egg problem: you first need to have > Guix installed. Typically you would install Guix System (see System > Installation) or Guix on top of another distro (see Binary Installation);= in > either case, you would verify the OpenPGP signature on the installation m= edium. > This =E2=80=9Cbootstraps=E2=80=9D the trust chain. > > I install it. You don't need guix to build guix, it just makes it a lot easier to setup the environment to build guix as you don't need to hunt for its dependencies yourself. > Then I run: > > ~~~~ > guix environment guix --pure > ~~~~ > > The docs tell me I have to run: > > ~~~~ > ./bootstrap > ./configure --localstatedir=3Dsome_directory > ~~~~ > > But here I am facing a problem. I have no clue what to set the > `--localstatedir=3Ddirectory` to. The docs tell me it is important, but I= see no > instructions on how to choose a directory for the local state, when I have > already a Guix installed (binary installation on foreign distro). The lin= ked > docs about the https://guix.gnu.org/manual/en/html_node/The-Store.html > do not help me > choosing it either, because that page is about the store itself, not abou= t my > specific scenario of doing things from Guix source tree. Since I intend t= o build > a package inside the Guix source tree, I think it should exactly _not_ be= /var, > as that would conflict with the Guix installation, that I had to do to cr= eate > the pre-inst-env script. > > What is the idea for the local state directory? Is it the location of a > temporary store, which will contain anything, that I produce using the > pre-inst-env script? That is what I am guessing. In that case I think > `localstoredir` might be a good alias for `localstatedir`. > > > I am trying with an empty directory, which I create just for that purpose= , on > the same level as the cloned Guix repository: > > ~~~~ > $ tree -L 2 > . > =E2=94=9C=E2=94=80=E2=94=80 guix > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 ABOUT-NLS > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 aclocal.m4 > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 AUTHORS > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 autom4te.cache > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 bootstrap > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 build-aux > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 ChangeLog > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 CODE-OF-CONDUCT > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 config-daemon.ac > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 config.log > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 config.status > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 configure > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 configure.ac > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 COPYING > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 doc > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 etc > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 gnu > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 gnu.scm > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 guix > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 guix.scm > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 HACKING > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 INSTALL > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 m4 > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 Makefile > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 Makefile.am > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 Makefile.in > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 NEWS > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 nix > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 po > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 pre-inst-env > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 README > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 ROADMAP > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 scripts > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 test-env > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 tests > =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 THANKS > =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 TODO > =E2=94=94=E2=94=80=E2=94=80 guix-store > ~~~~ > > So I run: > > ~~~~ > ./configure --localstatedir=3D/home/user/dev/guix-store > ~~~~ > > Next is running: > > ~~~~ > make check > ~~~~ > > Some warnings appear: > > ~~~~ > Your input po file po/doc/guix-manual.de.po seems outdated (The amount of= entries differ between files: 10012 is not 334 > ). Please consider running po4a-updatepo to refresh it. > ~~~~ > > But I am guessing, that these can be ignored for my purposes, as I am not= doing > anything with translations or po files. > > However, there are other errors, like not finding code for some modules (= the > output of make check is very long and probably I should rather put the log > somewhere and link to it). The check seems to fail ultimately with the fo= llowing > result: > > ~~~~ > make[4]: *** [Makefile:5563: tests/store.log] Error 1 > make[4]: Leaving directory '/home/user/dev/guix' > make[3]: *** [Makefile:5545: check-TESTS] Error 2 > make[3]: Leaving directory '/home/user/dev/guix' > make[2]: *** [Makefile:5794: check-am] Error 2 > make[2]: Leaving directory '/home/user/dev/guix' > make[1]: *** [Makefile:5322: check-recursive] Error 1 > make[1]: Leaving directory '/home/user/dev/guix' > make: *** [Makefile:5796: check] Error 2 > ~~~~ > > The only red colored fail I can see is above from that, first line of the= following: > > ~~~~ > FAIL: tests/go.scm > PASS: tests/grafts.scm > PASS: tests/graph.scm > PASS: tests/gremlin.scm > SKIP: tests/hackage.scm > PASS: tests/import-utils.scm > PASS: tests/inferior.scm > PASS: tests/lint.scm > PASS: tests/modules.scm > PASS: tests/monads.scm > PASS: tests/nar.scm > PASS: tests/networking.scm > PASS: tests/opam.scm > PASS: tests/openpgp.scm > PASS: tests/packages.scm > SKIP: tests/pack.scm > PASS: tests/pki.scm > PASS: tests/print.scm > PASS: tests/processes.scm > PASS: tests/profiles.scm > SKIP: tests/publish.scm > SKIP: tests/pypi.scm > PASS: tests/records.scm > PASS: tests/scripts.scm > PASS: tests/search-paths.scm > PASS: tests/services.scm > PASS: tests/services/file-sharing.scm > PASS: tests/services/linux.scm > PASS: tests/sets.scm > PASS: tests/size.scm > SKIP: tests/snix.scm > PASS: tests/status.scm > PASS: tests/store-database.scm > PASS: tests/store-deduplication.scm > PASS: tests/store-roots.scm > make[4]: *** [Makefile:5563: tests/store.log] Error 1 > make[4]: Leaving directory '/home/user/dev/guix' > make[3]: *** [Makefile:5545: check-TESTS] Error 2 > make[3]: Leaving directory '/home/user/dev/guix' > make[2]: *** [Makefile:5794: check-am] Error 2 > make[2]: Leaving directory '/home/user/dev/guix' > make[1]: *** [Makefile:5322: check-recursive] Error 1 > make[1]: Leaving directory '/home/user/dev/guix' > make: *** [Makefile:5796: check] Error 2 > ~~~~ > > I am not sure, whether this means, that I have an erroneous Guix or wheth= er the > localstatedir was wrong or what else it means. I get the same error with localstatedir=3D/var and using `guix=C2=A0environment=C2=A0guix=C2=A0--pure`. I don't get this error when = I drop the --pure argument. Might be some environment variables that needs to be setup for it to communicate properly with the guix daemon. > However, I continue. > > The docs on https://guix.gnu.org/manual/en/html_node/Building-from-Git.ht= ml > continu= e: > >> From there on, you can authenticate all the commits included in your che= ckout > by running: make authenticate > > It is not clear to me, whether that means, that I need to run it in my sc= enario > or whether I should not run it. > > A look into the Makefile shows, that it is actually calling a guix comman= d `guix > git authenticate`. The description is "verify commit signatures and > authorizations". "verify" or "verify-signatures" seems a more appropriate= name, > because it indicates checking signatures, instead of authenticating commi= ts. > However, this might be my lacking understanding of what `make authenticat= e` does > or aims to do. > > When I try running: > > ~~~~ > make authenticate > ~~~~ > > I get an error: > > ~~~~ > $ make authenticate=20 > Authenticating Git checkout... > /bin/bash: line 1: guix: command not found > make: *** [Makefile:6290: authenticate] Error 127 > ~~~~ > > I am confused as to why it does not find guix. I am inside the environment > created by `guix environment guix --pure`. > > I continue nevertheless and try to run: > > ~~~~ > ./pre-inst-env guix build guile-fslib > ~~~~ > > However, my whole setup now seems wo be messed up. The `guix` command can= simply > no longer be found: > > ~~~~ > $ pwd > /home/user/dev > $ guix environment guix --pure > $ pushd guix > ~/dev/guix ~/dev > $ ./pre-inst-env guix build guile-fslib > guix build: error: failed to connect to `/home/user/dev/guix-store/guix/d= aemon-socket/socket': No such file or directory > ~~~~ > > A logout and login does not change the error. > > Where did I go wrong? The issue, I believe, is that there is no guix-daemon running that is listening on that store, hence the error about missing socket file for it. You can try in a different shell: guix environment guix --pure ./pre-inst-env guix-daemon And then call `guix build` in the other shell and see if that works. Some one correct me if I'm wrong. But just contributing a package, using /var should be enough. Then you can use the build daemon that is already running. As the manual points out: "(this assumes =E2=80=98guix-daemon=E2=80=99 is already running on your sys= tem; it=E2=80=99s OK if it=E2=80=99s a different version)" [0] [0] https://guix.gnu.org/manual/en/html_node/Running-Guix-Before-It-Is-Inst= alled.html#Running-Guix-Before-It-Is-Installed I hope that helps. --=20 s/Fred[re]+i[ck]+/Fredrik/g