[PATCH 0/5] Guix Build Coordinator service fixes

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 22 Oct 2020 18:16
(address . guix-patches@gnu.org)
87eelqgrso.fsf@cbaines.net
These patches fix the things I missed with the first pass at the service
for the Guix Build Coordinator.

Christopher Baines (5):
services: guix: Fix hooks gexp issue for the Guix Build Coordinator.
gnu: guix-build-coordinator: Ensure gnutls is available.
services: guix-build-coordinator: Output the start script name.
services: guix-build-coordinator: Include the system profile in PATH.
services: guix-build-coordinator: Configure output buffering.

gnu/packages/package-management.scm | 2 ++
gnu/services/guix.scm | 10 ++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+RsEdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfGxw/+K+Q5ph/VAGCZaHejytgpQBsf4SmdB62n
Dx8D8SyT0AbCtOsmhSJ7XkgpMmBEmEma557/GF6vZK/T/ahzrEu7t4NfV/ECrp7N
B9hBsVWzkoL8Hj+JQO55ISv+KzYiMTfmO0a/jeTb0X/68IsaVcZnXKo96zcv+uz5
y5rP+OP/KNfZ75FZWt2kEtoUh1kS31f6CJfNPnSKCjzNQtL3SHbzvZdUrMDrROD4
KMgdlFU6VKiJbgLrFmlew+ksyLBFiA9r0ZLEeX+xmgJU8p8iEB6gvZrQgjNLVktS
fGdjBzZ5BECA1xbzc7bAeXexfnmMxJHfeCcS+ltGQVAPfyV0APZkndbStYSRME79
h77ZVmUWLz7Z1ttE5X4oSzrotpLKKoJPoq7f4kRIHk45vQWIEbkCdgxG4fRRkRLm
Hq4ZLeMHe2ziXH/u4Bfe+Coan74ZRioaZgT6phHcpfpG0B/Bq115I6S1mo7DGDRb
6ikdIJy9noPsmO5RMuGkJ5kciPxz5+jvzOQUDwpo58maU2Sa1KANmOqq9cgql9yT
ac72GdVGXJsSaDMkH2E4Q83IxmVmg2jFMdy89IaZXG1VwTY0yJBoEB2rT2yhJAER
v36H6WSHPLUnfL1Z5K7YJajCCqYWM+yRy0rwlRb7YJ5vWhUlsYMRzPmI7QFtXDXa
gCiOeF0EuKk=
=DRn7
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 22 Oct 2020 18:26
[PATCH 4/5] services: guix-build-coordinator: Include the system profile in PATH.
(address . 44143@debbugs.gnu.org)
20201022162601.3757-4-mail@cbaines.net
As this allows hooks to use the system profile, if that's desired.

* gnu/services/guix.scm (guix-build-coordinator-shepherd-services): Set PATH
to include the system profile.
---
gnu/services/guix.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index 1666733e9c..ac2a03147c 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -267,7 +267,8 @@
#:environment-variables
`(,(string-append
"GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale")
- "LC_ALL=en_US.utf8")
+ "LC_ALL=en_US.utf8"
+ "PATH=/run/current-system/profile/bin") ; for hooks
#:log-file "/var/log/guix-build-coordinator/coordinator.log"))
(stop #~(make-kill-destructor))))))
--
2.28.0
C
C
Christopher Baines wrote on 22 Oct 2020 18:26
[PATCH 5/5] services: guix-build-coordinator: Configure output buffering.
(address . 44143@debbugs.gnu.org)
20201022162601.3757-5-mail@cbaines.net
Otherwise the logging is garbled.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Configure
line output buffering for stdout and stderr.
---
gnu/services/guix.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (16 lines)
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index ac2a03147c..4afe02792f 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -200,6 +200,9 @@
(guix-build-coordinator build-allocator)
(guix-build-coordinator coordinator))
+ (setvbuf (current-output-port) 'line)
+ (setvbuf (current-error-port) 'line)
+
(simple-format #t "starting the guix-build-coordinator:\n ~A\n"
(current-filename))
(let* ((metrics-registry (make-metrics-registry
--
2.28.0
C
C
Christopher Baines wrote on 22 Oct 2020 18:25
[PATCH 3/5] services: guix-build-coordinator: Output the start script name.
(address . 44143@debbugs.gnu.org)
20201022162601.3757-3-mail@cbaines.net
As this can be useful for debugging purposes.

* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Output the
current filename.
---
gnu/services/guix.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index 665267f5e3..1666733e9c 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -200,6 +200,8 @@
(guix-build-coordinator build-allocator)
(guix-build-coordinator coordinator))
+ (simple-format #t "starting the guix-build-coordinator:\n ~A\n"
+ (current-filename))
(let* ((metrics-registry (make-metrics-registry
#:namespace
"guixbuildcoordinator_"))
--
2.28.0
C
C
Christopher Baines wrote on 22 Oct 2020 18:25
[PATCH 2/5] gnu: guix-build-coordinator: Ensure gnutls is available.
(address . 44143@debbugs.gnu.org)
20201022162601.3757-2-mail@cbaines.net
Some hooks expect this to be available.

* gnu/packages/package-management.scm (guix-build-coordinator)
[inputs,native-inputs]: Add gnutls.
---
gnu/packages/package-management.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 45c3d4d5cf..349897fd16 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -1048,6 +1048,7 @@ environments.")
`(("pkg-config" ,pkg-config)
("autoconf" ,autoconf)
("automake" ,automake)
+ ("gnutls" ,gnutls)
;; Guile libraries are needed here for cross-compilation.
("guile-json" ,guile-json-3)
@@ -1066,6 +1067,7 @@ environments.")
("guile-zlib" ,guile-zlib)
("guile-sqlite3" ,guile-sqlite3)
("guix" ,guix)
+ ("gnutls" ,gnutls)
("sqlite" ,sqlite)
("sqitch" ,sqitch)))
(home-page "https://git.cbaines.net/guix/build-coordinator/")
--
2.28.0
C
C
Christopher Baines wrote on 22 Oct 2020 18:25
[PATCH 1/5] services: guix: Fix hooks gexp issue for the Guix Build Coordinator.
(address . 44143@debbugs.gnu.org)
20201022162601.3757-1-mail@cbaines.net
* gnu/services/guix.scm (make-guix-build-coordinator-start-script): Fix
handling the name within the hook gexp.
---
gnu/services/guix.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index bd7ebcd2aa..665267f5e3 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -209,7 +209,7 @@
(hooks
(list #$@(map (match-lambda
((name . hook-gexp)
- #~(cons name #$hook-gexp)))
+ #~(cons '#$name #$hook-gexp)))
hooks)))
(hooks-with-defaults
`(,@hooks
--
2.28.0
M
M
Mathieu Othacehe wrote on 23 Oct 2020 13:54
Re: [bug#44143] [PATCH 0/5] Guix Build Coordinator service fixes
(name . Christopher Baines)(address . mail@cbaines.net)(address . 44143@debbugs.gnu.org)
87eelpi2dv.fsf@gnu.org
Hello Chris,

Toggle quote (3 lines)
> These patches fix the things I missed with the first pass at the service
> for the Guix Build Coordinator.

This patchset seems fine to me.

Thanks,

Mathieu
C
C
Christopher Baines wrote on 23 Oct 2020 17:31
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 44143-done@debbugs.gnu.org)
87d0192c3e.fsf@cbaines.net
Mathieu Othacehe <othacehe@gnu.org> writes:

Toggle quote (7 lines)
> Hello Chris,
>
>> These patches fix the things I missed with the first pass at the service
>> for the Guix Build Coordinator.
>
> This patchset seems fine to me.

Great, I've pushed this plus even more fixes to master now.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+S90VfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcvvA//Sv5JeiIK5gi85P0Dy/2r+zPajmhESKF2
WF8vrvxK+3hg0Um9n7YJzRhAAl9mCItt+XjBGonDGe/S07hbAVZZJG+lGt/8+VLB
Gj5WBsL4wsEQZGDU3qf1//73MiQf0ks9SYg6IuDZcZIsfpJzphQSBVgJu5GJoqkN
F8qtM8C2Gb+NSzZne88jBE57FZh3jlde1NH9oWn/cjPdFNijT1HVwIqXyrwt50qg
WAzUS5n7DiRozgqz9ONNcFiPt9eT6roqncYbrUiqVHOBHiBVV1UTTwOUGIidmmiz
QU9oJrYtD0bxpBiqkDNOUNlbIpg69n8pDo4/LhNRQAyelW5DwbBdhoXMEeBc9jV8
7UysR309s++yJtG/Ol6GSN484D5/BiGcq51WuWZqSSOSDqx1FgneXBzmvBawtgpd
pVAvHhU0F0nFt+iDGoxE1niJmQIrRskCktxbA/AsSVmlkzABBNm44vZn3WyAXE2Z
voLfGQm5TdYCrZpMjXmzqRXYmjJE4rZjyajCYMHh/J365h31SiO73i5poNJCNe06
TGTCt4oLGg6bnNdeVhMrfS2JG/bT0ukKzXpFBUAQQ3m1SAJY5k4n4tW8CMOkZZg+
yBYMk95kP/BDdVjSW6wylwpBTxqiSfXxsHlVaf9F9uTNAsdDpx+1ugaSTavmKlcW
7ITBMjPE6/4=
=AGvp
-----END PGP SIGNATURE-----

Closed
?