From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catonano Subject: Re: how to create and test a new service definition Date: Sun, 14 May 2017 09:56:35 +0200 Message-ID: References: <87vap4zupo.fsf@gnu.org> <878tm0zflx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c283e194378054f774722" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9oOP-0001pC-A8 for guix-devel@gnu.org; Sun, 14 May 2017 03:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9oON-0006dh-VH for guix-devel@gnu.org; Sun, 14 May 2017 03:56:41 -0400 In-Reply-To: <878tm0zflx.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel --f403045c283e194378054f774722 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-05-13 22:06 GMT+02:00 Ludovic Court=C3=A8s : > Vincent Legoll skribis: > > >> The best way to test your code is to write an =E2=80=98operating-syste= m=E2=80=99 > >> declaration that uses the new service and to instantiate it in a VM wi= th > >> =E2=80=98guix system vm=E2=80=99. > > > > Should that be working properly (out-of-the-box) when you're already in > > a qemu VM (recursive virtualization) ? > > > > I ask because I'm getting: > > > > [...] > > ERROR: qemu failed "qemu-system-x86_64" > > What were the lines above this one? This tool tries to use KVM if it > seems available. Maybe in your case it =E2=80=9Cseems=E2=80=9D to be ava= ilable (as in > /dev/kvm exists) but is actually unusable? > > >> Once you=E2=80=99ve done that, you can also write an automated test fo= r the new > >> service; see . > > > > I'm far from there, I have a *really* hard time getting back to guixsd. > For > > instance it took me very long time to find back the GUIX_PACKAGE_PATH > > env var. This looks under-documented, or I don't understand how one is = to > > work on custom or new packages, etc... > > =E2=80=98GUIX_PACKAGE_PATH=E2=80=99 is documented at > Modules.html#index-GUIX_005fPACKAGE_005fPATH>. > > The workflow for defining packages is described at > >, > and that for contributing them is at > Submitting-Patches.html>. > > There=E2=80=99s probably room for improvement though. What changes/addit= ions > would you suggest? > Let me chime in here: I'd suggest to state the workflow or defining services, as the one or deining packages is stated But I'm not thinking about how to define and use The scheme structures. The examples are enough for that. I'm thinking about things like how to deal with qemu, if you want to test your services in a vm Is there any other way to get your feet wet with services ? George suggested me the trick to link a checked out master branch to .local/guix/profile (or maybe it's the other way around: it's liinking .local/guix/profile to a checked out master branch) Is anyone using this to work on services ? How, exactly ? Thanks --f403045c283e194378054f774722 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2017-05-13 22:06 GMT+02:00 Ludovic Court=C3=A8s <ludo@gnu.org= >:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">Vincent Legoll <vincent.legoll@gmail.com> skribis:

>> The best way to test your code is to write an =E2=80=98operating-s= ystem=E2=80=99
>> declaration that uses the new service and to instantiate it in a V= M with
>> =E2=80=98guix system vm=E2=80=99.
>
> Should that be working properly (out-of-the-box) when you're alrea= dy in
> a qemu VM (recursive virtualization) ?
>
> I ask because I'm getting:
>
> [...]
> ERROR: qemu failed "qemu-system-x86_64"

What were the lines above this one?=C2=A0 This tool tries to use KVM= if it
seems available.=C2=A0 Maybe in your case it =E2=80=9Cseems=E2=80=9D to be = available (as in
/dev/kvm exists) but is actually unusable?

>> Once you=E2=80=99ve done that, you can also write an automated tes= t for the new
>> service; see <https://gnu.org/s/guix= /news/guixsd-system-tests.html>.
>
> I'm far from there, I have a *really* hard time getting back to gu= ixsd. For
> instance it took me very long time to find back the GUIX_PACKAGE_PATH<= br> > env var. This looks under-documented, or I don't understand how on= e is to
> work on custom or new packages, etc...

=E2=80=98GUIX_PACKAGE_PATH=E2=80=99 is documented at
<https://www.gnu.org/software/guix/manual/html_node/Package-Modules.html#index-GUIX_005fPACKAGE_005fPATH>.

The workflow for defining packages is described at
<https://www.gnu.org/sof= tware/guix/manual/html_node/Defining-Packages.html>,
and that for contributing them is at
<https://www.gnu.org/so= ftware/guix/manual/html_node/Submitting-Patches.html>.

There=E2=80=99s probably room for improvement though.=C2=A0 What changes/ad= ditions
would you suggest?

Let me chime in he= re: I'd suggest to state the workflow or defining services, as the one = or deining packages is stated

But I'm not thinking ab= out how to define and use The scheme structures. The examples are enough fo= r that.

I'm thinking about things like how to deal wi= th qemu, if you want to test your services in a vm

Is the= re any other way to get your feet wet with services ?

Geo= rge suggested me the trick to link a checked out master branch to .local/gu= ix/profile (or maybe it's the other way around: it's liinking .loca= l/guix/profile to a checked out master branch)

Is anyone = using this to work on services ? How, exactly ?

Thanks
--f403045c283e194378054f774722--