From d128c6fd33f46ec4e2d0ef352d20a858c377bf6f Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 12 Aug 2021 12:58:34 +0200 Subject: services: cuirass: Add a no-publish argument. * gnu/services/cuirass.scm (): Add a no-publish? field. (cuirass-shepherd-service): Honor it. * doc/guix.texi (Cuirass remote building): Document it. --- gnu/services/cuirass.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 99b137e05e..f0df5a6824 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -72,6 +72,8 @@ (default "/var/log/cuirass-remote-server.log")) (cache cuirass-remote-server-configuration-cache ;string (default "/var/cache/cuirass/remote/")) + (no-publish? cuirass-remote-server-configuration-no-publish? ;boolean + (default #f)) (trigger-url cuirass-remote-server-trigger-url ;string (default #f)) (public-key cuirass-remote-server-configuration-public-key ;string @@ -191,8 +193,8 @@ (stop #~(make-kill-destructor))) ,@(if remote-server (match-record remote-server - (backend-port publish-port log-file cache trigger-url - public-key private-key) + (backend-port publish-port log-file cache no-publish? + trigger-url public-key private-key) (list (shepherd-service (documentation "Run Cuirass remote build server.") @@ -225,6 +227,9 @@ "--trigger-substitute-url=" trigger-url)) '()) + #$@(if no-publish? + (list "--no-publish") + '()) #$@(if public-key (list (string-append "--public-key=" -- cgit 1.4.1 From 23b5b168ae95aed04cbaa0598449361af3423688 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 12 Aug 2021 14:23:41 +0200 Subject: services: cuirass: Add a substitute-urls argument. * gnu/services/cuirass.scm (): Add a substitute-urls field. (cuirass-remote-worker-shepherd-service): Honor it. * doc/guix.texi (Cuirass remote building): Document it. --- doc/guix.texi | 3 +++ gnu/services/cuirass.scm | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index ac6c11949f..78c1c09858 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -27928,6 +27928,9 @@ Location of the log file. @item @code{publish-port} (default: @code{5558}) The TCP port of the publish server. It defaults to @code{5558}. +@item @code{substitute-urls} (default: @code{%default-substitute-urls}) +The list of URLs where to look for substitutes by default. + @item @code{public-key} @item @code{private-key} Use the specific @var{file}s as the public/private key pair used to sign diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index f0df5a6824..4d4f81a3a8 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -25,6 +25,7 @@ #:use-module (guix channels) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix store) #:use-module (guix utils) #:use-module (gnu packages admin) #:use-module (gnu packages ci) @@ -338,6 +339,8 @@ (default "/var/log/cuirass-remote-worker.log")) (publish-port cuirass-remote-worker-configuration-publish-port ;int (default 5558)) + (substitute-urls cuirass-remote-worker-configuration-substitute-urls + (default %default-substitute-urls)) ;list of strings (public-key cuirass-remote-worker-configuration-public-key ;string (default #f)) (private-key cuirass-remote-worker-configuration-private-key ;string @@ -348,7 +351,7 @@ CONFIG." (match-record config (cuirass workers server systems log-file publish-port - public-key private-key) + substitute-urls public-key private-key) (list (shepherd-service (documentation "Run Cuirass remote build worker.") (provision '(cuirass-remote-worker)) @@ -371,6 +374,11 @@ CONFIG." "--publish-port=" (number->string publish-port))) '()) + #$@(if substitute-urls + (string-append + "--substitute-urls=" + (string-join substitute-urls)) + '()) #$@(if public-key (list (string-append "--public-key=" -- cgit 1.4.1 From 8221cf834946ed65a12b88f2faf7b26a2d57db3a Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 12 Aug 2021 14:58:18 +0200 Subject: services: cuirass: Fix the substitute-urls argument. This is a follow-up of: 23b5b168ae95aed04cbaa0598449361af3423688. * gnu/services/cuirass.scm (cuirass-remote-worker-shepherd-service): Fix it. --- gnu/services/cuirass.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 4d4f81a3a8..34564b3894 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -375,9 +375,9 @@ CONFIG." (number->string publish-port))) '()) #$@(if substitute-urls - (string-append - "--substitute-urls=" - (string-join substitute-urls)) + (list (string-append + "--substitute-urls=" + (string-join substitute-urls))) '()) #$@(if public-key (list -- cgit 1.4.1 From cfd2442488971420289a12d5ca8f07816e1149bf Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 13 Aug 2021 13:44:06 +0200 Subject: services: cuirass: Reverse the no-publish logic. This is a follow-up of d128c6fd33f46ec4e2d0ef352d20a858c377bf6f. * gnu/services/cuirass.scm () [no-publish?]: Rename it to ... [publish?]: ... this new field. (cuirass-shepherd-service): Adapt it. * doc/guix.texi (Cuirass remote building): Document it. --- doc/guix.texi | 8 ++++---- gnu/services/cuirass.scm | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index 78c1c09858..6ba52623c0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -27889,10 +27889,10 @@ Use @var{cache} directory to cache build log files. Once a substitute is successfully fetched, trigger substitute baking at @var{trigger-url}. -@item @code{no-publish} (default: @code{#f}) -Do not start a publish server and ignore the @code{publish-port} -argument. This can be useful if there is already a standalone publish -server standing next to the remote server. +@item @code{publish?} (default: @code{#t}) +If set to false, do not start a publish server and ignore the +@code{publish-port} argument. This can be useful if there is already a +standalone publish server standing next to the remote server. @item @code{public-key} @item @code{private-key} diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 34564b3894..83e63fe79c 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -73,8 +73,8 @@ (default "/var/log/cuirass-remote-server.log")) (cache cuirass-remote-server-configuration-cache ;string (default "/var/cache/cuirass/remote/")) - (no-publish? cuirass-remote-server-configuration-no-publish? ;boolean - (default #f)) + (publish? cuirass-remote-server-configuration-publish? ;boolean + (default #t)) (trigger-url cuirass-remote-server-trigger-url ;string (default #f)) (public-key cuirass-remote-server-configuration-public-key ;string @@ -194,7 +194,7 @@ (stop #~(make-kill-destructor))) ,@(if remote-server (match-record remote-server - (backend-port publish-port log-file cache no-publish? + (backend-port publish-port log-file cache publish? trigger-url public-key private-key) (list (shepherd-service @@ -228,9 +228,9 @@ "--trigger-substitute-url=" trigger-url)) '()) - #$@(if no-publish? - (list "--no-publish") - '()) + #$@(if publish? + '() + (list "--no-publish")) #$@(if public-key (list (string-append "--public-key=" -- cgit 1.4.1 From 94551439074f804f35970b08435aa02007edfb0b Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber Date: Sun, 15 Aug 2021 14:15:37 -0400 Subject: Update copyright/name notices for Christine Lemmer-Webber. * doc/guix-cookbook.texi: Update copyright/name for Christine Lemmer-Webber. * gnu/build/image.scm: Likewise. * gnu/build/vm.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/assembly.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/check.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/emacs-xyz.scm: Likewise. * gnu/packages/finance.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/guile-xyz.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/haskell-xyz.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/python-web.scm: Likewise. * gnu/packages/python-xyz.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/sphinx.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/system/vm.scm: Likewise. --- doc/guix-cookbook.texi | 2 +- gnu/build/image.scm | 2 +- gnu/build/vm.scm | 2 +- gnu/packages/admin.scm | 2 +- gnu/packages/assembly.scm | 2 +- gnu/packages/audio.scm | 2 +- gnu/packages/backup.scm | 2 +- gnu/packages/check.scm | 2 +- gnu/packages/databases.scm | 2 +- gnu/packages/emacs-xyz.scm | 2 +- gnu/packages/finance.scm | 2 +- gnu/packages/gnupg.scm | 2 +- gnu/packages/guile-xyz.scm | 2 +- gnu/packages/guile.scm | 2 +- gnu/packages/haskell-xyz.scm | 2 +- gnu/packages/linux.scm | 2 +- gnu/packages/mail.scm | 2 +- gnu/packages/password-utils.scm | 2 +- gnu/packages/perl.scm | 2 +- gnu/packages/python-web.scm | 2 +- gnu/packages/python-xyz.scm | 2 +- gnu/packages/python.scm | 2 +- gnu/packages/sphinx.scm | 2 +- gnu/packages/ssh.scm | 2 +- gnu/packages/xdisorg.scm | 2 +- gnu/services/networking.scm | 2 +- gnu/system/vm.scm | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 819dfd8dde..5b1b4b5ea9 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -16,7 +16,7 @@ Copyright @copyright{} 2020 Matthew Brooks@* Copyright @copyright{} 2020 Marcin Karpezo@* Copyright @copyright{} 2020 Brice Waegeneire@* Copyright @copyright{} 2020 André Batista@* -Copyright @copyright{} 2020 Christopher Lemmer Webber +Copyright @copyright{} 2020 Christine Lemmer-Webber@* Copyright @copyright{} 2021 Joshua Branson@* Permission is granted to copy, distribute and/or modify this document diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 45eed0b298..6eb0290256 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2020 Tobias Geerinckx-Rice diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index bd59916bf3..7b55127599 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017 Marius Bakke diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index eda269f148..007f15f9f5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2016 John Darrington ;;; Copyright © 2017 Ben Sturmfels ;;; Copyright © 2017 Ethan R. Jones -;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2017 Christine Lemmer-Webber ;;; Copyright © 2017, 2018, 2020 Marius Bakke ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2018 Pierre-Antoine Rouby diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index 51c0572674..c8576930ff 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2019 Guy Fleury Iteriteka ;;; Copyright © 2019 Andy Tai ;;; Copyright © 2020 Jakub Kądziołka -;;; Copyright © 2020 Christopher Lemmer Webber +;;; Copyright © 2020 Christine Lemmer-Webber ;;; Copyright © 2020 B. Wilson ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 5e1c6df6c3..80cd521773 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -24,7 +24,7 @@ ;;; Copyright © 2019, 2021 Arun Isaac ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2019, 2020 Alexandros Theodotou -;;; Copyright © 2019 Christopher Lemmer Webber +;;; Copyright © 2019 Christine Lemmer-Webber ;;; Copyright © 2019 Jan Wielkiewicz ;;; Copyright © 2019 Hartmt Goebel ;;; Copyright © 2019, 2021 Nicolas Goaziou diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 7d7868ea17..74e3f2ce01 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2017 Arun Isaac ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017, 2020 Efraim Flashner -;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2017 Christine Lemmer-Webber ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2018 Oleg Pykhalov diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 0d0229330e..894d8397e6 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016, 2017 Leo Famulari -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2016 Roel Janssen ;;; Copyright © 2016 Sou Bunnbu diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index fbff9e8a7c..adb15c03ce 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 Hartmut Goebel -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016, 2017, 2018 Roel Janssen diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index cbe830062b..0b76b4e64e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2016, 2017, 2018, 2019 Chris Marusich -;;; Copyright © 2015, 2016, 2018, 2020 Christopher Lemmer Webber +;;; Copyright © 2015, 2016, 2018, 2020 Christine Lemmer-Webber ;;; Copyright © 2016 Adriano Peluso ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016 David Thompson diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index bae56d9735..0d398a5367 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2019 Sebastian Schott ;;; Copyright © 2020 Kei Kebreau -;;; Copyright © 2020 Christopher Lemmer Webber +;;; Copyright © 2020 Christine Lemmer-Webber ;;; Copyright © 2020 Tom Zander ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020, 2021 Vinicius Monego diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 0eb6aff6e6..f0e87a36bb 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Christopher Baines ;;; Copyright © 2016 Mike Gerwitz diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index f8be5559cb..db31ada7b9 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver -;;; Copyright © 2015, 2017 Christopher Allan Webber +;;; Copyright © 2015, 2017 Christine Lemmer-Webber ;;; Copyright © 2016 Alex Sassmannshausen ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2016 Erik Edrosa diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index f90ea85999..99372c4668 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Cyril Roelandt ;;; Copyright © 2014, 2016, 2018 David Thompson ;;; Copyright © 2014, 2017, 2018 Mark H Weaver -;;; Copyright © 2015, 2017 Christopher Allan Webber +;;; Copyright © 2015, 2017 Christine Lemmer-Webber ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index bb59476795..c12f97802e 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -27,7 +27,7 @@ ;;; Copyright © 2020, 2021 Nicolas Goaziou ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Carlo Holl -;;; Copyright © 2020 Christopher Lemmer Webber +;;; Copyright © 2020 Christine Lemmer-Webber ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0b7a7aa56a..b1f7ab3cb7 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Alex Kost ;;; Copyright © 2016 Raymond Nicholson diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 8917a49c93..ccf44b7cf3 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2015, 2016, 2018 Eric Bavier ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016 Al McElrath ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Leo Famulari ;;; Copyright © 2016 Lukas Gradl diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index b969391ba9..a867fe1d94 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015 Steve Sprang ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2015 Aljosha Papsch -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016 Jessica Tallon ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2016 Lukas Gradl diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index db10c44a20..a01d904896 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2017 Adriano Peluso ;;; Copyright © 2017, 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Leo Famulari -;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2017 Christine Lemmer-Webber ;;; Copyright © 2018, 2019 Oleg Pykhalov ;;; Copyright © 2018, 2019 Pierre Neidhardt ;;; Copyright © 2018 Kei Kebreau diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 441af70f26..32b4aa4bf0 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2016, 2019 Hartmut Goebel ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2015, 2017 Ben Woodcroft -;;; Copyright © 2015, 2016 Christopher Allan Webber +;;; Copyright © 2015, 2016 Christine Lemmer-Webber ;;; Copyright © 2017 Adriano Peluso ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 295d158bd3..56920f68c3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2015 Omar Radwan ;;; Copyright © 2015 Pierre-Antoine Rault ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus -;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber +;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015, 2016 David Thompson ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4ff3200cc9..3bb57ee2bd 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2015 Omar Radwan ;;; Copyright © 2015 Pierre-Antoine Rault ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus -;;; Copyright © 2015, 2016 Christopher Allan Webber +;;; Copyright © 2015, 2016 Christine Lemmer-Webber ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015, 2016 David Thompson ;;; Copyright © 2015, 2016, 2017, 2021 Leo Famulari diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm index 6f1656eb82..a7a3443707 100644 --- a/gnu/packages/sphinx.scm +++ b/gnu/packages/sphinx.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2017 Danny Milosavljevic ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2017 Frederick M. Muriithi -;;; Copyright © 2017 Christopher Allan Webber +;;; Copyright © 2017 Christine Lemmer-Webber ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2019, 2021 Nicolas Goaziou diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 7429d4e956..4ceb437b26 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015, 2016, 2018, 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2016, 2019 Leo Famulari ;;; Copyright © 2016, 2021 Nicolas Goaziou -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Stefan Reichör ;;; Copyright © 2017 Ricardo Wurmus diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 8c630f3ac8..71c2ea4cbc 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2015 xd1le ;;; Copyright © 2015 Florian Paul Schmidt -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2018 Ricardo Wurmus ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2016 Leo Famulari diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 4e1055609d..7e310b70ec 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2021 Oleg Pykhalov -;;; Copyright © 2021 Christopher Lemmer Webber +;;; Copyright © 2021 Christine Lemmer-Webber ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Guillaume Le Vaillant ;;; diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 3390f5a88f..0241810897 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès -;;; Copyright © 2016 Christopher Allan Webber +;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017 Marius Bakke -- cgit 1.4.1 From b948ab8b56ac238e7a774625b8f971d28aee6055 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sun, 21 Mar 2021 21:34:07 +0300 Subject: services: slim: Add pam-gnupg support. * gnu/system/pam.scm (unix-pam-service): Add account and session PAM entries for pam-gnupg. Don't pass "#f" to "allow-root?" argument, because "lambda*" already does this by default. * doc/guix.texi (X Window): Document this. * gnu/services/xorg.scm ()[gnupg?]: New record field. (slim-pam-service): Pass "#:gnupg?" argument to "unix-pam-service". --- doc/guix.texi | 8 ++++++++ gnu/services/xorg.scm | 7 ++++++- gnu/system/pam.scm | 21 +++++++++++++++++---- 3 files changed, 31 insertions(+), 5 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index 6ba52623c0..17ecc3ad0f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18065,6 +18065,14 @@ Data type representing the configuration of @code{slim-service-type}. @item @code{allow-empty-passwords?} (default: @code{#t}) Whether to allow logins with empty passwords. +@item @code{gnupg?} (default: @code{#f}) +If enabled, @code{pam-gnupg} will attempt to automatically unlock the +user's GPG keys with the login password via @code{gpg-agent}. The +keygrips of all keys to be unlocked should be written to +@file{~/.pam-gnupg}, and can be queried with @code{gpg -K +--with-keygrip}. Presetting passphrases must be enabled by adding +@code{allow-preset-passphrase} in @file{~/.gnupg/gpg-agent.conf}. + @item @code{auto-login?} (default: @code{#f}) @itemx @code{default-user} (default: @code{""}) When @code{auto-login?} is false, SLiM presents a log-in screen. diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index d95f8beb7a..e34cfd35b4 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Alex Griffin ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -543,6 +544,8 @@ a `service-extension', as used by `set-xorg-configuration'." (default slim)) (allow-empty-passwords? slim-configuration-allow-empty-passwords? (default #t)) + (gnupg? slim-configuration-gnupg? + (default #f)) (auto-login? slim-configuration-auto-login? (default #f)) (default-user slim-configuration-default-user @@ -572,7 +575,9 @@ a `service-extension', as used by `set-xorg-configuration'." "slim" #:login-uid? #t #:allow-empty-passwords? - (slim-configuration-allow-empty-passwords? config)))) + (slim-configuration-allow-empty-passwords? config) + #:gnupg? + (slim-configuration-gnupg? config)))) (define (slim-shepherd-service config) (let* ((xinitrc (xinitrc #:fallback-session diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm index ad02586be8..a31daada59 100644 --- a/gnu/system/pam.scm +++ b/gnu/system/pam.scm @@ -27,6 +27,7 @@ #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module ((guix utils) #:select (%current-system)) + #:use-module (gnu packages linux) #:export (pam-service pam-service-name pam-service-account @@ -207,14 +208,16 @@ dumped in /etc/pam.d/NAME, where NAME is the name of SERVICE." (env (pam-entry ; to honor /etc/environment. (control "required") (module "pam_env.so")))) - (lambda* (name #:key allow-empty-passwords? (allow-root? #f) motd - login-uid?) + (lambda* (name #:key allow-empty-passwords? allow-root? motd + login-uid? gnupg?) "Return a standard Unix-style PAM service for NAME. When ALLOW-EMPTY-PASSWORDS? is true, allow empty passwords. When ALLOW-ROOT? is true, allow root to run the command without authentication. When MOTD is true, it should be a file-like object used as the message-of-the-day. When LOGIN-UID? is true, require the 'pam_loginuid' module; that module sets -/proc/self/loginuid, which the libc 'getlogin' function relies on." +/proc/self/loginuid, which the libc 'getlogin' function relies on. When +GNUPG? is true, require the 'pam_gnupg.so' module; that module hands over +the login password to 'gpg-agent'." ;; See . (pam-service (name name) @@ -229,7 +232,12 @@ When LOGIN-UID? is true, require the 'pam_loginuid' module; that module sets (control "required") (module "pam_unix.so") (arguments '("nullok"))) - unix)))) + unix)) + (if gnupg? + (list (pam-entry + (control "required") + (module (file-append pam-gnupg "/lib/security/pam_gnupg.so")))) + '()))) (password (list (pam-entry (control "required") (module "pam_unix.so") @@ -247,6 +255,11 @@ When LOGIN-UID? is true, require the 'pam_loginuid' module; that module sets (control "required") (module "pam_loginuid.so"))) '()) + ,@(if gnupg? + (list (pam-entry + (control "required") + (module (file-append pam-gnupg "/lib/security/pam_gnupg.so")))) + '()) ,env ,unix)))))) (define (rootok-pam-service command) -- cgit 1.4.1 From 8ad6624b96b31c2eeaf9a17309da2d2c6fdcf1d9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 5 Aug 2021 14:16:50 -0400 Subject: services: base: Honor file-system-create-mount-point? at all times. Fixes . * gnu/services/base.scm (file-system-shepherd-service): Update doc. Return a shepherd service for the mount point when either MOUNT? or CREATE? is true. [start]: Only mount when MOUNT? is true. (file-system-shepherd-services): Also consider file systems with create-mount-point? set to #t. --- gnu/services/base.scm | 53 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 22 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index c784d312b1..50865055fe 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2021 qblade ;;; Copyright © 2021 Hui Lu +;;; Copyright © 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -311,17 +312,20 @@ FILE-SYSTEM." (define (file-system-shepherd-service file-system) "Return the shepherd service for @var{file-system}, or @code{#f} if -@var{file-system} is not auto-mounted upon boot." +@var{file-system} is not auto-mounted or doesn't have its mount point created +upon boot." (let ((target (file-system-mount-point file-system)) (create? (file-system-create-mount-point? file-system)) + (mount? (file-system-mount? file-system)) (dependencies (file-system-dependencies file-system)) (packages (file-system-packages (list file-system)))) - (and (file-system-mount? file-system) + (and (or mount? create?) (with-imported-modules (source-module-closure '((gnu build file-systems))) (shepherd-service (provision (list (file-system->shepherd-service-name file-system))) - (requirement `(root-file-system udev + (requirement `(root-file-system + udev ,@(map dependency->shepherd-service-name dependencies))) (documentation "Check, mount, and unmount the given file system.") (start #~(lambda args @@ -329,24 +333,26 @@ FILE-SYSTEM." #~(mkdir-p #$target) #t) - (let (($PATH (getenv "PATH"))) - ;; Make sure fsck.ext2 & co. can be found. - (dynamic-wind - (lambda () - ;; Don’t display the PATH settings. - (with-output-to-port (%make-void-port "w") - (lambda () - (set-path-environment-variable "PATH" - '("bin" "sbin") - '#$packages)))) - (lambda () - (mount-file-system - (spec->file-system - '#$(file-system->spec file-system)) - #:root "/")) - (lambda () - (setenv "PATH" $PATH))) - #t))) + #$(if mount? + #~(let (($PATH (getenv "PATH"))) + ;; Make sure fsck.ext2 & co. can be found. + (dynamic-wind + (lambda () + ;; Don’t display the PATH settings. + (with-output-to-port (%make-void-port "w") + (lambda () + (set-path-environment-variable "PATH" + '("bin" "sbin") + '#$packages)))) + (lambda () + (mount-file-system + (spec->file-system + '#$(file-system->spec file-system)) + #:root "/")) + (lambda () + (setenv "PATH" $PATH)))) + #t) + #t)) (stop #~(lambda args ;; Normally there are no processes left at this point, so ;; TARGET can be safely unmounted. @@ -365,7 +371,10 @@ FILE-SYSTEM." (define (file-system-shepherd-services file-systems) "Return the list of Shepherd services for FILE-SYSTEMS." - (let* ((file-systems (filter file-system-mount? file-systems))) + (let* ((file-systems (filter (lambda (x) + (or (file-system-mount? x) + (file-system-create-mount-point? x))) + file-systems))) (define sink (shepherd-service (provision '(file-systems)) -- cgit 1.4.1 From 9734da36f209b50bdaee8f2abc8748fe9b7cff6d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 29 Aug 2021 09:42:49 +0300 Subject: services: Remove i486 qemu target. The i486 target has been removed from qemu since at least 5.2.0. * gnu/services/virtualization.scm (%i486): Remove variable. (%qemu-platforms): Remove it. --- gnu/services/virtualization.scm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index c8adcd06d0..47f3f79ad5 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -594,13 +594,6 @@ potential infinite waits blocking libvirt.")) (magic (bv "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00")) (mask (bv "\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff")))) -(define %i486 - (qemu-platform - (name "i486") - (family "i386") - (magic (bv "\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00")) - (mask (bv "\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff")))) - (define %alpha (qemu-platform (name "alpha") @@ -757,7 +750,7 @@ potential infinite waits blocking libvirt.")) (mask (bv "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff")))) (define %qemu-platforms - (list %i386 %i486 %alpha %arm %sparc32plus %ppc %ppc64 %ppc64le %m68k + (list %i386 %alpha %arm %sparc32plus %ppc %ppc64 %ppc64le %m68k %mips %mipsel %mipsn32 %mipsn32el %mips64 %mips64el %riscv32 %riscv64 %sh4 %sh4eb %s390x %aarch64 %hppa)) -- cgit 1.4.1 From f91ae9425bb385b60396a544afe27933896b8fa3 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 30 Aug 2021 10:56:11 +0200 Subject: services: xorg: Delay the xorg-configuration-modules field evaluation. When building an image with the "system" parameter set to an emulated architecture, the xorg-configuration-modules field needs to be evaluated once the %current-system parameter is set, otherwise this parameter is set to the current host system. * gnu/services/xorg.scm ()[modules]: Make it a thunked field. --- gnu/services/xorg.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/services') diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index e34cfd35b4..d5c5316d3f 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -162,6 +162,7 @@ xorg-configuration make-xorg-configuration xorg-configuration? (modules xorg-configuration-modules ;list of packages + (thunked) ; filter out modules not supported on current system (default (filter (lambda (p) -- cgit 1.4.1 From 1037211d1b1b509514a19385167b6b2eadc56fee Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 30 Aug 2021 14:24:14 +0200 Subject: services: hurd-vm: Use the new 'targets' field of . * gnu/services/virtualization.scm (%hurd-vm-operating-system): Use 'targets' instead of 'target' for the 'bootloader-configuration' field. --- gnu/services/virtualization.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 47f3f79ad5..0c75614e18 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -894,7 +894,7 @@ that will be listening to receive secret keys on port 1004, TCP." (timezone "Europe/Amsterdam") (bootloader (bootloader-configuration (bootloader grub-minimal-bootloader) - (target "/dev/vda") + (targets '("/dev/vda")) (timeout 0))) (packages (cons* gdb-minimal (operating-system-packages -- cgit 1.4.1 From cc16103861b26836908a7d16e0751739a0e20da2 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Wed, 25 Aug 2021 03:00:44 +0200 Subject: gnu: gitolite: Add unsafe-pattern configuration option. * gnu/services/version-control.scm (gitolite-rc-file): Add unsafe-pattern field. (gitolite-rc-file-compiler): Write it. * doc/guix.texi (Version Control Services): Document it. --- doc/guix.texi | 13 +++++++++++++ gnu/services/version-control.scm | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index d2819b259e..ab178a6b06 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31517,6 +31517,19 @@ A value like @code{#o0027} will give read access to the group used by Gitolite (by default: @code{git}). This is necessary when using Gitolite with software like cgit or gitweb. +@item @code{unsafe-pattern} (default: @code{#f}) +An optional Perl regular expression for catching unsafe configurations in +the configuration file. See +@uref{https://gitolite.com/gitolite/git-config.html#compensating-for-unsafe_patt, +Gitolite's documentation} for more information. + +When the value is not @code{#f}, it should be a string containing a Perl +regular expression, such as @samp{"[`~#\$\&()|;<>]"}, which is the default +value used by gitolite. It rejects any special character in configuration +that might be interpreted by a shell, which is useful when sharing the +administration burden with other people that do not otherwise have shell +access on the server. + @item @code{git-config-keys} (default: @code{""}) Gitolite allows you to set git config values using the @samp{config} keyword. This setting allows control over the config keys to accept. diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index 8cb5633165..ab86f82e62 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -54,6 +54,7 @@ gitolite-rc-file gitolite-rc-file-umask + gitolite-rc-file-unsafe-pattern gitolite-rc-file-git-config-keys gitolite-rc-file-roles gitolite-rc-file-enable @@ -226,6 +227,8 @@ access to exported repositories under @file{/srv/git}." gitolite-rc-file? (umask gitolite-rc-file-umask (default #o0077)) + (unsafe-pattern gitolite-rc-file-unsafe-pattern + (default #f)) (git-config-keys gitolite-rc-file-git-config-keys (default "")) (roles gitolite-rc-file-roles @@ -245,7 +248,7 @@ access to exported repositories under @file{/srv/git}." (define-gexp-compiler (gitolite-rc-file-compiler (file ) system target) (match file - (($ umask git-config-keys roles enable) + (($ umask unsafe-pattern git-config-keys roles enable) (apply text-file* "gitolite.rc" `("%RC = (\n" " UMASK => " ,(format #f "~4,'0o" umask) ",\n" @@ -264,6 +267,9 @@ access to exported repositories under @file{/srv/git}." " ],\n" ");\n" "\n" + ,(if unsafe-pattern + (string-append "$UNSAFE_PATT = qr(" unsafe-pattern ");") + "") "1;\n"))))) (define-record-type* -- cgit 1.4.1 From c60daa8e9dfa5f641ecb5f4f3a9135e27b58d2d7 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 5 Aug 2021 03:46:40 +0200 Subject: gnu: version-control: Add gitile service. * gnu/services/version-control.scm (gitile-service-type): New variable. * doc/guix.texi (Version Control Services): Document it. * gnu/tests/version-control.scm (%test-gitile): New variable. --- doc/guix.texi | 132 +++++++++++++++++++++++++++++++++++++ gnu/services/version-control.scm | 128 +++++++++++++++++++++++++++++++++++- gnu/tests/version-control.scm | 138 ++++++++++++++++++++++++++++++++++++++- 3 files changed, 395 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/doc/guix.texi b/doc/guix.texi index ab178a6b06..36a0c7f5ec 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25144,6 +25144,7 @@ of strings and G-expressions. @end table @end deffn +@anchor{NGINX} @subsubheading NGINX @deffn {Scheme Variable} nginx-service-type @@ -31544,6 +31545,137 @@ This setting controls the commands and features to enable within Gitolite. @end deftp +@subsubheading Gitile Service + +@cindex Gitile service +@cindex Git, forge +@uref{https://git.lepiller.eu/gitile, Gitile} is a Git forge for viewing +public git repository contents from a web browser. + +Gitile works best in collaboration with Gitolite, and will serve the public +repositories from Gitolite by default. The service should listen only on +a local port, and a webserver should be configured to serve static resources. +The gitile service provides an easy way to extend the Nginx service for +that purpose (@pxref{NGINX}). + +The following example will configure Gitile to serve repositories from a +custom location, with some default messages for the home page and the +footers. + +@lisp +(service gitile-service-type + (gitile-configuration + (repositories "/srv/git") + (base-git-url "https://myweb.site/git") + (index-title "My git repositories") + (intro '((p "This is all my public work!"))) + (footer '((p "This is the end"))) + (nginx-server-block + (nginx-server-configuration + (ssl-certificate + "/etc/letsencrypt/live/myweb.site/fullchain.pem") + (ssl-certificate-key + "/etc/letsencrypt/live/myweb.site/privkey.pem") + (listen '("443 ssl http2" "[::]:443 ssl http2")) + (locations + (list + ;; Allow for https anonymous fetch on /git/ urls. + (git-http-nginx-location-configuration + (git-http-configuration + (uri-path "/git/") + (git-root "/var/lib/gitolite/repositories"))))))))) +@end lisp + +In addition to the configuration record, you should configure your git +repositories to contain some optional information. First, your public +repositories need to contain the @file{git-daemon-export-ok} magic file +that allows Git to export the repository. Gitile uses the presence of this +file to detect public repositories it should make accessible. To do so with +Gitolite for instance, modify your @file{conf/gitolite.conf} to include +this in the repositories you want to make public: + +@example +repo foo + R = daemon +@end example + +In addition, Gitile can read the repository configuration to display more +infomation on the repository. Gitile uses the gitweb namespace for its +configuration. As an example, you can use the following in your +@file{conf/gitolite.conf}: + +@example +repo foo + R = daemon + desc = A long description, optionally with HTML, shown on the index page + config gitweb.name = The Foo Project + config gitweb.synopsis = A short description, shown on the main page of the project +@end example + +Do not forget to commit and push these changes once you are satisfied. You +may need to change your gitolite configuration to allow the previous +configuration options to be set. One way to do that is to add the +following service definition: + +@lisp +(service gitolite-service-type + (gitolite-configuration + (admin-pubkey (local-file "key.pub")) + (rc-file + (gitolite-rc-file + (umask #o0027) + ;; Allow to set any configuration key + (git-config-keys ".*") + ;; Allow any text as a valid configuration value + (unsafe-patt "^$"))))) +@end lisp + +@deftp {Data Type} gitile-configuration +Data type representing the configuration for @code{gitile-service-type}. + +@table @asis +@item @code{package} (default: @var{gitile}) +Gitile package to use. + +@item @code{host} (default: @code{"localhost"}) +The host on which gitile is listening. + +@item @code{port} (default: @code{8080}) +The port on which gitile is listening. + +@item @code{database} (default: @code{"/var/lib/gitile/gitile-db.sql"}) +The location of the database. + +@item @code{repositories} (default: @code{"/var/lib/gitolite/repositories"}) +The location of the repositories. Note that only public repositories will +be shown by Gitile. To make a repository public, add an empty +@file{git-daemon-export-ok} file at the root of that repository. + +@item @code{base-git-url} +The base git url that will be used to show clone commands. + +@item @code{index-title} (default: @code{"Index"}) +The page title for the index page that lists all the available repositories. + +@item @code{intro} (default: @code{'()}) +The intro content, as a list of sxml expressions. This is shown above the list +of repositories, on the index page. + +@item @code{footer} (default: @code{'()}) +The footer content, as a list of sxml expressions. This is shown on every +page served by Gitile. + +@item @code{nginx-server-block} +An nginx server block that will be extended and used as a reverse proxy by +Gitile to serve its pages, and as a normal web server to serve its assets. + +You can use this block to add more custom URLs to your domain, such as a +@code{/git/} URL for anonymous clones, or serving any other files you would +like to serve. +@end table +@end deftp + + @node Game Services @subsection Game Services diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index ab86f82e62..3315e80c6f 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017 Oleg Pykhalov ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2018 Christopher Baines +;;; Copyright © 2021 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -59,7 +60,21 @@ gitolite-rc-file-roles gitolite-rc-file-enable - gitolite-service-type)) + gitolite-service-type + + gitile-configuration + gitile-configuration-package + gitile-configuration-host + gitile-configuration-port + gitile-configuration-database + gitile-configuration-repositories + gitile-configuration-git-base-url + gitile-configuration-index-title + gitile-configuration-intro + gitile-configuration-footer + gitile-configuration-nginx + + gitile-service-type)) ;;; Commentary: ;;; @@ -386,3 +401,114 @@ access to exported repositories under @file{/srv/git}." By default, the @code{git} user is used, but this is configurable. Additionally, Gitolite can integrate with with tools like gitweb or cgit to provide a web interface to view selected repositories."))) + +;;; +;;; Gitile +;;; + +(define-record-type* + gitile-configuration make-gitile-configuration gitile-configuration? + (package gitile-configuration-package + (default gitile)) + (host gitile-configuration-host + (default "127.0.0.1")) + (port gitile-configuration-port + (default 8080)) + (database gitile-configuration-database + (default "/var/lib/gitile/gitile-db.sql")) + (repositories gitile-configuration-repositories + (default "/var/lib/gitolite/repositories")) + (base-git-url gitile-configuration-base-git-url) + (index-title gitile-configuration-index-title + (default "Index")) + (intro gitile-configuration-intro + (default '())) + (footer gitile-configuration-footer + (default '())) + (nginx gitile-configuration-nginx)) + +(define (gitile-config-file host port database repositories base-git-url + index-title intro footer) + (define build + #~(write `(config + (port #$port) + (host #$host) + (database #$database) + (repositories #$repositories) + (base-git-url #$base-git-url) + (index-title #$index-title) + (intro #$intro) + (footer #$footer)) + (open-output-file #$output))) + + (computed-file "gitile.conf" build)) + +(define gitile-nginx-server-block + (match-lambda + (($ package host port database repositories + base-git-url index-title intro footer nginx) + (list (nginx-server-configuration + (inherit nginx) + (locations + (append + (list + (nginx-location-configuration + (uri "/") + (body + (list + #~(string-append "proxy_pass http://" #$host + ":" (number->string #$port) + "/;"))))) + (map + (lambda (loc) + (nginx-location-configuration + (uri loc) + (body + (list + #~(string-append "root " #$package "/share/gitile/assets;"))))) + '("/css" "/js" "/images")) + (nginx-server-configuration-locations nginx)))))))) + +(define gitile-shepherd-service + (match-lambda + (($ package host port database repositories + base-git-url index-title intro footer nginx) + (list (shepherd-service + (provision '(gitile)) + (requirement '(loopback)) + (documentation "gitile") + (start (let ((gitile (file-append package "/bin/gitile"))) + #~(make-forkexec-constructor + `(,#$gitile "-c" #$(gitile-config-file + host port database + repositories + base-git-url index-title + intro footer)) + #:user "gitile" + #:group "git"))) + (stop #~(make-kill-destructor))))))) + +(define %gitile-accounts + (list (user-group + (name "git") + (system? #t)) + (user-account + (name "gitile") + (group "git") + (system? #t) + (comment "Gitile user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin"))))) + +(define gitile-service-type + (service-type + (name 'gitile) + (description "Run Gitile, a small Git forge. Expose public repositories +on the web.") + (extensions + (list (service-extension account-service-type + (const %gitile-accounts)) + (service-extension shepherd-root-service-type + gitile-shepherd-service) + (service-extension nginx-service-type + gitile-nginx-server-block))))) diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm index d3cf19c913..a7cde1f163 100644 --- a/gnu/tests/version-control.scm +++ b/gnu/tests/version-control.scm @@ -38,7 +38,8 @@ #:use-module (guix modules) #:export (%test-cgit %test-git-http - %test-gitolite)) + %test-gitolite + %test-gitile)) (define README-contents "Hello! This is what goes inside the 'README' file.") @@ -63,7 +64,10 @@ (invoke git "commit" "-m" "That's a commit.")) (mkdir-p "/srv/git") - (rename-file "/tmp/test-repo/.git" "/srv/git/test"))))) + (rename-file "/tmp/test-repo/.git" "/srv/git/test") + (with-output-to-file "/srv/git/test/git-daemon-export-ok" + (lambda _ + (display ""))))))) (define %test-repository-service ;; Service that creates /srv/git/test. @@ -416,3 +420,133 @@ HTTP-PORT." (name "gitolite") (description "Clone the Gitolite admin repository.") (value (run-gitolite-test)))) + +;;; +;;; Gitile. +;;; + +(define %gitile-configuration-nginx + (nginx-server-configuration + (root "/does/not/exists") + (try-files (list "$uri" "=404")) + (listen '("19418")) + (ssl-certificate #f) + (ssl-certificate-key #f))) + +(define %gitile-os + ;; Operating system under test. + (simple-operating-system + (service dhcp-client-service-type) + (simple-service 'srv-git activation-service-type + #~(mkdir-p "/srv/git")) + (service gitile-service-type + (gitile-configuration + (base-git-url "http://localhost") + (repositories "/srv/git") + (nginx %gitile-configuration-nginx))) + %test-repository-service)) + +(define* (run-gitile-test #:optional (http-port 19418)) + "Run tests in %GITOLITE-OS, which has nginx running and listening on +HTTP-PORT." + (define os + (marionette-operating-system + %gitile-os + #:imported-modules '((gnu services herd) + (guix combinators)))) + + (define vm + (virtual-machine + (operating-system os) + (port-forwardings `((8081 . ,http-port))))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-11) (srfi srfi-64) + (gnu build marionette) + (web uri) + (web client) + (web response)) + + (define marionette + (make-marionette (list #$vm))) + + (mkdir #$output) + (chdir #$output) + + (test-begin "gitile") + + ;; XXX: Shepherd reads the config file *before* binding its control + ;; socket, so /var/run/shepherd/socket might not exist yet when the + ;; 'marionette' service is started. + (test-assert "shepherd socket ready" + (marionette-eval + `(begin + (use-modules (gnu services herd)) + (let loop ((i 10)) + (cond ((file-exists? (%shepherd-socket-file)) + #t) + ((> i 0) + (sleep 1) + (loop (- i 1))) + (else + 'failure)))) + marionette)) + + ;; Wait for nginx to be up and running. + (test-assert "nginx running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'nginx)) + marionette)) + + ;; Make sure the PID file is created. + (test-assert "PID file" + (marionette-eval + '(file-exists? "/var/run/nginx/pid") + marionette)) + + ;; Make sure Git test repository is created. + (test-assert "Git test repository" + (marionette-eval + '(file-exists? "/srv/git/test") + marionette)) + + (sleep 2) + + ;; Make sure we can access pages that correspond to our repository. + (letrec-syntax ((test-url + (syntax-rules () + ((_ path code) + (test-equal (string-append "GET " path) + code + (let-values (((response body) + (http-get (string-append + "http://localhost:8081" + path)))) + (response-code response)))) + ((_ path) + (test-url path 200))))) + (test-url "/") + (test-url "/css/gitile.css") + (test-url "/test") + (test-url "/test/commits") + (test-url "/test/tree" 404) + (test-url "/test/tree/-") + (test-url "/test/tree/-/README") + (test-url "/test/does-not-exist" 404) + (test-url "/test/tree/-/does-not-exist" 404) + (test-url "/does-not-exist" 404)) + + (test-end) + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation "gitile-test" test)) + +(define %test-gitile + (system-test + (name "gitile") + (description "Connect to a running Gitile server.") + (value (run-gitile-test)))) -- cgit 1.4.1 From d0fcce8baf716f8661508db50eaf23b2d5a64a58 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 16 Feb 2021 22:23:44 +0100 Subject: services: libvirt: Add qemu field. * gnu/services/virtualization.scm (libvirt-configuration): Add 'qemu' field. (libvirt-service-type): Replace 'qemu' package with the one specified in the service configuration. --- gnu/services/virtualization.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 0c75614e18..b0df0489b9 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -131,6 +131,10 @@ (libvirt (package libvirt) "Libvirt package.") + (qemu + (package qemu) + "Qemu package.") + (listen-tls? (boolean #t) "Flag listening for secure TLS connections on the public TCP/IP port. @@ -485,7 +489,7 @@ potential infinite waits blocking libvirt.")) (lambda (config) (list (libvirt-configuration-libvirt config) - qemu))) + (libvirt-configuration-qemu config)))) (service-extension activation-service-type %libvirt-activation) (service-extension shepherd-root-service-type -- cgit 1.4.1 From 4dc17cd54e86dbd71d26b87138660d42e8f615a9 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 16 Feb 2021 22:17:30 +0100 Subject: services: libvirt: Change unix-sock-group default. When accessing libvrtd remotely, polkit can't be used unless you are logged as root. Instead allow libvirt groups member access to the control socket. * gnu/services/virtualization.scm (libvirt-configuration) [unix-sock-group]: Change default from "root" to "libvirt". --- gnu/services/virtualization.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/services') diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index b0df0489b9..bca5f56b87 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -172,7 +172,7 @@ stopping the Avahi daemon.") "Default mDNS advertisement name. This must be unique on the immediate broadcast network.") (unix-sock-group - (string "root") + (string "libvirt") "UNIX domain socket group ownership. This can be used to allow a 'trusted' set of users access to management capabilities without becoming root.") -- cgit 1.4.1