* How to enable server discovery in foreign distro? @ 2023-05-19 17:40 Rodrigo Morales 2023-05-19 20:18 ` Rodrigo Morales 0 siblings, 1 reply; 5+ messages in thread From: Rodrigo Morales @ 2023-05-19 17:40 UTC (permalink / raw) To: help-guix Previously, when I had installed GuixSD in my systems I executed "herd discover guix-daemon on" in order to be able to retrieve packages from my local network and thus reduce the download time. Now, I'm installing Guix on a foreign distro and I want to enable server discovery in my local network in this system. Because it is a foreign distro, there's no herd command. I'm wondering if it is possible to accomplish the same result as "herd discover guix-daemon on" in a foreign distro. Any help is appreciated. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to enable server discovery in foreign distro? 2023-05-19 17:40 How to enable server discovery in foreign distro? Rodrigo Morales @ 2023-05-19 20:18 ` Rodrigo Morales 2023-05-19 20:55 ` Rodrigo Morales 2023-05-20 3:51 ` Philip McGrath 0 siblings, 2 replies; 5+ messages in thread From: Rodrigo Morales @ 2023-05-19 20:18 UTC (permalink / raw) To: help-guix Table of Contents _________________ 1. The solution 2. Pending question 1 The solution ============== I managed to do it. I'll share some relevant information for those interested. [This section] in the Info manual helped me do what I was looking for. As specified in that part of the manual, I need to edit guix-daemon.service. In my system, there were 4 files with that name (see code block below) ,---- | rdrg@desktop:~$ locate -r 'guix-daemon.service$' | /etc/systemd/system/multi-user.target.wants/guix-daemon.service | /run/systemd/units/invocation:guix-daemon.service | /usr/lib/systemd/system/guix-daemon.service | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service `---- The file `/run/systemd/units/invocation:guix-daemon.service' was a broken symbolic link (see code block below), so I knew that I shouldn't edit this file. ,---- | rdrg@desktop:~$ file /run/systemd/units/invocation:guix-daemon.service | /run/systemd/units/invocation:guix-daemon.service: broken symbolic link to 8dbd9f7458e74f979a2b8d214ed47d42 `---- The file `/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service' wsa empty (see code block below), so I knew that I shouldn't edit this file. ,---- | rdrg@desktop:~$ file /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service: empty `---- The file `/etc/systemd/system/multi-user.target.wants/guix-daemon.service' was a symbolic link to `/usr/lib/systemd/system/guix-daemon.service' and, for that reason, I ended up editing `/usr/lib/systemd/system/guix-daemon.service'. I edited the line containing `ExecStart' and added the IP address of my system from which I wanted to retrieve the packages. ,---- | rdrg@desktop:~$ cat /usr/lib/systemd/system/guix-daemon.service | # This is a "service unit file" for the systemd init system to launch | # 'guix-daemon'. Drop it in /etc/systemd/system or similar to have | # 'guix-daemon' automatically started. | | [Unit] | Description=Build daemon for GNU Guix | | [Service] | ExecStart=/usr/bin/guix-daemon --build-users-group=_guixbuild --substitute-urls='http://192.168.1.39:8080 https://ci.guix.gnu.org https://bordeaux.guix.gnu.org' | Environment=LC_ALL=C.UTF-8 | StandardOutput=syslog | StandardError=syslog | | # Work around a nasty systemd ‘feature’ that kills the entire process tree | # (including the daemon!) if any child, such as cc1plus, runs out of memory. | OOMPolicy=continue | | # Despite the name, this is rate-limited: a broken daemon will eventually fail. | Restart=always | | # See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>. | # Some package builds (for example, go@1.8.1) may require even more than | # 1024 tasks. | TasksMax=8192 | | [Install] | WantedBy=multi-user.target `---- Finally, I executed the following two commands. ,---- | systemctl daemon-reload | systemctl restart guix-daemon.service `---- When I executed `guix home', the packages were retrieved from my other system (see line below `substitute: updating substitutes from 'http://192.168.1.39:8080'... 100.0%'). ,---- | rdrg@desktop:~$ guix home -L ~/guix-packages reconfigure ~/guix-config/home-configuration.scm | hint: Consider installing the `glibc-locales' package and defining `GUIX_LOCPATH', along these lines: | | guix install glibc-locales | export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" | | See the "Application Setup" section in the manual, for more info. | | guix home: warning: cannot determine provenance for current system | substitute: updating substitutes from 'http://192.168.1.39:8080'... 100.0% | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% | substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% | The following derivations will be built: | /gnu/store/kdlm30fl3cv6r0ww2njm0d7w8cipjpyj-home.drv | /gnu/store/76835anafmiz8ngx2aqwynps72m0wmgd-setup-environment.drv | (... some omitted lines ...) `---- [This section] <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> 2 Pending question ================== I was able to download packages from my other system without having to perform the following step which is mentioned in [the aforementioned part of the manual]. ,---- | guix archive --authorize < key.pub `---- I wonder whether this command is relevant in this context or not. Any information is appreciated. [the aforementioned part of the manual] <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to enable server discovery in foreign distro? 2023-05-19 20:18 ` Rodrigo Morales @ 2023-05-19 20:55 ` Rodrigo Morales 2023-05-20 4:13 ` Rodrigo Morales 2023-05-20 3:51 ` Philip McGrath 1 sibling, 1 reply; 5+ messages in thread From: Rodrigo Morales @ 2023-05-19 20:55 UTC (permalink / raw) To: help-guix With regards to the pending question which I mentioned in my previous message, I think I have found the answer. The system where I was installing the foreign distro showed a big list of packages to build. However, after I run the following command, that list was greatly reduced, so I suppose that the following command allows retrieving built derivations from other systems which makes it unnecessary to build those derivations again. ,---- | guix archive --authorize < key.pub `---- On Fri, 19 May 2023 at 20:18, Rodrigo Morales <moralesrodrigo1100@gmail.com> wrote: > > Table of Contents > _________________ > > 1. The solution > 2. Pending question > > > 1 The solution > ============== > > I managed to do it. I'll share some relevant information for those > interested. > > [This section] in the Info manual helped me do what I was looking > for. As specified in that part of the manual, I need to edit > guix-daemon.service. In my system, there were 4 files with that name > (see code block below) > > ,---- > | rdrg@desktop:~$ locate -r 'guix-daemon.service$' > | /etc/systemd/system/multi-user.target.wants/guix-daemon.service > | /run/systemd/units/invocation:guix-daemon.service > | /usr/lib/systemd/system/guix-daemon.service > | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service > `---- > > The file `/run/systemd/units/invocation:guix-daemon.service' was a > broken symbolic link (see code block below), so I knew that I > shouldn't edit this file. > > ,---- > | rdrg@desktop:~$ file /run/systemd/units/invocation:guix-daemon.service > | /run/systemd/units/invocation:guix-daemon.service: broken symbolic > link to 8dbd9f7458e74f979a2b8d214ed47d42 > `---- > > The file > `/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service' > wsa empty (see code block below), so I knew that I shouldn't edit this > file. > > ,---- > | rdrg@desktop:~$ file > /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service > | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service: > empty > `---- > > The file > `/etc/systemd/system/multi-user.target.wants/guix-daemon.service' was > a symbolic link to `/usr/lib/systemd/system/guix-daemon.service' and, > for that reason, I ended up editing > `/usr/lib/systemd/system/guix-daemon.service'. I edited the line > containing `ExecStart' and added the IP address of my system from > which I wanted to retrieve the packages. > > ,---- > | rdrg@desktop:~$ cat /usr/lib/systemd/system/guix-daemon.service > | # This is a "service unit file" for the systemd init system to launch > | # 'guix-daemon'. Drop it in /etc/systemd/system or similar to have > | # 'guix-daemon' automatically started. > | > | [Unit] > | Description=Build daemon for GNU Guix > | > | [Service] > | ExecStart=/usr/bin/guix-daemon --build-users-group=_guixbuild > --substitute-urls='http://192.168.1.39:8080 https://ci.guix.gnu.org > https://bordeaux.guix.gnu.org' > | Environment=LC_ALL=C.UTF-8 > | StandardOutput=syslog > | StandardError=syslog > | > | # Work around a nasty systemd ‘feature’ that kills the entire process tree > | # (including the daemon!) if any child, such as cc1plus, runs out of memory. > | OOMPolicy=continue > | > | # Despite the name, this is rate-limited: a broken daemon will > eventually fail. > | Restart=always > | > | # See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>. > | # Some package builds (for example, go@1.8.1) may require even more than > | # 1024 tasks. > | TasksMax=8192 > | > | [Install] > | WantedBy=multi-user.target > `---- > > Finally, I executed the following two commands. > > ,---- > | systemctl daemon-reload > | systemctl restart guix-daemon.service > `---- > > When I executed `guix home', the packages were retrieved from my other > system (see line below `substitute: updating substitutes from > 'http://192.168.1.39:8080'... 100.0%'). > > ,---- > | rdrg@desktop:~$ guix home -L ~/guix-packages reconfigure > ~/guix-config/home-configuration.scm > | hint: Consider installing the `glibc-locales' package and defining > `GUIX_LOCPATH', along these lines: > | > | guix install glibc-locales > | export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" > | > | See the "Application Setup" section in the manual, for more info. > | > | guix home: warning: cannot determine provenance for current system > | substitute: updating substitutes from 'http://192.168.1.39:8080'... 100.0% > | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > | substitute: updating substitutes from > 'https://bordeaux.guix.gnu.org'... 100.0% > | The following derivations will be built: > | /gnu/store/kdlm30fl3cv6r0ww2njm0d7w8cipjpyj-home.drv > | /gnu/store/76835anafmiz8ngx2aqwynps72m0wmgd-setup-environment.drv > | (... some omitted lines ...) > `---- > > > [This section] > <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> > > > 2 Pending question > ================== > > I was able to download packages from my other system without having > to perform the following step which is mentioned in [the > aforementioned part of the manual]. > > ,---- > | guix archive --authorize < key.pub > `---- > > I wonder whether this command is relevant in this context or not. Any > information is appreciated. > > > [the aforementioned part of the manual] > <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to enable server discovery in foreign distro? 2023-05-19 20:55 ` Rodrigo Morales @ 2023-05-20 4:13 ` Rodrigo Morales 0 siblings, 0 replies; 5+ messages in thread From: Rodrigo Morales @ 2023-05-20 4:13 UTC (permalink / raw) To: help-guix > The system where I was installing the foreign distro showed a big list > of packages to build. However, after I run the following command, that > list was greatly reduced Ooops, it seems that I didn't include the command in my previous message. This is the command I was referring to ,---- | guix archive --authorize < key.pub `---- On Fri, 19 May 2023 at 20:55, Rodrigo Morales <moralesrodrigo1100@gmail.com> wrote: > > With regards to the pending question which I mentioned in my previous > message, I think I have found the answer. > > The system where I was installing the foreign distro showed a big list > of packages to build. However, after I run the following command, that > list was greatly reduced, so I suppose that the following command allows > retrieving built derivations from other systems which makes it > unnecessary to build those derivations again. > > ,---- > | guix archive --authorize < key.pub > `---- > > On Fri, 19 May 2023 at 20:18, Rodrigo Morales > <moralesrodrigo1100@gmail.com> wrote: > > > > Table of Contents > > _________________ > > > > 1. The solution > > 2. Pending question > > > > > > 1 The solution > > ============== > > > > I managed to do it. I'll share some relevant information for those > > interested. > > > > [This section] in the Info manual helped me do what I was looking > > for. As specified in that part of the manual, I need to edit > > guix-daemon.service. In my system, there were 4 files with that name > > (see code block below) > > > > ,---- > > | rdrg@desktop:~$ locate -r 'guix-daemon.service$' > > | /etc/systemd/system/multi-user.target.wants/guix-daemon.service > > | /run/systemd/units/invocation:guix-daemon.service > > | /usr/lib/systemd/system/guix-daemon.service > > | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service > > `---- > > > > The file `/run/systemd/units/invocation:guix-daemon.service' was a > > broken symbolic link (see code block below), so I knew that I > > shouldn't edit this file. > > > > ,---- > > | rdrg@desktop:~$ file /run/systemd/units/invocation:guix-daemon.service > > | /run/systemd/units/invocation:guix-daemon.service: broken symbolic > > link to 8dbd9f7458e74f979a2b8d214ed47d42 > > `---- > > > > The file > > `/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service' > > wsa empty (see code block below), so I knew that I shouldn't edit this > > file. > > > > ,---- > > | rdrg@desktop:~$ file > > /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service > > | /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/guix-daemon.service: > > empty > > `---- > > > > The file > > `/etc/systemd/system/multi-user.target.wants/guix-daemon.service' was > > a symbolic link to `/usr/lib/systemd/system/guix-daemon.service' and, > > for that reason, I ended up editing > > `/usr/lib/systemd/system/guix-daemon.service'. I edited the line > > containing `ExecStart' and added the IP address of my system from > > which I wanted to retrieve the packages. > > > > ,---- > > | rdrg@desktop:~$ cat /usr/lib/systemd/system/guix-daemon.service > > | # This is a "service unit file" for the systemd init system to launch > > | # 'guix-daemon'. Drop it in /etc/systemd/system or similar to have > > | # 'guix-daemon' automatically started. > > | > > | [Unit] > > | Description=Build daemon for GNU Guix > > | > > | [Service] > > | ExecStart=/usr/bin/guix-daemon --build-users-group=_guixbuild > > --substitute-urls='http://192.168.1.39:8080 https://ci.guix.gnu.org > > https://bordeaux.guix.gnu.org' > > | Environment=LC_ALL=C.UTF-8 > > | StandardOutput=syslog > > | StandardError=syslog > > | > > | # Work around a nasty systemd ‘feature’ that kills the entire process tree > > | # (including the daemon!) if any child, such as cc1plus, runs out of memory. > > | OOMPolicy=continue > > | > > | # Despite the name, this is rate-limited: a broken daemon will > > eventually fail. > > | Restart=always > > | > > | # See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>. > > | # Some package builds (for example, go@1.8.1) may require even more than > > | # 1024 tasks. > > | TasksMax=8192 > > | > > | [Install] > > | WantedBy=multi-user.target > > `---- > > > > Finally, I executed the following two commands. > > > > ,---- > > | systemctl daemon-reload > > | systemctl restart guix-daemon.service > > `---- > > > > When I executed `guix home', the packages were retrieved from my other > > system (see line below `substitute: updating substitutes from > > 'http://192.168.1.39:8080'... 100.0%'). > > > > ,---- > > | rdrg@desktop:~$ guix home -L ~/guix-packages reconfigure > > ~/guix-config/home-configuration.scm > > | hint: Consider installing the `glibc-locales' package and defining > > `GUIX_LOCPATH', along these lines: > > | > > | guix install glibc-locales > > | export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" > > | > > | See the "Application Setup" section in the manual, for more info. > > | > > | guix home: warning: cannot determine provenance for current system > > | substitute: updating substitutes from 'http://192.168.1.39:8080'... 100.0% > > | substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > > | substitute: updating substitutes from > > 'https://bordeaux.guix.gnu.org'... 100.0% > > | The following derivations will be built: > > | /gnu/store/kdlm30fl3cv6r0ww2njm0d7w8cipjpyj-home.drv > > | /gnu/store/76835anafmiz8ngx2aqwynps72m0wmgd-setup-environment.drv > > | (... some omitted lines ...) > > `---- > > > > > > [This section] > > <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> > > > > > > 2 Pending question > > ================== > > > > I was able to download packages from my other system without having > > to perform the following step which is mentioned in [the > > aforementioned part of the manual]. > > > > ,---- > > | guix archive --authorize < key.pub > > `---- > > > > I wonder whether this command is relevant in this context or not. Any > > information is appreciated. > > > > > > [the aforementioned part of the manual] > > <https://guix.gnu.org/manual/en/html_node/Getting-Substitutes-from-Other-Servers.html> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to enable server discovery in foreign distro? 2023-05-19 20:18 ` Rodrigo Morales 2023-05-19 20:55 ` Rodrigo Morales @ 2023-05-20 3:51 ` Philip McGrath 1 sibling, 0 replies; 5+ messages in thread From: Philip McGrath @ 2023-05-20 3:51 UTC (permalink / raw) To: help-guix; +Cc: Rodrigo Morales [-- Attachment #1: Type: text/plain, Size: 1139 bytes --] On Friday, May 19, 2023 4:18:01 PM EDT Rodrigo Morales wrote: > > The file > `/etc/systemd/system/multi-user.target.wants/guix-daemon.service' was > a symbolic link to `/usr/lib/systemd/system/guix-daemon.service' and, > for that reason, I ended up editing > `/usr/lib/systemd/system/guix-daemon.service'. I edited the line > containing `ExecStart' and added the IP address of my system from > which I wanted to retrieve the packages. > A cleaner way to do this is to run `sudo systemctl edit guix-daemon.service`. It will open your editor to create a drop-in override file, in this case /etc/systemd/system/guix-daemon.service.d/override.conf, with a commented-out version of the base unit file included. You'll want to write something like this: ``` [Service] ExecStart= ExecStart=/usr/bin/guix-daemon \ --build-users-group=_guixbuild \ --discover=yes \ --substitute-urls='https://bordeaux-us-east-mirror.cbaines.net https://bordeaux.guix.gnu.org https://ci.guix.gnu.org' ``` The most confusing part is that you need two ExecStart lines, one unsetting the old value and one setting your new value. Philip [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-20 4:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-19 17:40 How to enable server discovery in foreign distro? Rodrigo Morales 2023-05-19 20:18 ` Rodrigo Morales 2023-05-19 20:55 ` Rodrigo Morales 2023-05-20 4:13 ` Rodrigo Morales 2023-05-20 3:51 ` Philip McGrath
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.