[PATCH] gnu: guix-data-service: Update to 0.0.1-19.d12909d.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 21 Mar 2020 10:22
(address . guix-patches@gnu.org)
20200321092259.2729-1-mail@cbaines.net
These changes support the guix-data-service-backup-database and
guix-data-service-create-small-backup scripts. These are shell scripts, so
require coreutils from the build environment at runtime as well as binaries
from postgresql, ephemeralpg and optionally util-linux (for ionice and
renice).

* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
[arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
'install phase to wrap all bin files with the PATH at build time.
[inputs]: Add util-linux and include ephemeralpg from native-inputs.
[native-inputs]: Move ephemeralpg to inputs.
---
gnu/packages/web.scm | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)

Toggle diff (77 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 10cbf6165b..3bcc067b4c 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4381,8 +4381,8 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
(package-with-python2 python-feedparser))
(define-public guix-data-service
- (let ((commit "18eb9dfdcb3174bfd4bab5b9089acffa13aa1214")
- (revision "18"))
+ (let ((commit "d12909d57282babfc55f1eef96bc478c17821c85")
+ (revision "19"))
(package
(name "guix-data-service")
(version (string-append "0.0.1-" revision "." (string-take commit 7)))
@@ -4394,11 +4394,13 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
(file-name (git-file-name name version))
(sha256
(base32
- "0lb78cqzqaz0r4sspg272w2a3yhzhqah30j0kxf0z182b0qpmp37"))))
+ "1zh6awrs2qgkrrz4d9212an1ggspmsadjdysgf215z5zkc25lpf7"))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
(guix build gnu-build-system)
+ (ice-9 ftw)
+ (ice-9 match)
(ice-9 rdelim)
(ice-9 popen))
#:test-target "check-with-tmp-database"
@@ -4426,20 +4428,20 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
"/site-ccache")))
(for-each
(lambda (file)
+ (simple-format (current-error-port)
+ "wrapping: ~A\n"
+ (string-append bin "/" file))
(wrap-program (string-append bin "/" file)
`("PATH" ":" prefix
- (,bin))
+ (,bin ,(getenv "PATH")))
`("GUILE_LOAD_PATH" ":" prefix
(,scm ,(getenv "GUILE_LOAD_PATH")))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
(,go ,(getenv "GUILE_LOAD_COMPILED_PATH")))))
- '("guix-data-service"
- "guix-data-service-process-branch-updated-email"
- "guix-data-service-process-branch-updated-mbox"
- "guix-data-service-process-job"
- "guix-data-service-process-jobs"
- "guix-data-service-manage-build-servers"
- "guix-data-service-query-build-servers"))
+ (scandir bin
+ (match-lambda
+ ((or "." "..") #f)
+ (_ #t))))
#t)))
(delete 'strip)))) ; As the .go files aren't compatible
(inputs
@@ -4448,13 +4450,14 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
("guile-json" ,guile3.0-json)
("guile-email" ,guile3.0-email)
("guile-squee" ,guile3.0-squee)
+ ("ephemeralpg" ,ephemeralpg)
+ ("util-linux" ,util-linux)
("postgresql" ,postgresql)
("sqitch" ,sqitch)))
(native-inputs
`(("guile" ,guile-3.0)
("autoconf" ,autoconf)
("automake" ,automake)
- ("ephemeralpg" ,ephemeralpg)
("emacs-minimal" ,emacs-minimal)
("emacs-htmlize" ,emacs-htmlize)
("pkg-config" ,pkg-config)))
--
2.25.1
L
L
Ludovic Courtès wrote on 21 Mar 2020 22:50
(name . Christopher Baines)(address . mail@cbaines.net)(address . 40162@debbugs.gnu.org)
874kuhxtrp.fsf@gnu.org
Hi!

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (12 lines)
> These changes support the guix-data-service-backup-database and
> guix-data-service-create-small-backup scripts. These are shell scripts, so
> require coreutils from the build environment at runtime as well as binaries
> from postgresql, ephemeralpg and optionally util-linux (for ionice and
> renice).
>
> * gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
> [arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
> 'install phase to wrap all bin files with the PATH at build time.
> [inputs]: Add util-linux and include ephemeralpg from native-inputs.
> [native-inputs]: Move ephemeralpg to inputs.

[...]

Toggle quote (9 lines)
> (lambda (file)
> + (simple-format (current-error-port)
> + "wrapping: ~A\n"
> + (string-append bin "/" file))
> (wrap-program (string-append bin "/" file)
> `("PATH" ":" prefix
> - (,bin))
> + (,bin ,(getenv "PATH")))

If I’m not mistaken, this would keep references to GCC, etc.

What about explicitly listing the things that you list above?

Thanks,
Ludo’.
C
C
Christopher Baines wrote on 26 Mar 2020 22:26
[PATCH] gnu: guix-data-service: Update to 0.0.1-19.d12909d.
(address . 40162@debbugs.gnu.org)
20200326212640.10610-1-mail@cbaines.net
These changes support the guix-data-service-backup-database and
guix-data-service-create-small-backup scripts. These are shell scripts, so
require coreutils from the build environment at runtime as well as binaries
from postgresql, ephemeralpg and optionally util-linux (for ionice and
renice).

* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
[arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
'install phase to wrap all bin files with some inputs as well.
[inputs]: Add util-linux and include ephemeralpg from native-inputs.
[native-inputs]: Move ephemeralpg to inputs.
---
gnu/packages/web.scm | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)

Toggle diff (85 lines)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 10cbf6165b..86d3f41efc 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4381,8 +4381,8 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
(package-with-python2 python-feedparser))
(define-public guix-data-service
- (let ((commit "18eb9dfdcb3174bfd4bab5b9089acffa13aa1214")
- (revision "18"))
+ (let ((commit "d1c243f7fd8902f359ff06fb78dce663cf4297ce")
+ (revision "19"))
(package
(name "guix-data-service")
(version (string-append "0.0.1-" revision "." (string-take commit 7)))
@@ -4394,11 +4394,13 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
(file-name (git-file-name name version))
(sha256
(base32
- "0lb78cqzqaz0r4sspg272w2a3yhzhqah30j0kxf0z182b0qpmp37"))))
+ "1ji8d4vwmv7j9h7z96hvzi3zvik594yngjrdal37w13fbxy2v6sw"))))
(build-system gnu-build-system)
(arguments
'(#:modules ((guix build utils)
(guix build gnu-build-system)
+ (ice-9 ftw)
+ (ice-9 match)
(ice-9 rdelim)
(ice-9 popen))
#:test-target "check-with-tmp-database"
@@ -4426,20 +4428,28 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
"/site-ccache")))
(for-each
(lambda (file)
+ (simple-format (current-error-port)
+ "wrapping: ~A\n"
+ (string-append bin "/" file))
(wrap-program (string-append bin "/" file)
`("PATH" ":" prefix
- (,bin))
+ ,(cons*
+ bin
+ (map (lambda (input)
+ (string-append
+ (assoc-ref inputs input)
+ "/bin"))
+ '("ephemeralpg"
+ "util-linux"
+ "postgresql"))))
`("GUILE_LOAD_PATH" ":" prefix
(,scm ,(getenv "GUILE_LOAD_PATH")))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix
(,go ,(getenv "GUILE_LOAD_COMPILED_PATH")))))
- '("guix-data-service"
- "guix-data-service-process-branch-updated-email"
- "guix-data-service-process-branch-updated-mbox"
- "guix-data-service-process-job"
- "guix-data-service-process-jobs"
- "guix-data-service-manage-build-servers"
- "guix-data-service-query-build-servers"))
+ (scandir bin
+ (match-lambda
+ ((or "." "..") #f)
+ (_ #t))))
#t)))
(delete 'strip)))) ; As the .go files aren't compatible
(inputs
@@ -4448,13 +4458,14 @@ CDF, Atom 0.3, and Atom 1.0 feeds.")
("guile-json" ,guile3.0-json)
("guile-email" ,guile3.0-email)
("guile-squee" ,guile3.0-squee)
+ ("ephemeralpg" ,ephemeralpg)
+ ("util-linux" ,util-linux)
("postgresql" ,postgresql)
("sqitch" ,sqitch)))
(native-inputs
`(("guile" ,guile-3.0)
("autoconf" ,autoconf)
("automake" ,automake)
- ("ephemeralpg" ,ephemeralpg)
("emacs-minimal" ,emacs-minimal)
("emacs-htmlize" ,emacs-htmlize)
("pkg-config" ,pkg-config)))
--
2.26.0
C
C
Christopher Baines wrote on 26 Mar 2020 22:28
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40162@debbugs.gnu.org)
87tv2akdqy.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (31 lines)
> Hi!
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> These changes support the guix-data-service-backup-database and
>> guix-data-service-create-small-backup scripts. These are shell scripts, so
>> require coreutils from the build environment at runtime as well as binaries
>> from postgresql, ephemeralpg and optionally util-linux (for ionice and
>> renice).
>>
>> * gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
>> [arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
>> 'install phase to wrap all bin files with the PATH at build time.
>> [inputs]: Add util-linux and include ephemeralpg from native-inputs.
>> [native-inputs]: Move ephemeralpg to inputs.
>
> [...]
>
>> (lambda (file)
>> + (simple-format (current-error-port)
>> + "wrapping: ~A\n"
>> + (string-append bin "/" file))
>> (wrap-program (string-append bin "/" file)
>> `("PATH" ":" prefix
>> - (,bin))
>> + (,bin ,(getenv "PATH")))
>
> If I’m not mistaken, this would keep references to GCC, etc.
>
> What about explicitly listing the things that you list above?

Indeed, I've sent another patch which explicitly lists some inputs.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl59HmVfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdHZBAAjPeovoyaz5bzLJJFd8Anv0N34aJKTY/4TUjz9/N8P8Ysu7tEY4h6VZJb
+W3b+ZHpCa8vxF+lQ71uQzYxw47oojGAJQXJFC+Zj8ug0a1lHnTNfmoaeqbJ9Otj
wXk3BjPTiOoA+DCUufEpcKPNxDtUbkiBSBPjIXzbRsd9kqxiH4Dqq6QZWHyU+Anh
8bRMrHx2bx3ZEaVekAN9HGSmVJwmjMUGOPMKoQgW6rOA4N8PVmfbfAKhr8J0NQzW
mVw+J8xBTK8SUbsTozXn4mXsaJRu425szVWSNT4WbJ2/m++89LVh0fTXnI9lgs6k
kaWIXHYz06TYdRv1ZkYWCzQdtDo4cw2tkLxJqitxJGXj2ZAYdV+W0VlPSBLtKOMe
Ej93qt4HmWlStV53Z1b033Ul64SjGrLBKf+BfsrikROyuz7sEQsG1Yt8/oAowgcP
WzGLdHafvLh5cO2zxcGoyHIqtjHbVkPGaEYn/ACTVJ/8UIfgaHMmtJ5sZLvsfvqy
fWLFDQQ23HvT08S/LPcRPp3nrUeQdAgAcs1pFcRtxs9oc7WM8BwQz8PUdXxPV5c+
huVITMdCLsa4bCaEWLY/wsDHG1I969T0WGrM78qmtmdUTpXD7BPfdhiyar7aGcP4
sPMHihCEYRYxKKuEbLNAq3kpibJuoL8xXXk1zpEuoBg1Ydo9dXk=
=yN15
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 26 Mar 2020 22:33
(name . Christopher Baines)(address . mail@cbaines.net)(address . 40162@debbugs.gnu.org)
87mu8294yi.fsf@gnu.org
Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (12 lines)
> These changes support the guix-data-service-backup-database and
> guix-data-service-create-small-backup scripts. These are shell scripts, so
> require coreutils from the build environment at runtime as well as binaries
> from postgresql, ephemeralpg and optionally util-linux (for ionice and
> renice).
>
> * gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
> [arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
> 'install phase to wrap all bin files with some inputs as well.
> [inputs]: Add util-linux and include ephemeralpg from native-inputs.
> [native-inputs]: Move ephemeralpg to inputs.

LGTM, thanks!

Ludo'.
C
C
Christopher Baines wrote on 26 Mar 2020 23:53
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40162-done@debbugs.gnu.org)
87sghuk9rw.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (16 lines)
> Christopher Baines <mail@cbaines.net> skribis:
>
>> These changes support the guix-data-service-backup-database and
>> guix-data-service-create-small-backup scripts. These are shell scripts, so
>> require coreutils from the build environment at runtime as well as binaries
>> from postgresql, ephemeralpg and optionally util-linux (for ionice and
>> renice).
>>
>> * gnu/packages/web.scm (guix-data-service): Update to 0.0.1-19.d12909d.
>> [arguments]: Add (ice-9 ftw) and (ice-9 match) to #:modules, change the
>> 'install phase to wrap all bin files with some inputs as well.
>> [inputs]: Add util-linux and include ephemeralpg from native-inputs.
>> [native-inputs]: Move ephemeralpg to inputs.
>
> LGTM, thanks!

Great, I've pushed this now :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl59MoNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xeo8w/6Aih0RtxrZul94+shkCh6W8JgjR7cVtg1D3EhiHE45UhsnSIfA9+9RsGx
dDPkT3GOsgiFtWWgnpZMcTHeeC1PWH6VH6OWNmjlpTUy2+bEmLED8ZhgaVBSQHJN
DbfXCLXOn2dhh0UP6yUvO3xKHY2zIH3+7lLK3weHKPuAjJ4r5th1b0uqAGSXYvVK
qlK8h31D5Y1bobRq5BOH8PMo78yCoZ3qxFIKbZbbyw8t3iv8YEEbInHfL91V8muA
egW/wOPD0/QCLCO5AqIbsIzuS3ywCzalCzg30vXHMoBm6fJ/HUsbSG1c1nVHFNA8
rFLBe8zW7Kz9D0MOSqcbauERAsdcLPWL8APygRHcoGjz79Q/bymdG0qNwUCIi8fV
Pa4yOoD9TqB6XOZe2hMPdocD/ct98hQYTjGOOTDXhHZhIZ4h7b39fG22wmt1HsEA
PDW35S1sqWGxiSzbKUTmoiP8AybRVqCT1DljaurGLu/d0oMxXTrkPMo0bPQtVz7M
L/ymIj+A3EJEC/oM0Z8xTdmckRXchal4FvquVkySls4VkW/CjNGkqNMzkcBJ1L/6
1QRIxHe4ig0QlNxv2l1YgEHI4ikvRKC1fwQ7UhJrZJcE1NSu7C1CYUI0jUddYyeM
NDJ/yyTtAWF9HxTLOiRHj24vfRGeMmaqQVffHLQed2IwZjTLUHw=
=Dy+V
-----END PGP SIGNATURE-----

Closed
?