Guix doesnt use guix publish as a substitute

2020-09-02 Thread edk
Dear Guixers,

On one machine I have the following:
$guix describe
guile: warning: failed to install locale
Génération 201 sept. 2020 17:10:25  (actuelle)
  beaverlabs d878892
URL du dépôt : https://gitlab.com/edouardklein/guix
branche: beaverlabs
commit : d8788927c7e8b29702adb971bf1ffbc3235fba22
  guix 6bf5f20
URL du dépôt : https://git.savannah.gnu.org/git/guix.git
branche: master
commit : 6bf5f207f171e87a53e6578a61b4334683a861c8

On another I have:

$guix describe
Generation 4Sep 01 2020 17:32:39(current)
  beaverlabs d878892
repository URL: https://gitlab.com/edouardklein/guix
branch: master
commit: d8788927c7e8b29702adb971bf1ffbc3235fba22
  guix 6bf5f20
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 6bf5f207f171e87a53e6578a61b4334683a861c8

I then run guix build gerbil on the first machine, then  guix publish, and make 
it available to
the second using a ssh tunnel and run

guix build --substitute-urls=http://localhost:8080 --dry-run gerbil

on the second machine, and I get:

substitute: 
/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash: 
warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
The following derivation would be built:
   /gnu/store/0nl1kmsqnbba4z47p28y0n023kbnvl8w-gerbil-0.16.drv


My question is: why isn't the second machine fetching a binary package
of gerbil from the first ? Why does it try to build it (it can't, not
enough RAM) ?

I have no idea how to debug this.

I tried curling http://localhost:8080 on the second machine, which gives
me the nice "Guix publish speaking" message.

I noticed that on the second machine, it believes that commit d878892 is
on branch master, which it isn't, it's on branch beaverlabs, but I don't
think this matters, does it ?


Any help would be appreciated.

Thanks,

Edouard.



Re: Guix doesnt use guix publish as a substitute

2020-09-02 Thread edk
Hi Pierre !

That was it, thanks a lot ! Sorry I should have read the docs more carefully.

The command to run on the first machine was

ssh root@SECONDMACHINE guix archive --authorize < /etc/guix/signing-key.pub

It now says "downloading from
http://localhost:8081/nar/gzip/yyrr1zj2ax53pylzp0mq92sgpldk2603-gerbil-0.16";

Cheers,

Edouard.

Pierre Neidhardt writes:

> Hi!
>
> Did you authorize the substitute server on the client?
>
> From the manual (Invoking `guix publish'):
>
>>The signing key pair must be generated before ‘guix publish’ is
>> launched, using ‘guix archive --generate-key’ (*note Invoking guix
>> archive::).
>> ...
>>Once a publishing server has been authorized (*note Invoking guix
>> archive::), the daemon may download substitutes from it:
>
> Hope that helps!




guix system docker-image : missing root file system and 'incompatible bytecode kind'

2020-10-31 Thread edk
Dear Guix,

At the request of a client, I am trying to create a docker image for a
guix package I wrote.

I pasted my operating-system declaration below. I try to run
guix system docker-image denatting.scm

If I remove the dummy root file system, I get the error:
> /home/edouard/src/denatting/denatting.scm:36:0: error: missing root file 
> system

If I put a dummy root filesystem (I put '/dev/vda1' there arbitrarily,
the field is mandatory and I have no idea what block device is available
under docker, I was under the impression that virtualized operating
system did not neeed a root file system), I can create an image and load
it but when I invoke docker run I get the error message I also
pasted below "In procedure load-thunk-from-memory: incompatible bytecode
kind" and the service does not start.

What I don't understand is that if I use `guix pack` I can get a docker
image with my software installed. However I must then run
docker run denatting:latest denat
to run the server.

My goal here is to create a shepherd service so that the client just has
to run
docker run denatting:latest
without habing to specify a command, and with shepherd monitoring the
server and restarting it when it crashes.

Any help would be appreciated,

Thanks in advance,

Edouard.

---denatting.scm---8<-
(define-module (denatting)
  #:use-module (gnu system)
  #:use-module (gnu system file-systems)
  #:use-module (gnu bootloader)
  #:use-module (gnu bootloader grub)
  #:use-module (gnu services)
  #:use-module (gnu services base)
  #:use-module (gnu services shepherd)
  #:use-module (beaver packages scheme-xyz)
  ;#:use-module (oop goops)
  #:use-module (guix gexp)
  ;#:use-module (guix records)
  ;#:use-module (ice-9 match)
  #:export (denatting-service))

(define denatting-service
  (lambda (_)
(list
 (shepherd-service
  (provision '(denatting))
  (documentation "Denatting web server")
  (respawn? #t)
  (start #~((make-forkexec-constructor
 (list "denat")
 #:log-file "/var/log/denatting.log")))
  (stop #~((make-kill-destructor)))

(define denatting-service-type
  (service-type
   (name 'denatting)
   (extensions
(list (service-extension shepherd-root-service-type denatting-service)))
   (default-value #f)))


(operating-system
 (host-name "denatting")
 (timezone "Europe/Paris")
 (bootloader (bootloader-configuration
  (bootloader grub-bootloader)))
 (packages (append (list
gerbil-denatting)
   %base-packages))
;; (file-systems %base-file-systems)
  (file-systems (append (list
 (file-system
  (mount-point "/")
  (device "/dev/vda1")
  (type "ext4")))
%base-file-systems))
 (services (append (list
(service denatting-service-type))
   %base-services)))
Error message I get with the dummy file system---8<
;;; WARNING: loading compiled file 
/gnu/store/08da6i38fzn9g36gyq443k03f84nk8rk-module-import-compiled/guix/build/utils.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/activation.go
 failed
:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/system/accounts.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/records.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/accounts.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/combinators.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/linux-boot.go
 failed
:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/build/syscalls.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/gnu/build/linux-modules.go
 fai
led:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
;;; WARNING: loading compiled file 
/gnu/store/xfrwjx47iwv8pnn6ml22fj6jnm2jmdjm-module-import-compiled/guix/elf.go 
failed:
;;; In procedure load-thunk-

Re: Port forwarding for Guix containers

2020-11-22 Thread edk


The trick is that guix being written in scheme, operating system
declarations can be written in a composable way, where the port N can be
a parameter.

The way I see it, it is when you compose all your services together on
one host that you decide which service gets which port, and declare all
that in a single operating system declaration (which is made up of
modular, task specific, smaller OS declarations).

I don't know if I'm being clear. I can't provide code because I did not
have the time to do it yet, but this was my understanding of how guix works.

Jason Conroy writes:

> I agree with Zihao that containers have certain use cases where it's
> important to use separate network namespaces for each instance, with
> traffic forwarded selectively between host and guest. Security (and hence
> firewalling) is part of the issue, but it's also about the container's
> maintainability and reproducibility.
>
> Supposing that we've developed some system container that starts a service
> on port N. If we want to run another instance of the same container, we
> first need to override the port number for the service in our
> operating-system, otherwise the service in the second container will fail
> to bind to port N in the shared network namespace. With a couple of
> one-service containers this may not be so hard, but system containers in
> general could have lots of services, and the authors of individual
> containers may not want to worry about choosing port numbers that are
> mutually disjoint from those in all other containers (and those used by the
> container host itself).
>
> Aside from the risk that one container's port bindings will prevent another
> container from working, there's also the risk of unintended dependencies:
> we might start a container thinking that it's self-contained, when really
> it depends on a service belonging to the container's host or to another
> container. This is why I consider the shared namespace a reproducibility
> problem.
>
> Lately I've been experimenting with a modified version of this script
> 
> to set up a network namespace with its own interface and routes, and then
> run a guix system container inside. Because the container is built with the
> -N flag, its services will bind to the virtual interface inside the network
> namespace. Processes inside the container can access the internet, while
> processes on the host (but outside the container) can access the container
> services via the IP address bound to the container's interface.
>
> Next, to make the container's services accessible to other hosts, there are
> a couple of options. One is to enable port forwarding from the host's
> external interface to the container's IP address using iptables
> . If the
> container is hosting a web service, another choice (as Edouard mentions) is
> for the host to run some sort of reverse proxy that forwards incoming
> requests to the container's port. For example, nginx and Apache can both do
> this.
>
> It would be really nice if guix system containers had this namespacing
> ability built in, but it sounds complex.
>
> On Sat, Nov 21, 2020 at 10:03 AM zimoun  wrote:
>
>> Hi,
>>
>> On Fri, 20 Nov 2020 at 19:26, Christopher Baines  wrote:
>> > Zhu Zihao  writes:
>> >
>> >> I found guix container "created by `guix environment --container` or
>> >> `guix system container`" is very useful to isolate some service. But
>> >> it only supports fully isolated network namespace or just share with
>> >> host, it's not so safe IMO.
>> >
>> > I'll assume that a fully isolated network namespace is safer in whatever
>> > way you're referring to than a shared network namespace. However, for a
>> > shared network namespace, what threats is that not safe in respect to?
>> >
>> > In the shared network namespace scenario, you are free to use a
>> > firewall, which could help protect against threats coming from other
>> > machines, for example by creating a list of IP addresses which are
>> > allowed to connect, and dropping any other traffic.
>>
>> I do not know about the initial motivation and I do not know either if
>> it makes sense in the context of “guix environment”.  One point is that
>> Docker [1] provides a way to specify the firewall rules.  Well, somehow,
>> something similar as ’--share’ but for network.
>>
>>
>> 1: 
>>
>> All the best,
>> simon
>>
>>




Error with guile function format

2021-03-12 Thread edk
Dear Guixers,

In a channel-that-should-not-be-named, there is the following snippet

   (apply invoke "7z" "e" (assoc-ref %build-inputs "patch-data")
  (map (cut format "quake3-latest-pk3s/baseq3/pak~a.pk3" <>)
   (iota 8 1)))

Which, as far as my limited knowledge of Guile goes, is correct.

Yet the build fail with the following error message:

In ice-9/format.scm:
 43:8  0 (format "quake3-latest-pk3s/baseq3/pak~a.pk3" 1)

ice-9/format.scm:43:8: In procedure format:
format: expected a string for format string 1


The first argument to format is a string, so I don't understand the
fuss.

Any idea would be welcome :)

Thanks !

Edouard.



Environment of a shepherd service

2021-04-11 Thread edk
Dear fellow Guixers,

I'm trying to create an operating system declaration, so that I can run
a piece of software of mine in a container with =guix system container=.

I wrote a package for the software. The package works: the tests pass
and when the package is installed I can run the software.

I wrote a shepherd service for the software (it's called requisomatic).
I copied the relevant part at the end of the email.

When I run the container script created by =guix system container=, and
get a shell in the container, I can run the software (I added the software's
package to the globally installed packages in the operating-system definition).

But, when I try to run it with shepherd, it fails because it can't find
flask (a dependency of the software, which I've put as a
propagated-input, and is indeed installed in the container).

I replaced the software invocation in the shepherd service with just
"env", and saw that the whole env in the service is:

PATH=/run/current-system/profile/bin

whereas in the shell I get when I connect to the container, the env
contains many other variables, including a correctly set PYTHONPATH,
which allows the finding of flask.

So I now know why my software is not starting, but my question is:

Why is the PYTHONPATH (and the other env vars, for that matter) not
propagated from the package to the shepherd service by default ? And how
can I make it so ? I would have expected the shepherd service to run
with the global profile active.

Follow up question, can shepherd services be specified to run in a
specific profile ? So that I can have two services with incompatible
dependencies running at the same time in the same operating-system ?

Thanks in advance,

Cheers,

Edouard.



-extract from my operating-system declaration file---
(define requisomatic-shepherd-service
  (match-lambda
(($  user group db-file)
 (list (shepherd-service
(provision '(requisomatic))
(requirement '(user-processes networking))
(documentation "Run the requisomatic server")
(start #~((make-forkexec-constructor
;;   (append
;;(if db-file
;;  `("env"
;;,(string-append "REQUISOMATIC_DB_FILE=" db-file))
;;  '())
'("gunicorn" "requisomatic:app")
   ;;   '("env")
   ;;)
   #:directory (string-append #$requisomatic 
"/bin/requisomatic/")
   #:log-file "/var/log/requisomatic.log")))
(stop #~(make-kill-destructor)))



Can't bind to port 80 from inside a Guix container

2021-04-21 Thread edk
Dear fellow Guixers,

I'm trying to run nginx with `guix system container --network toto.scm`,
and I get the following error:

nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

despite the container script being launched with sudo.

I got a root shell inside the container, checked that the corresponding
process also belongs to root from outside the container, and still don't
have the right to bind to port 80, with any software (this is not an
nginx error).

netcat lets me launch `nc -l 80` but I can't reach it, I don't think it
is actually binding.

Is this a known problem or limitation of guix containers ?

What do you suggest to try to troubleshoot this issue ?

Cheers,

Edouard.



How to lower a record to the build code ?

2021-05-05 Thread edk
Hi,

I've been stuck for a few days on the following:
Let's say I have a record type:

(define-record-type*  my-record make-my-record
  my-record?
  this-record
 (first-field my-record-first-field)
 (second-field my-record-second-field))

And a function that uses such a record, but needs to run on the build
side, because it also needs the store path of a package (I can't edit
this function):

(define (function-of-a-record-and-a-build-time-path rec path)
  "Concatenate the path, first, and second field"
  (string-append path " " (my-record-first-field rec) " " (car
  (my-record-second-field rec)) " " (cdr (my-record-second-field rec

How can I use this record in the build side. For example, I'm unable to
build the following G-exp:
(define a-record (my-record
  (first-field "first")
  (second-field '("second" . "third"


#~(with-output-to-file (string-append #$output "/file.txt")
 (lambda _
   (display (function-of-a-record-and-a-build-time-path #$a-record
 #$bash)

I expect the gexp to compile to a file in the store whose contents are
/gnu/store/bash/ first second third

The error is   1. &gexp-input-error: #< first-field: "first"
second-field: ("second" . "third")>

I tried to define a gexp-compiler, but I have clearly no idea of what
I'm doing and I could sometimes make it work if I convert the record
into a list, but not if there is a list within that list.

I've read the relevant sections of the manual, and the code, and
basically all instances of a call to define-gexp-compiler in the source
code, but nothing comes close to what I need.

I really could use some help,

Thank you very much,

Edouard.

P.S. here is a minimal not-working example that you can copy paste in
guix repl in order to reproduce my problem:


(use-modules
 (guix gexp)
 (guix store)
 (guix derivations)
 (guix records)
 (guix monads)
 (gnu packages bash))
(define (build-gexp gexp)
  "Build GEXP using the local daemon."
  (let ((derivation
 (run-with-store (open-connection)
   (gexp->derivation
"noname"
gexp
(build-derivations
 (open-connection)
 (list derivation))
(derivation-output-path (assoc-ref (derivation-outputs derivation) "out"
;; There is a record type that I need on the build side
(define-record-type*  my-record make-my-record
  my-record?
  this-record
 (first-field my-record-first-field)
 (second-field my-record-second-field))
(define a-record (my-record
  (first-field "first")
  (second-field '("second" . "third"
(define (function-of-a-record-and-a-build-time-path rec path)
  "Concatenate the path, first, and second field"
  (string-append path " " (my-record-first-field rec) " " (car 
(my-record-second-field rec)) " " (cdr (my-record-second-field rec

;;   1. &gexp-input-error: #< first-field: "first" second-field: 
("second" . "third")>
(build-gexp
 #~(with-output-to-file (string-append #$output "/file.txt")
 (lambda _
   (display (function-of-a-record-and-a-build-time-path #$a-record 
#$bash)



Re: Using emacs library with guix environment

2021-10-06 Thread edk
Hello !

I'm not sure what the problem is with this particular package, but:
guix environment emacs-commander

will create an env with all you need to BUILD emacs-commander

while

guix environment --ad-hoc emacs-commander

will create an env in which emacs-commander is installed.

Now, if guix environment --ad-hoc emacs-commander doesnt work, it may
mean that one of the native-input of emacs-commander should be an input
or a propagated-input instead. That would explain why

guix environment emacs-commander --ad-hoc emacs-commander

works: because it installs this native-input in the env as well.

I hope this makes sense, if not please ask away.

Cheers,

Edouard.

jgart  writes:

> Hi,
>
> I'm trying to use emacs-commander with guix environment on a foreign distro.
>
> I'm only able to properly source the library into the environment if I run 
> the following:
>
> `guix environment emacs-commander --ad-hoc emacs-commander`
>
> Why do I have to provide emacs-commander twice to the environment command?
>
> I tested only using --ad-hoc or without and none of those work.
>
> I'm only able to properly source emacs-commander when I include it twice as in
> the above command.
>
> Could someone explain the reason for this to me?
>
> Any help is much appreciated.
>
> all best,
>
> jgart
>
> https://github.com/rejeep/commander.el
>
> 3B1D 7F19 E36B B60C 0F5B 2CA9 A52A A2B4 77B6 DD35




Re: sbcl-ningle: permission denied

2021-12-12 Thread edk
Hi !

The store (everything under /gnu/store) is read-only. The only way to
edit it is when building a package.

If cl-ningle does not call asdf:make, then you'll need to edit the
package so that it does.

Maybe there's a way to tell asdf to put build products somewhere else
than near the source code, in which case you may point to somewhere
outside the store ?

Good luck,

Edouard.
jgart  writes:

> Hi Guixers,
>
> Just reporting this issue.
>
> I had sbcl and sbcl-ningle in my profile.
>
> When I try to build ningle I get the error below:
>
> ```
> λ rlwrap sbcl
> This is SBCL 2.1.9, an implementation of ANSI Common Lisp.
> More information about SBCL is available at .
>
> SBCL is free software, provided as is, with absolutely no warranty.
> It is mostly in the public domain; some portions are provided under
> BSD-style licenses.  See the CREDITS and COPYING files in the
> distribution for more information.
> CL-USER(1): (asdf:make :ningle)
> WARNING: System definition file 
> #P"/gnu/store/zwkhqlyijf8bwpm3a70f7ly978w2knqw-sbcl-flexi-streams-1.0.19/share/common-lisp/sbcl/flexi-streams/flexi-streams.asd"
>  contains definition for system "flexi-streams-test". Please only define 
> "flexi-streams" and secondary systems with a name starting with 
> "flexi-streams/" (e.g. "flexi-streams/test") in that file.
>
> debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
> #:
>   Error opening 
> #P"/gnu/store/8jn98z4pr2r9dglsw37a70y8nl6ksb9i-sbcl-ningle-0.3.0-1.50bd4f0/lib/common-lisp/sbcl/ningle/context-tmpGHU3ALSV.fasl":
>
> Permission denied
>
> Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
>   0: [CONTINUE ] Retry opening.
>   1: [USE-VALUE] Try opening a different file.
>   2: [RETRY] Retry
>  compiling # "ningle/context" "file-type">.
>   3: [ACCEPT   ] Continue, treating
>  compiling # "ningle/context" "file-type">
>  as having been successful.
>   4: Retry ASDF operation.
>   5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
>  configuration.
>   6: Retry ASDF operation.
>   7: Retry ASDF operation after resetting the
>  configuration.
>   8: [ABORT] Exit debugger, returning to top level.
>
> (SB-IMPL::FILE-PERROR 
> #P"/gnu/store/8jn98z4pr2r9dglsw37a70y8nl6ksb9i-sbcl-ningle-0.3.0-1.50bd4f0/lib/common-lisp/sbcl/ningle/context-tmpGHU3ALSV.fasl"
>  13 "Error opening ~S" 
> #P"/gnu/store/8jn98z4pr2r9dglsw37a70y8nl6ksb9i-sbcl-ningle-0.3.0-1.50bd4f0/lib/common-lisp/sbcl/ningle/context-tmpGHU3ALSV.fasl")
> ```
>
> WDYT?




Unknown getter "operating-system-user-services"

2022-01-01 Thread edk
Dear all,

In order to programmatically define operating-systems, I use a
functional approach, where I edit the fields of the operating-system
structure using set-fields, like so:

https://gitlab.com/edouardklein/guix/-/blob/beaverlabs/beaver/system.scm#L106

#+begin_src scheme
(define* (add-something-to os)
  "Return a copy of OS (an operating-system) edited in such a way that some 
functionality is added to it."
  (set-fields os
  ((operating-system-user-services)
   (cons (simple-service "toto" some-service-type (list 
(some-service-conf)))
 (operating-system-user-services os)
#+end_src

This allows for very nice OS declarations, for example my VPS is
declared like this, and it is immediately clear which services it provides:
#+begin_src scheme
(-> minimal-ovh
(packages (list git))
(denatting-webapp #:port 8000)
(https-reverse-proxy
 #:from-host "denatting.beaver-labs.com"
 #:fullchain-path "/srv/ssl/certs/*.beaver-labs.com/fullchain.cer"
 #:privkey-path "/srv/ssl/certs/*.beaver-labs.com/private.key"
 #:to-port 8000
 #:raw-content '("client_max_body_size 1024M;"))
(requisomatic-webapp #:port 8001)
(https-reverse-proxy
 #:from-host "requisomatic.beaver-labs.com"
 #:fullchain-path "/srv/ssl/certs/*.beaver-labs.com/fullchain.cer"
 #:privkey-path "/srv/ssl/certs/*.beaver-labs.com/private.key"
 #:to-port 8001)
(https-static-content
 #:from-host "dump.rdklein.fr"
 #:fullchain-path "/srv/ssl/certs/*.rdklein.fr/fullchain.cer"
 #:privkey-path "/srv/ssl/certs/*.rdklein.fr/private.key"
 #:to-dir "/srv/dump.rdklein.fr"
 #:allow-dir-listing #t)
(https-static-content
 #:from-host "rdklein.fr"
 #:fullchain-path "/srv/ssl/certs/rdklein.fr/fullchain.cer"
 #:privkey-path "/srv/ssl/certs/rdklein.fr/private.key"
 #:to-dir "/srv/rdklein.fr"
 #:allow-dir-listing #f))
#+end_src

When I tried a guix pull today (after 18 days of not pulling), I got the
following error (with the above git repo being in my channels):

#+begin_src
(repl-version 0 1 1)
(exception syntax-error (value operating-system-user-services) (value "Wrong 
number of arguments") (value ((filename . 
"/gnu/store/xdvrkpldalcqjl9f10x9mlynkc8hb1bv-guix-45357d6/beaver/packages/python-xyz.scm")
 (line . 306) (column . 2))) (value (operating-system-user-services (%%on-error 
(unknown-getter (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os 
operating-system-user-services)) %%type (((c-list)) ((c-same-type-check (quote 
(set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os) (quote ()) (quote 
(operating-system-user-services))) (quote (let ((s os)) ((ck () ((@@ (srfi 
srfi-9) getter-copier) (quote operating-system-user-services) (quote 
(unknown-getter (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os 
operating-system-user-services #t s (operating-system-user-services 
(%set-fields #t (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os 
(operating-system-user-services) (struct-ref s (ck () ((@@ (srfi srfi-9) 
getter-index) (quote operating-system-user-services) (quote (unknown-getter 
(set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os 
operating-system-user-services) (() (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port (operating-system-user-services os (value #f))
#+end_src

If you want to try, here is my channels.scm file:
#+begin_src
(cons*
 (channel
  (name 'beaverlabs)
  (url "https://gitlab.com/edouardklein/guix";)
  (branch "beaverlabs"))
 (channel
  (name 'guix-gaming-games)
  (url "https://gitlab.com/guix-gaming-channels/games.git";)
  ;; Enable signature verification:
  (introduction
   (make-channel-intr

I think thunked fields are breaking my previously working code

2022-01-10 Thread edk
Dear Guixers

This is a follow-up on

https://lists.gnu.org/archive/html/help-guix/2022-01/msg0.html

Using the REPL, I traced the bug on my code trying to update fields of
an operating-system records, which on gnu/system.scm are declared as
"thunked".

Guile is not my primary language. I would really appreciate some
pointers here:
- Why is it that I can't update those fields ?
- I was able to ~1 month ago, but can't do that now. Why ? Is my
use-case unsupported ? Should I expect other breaking change in the
future ? i.e. was I using a non-public interface ?
- How can I update those fields ?

For example, given that "minimal-container" is an operating system, I
can do the following:

(set-fields minimal-container ((operating-system-host-name) "toto"))

But not:

(set-fields minimal-container ((operating-system-label) "toto"))

while both fields are supposed to be strings, but label is "thunked".

Thanks in advance for any help.

Cheers,

Edouard.



password-store is broken in master but builds in version-1.4.0 (utf8 problem)

2022-01-15 Thread edk
Dear Guixers,

Using an up to date guix and guix-daemon on a foreign distro (Arch) I
can't build password-store.

It seems to be broken on cuirass also:
https://ci.guix.gnu.org/build/306769/details

Same error as I have: an utf8-related test does not pass anymore.

On the version-1.4.0 branch, however, the package builds:
https://ci.guix.gnu.org/build/361374/details

I tried to diff the package definition between the two branches, but
it's actually the same (unless my git-fu fails me).

I tried to see if any utf-8 related changes happened on master since the
point of divergence of the two branches, but nothing jumped at me.

If you have any idea on how to solve the problem...

Cheers,

Edouard.