From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UEA7IOFqUmBLBAAA0tVLHw (envelope-from ) for ; Wed, 17 Mar 2021 20:47:29 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wETuG+FqUmBYKwAAB5/wlQ (envelope-from ) for ; Wed, 17 Mar 2021 20:47:29 +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 aspmx2.migadu.com (Postfix) with ESMTPS id AA3AC22D27 for ; Wed, 17 Mar 2021 21:47:28 +0100 (CET) Received: from localhost ([::1]:33130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMd4h-0001Jp-SV for larch@yhetil.org; Wed, 17 Mar 2021 16:47:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMd4G-0001JS-EC for help-guix@gnu.org; Wed, 17 Mar 2021 16:47:00 -0400 Received: from mout01.posteo.de ([185.67.36.65]:51721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMd4C-0000eC-6o for help-guix@gnu.org; Wed, 17 Mar 2021 16:47:00 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E701F16005C for ; Wed, 17 Mar 2021 21:46:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1616014013; bh=wwkjVBUWzs/5JNvBwVNk46232VmTU00dnNGA56JiUeo=; h=Subject:To:From:Date:From; b=GyVT5sgORMQasHwM37XMLBSNLVsQaTDKG0WE3Kg8ZybPCRXLIg0M4JYQFjiKc8SbB hbk+SDKQ/e2ZtK3Ww/sjWT9zt331XZqokZhGjmUBmomxSviQNRu4etQgmCr98/FS5r CWz96DFdfSMH+Pn6vd6+OPQfPIkyZljf8Bp5P1nyqNqhqxy//lDDN0DDKX6YO0a9mT Ir7KAPmRPW27OmIj3vCmdwaPIrx7idU7K3aDNty1uz9JZ8F9CAor6yS1dNGTWkSQ2s yqgzJiJkAAP5PSxFqCY3X2z8BvQZbV2o92AL4IeW5s5XddchDymU8GAxwqMsZqnmcX rpzGa+v7ZyRww== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F12JY0rKqz9rxV; Wed, 17 Mar 2021 21:46:53 +0100 (CET) Subject: Re: Setting up guix source tree for testing a package To: Fredrik Salomonsson , help-guix References: <7698a9df-6fe6-9581-a513-456f8058ad3b@posteo.de> <87im5xkwx8.fsf@posteo.net> From: Zelphir Kaltstahl Message-ID: Date: Wed, 17 Mar 2021 21:46:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <87im5xkwx8.fsf@posteo.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL=1.623 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=1616014048; 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=/+KL+CidIvtVmfUYkaf1yuPy/nSNb/+KJ12UFY9NUaE=; b=QdavJkJ86r9Ybwak0VCn/4KoLS9L8Wl1CtzVLDc7IPugr1QLdkGe9qHMZbud7TyG2fNptO PqWTa4BRfarvjfdrFiSb8/zCbtAD6sEazLuBwKkKuEGSsXee5aTI+3aO13lyDvT2c/XG4e hQCVvhs4O/SWfVIJymsG8wP3hmTRdTGcDAeNTMa5F5gGwBV9EVdatey7WhqF6ZH2GjO7Bg wLjnciNWprvXixRog6hNfkZ5As6CLtUbBg1xGAIj1rEumzl3Tit2UquB0r/HUSixikzplU 4odmBn7SqpMgEcgg6Se7nuNoKoGONE6T9pb3s/DxEoNqGxSRoMM99yR2NxJAOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616014048; a=rsa-sha256; cv=none; b=t9LRU/dugMAM1FNovYque03lg2mdLFowDnDoVjTkqzMb5TmMo99FBv8QMPVYGQBJTonVB4 m3ei011tzNj6y2m0tiLxRzFWnh8w3htWCscgqfVA9sGdIXXB6fY4jv4Fgq1suoDmLIhu7O FGzT9Nr0dMvSrt2aMdTZrmwL6WVqUbfH6+VtOBGDCvMt7yW30WA13SsjJDxO6jgpQFJ9Vl xdq/Xa7tSlcoFmJU9erGcvQPGowyVdyAfEt4d4SqfIFpADjNSAiGnDhwblJcqieel1Icto Ke//UrTpHeLJzyaeRrvw8xekeGJcz+Pi7Ge85IHAQSWTugcj8EYosGTWc4APaw== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=GyVT5sgO; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx2.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.10 Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=GyVT5sgO; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx2.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: AA3AC22D27 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1uXmFAaxMB7S Hello Frederik! On 3/12/21 2:01 AM, Fredrik Salomonsson wrote: > 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 package >> 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 docs in >> the following. >> >> All is happening inside a VM, which runs a Debian 10. The VM is almost fresh, >> 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 >> , wherein 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-Installed.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-Installed.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 understand). 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 dilemma 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 medium. >> This “bootstraps” 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=some_directory >> ~~~~ >> >> But here I am facing a problem. I have no clue what to set the >> `--localstatedir=directory` 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 linked >> 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 about my >> specific scenario of doing things from Guix source tree. Since I intend to 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 create >> 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 >> . >> ├── guix >> │   ├── ABOUT-NLS >> │   ├── aclocal.m4 >> │   ├── AUTHORS >> │   ├── autom4te.cache >> │   ├── bootstrap >> │   ├── build-aux >> │   ├── ChangeLog >> │   ├── CODE-OF-CONDUCT >> │   ├── config-daemon.ac >> │   ├── config.log >> │   ├── config.status >> │   ├── configure >> │   ├── configure.ac >> │   ├── COPYING >> │   ├── doc >> │   ├── etc >> │   ├── gnu >> │   ├── gnu.scm >> │   ├── guix >> │   ├── guix.scm >> │   ├── HACKING >> │   ├── INSTALL >> │   ├── m4 >> │   ├── Makefile >> │   ├── Makefile.am >> │   ├── Makefile.in >> │   ├── NEWS >> │   ├── nix >> │   ├── po >> │   ├── pre-inst-env >> │   ├── README >> │   ├── ROADMAP >> │   ├── scripts >> │   ├── test-env >> │   ├── tests >> │   ├── THANKS >> │   └── TODO >> └── guix-store >> ~~~~ >> >> So I run: >> >> ~~~~ >> ./configure --localstatedir=/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 following >> 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 whether the >> localstatedir was wrong or what else it means. > I get the same error with localstatedir=/var and using > `guix environment guix --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.html >> continue: >> >>> From there on, you can authenticate all the commits included in your checkout >> by running: make authenticate >> >> It is not clear to me, whether that means, that I need to run it in my scenario >> or whether I should not run it. >> >> A look into the Makefile shows, that it is actually calling a guix command `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 commits. >> However, this might be my lacking understanding of what `make authenticate` does >> or aims to do. >> >> When I try running: >> >> ~~~~ >> make authenticate >> ~~~~ >> >> I get an error: >> >> ~~~~ >> $ make authenticate >> 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/daemon-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 ‘guix-daemon’ is already running on your system; it’s OK > if it’s a different version)" [0] > > [0] https://guix.gnu.org/manual/en/html_node/Running-Guix-Before-It-Is-Installed.html#Running-Guix-Before-It-Is-Installed > > I hope that helps. > This definitely is helpful! I'm sorry for the delay in responding. Thank you for your efforts! I hit other errors when leaving away the --pure and I have the suspicion, that gnu-build-system requires me to have a configure script in the git tree of my repository, which I did not know before I saw it failing with a 127 error on calling a configure script, which is/was not commited in my repository. I will probably have to revise a section somewhere in my guile-hall packaging guide, to note, that one should add the configure script, even though it is generated by hall. Best regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl