me
/
guix
Archived
1
0
Fork 0

gnu: polkit: Remove dependency on (guix build syscalls).

Having a dependency on (guix build syscalls) this deep in the stack
would make it much harder to change syscalls.scm.

* gnu/packages/polkit.scm (polkit)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap processes from the build process.
[native-inputs]: Remove TINI.
master
Ludovic Courtès 2023-10-13 17:05:27 +02:00
parent 4eda89248d
commit 8e3d710f4c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 15 additions and 20 deletions

View File

@ -95,10 +95,7 @@
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
(list (list
#:imported-modules `(,@%meson-build-system-modules
(guix build syscalls))
#:modules '((guix build meson-build-system) #:modules '((guix build meson-build-system)
(guix build syscalls)
(guix build utils) (guix build utils)
(ice-9 match)) (ice-9 match))
#:configure-flags #:configure-flags
@ -130,24 +127,23 @@
(replace 'check (replace 'check
(lambda* (#:key tests? test-options #:allow-other-keys) (lambda* (#:key tests? test-options #:allow-other-keys)
(when tests? (when tests?
;; Run the test suite through tini to ensure signals are
;; properly handled and zombie processes reaped.
(match (primitive-fork) (match (primitive-fork)
(0 ;child process (0 ;child process
(set-child-subreaper!) (apply execlp "meson" "meson"
;; Use tini so that signals are properly handled and "test" "-t" "0" "--print-errorlogs"
;; doubly-forked processes get reaped; otherwise,
;; python-dbusmock would waste time polling for the dbus
;; processes it spawns to be reaped, in vain.
(apply execlp "tini" "--"
"meson" "--" "test" "-t" "0" "--print-errorlogs"
test-options)) test-options))
(pid (meson-pid
(match (waitpid pid) ;; Reap child processes; otherwise, python-dbusmock would
((_ . status) ;; waste time polling for the dbus processes it spawns to
(unless (zero? status) ;; be reaped, in vain.
(error "`meson test' exited with status" (let loop ()
status)))))))))))) (match (waitpid WAIT_ANY)
((pid . status)
(if (= pid meson-pid)
(unless (zero? status)
(error "`meson test' exited with status"
status))
(loop)))))))))))))
(inputs (inputs
(list duktape expat elogind linux-pam nspr)) (list duktape expat elogind linux-pam nspr))
(propagated-inputs (propagated-inputs
@ -162,8 +158,7 @@
perl perl
pkg-config pkg-config
python python
python-dbusmock python-dbusmock))
tini))
(home-page "https://www.freedesktop.org/wiki/Software/polkit/") (home-page "https://www.freedesktop.org/wiki/Software/polkit/")
(synopsis "Authorization API for privilege management") (synopsis "Authorization API for privilege management")
(description "Polkit is an application-level toolkit for defining and (description "Polkit is an application-level toolkit for defining and