From d822c592438d025107c95dc49435a4c9c3cfd863 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sun, 20 Jun 2021 20:44:44 +0200 Subject: etc: snippets: Use ‘hg-file-name’ when origin uses ‘hg-fetch’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adjust to changes in commit aaafd19bd1e37265de07e246286a6819792c25b4. * etc/snippets/scheme-mode/guix-origin: Use ‘hg-file-name’ instead of ‘string-append’ when ‘method’ for origin is ‘hg-fetch’. Signed-off-by: Ludovic Courtès --- etc/snippets/scheme-mode/guix-origin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/snippets/scheme-mode/guix-origin b/etc/snippets/scheme-mode/guix-origin index 2820a369f3..eb0cdc8242 100644 --- a/etc/snippets/scheme-mode/guix-origin +++ b/etc/snippets/scheme-mode/guix-origin @@ -19,7 +19,9 @@ (t "(string-append \\"https://\\" version \\".tar.gz\\")"))}$0) ${1:$(cond ((equal yas-text "git-fetch") "(file-name (git-file-name name version))") - ((member yas-text '("svn-fetch" "hg-fetch" "cvs-fetch" "bzr-fetch")) + ((equal yas-text "hg-fetch") + "(file-name (hg-file-name name version))") + ((member yas-text '("svn-fetch" "cvs-fetch" "bzr-fetch")) "(file-name (string-append name \\"-\\" version \\"-checkout\\"))") (t ""))} (sha256 -- cgit 1.4.1 From 6396f0c235231d4d41d11fffa021251ea6aa90a7 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 29 Jun 2021 14:51:20 -0400 Subject: news: Add entry for the new 'deb' guix pack format. * etc/news.scm: Add entry. --- etc/news.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'etc') diff --git a/etc/news.scm b/etc/news.scm index 3207c12152..9bada88b49 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -23,6 +23,21 @@ (channel-news (version 0) +(entry (commit "82daab42811a2e3c7684ebdf12af75ff0fa67b99") + (title + (en "New @samp{deb} format for the @command{guix pack} command")) + (body + (en "Debian archives (with the .deb file extension) can now be +produced via the @command{guix pack --format=deb} command, providing an +alternative distribution path for software built with Guix. Here is a simple +example that generates a Debian archive for the @code{hello} package: + +@example +guix pack --format=deb --symlink=/usr/bin/hello=bin/hello hello +@end example + +See @command{info \"(guix) Invoking guix pack\"} for more information."))) + (entry (commit "bdc298ecee15283451d3aa20a849dd7bb22c8538") (title (en "New @command{guix import egg} command") -- cgit 1.4.1 From 20dfda3d9ebb14b72ed33fed940ee3a1f030c99a Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 30 Jun 2021 15:21:56 +0200 Subject: news: Add 'de' translation. * etc/news.scm: Add German translation of 'guix pack --format=deb' entry. --- etc/news.scm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/news.scm b/etc/news.scm index 9bada88b49..88d23d71ed 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -23,9 +23,10 @@ (channel-news (version 0) -(entry (commit "82daab42811a2e3c7684ebdf12af75ff0fa67b99") + (entry (commit "82daab42811a2e3c7684ebdf12af75ff0fa67b99") (title - (en "New @samp{deb} format for the @command{guix pack} command")) + (en "New @samp{deb} format for the @command{guix pack} command") + (de "Neues Format @samp{deb} für den Befehl @command{guix pack}")) (body (en "Debian archives (with the .deb file extension) can now be produced via the @command{guix pack --format=deb} command, providing an @@ -36,7 +37,19 @@ example that generates a Debian archive for the @code{hello} package: guix pack --format=deb --symlink=/usr/bin/hello=bin/hello hello @end example -See @command{info \"(guix) Invoking guix pack\"} for more information."))) +See @command{info \"(guix) Invoking guix pack\"} for more information.") + (de "Debian-Archive (mit der Dateinamenserweiterung .deb) können +jetzt auch mit dem Befehl @command{guix pack --format=deb} erzeugt werden, um +mit Guix erstellte Software auf andere Art anzubieten. Hier sehen Sie ein +einfaches Beispiel, wie ein Debian-Archiv für das Paket @code{hello} angelegt +wird: + +@example +guix pack --format=deb --symlink=/usr/bin/hello=bin/hello hello +@end example + +Siehe @command{info \"(guix.de) Aufruf von guix pack\"} für mehr +Informationen."))) (entry (commit "bdc298ecee15283451d3aa20a849dd7bb22c8538") (title -- cgit 1.4.1 From 7f06567b83a6d994703adbdda99b266dc83d2d84 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Mon, 24 May 2021 17:26:52 +0200 Subject: guix-install.sh: No longer export GUIX_PROFILE. If GUIX_PROFILE is exported here, any subsequent "source /some/other/profile/etc/profile" will set variables pointing to "$HOME/.guix-profile" instead of pointing to the sourced profile. * etc/guix-install.sh (sys_create_init_profile): No longer export GUIX_PROFILE. --- etc/guix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 6a799fa823..8ecadea97d 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -499,7 +499,7 @@ export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH" GUIX_PROFILE="$HOME/.guix-profile" [ -L $GUIX_PROFILE ] || return GUIX_LOCPATH="$GUIX_PROFILE/lib/locale" -export GUIX_PROFILE GUIX_LOCPATH +export GUIX_LOCPATH [ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile" -- cgit 1.4.1 From 4cbe0127a668cbcc64087c5d311308b59d39b104 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 5 Jul 2021 16:44:29 -0400 Subject: guix-install.sh: Prompt for configuring substitutes discovery. Also ensure prompt_yes_no always print the message with a trailing space, which is more pleasing to the eye. * etc/guix-daemon.conf.in <--discover=no>: New guix-daemon option. * etc/guix-daemon.service.in: Likewise. * etc/init.d/guix-daemon.in: Likewise. * etc/openrc/guix-daemon.in: Likewise. * etc/guix-install.sh (configure_substitute_discovery): New procedure. (sys_enable_guix_daemon): Ask the user whether automatic substitute discovery should be enabled. Set the '--discover' argument accordingly. (prompt_yes_no): Add a trailing space to the message. (sys_authorize_build_farms): Remove trailing space from the message argument. * NEWS (Distribution): Add news. --- NEWS | 5 +++-- etc/guix-daemon.conf.in | 2 +- etc/guix-daemon.service.in | 3 ++- etc/guix-install.sh | 22 ++++++++++++++++++++-- etc/init.d/guix-daemon.in | 2 +- etc/openrc/guix-daemon.in | 2 +- 6 files changed, 28 insertions(+), 8 deletions(-) (limited to 'etc') diff --git a/NEWS b/NEWS index b0647b3700..2b6f65d088 100644 --- a/NEWS +++ b/NEWS @@ -14,8 +14,9 @@ Please send Guix bug reports to bug-guix@gnu.org. * Changes in 1.4.0 (since 1.3.0) ** Package management - * New 'deb' format for the 'guix pack' command - +*** New 'deb' format for the 'guix pack' command +** Distribution +*** The installation script can now enable local substitute servers discovery * Changes in 1.3.0 (since 1.2.0) ** Package management *** POWER9 (powerpc64le-linux) is now supported as a technology preview diff --git a/etc/guix-daemon.conf.in b/etc/guix-daemon.conf.in index 755192d555..fb681d1f80 100644 --- a/etc/guix-daemon.conf.in +++ b/etc/guix-daemon.conf.in @@ -7,4 +7,4 @@ start on runlevel [2345] stop on runlevel [016] -exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild +exec @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --discover=no diff --git a/etc/guix-daemon.service.in b/etc/guix-daemon.service.in index 407cdd199c..17b54eaeb0 100644 --- a/etc/guix-daemon.service.in +++ b/etc/guix-daemon.service.in @@ -6,7 +6,8 @@ Description=Build daemon for GNU Guix [Service] -ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild +ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ + --build-users-group=guixbuild --discover=no Environment='GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8 RemainAfterExit=yes StandardOutput=syslog diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 8ecadea97d..4d81940eb7 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -96,7 +96,7 @@ _debug() # $1: The prompt question. prompt_yes_no() { while true; do - read -rp "$1" yn + read -rp "$1 " yn case $yn in [Yy]*) return 0;; [Nn]*) return 1;; @@ -249,6 +249,16 @@ chk_sys_nscd() fi } +# Configure substitute discovery according to user's preferences. +# $1 is the installed service file to edit. +configure_substitute_discovery() { + if grep -q -- '--discover=no' "$1" && \ + prompt_yes_no "Would you like the Guix daemon to automatically \ +discover substitute servers on the local network? (yes/no)"; then + sed -i 's/--discover=no/--discover=yes/' "$1" + fi +} + # ------------------------------------------------------------------------------ #+MAIN @@ -397,6 +407,7 @@ sys_enable_guix_daemon() { initctl reload-configuration; cp "~root/.config/guix/current/lib/upstart/system/guix-daemon.conf" \ /etc/init/ && + configure_substitute_discovery /etc/init/guix-daemon.conf && start guix-daemon; } && _msg "${PAS}enabled Guix daemon via upstart" ;; @@ -426,6 +437,9 @@ sys_enable_guix_daemon() -e 's/^Environment=\(.*\)$/Environment=\1 LC_ALL=en_US.UTF-8'; fi; + configure_substitute_discovery \ + /etc/systemd/system/guix-daemon.service + systemctl daemon-reload && systemctl enable guix-daemon && systemctl start guix-daemon; } && @@ -437,6 +451,8 @@ sys_enable_guix_daemon() /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon; + configure_substitute_discovery /etc/init.d/guix-daemon + update-rc.d guix-daemon defaults && update-rc.d guix-daemon enable && service guix-daemon start; } && @@ -448,6 +464,8 @@ sys_enable_guix_daemon() /etc/init.d/guix-daemon; chmod 775 /etc/init.d/guix-daemon; + configure_substitute_discovery /etc/init.d/guix-daemon + rc-update add guix-daemon default && rc-service guix-daemon start; } && _msg "${PAS}enabled Guix daemon via OpenRC" @@ -472,7 +490,7 @@ sys_enable_guix_daemon() sys_authorize_build_farms() { # authorize the public key of the build farm if prompt_yes_no "Permit downloading pre-built package binaries from the \ -project's build farm? (yes/no) "; then +project's build farm? (yes/no)"; then guix archive --authorize \ < "~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub" \ && _msg "${PAS}Authorized public key for ci.guix.gnu.org" diff --git a/etc/init.d/guix-daemon.in b/etc/init.d/guix-daemon.in index 1cc49fed89..b7d4bb72bb 100644 --- a/etc/init.d/guix-daemon.in +++ b/etc/init.d/guix-daemon.in @@ -36,7 +36,7 @@ start) -E LC_ALL=en_US.utf8 \ -p "/var/run/guix-daemon.pid" \ @localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon \ - --build-users-group=guixbuild + --build-users-group=guixbuild --discover=no fi ;; stop) diff --git a/etc/openrc/guix-daemon.in b/etc/openrc/guix-daemon.in index 110a58b88d..eeedc2a840 100644 --- a/etc/openrc/guix-daemon.in +++ b/etc/openrc/guix-daemon.in @@ -20,7 +20,7 @@ export GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale export LC_ALL=en_US.utf8 command="@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daemon" -command_args="--build-users-group=guixbuild" +command_args="--build-users-group=guixbuild --discover=no" command_background="yes" pidfile="/var/run/guix-daemon.pid" -- cgit 1.4.1 From 073904c5536c73a71aa42347453cb18ae41a6b19 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 13 Jul 2021 23:42:19 -0400 Subject: guix-install.sh: Untabify. * etc/guix-install.sh (sys_create_build_user): Normalize to spaces. --- etc/guix-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 4d81940eb7..4f0f89100d 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -369,7 +369,7 @@ sys_create_build_user() if getent group kvm > /dev/null; then _msg "${INF}group kvm exists and build users will be added to it" - local KVMGROUP=,kvm + local KVMGROUP=,kvm fi for i in $(seq -w 1 10); do -- cgit 1.4.1