Re: guix pull: error: getting status of /var/guix/gcroots

2020-02-06 Thread Jimmy Thrasibule
> Do you have any possibility to run guix pull with strace?

Unfortunately containers are not given PTRACE privileges during the
build phase so I cannot call strace.

> I do not have carefully look to your files, but the issue should be:
>  - wrong permission
>  - /var/guix is not exposed

Well the folder exists and is owned by root.

> My intuition is that your issue comes from this other container.
> And it builds, pulls etc because your are inside. However, if
> something is wrong then the command "FROM x237net/alpine-guix" does
> not do what you expect.

The x237net/guixsd container builds successfully on my work stations
and others. Only hub.docker.com CI's platform seems to fail building
the image. I actually pushed to the hub an image that I successfully
built.



Automated system upgrade

2020-02-03 Thread Jimmy Thrasibule
Hi,

I would like to know about the best way one would automate a Guix system
reconfiguration. The idea is to put the system configuration stanza into a
Git repository and then having the systems regularly pull from this
repository and reconfigure.

The way I see it so far would take the following steps:

1. Create a Guix package with all the system configuration (the package can
call guix system reconfigure after install).
2. Create a Guix pull channel.
3. Have the system automatically pulling the latest revision. (??)
4. Repeat.

Does this plan is looking sane to you and how can I regularly pull the
system's repository? Maybe using a service or a cron job?

Regards,
Jimmy


guix pull: error: getting status of /var/guix/gcroots

2020-01-30 Thread Jimmy Thrasibule
Hi,

I'm building a Docker image in order to get a GuixSD by using the ``guix
system docker-image`` command. See the Dokerfile at:
https://bitbucket.org/x237net/guixsd/src/master/src/Dockerfile.

The process is working great and I can successfully get to the final result
on my local systems.

However, when I push the container to hub.docker.com it fails to build the
image with the following error message:


guix pull: error: getting status of /var/guix/gcroots: Operation not
permitted


Again, I successfully built the image on different local systems and my
other container [x237net/alpine-guix] which builds successfully on their
platform also calls ``guix pull``.

I guess they are reducing the capabilities allowed to their build platform
but I can really tell what operation is guix pull attempting in this
particular case.

Regards,
Jimmy


Re: guix pull: error: symlink: File exists

2020-01-20 Thread Jimmy Thrasibule
OK, so following the discussion at https://issues.guix.info/issue/39195, my
container was missing the $USER environment variable so Guix was failing
back to the "default" profile. Once $USER is set to "root" my current user
in this context, Guix is not complaining about the profiles anymore.

Le dim. 19 janv. 2020 à 19:54, Jimmy Thrasibule 
a écrit :

> I tried some actions and here is what happening:
>
>
> # ls -l .config/guix/
> total 0
> lrwxrwxrwx1 root root45 Jan 19 18:33 current ->
> /var/guix/profiles/per-user/root/current-guix
> # guix pull
> Migrating profile generations to '/var/guix/profiles/default'...
> Updating channel 'guix' from Git repository at '
> https://git.savannah.gnu.org/git/guix.git'...
> [...]
>
>
> When ``.config/guix/current`` is pointing to
> ``/var/guix/profiles/per-user/root/current-guix``, the ``guix pull``
> command will change the link to `` /var/guix/profiles/default`` or the
> other way arround.
>
> Calling ``guix pull`` again will fail:
>
>
> # ls -l .config/guix/
> total 0
> lrwxrwxrwx1 root root39 Jan 19 18:37 current ->
> /var/guix/profiles/default/current-guix
> # guix pull
> Migrating profile generations to '/var/guix/profiles/per-user/root'...
> guix pull: error: symlink: File exists:
> "/var/guix/profiles/per-user/root/current-guix"
>
>
> The workaround is to link back the profile to ``per-user/root`` and delete
> ``/var/guix/profiles/default/current-guix*``.
>
> It is not clear why Guix is constantly swapping the profiles this way.
>
> Le sam. 18 janv. 2020 à 22:11, Jimmy Thrasibule <
> jimmy.thrasib...@gmail.com> a écrit :
>
>> Hi,
>>
>> I'm working on an Alpine Docker image with the Guix package manager [1].
>> The container is building and can run Guix without the ``--privileged``
>> option.
>>
>> The installation process is based on the documentation and the
>> installation script [2]. Everything is working fine however, when I run
>> ``guix pull`` in the generated image, I got the following error:
>>
>>
>> Migrating profile generations to '/var/guix/profiles/per-user/root'...
>> guix pull: error: symlink: File exists: "
>> /var/guix/profiles/per-user/root/current-guix"
>>
>>
>> This issue has already been discussed at [3] but the workaround to delete
>> all the links in the directory ``/var/guix/profiles/per-user/root`` is
>> causing some troubles:
>>
>> 1. If I want to ship a ready to use image and delete the links upfront,
>> ``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
>> broken.
>> 2. Users of the image can delete the links themselves but this is not
>> really friendly.
>>
>> So what is exactly causing this error and what would be a good option to
>> fix it?
>>
>>
>> [1] https://hub.docker.com/repository/docker/x237net/alpine-guix
>> [2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
>> [3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html
>>
>>


Re: guix pull: error: symlink: File exists

2020-01-19 Thread Jimmy Thrasibule
I tried some actions and here is what happening:


# ls -l .config/guix/
total 0
lrwxrwxrwx1 root root45 Jan 19 18:33 current ->
/var/guix/profiles/per-user/root/current-guix
# guix pull
Migrating profile generations to '/var/guix/profiles/default'...
Updating channel 'guix' from Git repository at '
https://git.savannah.gnu.org/git/guix.git'...
[...]


When ``.config/guix/current`` is pointing to
``/var/guix/profiles/per-user/root/current-guix``, the ``guix pull``
command will change the link to `` /var/guix/profiles/default`` or the
other way arround.

Calling ``guix pull`` again will fail:


# ls -l .config/guix/
total 0
lrwxrwxrwx1 root root39 Jan 19 18:37 current ->
/var/guix/profiles/default/current-guix
# guix pull
Migrating profile generations to '/var/guix/profiles/per-user/root'...
guix pull: error: symlink: File exists:
"/var/guix/profiles/per-user/root/current-guix"


The workaround is to link back the profile to ``per-user/root`` and delete
``/var/guix/profiles/default/current-guix*``.

It is not clear why Guix is constantly swapping the profiles this way.

Le sam. 18 janv. 2020 à 22:11, Jimmy Thrasibule 
a écrit :

> Hi,
>
> I'm working on an Alpine Docker image with the Guix package manager [1].
> The container is building and can run Guix without the ``--privileged``
> option.
>
> The installation process is based on the documentation and the
> installation script [2]. Everything is working fine however, when I run
> ``guix pull`` in the generated image, I got the following error:
>
>
> Migrating profile generations to '/var/guix/profiles/per-user/root'...
> guix pull: error: symlink: File exists: "
> /var/guix/profiles/per-user/root/current-guix"
>
>
> This issue has already been discussed at [3] but the workaround to delete
> all the links in the directory ``/var/guix/profiles/per-user/root`` is
> causing some troubles:
>
> 1. If I want to ship a ready to use image and delete the links upfront,
> ``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
> broken.
> 2. Users of the image can delete the links themselves but this is not
> really friendly.
>
> So what is exactly causing this error and what would be a good option to
> fix it?
>
>
> [1] https://hub.docker.com/repository/docker/x237net/alpine-guix
> [2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
> [3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html
>
>


guix pull: error: symlink: File exists

2020-01-18 Thread Jimmy Thrasibule
Hi,

I'm working on an Alpine Docker image with the Guix package manager [1].
The container is building and can run Guix without the ``--privileged``
option.

The installation process is based on the documentation and the installation
script [2]. Everything is working fine however, when I run ``guix pull`` in
the generated image, I got the following error:


Migrating profile generations to '/var/guix/profiles/per-user/root'...
guix pull: error: symlink: File exists: "
/var/guix/profiles/per-user/root/current-guix"


This issue has already been discussed at [3] but the workaround to delete
all the links in the directory ``/var/guix/profiles/per-user/root`` is
causing some troubles:

1. If I want to ship a ready to use image and delete the links upfront,
``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
broken.
2. Users of the image can delete the links themselves but this is not
really friendly.

So what is exactly causing this error and what would be a good option to
fix it?


[1] https://hub.docker.com/repository/docker/x237net/alpine-guix
[2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
[3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html


Re: system docker-image needs file-system

2020-01-15 Thread Jimmy Thrasibule
I got it working by using


(bootloader (bootloader-configuration
 (bootloader grub-efi-bootloader)
 (target "noop")))

(file-systems (list (file-system
 (device "noop")
 (mount-point "/")
 (type "noop"


Your suggestion seems to be working for (file-systems) but not (bootloader):

Wrong type argument in position 1 (expecting struct): #f


Le mer. 15 janv. 2020 à 21:19, Julien Lepiller  a
écrit :

> Le 15 janvier 2020 15:01:18 GMT-05:00, Josh Marshall <
> joshua.r.marshall.1...@gmail.com> a écrit :
> >I'll second this.  It is one of my expected use cases.
> >
> >On Wed, Jan 15, 2020, 13:32 Jimmy Thrasibule
> >
> >wrote:
> >
> >> Hi,
> >>
> >> I'm trying to use Guix in order to create a Docker image. However,
> >I'm
> >> forced to set both ``bootloader`` and ``file-systems`` initializers:
> >>
> >> system.scm:29:0: error: missing field initializers (bootloader
> >> file-systems)
> >>
> >> For a Docker image this is quite unexpected. I'm wondering whether
> >there is
> >> a way to bypass this limitation?
> >>
> >> Regards,
> >> Jimmy
> >>
>
> Not sure if that will work, but have you tried:
>
> (bootloader #f)
> (file-systems '())
>
> ?
>
>


system docker-image needs file-system

2020-01-15 Thread Jimmy Thrasibule
Hi,

I'm trying to use Guix in order to create a Docker image. However, I'm
forced to set both ``bootloader`` and ``file-systems`` initializers:

system.scm:29:0: error: missing field initializers (bootloader
file-systems)

For a Docker image this is quite unexpected. I'm wondering whether there is
a way to bypass this limitation?

Regards,
Jimmy