unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Joshua Branson <jbranso@dismail.de>
To: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Setting up guix source tree for testing a package
Date: Fri, 12 Mar 2021 14:59:21 -0500	[thread overview]
Message-ID: <877dmcb0ti.fsf@dismail.de> (raw)
In-Reply-To: <7698a9df-6fe6-9581-a513-456f8058ad3b@posteo.de> (Zelphir Kaltstahl's message of "Fri, 12 Mar 2021 00:31:36 +0100")

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> 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.

This sounds a little complicated...trying to develop things for guix
inside a virtual machine that's running Debian...I mean that sure makes
the testing REALLY potentially reproducible...But wouldn't it be
easier/simpler to do development for guix whilst using guix (or guix
system) on bare metal?

If you really prefer to develop for guix in a vm, you can download guix
virtual machine images here: http://guix.gnu.org/en/download/

Oh, having read the building from git section in the guix manual...they
do make it should like you should start from a virtual machine...What
operating system are you running on bare metal?  That's what I would use
to develop for guix.

>> 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.

May I suggest that this chicken and egg problem exists because you chose
to use a debian vm?  This is not a criticism.  :)

> 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
> <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.

I'm not certain how to answer this.  Since I develop for GNU Guix on
guix system, I always run "./configure --localstatedir=/var".  This
works for me!

>
> 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 think localstatedir is the location of guix specific things?  My
/var/guix contains gcroots, profiles, substitute, and daemon-socket
directories.

I applaud your attention to detail and trying to submit a "perfect"
patch to GNU guix.  :) That really does help the project have good
standards.  Trust me not all of the guix patches are perfect.  Somehow
some of mine were merged.  :)

>
> 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've run into this issue before too...hmmm.  How did I fix it?  I think
that you need to download Ludo's gpg keyring...

https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key

gpg --import public.key

Then you should be able to run:

     git fetch origin keyring:keyring
     guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad \
       "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"

> Where did I go wrong?
> Regards,
> Zelphir

I think you just tried to start developing in a "perfect" but difficult
way.  :)  If you already use GNU/Linux as your main OS, install guix on
it, and develop from that OS.  If you are running guix system, develop
from that.  Best of luck!

P.S.  You might find my online videos where I try to contribute to guix
helpful too:
https://video.hardlimit.com/accounts/joshua_branson/video-channels They
may be a little boring, and perhaps not the best way to develop, but the
videos show me developing in some kind of haphazard way.  My newer
videos involving endlessh are probably close to the "correct" way.

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar


  parent reply	other threads:[~2021-03-12 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 23:31 Setting up guix source tree for testing a package Zelphir Kaltstahl
2021-03-12  1:01 ` Fredrik Salomonsson
2021-03-17 20:46   ` Zelphir Kaltstahl
2021-03-18  0:22     ` Fredrik Salomonsson
2021-03-12 19:59 ` Joshua Branson [this message]
2021-03-17 20:49   ` Zelphir Kaltstahl
2021-03-12 21:52 ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dmcb0ti.fsf@dismail.de \
    --to=jbranso@dismail.de \
    --cc=help-guix@gnu.org \
    --cc=zelphirkaltstahl@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).