[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting up guix source tree for testing a package
From: |
Zelphir Kaltstahl |
Subject: |
Re: Setting up guix source tree for testing a package |
Date: |
Wed, 17 Mar 2021 21:49:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
Hi Joshua!
On 3/12/21 8:59 PM, Joshua Branson wrote:
> 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
Thanks Joshua! I'll have a look at your resources once I get to it ; )
(I think I added them to the guile awesome list already, just did not yet watch
them all.)
Best wishes,
Zelphir
--
repositories: https://notabug.org/ZelphirKaltstahl