[PATCH 0/7] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)

  • Done
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Maxim Cournoyer
  • Bruno Victal
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:45
(address . guix-patches@gnu.org)
cover.1697211312.git.ludo@gnu.org
Hello!

This patch series removes (guix build syscalls) from the dependencies
of several packages where having that dependency would effectively
prevent us from changing syscalls.scm due to the high number of
dependents (and it turns out that removing that dependency was easy).

This change involves a rebuild of ~3,912 packages. I plan to create
a branch and have it built by ci.guix (I suppose qa.guix will skip it
by default?). I can do that any time (the build farm is currently idle!)
but since ‘rust-team’ is fully built, I thought we might want to merge
it first; Efraim? I’ll also send a proper “request for merging”.

Besides I have not forgotten about the underlying bug, reported
at https://issues.guix.gnu.org/30948, and I plan to propose another
fix there.

Thoughts?

Ludo’.

Ludovic Courtès (7):
gnu: mutter: Remove dependency on (guix build syscalls).
gnu: python-ipykernel: Remove dependency on (guix build syscalls).
gnu: python-dbusmock: Remove dependency on (guix build syscalls).
gnu: python-dbusmock: Rewrite phases as a gexp.
gnu: python-dbusmock: Use ‘search-input-file’.
gnu: polkit: Remove dependency on (guix build syscalls).
gnu: public-inbox: Remove dependency on (guix build syscalls).

gnu/packages/gnome.scm | 25 +++++-----
gnu/packages/mail.scm | 33 ++++++-------
gnu/packages/polkit.scm | 35 ++++++-------
gnu/packages/python-xyz.scm | 99 ++++++++++++++++++-------------------
4 files changed, 89 insertions(+), 103 deletions(-)


base-commit: 5a3fb306535c2ec0a118f2f0bc8f6a162b85c7d6
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
51c7e4c608c40f38c83a4ac9db88e8e1c2985ac1.1697211312.git.ludo@gnu.org
* gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/gnome.scm | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 908b5782b5..a4993b7aa9 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7831,10 +7831,7 @@ (define-public mutter
(build-system meson-build-system)
(arguments
(list
- #:imported-modules `(,@%meson-build-system-modules
- (guix build syscalls))
#:modules '((guix build meson-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:glib-or-gtk? #t
@@ -7928,22 +7925,23 @@ (define-public mutter
"1"))
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
;; Use tini so that signals are properly handled and
;; 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" "--"
- "dbus-run-session" "--"
+ (apply execlp "dbus-run-session" "dbus-run-session"
"xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
"meson" "test" "-t" "0" "--print-errorlogs"
test-options))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`meson test' exited with status"
- status))))))))))))
+ (dbus-pid
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid dbus-pid)
+ (unless (zero? status)
+ (error "`meson test' exited with status"
+ status))
+ (loop)))))))))))))
(native-inputs
(list desktop-file-utils ;for update-desktop-database
`(,glib "bin") ;for glib-compile-schemas, etc.
@@ -7964,8 +7962,7 @@ (define-public mutter
pipewire
python
python-dbus
- python-dbusmock
- tini)) ;acting as init (zombie reaper)
+ python-dbusmock))
(propagated-inputs
(list gsettings-desktop-schemas-next ;required by libmutter.pc
gtk+ ;required by libmutter.pc
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 2/7] gnu: python-ipykernel: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
f8b1ddf9b3d17af43bd29cd33036cbaba22ad975.1697211312.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-ipykernel)[arguments]:
Remove #:imported-modules. Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap child processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a45ff44be1..07984adb8e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10644,10 +10644,7 @@ (define-public python-ipykernel
(build-system pyproject-build-system)
(arguments
(list
- #:imported-modules `(,@%pyproject-build-system-modules
- (guix build syscalls))
#:modules '((guix build pyproject-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:phases
@@ -10666,20 +10663,19 @@ (define-public python-ipykernel
(when tests?
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; XXX: Tini provides proper PID1-like signal handling that
- ;; reaps zombie processes, necessary for the
- ;; 'test_shutdown_subprocesses' test to pass.
-
- ;; TODO: Complete https://issues.guix.gnu.org/30948.
(setenv "HOME" "/tmp")
- (execlp "tini" "--" "pytest" "-vv"))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`pytest' exited with status"
- status)))))))))
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ ;; Reap zombie processes, necessary for the
+ ;; 'test_shutdown_subprocesses' test to pass.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status"
+ status))
+ (loop))))))))))
(add-after 'install 'set-python-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; Record the absolute file name of the 'python' executable in
@@ -10708,8 +10704,7 @@ (define-public python-ipykernel
;; and causes deprecation warnings. Using the bootstrap variant
;; avoids that.
python-pytest-bootstrap
- python-pytest-timeout
- tini))
+ python-pytest-timeout))
(home-page "https://ipython.org")
(synopsis "IPython Kernel for Jupyter")
(description "This package provides the IPython kernel for Jupyter.")
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 3/7] gnu: python-dbusmock: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
14bf42fc8911d464d5a9f7cadc11ba05b4f54b07.1697211312.git.ludo@gnu.org
Having a dependency on (guix build syscalls) this deep in the stack
would make it much harder to change syscalls.scm.

* gnu/packages/python-xyz.scm (python-dbusmock)[native-inputs]: Remove TINY.
[arguments]: Remove #:imported-modules, and remove (guix build syscalls)
from #:modules. Rewrite ‘check’ phase to reap processes from the build
process itself.
---
gnu/packages/python-xyz.scm | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 07984adb8e..e871951def 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27156,12 +27156,10 @@ (define-public python-dbusmock
"1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
(build-system python-build-system)
(arguments
- `(#:imported-modules (,@%python-build-system-modules
- (guix build syscalls))
- #:modules ((guix build python-build-system)
- (guix build syscalls)
+ `(#:modules ((guix build python-build-system)
(guix build utils)
(ice-9 match))
+
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
@@ -27177,20 +27175,20 @@ (define-public python-dbusmock
(when tests?
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; Use tini so that signals are properly handled and
- ;; doubly-forked processes get reaped; otherwise,
- ;; python-dbusmock would waste time polling for the dbus
- ;; processes it spawns to be reaped, in vain.
- (execlp "tini" "--" "pytest" "-vv"))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`pytest' exited with status"
- status))))))))))))
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ (let loop ()
+ ;; Reap child processes; otherwise, python-dbusmock would
+ ;; waste time polling for the dbus processes it spawns to
+ ;; be reaped, in vain.
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status" status))
+ (loop)))))))))))))
(native-inputs
- (list dbus python-pytest tini which))
+ (list dbus python-pytest which))
(inputs
(list dbus))
(propagated-inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 4/7] gnu: python-dbusmock: Rewrite phases as a gexp.
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
0ee0f58bdbe25eeed5bcf4ce52c56e6d6b180bb9.1697211312.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: Use gexps.
---
gnu/packages/python-xyz.scm | 62 +++++++++++++++++++------------------
1 file changed, 32 insertions(+), 30 deletions(-)

Toggle diff (76 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e871951def..d6747a55c0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27156,37 +27156,39 @@ (define-public python-dbusmock
"1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build python-build-system)
- (guix build utils)
- (ice-9 match))
+ (list #:modules `((guix build python-build-system)
+ (guix build utils)
+ (ice-9 match))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "tests/test_code.py"
- (("/bin/bash") (which "bash")))
- (substitute* "dbusmock/testcase.py"
- (("'dbus-daemon'")
- (string-append "'" (assoc-ref inputs "dbus")
- "/bin/dbus-daemon'")))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (match (primitive-fork)
- (0 ;child process
- (execlp "pytest" "pytest" "-vv"))
- (pytest-pid
- (let loop ()
- ;; Reap child processes; otherwise, python-dbusmock would
- ;; waste time polling for the dbus processes it spawns to
- ;; be reaped, in vain.
- (match (waitpid WAIT_ANY)
- ((pid . status)
- (if (= pid pytest-pid)
- (unless (zero? status)
- (error "`pytest' exited with status" status))
- (loop)))))))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "tests/test_code.py"
+ (("/bin/bash")
+ (which "bash")))
+ (substitute* "dbusmock/testcase.py"
+ (("'dbus-daemon'")
+ (string-append "'" (assoc-ref inputs "dbus")
+ "/bin/dbus-daemon'")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (match (primitive-fork)
+ (0 ;child process
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ (let loop ()
+ ;; Reap child processes; otherwise, python-dbusmock
+ ;; would waste time polling for the dbus processes
+ ;; it spawns to be reaped, in vain.
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status"
+ status))
+ (loop)))))))))))))
(native-inputs
(list dbus python-pytest which))
(inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 5/7] gnu: python-dbusmock: Use ‘se arch-input-file’.
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
d9dbd7d98c0eec0df09162c2a2928b2707f3b5fe.1697211312.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: In
‘patch-paths’ phase, use ‘search-input-file’ instead of ‘assoc-ref’.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d6747a55c0..c70ea6eea5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27169,8 +27169,8 @@ (define-public python-dbusmock
(which "bash")))
(substitute* "dbusmock/testcase.py"
(("'dbus-daemon'")
- (string-append "'" (assoc-ref inputs "dbus")
- "/bin/dbus-daemon'")))))
+ (object->string
+ (search-input-file inputs "/bin/dbus-daemon"))))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 6/7] gnu: polkit: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
6fc608f82eed9b32bfdbb9c39ce5b186f7acf2f5.1697211312.git.ludo@gnu.org
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.
---
gnu/packages/polkit.scm | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index 6fe7824a57..2f733dd703 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -95,10 +95,7 @@ (define-public polkit
(build-system meson-build-system)
(arguments
(list
- #:imported-modules `(,@%meson-build-system-modules
- (guix build syscalls))
#:modules '((guix build meson-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:configure-flags
@@ -130,24 +127,23 @@ (define-public polkit
(replace 'check
(lambda* (#:key tests? test-options #:allow-other-keys)
(when tests?
- ;; Run the test suite through tini to ensure signals are
- ;; properly handled and zombie processes reaped.
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; Use tini so that signals are properly handled and
- ;; 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"
+ (apply execlp "meson" "meson"
+ "test" "-t" "0" "--print-errorlogs"
test-options))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`meson test' exited with status"
- status))))))))))))
+ (meson-pid
+ ;; Reap child processes; otherwise, python-dbusmock would
+ ;; waste time polling for the dbus processes it spawns to
+ ;; be reaped, in vain.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid meson-pid)
+ (unless (zero? status)
+ (error "`meson test' exited with status"
+ status))
+ (loop)))))))))))))
(inputs
(list duktape expat elogind linux-pam nspr))
(propagated-inputs
@@ -162,8 +158,7 @@ (define-public polkit
perl
pkg-config
python
- python-dbusmock
- tini))
+ python-dbusmock))
(home-page "https://www.freedesktop.org/wiki/Software/polkit/")
(synopsis "Authorization API for privilege management")
(description "Polkit is an application-level toolkit for defining and
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:47
[PATCH 7/7] gnu: public-inbox: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
d434c2bd287764aa96301898ba8c3824b83015c9.1697211312.git.ludo@gnu.org
* gnu/packages/mail.scm (public-inbox)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules. Rewrite ‘check’ phase to
reap processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/mail.scm | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index be458a2d92..fc5cde38ce 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
@@ -4242,10 +4242,7 @@ (define-public public-inbox
(file-name (git-file-name name version))))
(build-system perl-build-system)
(arguments
- `(#:imported-modules (,@%perl-build-system-modules
- (guix build syscalls))
- #:modules ((guix build perl-build-system)
- (guix build syscalls)
+ `(#:modules ((guix build perl-build-system)
(guix build utils)
(ice-9 match))
#:phases
@@ -4282,18 +4279,20 @@ (define-public public-inbox
(setenv "TMP" "/tmp")
(setenv "TMPDIR" "/tmp")
- ;; Use tini so that signals are properly handled and
- ;; doubly-forked processes get reaped; otherwise,
- ;; lei-daemon is kept as a zombie and the testsuite
- ;; fails thinking that it didn't quit as it should.
- (set-child-subreaper!)
- (apply execlp "tini" "--"
+ (apply execlp "make"
"make" "check" test-flags))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`make check' exited with status" status))))))
+ (make-pid
+ ;; Reap child processes; otherwise, lei-daemon is kept as
+ ;; a zombie and the testsuite fails thinking that it
+ ;; didn't quit as it should.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid make-pid)
+ (unless (zero? status)
+ (error "`make check' exited with status"
+ status))
+ (loop)))))))
(format #t "test suite not run~%"))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -4313,7 +4312,7 @@ (define-public public-inbox
(find-files (string-append out "/bin")))))))))
(native-inputs
(list ;; For testing.
- lsof openssl tini))
+ lsof openssl))
(inputs
(append
(if (not (target-64bit?))
--
2.41.0
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:53
control message for bug #66055
(address . control@debbugs.gnu.org)
87v8baikne.fsf@gnu.org
block 66055 by 66525
quit
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:53
control message for bug #66054
(address . control@debbugs.gnu.org)
87ttquikn4.fsf@gnu.org
block 66054 by 66525
quit
L
L
Ludovic Courtès wrote on 13 Oct 2023 17:53
control message for bug #65546
(address . control@debbugs.gnu.org)
87sf6eikmo.fsf@gnu.org
block 65546 by 66525
quit
L
L
Liliana Marie Prikler wrote on 13 Oct 2023 18:49
Re: [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls).
669f58d12a344dce3a6b4dc0b74026b73eee592c.camel@gmail.com
Am Freitag, dem 13.10.2023 um 17:47 +0200 schrieb Ludovic Courtès:
Toggle quote (6 lines)
> * gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-
> modules.
> Remove (guix build syscalls) from #:modules.
> Rewrite ‘check’ phase to reap processes from the build process.
> [native-inputs]: Remove TINI.
> ---
LGTM, but where would this go?
B
B
Bruno Victal wrote on 13 Oct 2023 19:05
(name . Ludovic Courtès)(address . ludo@gnu.org)
3a9535ad-4be6-486d-9a1a-ef1004edf588@makinata.eu
Hi Ludovic,

On 2023-10-13 16:47, Ludovic Courtès wrote:
Toggle quote (2 lines)
> [native-inputs]: Remove TINI.

[…]

Toggle quote (12 lines)
> (match (primitive-fork)
> (0 ;child process
> - (set-child-subreaper!)
> ;; Use tini so that signals are properly handled and
> ;; 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" "--"
> - "dbus-run-session" "--"
> + (apply execlp "dbus-run-session" "dbus-run-session"
> "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")

Looks like this comment could be removed as well?

--
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.
M
M
Maxim Cournoyer wrote on 14 Oct 2023 14:52
(name . Ludovic Courtès)(address . ludo@gnu.org)
874jit5psy.fsf@gmail.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (33 lines)
> * gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-modules.
> Remove (guix build syscalls) from #:modules.
> Rewrite ‘check’ phase to reap processes from the build process.
> [native-inputs]: Remove TINI.
> ---
> gnu/packages/gnome.scm | 25 +++++++++++--------------
> 1 file changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 908b5782b5..a4993b7aa9 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -7831,10 +7831,7 @@ (define-public mutter
> (build-system meson-build-system)
> (arguments
> (list
> - #:imported-modules `(,@%meson-build-system-modules
> - (guix build syscalls))
> #:modules '((guix build meson-build-system)
> - (guix build syscalls)
> (guix build utils)
> (ice-9 match))
> #:glib-or-gtk? #t
> @@ -7928,22 +7925,23 @@ (define-public mutter
> "1"))
> (match (primitive-fork)
> (0 ;child process
> - (set-child-subreaper!)
> ;; Use tini so that signals are properly handled and
> ;; doubly-forked processes get reaped; otherwise,
> ;; python-dbusmock would waste time polling for the dbus
> ;; processes it spawns to be reaped, in vain.

As Bruno mentioned, the comment above has gone stale.

Toggle quote (22 lines)
> - (apply execlp "tini" "--"
> - "dbus-run-session" "--"
> + (apply execlp "dbus-run-session" "dbus-run-session"
> "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
> "meson" "test" "-t" "0" "--print-errorlogs"
> test-options))
> - (pid
> - (match (waitpid pid)
> - ((_ . status)
> - (unless (zero? status)
> - (error "`meson test' exited with status"
> - status))))))))))))
> + (dbus-pid
> + (let loop ()
> + (match (waitpid WAIT_ANY)
> + ((pid . status)
> + (if (= pid dbus-pid)
> + (unless (zero? status)
> + (error "`meson test' exited with status"
> + status))
> + (loop)))))))))))))

Interesting simplification! I obviously wasn't aware this could work
instead of the more intricate set-child-subreaper! + fake init (tini).
I guess it solves a very narrow subset signal handling behavior compared
to a real init, but that it is sufficient here.

LGTM with comments from Bruno taken into account.

I think it could go to core-updates since we're already prepping the
branch. It may give some respite to the berlin aarch64 workers, which
have been working non-stop for days or weeks.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 14 Oct 2023 14:53
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87zg0l4b7j.fsf@gmail.com
Hi Liliana,
z
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (9 lines)
> Am Freitag, dem 13.10.2023 um 17:47 +0200 schrieb Ludovic Courtès:
>> * gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-
>> modules.
>> Remove (guix build syscalls) from #:modules.
>> Rewrite ‘check’ phase to reap processes from the build process.
>> [native-inputs]: Remove TINI.
>> ---
> LGTM, but where would this go?

I think it could go to core-updates.
M
M
Maxim Cournoyer wrote on 14 Oct 2023 14:56
Re: [bug#66525] [PATCH 0/7] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
(name . Ludovic Courtès)(address . ludo@gnu.org)
87v8b94b24.fsf@gmail.com
Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

[...]

Toggle quote (4 lines)
> Besides I have not forgotten about the underlying bug, reported
> at <https://issues.guix.gnu.org/30948>, and I plan to propose another
> fix there.

I'm looking forward to how you'll approach the problem.

[...]

Toggle quote (9 lines)
> Ludovic Courtès (7):
> gnu: mutter: Remove dependency on (guix build syscalls).
> gnu: python-ipykernel: Remove dependency on (guix build syscalls).
> gnu: python-dbusmock: Remove dependency on (guix build syscalls).
> gnu: python-dbusmock: Rewrite phases as a gexp.
> gnu: python-dbusmock: Use ‘search-input-file’.
> gnu: polkit: Remove dependency on (guix build syscalls).
> gnu: public-inbox: Remove dependency on (guix build syscalls).

This series LGTM, with the comment about Mirai to drop a stale comment
in path #1 addressed.

Thanks for working on it!

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 14 Oct 2023 19:48
Re: [bug#66525] [PATCH 1/7] gnu: mutter: Remove dependency on (guix build syscalls).
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
877cnpccyu.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (13 lines)
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
>> Am Freitag, dem 13.10.2023 um 17:47 +0200 schrieb Ludovic Courtès:
>>> * gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-
>>> modules.
>>> Remove (guix build syscalls) from #:modules.
>>> Rewrite ‘check’ phase to reap processes from the build process.
>>> [native-inputs]: Remove TINI.
>>> ---
>> LGTM, but where would this go?
>
> I think it could go to core-updates.

I proposed a dedicated branch, in line with the branching policy that
was discussed back in February during and after the Guix Days:


Ludo’.
L
L
Ludovic Courtès wrote on 14 Oct 2023 19:48
(name . Bruno Victal)(address . mirai@makinata.eu)
8734ydccxv.fsf@gnu.org
Bruno Victal <mirai@makinata.eu> skribis:

Toggle quote (14 lines)
>> (match (primitive-fork)
>> (0 ;child process
>> - (set-child-subreaper!)
>> ;; Use tini so that signals are properly handled and
>> ;; 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" "--"
>> - "dbus-run-session" "--"
>> + (apply execlp "dbus-run-session" "dbus-run-session"
>> "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
>
> Looks like this comment could be removed as well?

Oops, noted (waiting for other comments before sending a new version).

Ludo’.
L
L
Ludovic Courtès wrote on 14 Oct 2023 19:50
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87y1g5ayal.fsf@gnu.org
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (4 lines)
> I think it could go to core-updates since we're already prepping the
> branch. It may give some respite to the berlin aarch64 workers, which
> have been working non-stop for days or weeks.

Yeah, it’s a tempting option in terms of resource usage, but less in
terms of legibility of the whole process. Dunno.

Ludo’.
M
M
Maxim Cournoyer wrote on 15 Oct 2023 21:54
(name . Ludovic Courtès)(address . ludo@gnu.org)
878r831x1s.fsf@gmail.com
Hi,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (9 lines)
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> I think it could go to core-updates since we're already prepping the
>> branch. It may give some respite to the berlin aarch64 workers, which
>> have been working non-stop for days or weeks.
>
> Yeah, it’s a tempting option in terms of resource usage, but less in
> terms of legibility of the whole process. Dunno.

Yeah, for resource usage, bundling this to core-updates makes sense,
especially since it should only affect running the test suite of the
packages touched, not their output.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 16 Oct 2023 17:16
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87il767g2v.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (15 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> I think it could go to core-updates since we're already prepping the
>>> branch. It may give some respite to the berlin aarch64 workers, which
>>> have been working non-stop for days or weeks.
>>
>> Yeah, it’s a tempting option in terms of resource usage, but less in
>> terms of legibility of the whole process. Dunno.
>
> Yeah, for resource usage, bundling this to core-updates makes sense,
> especially since it should only affect running the test suite of the
> packages touched, not their output.

OTOH, my initial motivation was to apply patches to syscalls.scm that
have been queued for quite a while already:


I fear that bundling it with ‘core-updates’ would delay it by several
more months.

Resource usage is a concern due to the low AArch64 build power, but it’s
not too bad lately, even with ‘rust-team’ and ‘gnome-team’ updates:


So overall, I think I have a preference for making a dedicated branch
and queueing a branch merge request. (I think it’s also good to use
that process more widely.)

WDYT?

Ludo’.
M
M
Maxim Cournoyer wrote on 16 Oct 2023 18:19
(name . Ludovic Courtès)(address . ludo@gnu.org)
87o7gywndy.fsf@gmail.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (40 lines)
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>>
>>>> I think it could go to core-updates since we're already prepping the
>>>> branch. It may give some respite to the berlin aarch64 workers, which
>>>> have been working non-stop for days or weeks.
>>>
>>> Yeah, it’s a tempting option in terms of resource usage, but less in
>>> terms of legibility of the whole process. Dunno.
>>
>> Yeah, for resource usage, bundling this to core-updates makes sense,
>> especially since it should only affect running the test suite of the
>> packages touched, not their output.
>
> OTOH, my initial motivation was to apply patches to syscalls.scm that
> have been queued for quite a while already:
>
> https://issues.guix.gnu.org/66055
> https://issues.guix.gnu.org/66054
> https://issues.guix.gnu.org/65546
>
> I fear that bundling it with ‘core-updates’ would delay it by several
> more months.
>
> Resource usage is a concern due to the low AArch64 build power, but it’s
> not too bad lately, even with ‘rust-team’ and ‘gnome-team’ updates:
>
> https://ci.guix.gnu.org/metrics
>
> So overall, I think I have a preference for making a dedicated branch
> and queueing a branch merge request. (I think it’s also good to use
> that process more widely.)
>
> WDYT?

Go for it! I'm confident core-updates won't take several months, but
who knows :-)

--
Thanks,
Maxim
E
E
Efraim Flashner wrote on 17 Oct 2023 10:56
Re: [PATCH 0/7] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
(name . Ludovic Courtès)(address . ludo@gnu.org)
ZS5MWHtWs04YiTwT@3900XT
On Fri, Oct 13, 2023 at 05:45:32PM +0200, Ludovic Courtès wrote:
Toggle quote (13 lines)
> Hello!
>
> This patch series removes (guix build syscalls) from the dependencies
> of several packages where having that dependency would effectively
> prevent us from changing syscalls.scm due to the high number of
> dependents (and it turns out that removing that dependency was easy).
>
> This change involves a rebuild of ~3,912 packages. I plan to create
> a branch and have it built by ci.guix (I suppose qa.guix will skip it
> by default?). I can do that any time (the build farm is currently idle!)
> but since ‘rust-team’ is fully built, I thought we might want to merge
> it first; Efraim? I’ll also send a proper “request for merging”.

That would be nice. I'm currently waiting for aarch64 to catch up and
then I need to rebase on master since the qt-team branch got merged and
then it should be ready.

Toggle quote (29 lines)
> Besides I have not forgotten about the underlying bug, reported
> at <https://issues.guix.gnu.org/30948>, and I plan to propose another
> fix there.
>
> Thoughts?
>
> Ludo’.
>
> Ludovic Courtès (7):
> gnu: mutter: Remove dependency on (guix build syscalls).
> gnu: python-ipykernel: Remove dependency on (guix build syscalls).
> gnu: python-dbusmock: Remove dependency on (guix build syscalls).
> gnu: python-dbusmock: Rewrite phases as a gexp.
> gnu: python-dbusmock: Use ‘search-input-file’.
> gnu: polkit: Remove dependency on (guix build syscalls).
> gnu: public-inbox: Remove dependency on (guix build syscalls).
>
> gnu/packages/gnome.scm | 25 +++++-----
> gnu/packages/mail.scm | 33 ++++++-------
> gnu/packages/polkit.scm | 35 ++++++-------
> gnu/packages/python-xyz.scm | 99 ++++++++++++++++++-------------------
> 4 files changed, 89 insertions(+), 103 deletions(-)
>
>
> base-commit: 5a3fb306535c2ec0a118f2f0bc8f6a162b85c7d6
> --
> 2.41.0
>

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmUuTFUACgkQQarn3Mo9
g1EpOg//fKaqY0/BZ0zPAHpYlkOKpui/BEiQ7jleHL+RBe3sv1tu6uWm6pZkiTyj
ERg159A9w9HYp0IzuqTEGzzGFSSrJWKIig3FiR5NH9G8gdjHFXhytUcezCcIUfg7
pmgD/fZVVbftIgAGtOs7PqLJxA0C2vIUeX8c17//rwhw31aVS+HO0V/UlT90rSmD
l/x8aF7Fw5OHBLgPapN1mmySgskXjeKH4g80vrmDDErWMHdQi2YpocG9T1dzuPB5
TcMPtnyiQALGGBHdXfA1XxsZApVV2yzvc7F/LYqWnU0LuyShB37dBrqi4axayg4C
X177R32ISFHYJScOjwwyJKIOOTn5HQECyovAqtVpahiFd3/oo4Mq80RoleQ78M68
Zn3dT6r87zbYwK6XiCoo7BpXa2JnGmUw8Ps3XjyquCojfnxt+RE6L90e0t+ehsOL
lckd2J91DQeC3kbfLTvC+wIY99RP1kbvvNIIpOG9bwf0+MmG+br+BPo9qKIUtWiQ
SxDpVDqkhv46kLkMZAgUj06MqnKKffQoW02VGM3XRuNmQKOih9r60ebeDDSJjZm2
sUWgaohDmJAbAJwuRL/yBnvYdX6/Jz2kr+GUq53XBBoyNPhkG/B6PtQHVlx7H3hO
FCqz2qt0ye5+ilJCjdb41k+FjPNJ0rhvDitrswLKHHcbuFZxsiI=
=N5HW
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
cover.1697982039.git.ludo@gnu.org
Hello!

Here’s an updated version of this patch set; changes compared to v1:

• Update outdated comment in one of the packages;

• Remove dependency on (guix build syscalls) of the following build
systems: ant, dub, android-ndk.

I’ve pushed this as ‘wip-syscall-update’ and got ci.guix to build it:


As discussed earlier, I’ll send a merge request.

Ludo’.

Ludovic Courtès (10):
gnu: mutter: Remove dependency on (guix build syscalls).
gnu: python-ipykernel: Remove dependency on (guix build syscalls).
gnu: python-dbusmock: Remove dependency on (guix build syscalls).
gnu: python-dbusmock: Rewrite phases as a gexp.
gnu: python-dbusmock: Use ‘search-input-file’.
gnu: polkit: Remove dependency on (guix build syscalls).
gnu: public-inbox: Remove dependency on (guix build syscalls).
build-system/ant: Remove dependency on (guix build syscalls).
build-system/android-ndk: Remove dependency on (guix build syscalls).
build-system/dub: Remove dependency on (guix build syscalls).

gnu/packages/gnome.scm | 32 +++++-----
gnu/packages/mail.scm | 33 +++++------
gnu/packages/polkit.scm | 35 +++++------
gnu/packages/python-xyz.scm | 99 +++++++++++++++----------------
guix/build-system/android-ndk.scm | 1 -
guix/build-system/ant.scm | 1 -
guix/build-system/dub.scm | 1 -
7 files changed, 92 insertions(+), 110 deletions(-)


base-commit: 8ca7ccbf0dad63d75637ffdc6a5105eb9a4a4673
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 01/10] gnu: mutter: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
f893b135abe82b276dee940ce9e2c46c93f468a2.1697982039.git.ludo@gnu.org
* gnu/packages/gnome.scm (mutter)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/gnome.scm | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 2ffe8dfef2..ac3035e07d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7831,10 +7831,7 @@ (define-public mutter
(build-system meson-build-system)
(arguments
(list
- #:imported-modules `(,@%meson-build-system-modules
- (guix build syscalls))
#:modules '((guix build meson-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:glib-or-gtk? #t
@@ -7928,22 +7925,22 @@ (define-public mutter
"1"))
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; Use tini so that signals are properly handled and
- ;; 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" "--"
- "dbus-run-session" "--"
+ (apply execlp "dbus-run-session" "dbus-run-session"
"xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
"meson" "test" "-t" "0" "--print-errorlogs"
test-options))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`meson test' exited with status"
- status))))))))))))
+ (dbus-pid
+ (let loop ()
+ ;; Reap child processes; otherwise, python-dbusmock would
+ ;; waste time polling for the dbus processes it spawns to
+ ;; be reaped, in vain.
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid dbus-pid)
+ (unless (zero? status)
+ (error "`meson test' exited with status"
+ status))
+ (loop)))))))))))))
(native-inputs
(list desktop-file-utils ;for update-desktop-database
`(,glib "bin") ;for glib-compile-schemas, etc.
@@ -7964,8 +7961,7 @@ (define-public mutter
pipewire
python
python-dbus
- python-dbusmock
- tini)) ;acting as init (zombie reaper)
+ python-dbusmock))
(propagated-inputs
(list gsettings-desktop-schemas-next ;required by libmutter.pc
gtk+ ;required by libmutter.pc
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 02/10] gnu: python-ipykernel: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
57121aa0458c061c023a104ee5775897167ace8b.1697982039.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-ipykernel)[arguments]:
Remove #:imported-modules. Remove (guix build syscalls) from #:modules.
Rewrite ‘check’ phase to reap child processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/python-xyz.scm | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 29ac11df95..d094c6e451 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10660,10 +10660,7 @@ (define-public python-ipykernel
(build-system pyproject-build-system)
(arguments
(list
- #:imported-modules `(,@%pyproject-build-system-modules
- (guix build syscalls))
#:modules '((guix build pyproject-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:phases
@@ -10682,20 +10679,19 @@ (define-public python-ipykernel
(when tests?
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; XXX: Tini provides proper PID1-like signal handling that
- ;; reaps zombie processes, necessary for the
- ;; 'test_shutdown_subprocesses' test to pass.
-
- ;; TODO: Complete https://issues.guix.gnu.org/30948.
(setenv "HOME" "/tmp")
- (execlp "tini" "--" "pytest" "-vv"))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`pytest' exited with status"
- status)))))))))
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ ;; Reap zombie processes, necessary for the
+ ;; 'test_shutdown_subprocesses' test to pass.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status"
+ status))
+ (loop))))))))))
(add-after 'install 'set-python-file-name
(lambda* (#:key inputs #:allow-other-keys)
;; Record the absolute file name of the 'python' executable in
@@ -10724,8 +10720,7 @@ (define-public python-ipykernel
;; and causes deprecation warnings. Using the bootstrap variant
;; avoids that.
python-pytest-bootstrap
- python-pytest-timeout
- tini))
+ python-pytest-timeout))
(home-page "https://ipython.org")
(synopsis "IPython Kernel for Jupyter")
(description "This package provides the IPython kernel for Jupyter.")
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 04/10] gnu: python-dbusmock: Rewrite phases as a gexp.
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
48b4d13af78919c35ae4389fb46fd1c124a7bc30.1697982039.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: Use gexps.
---
gnu/packages/python-xyz.scm | 62 +++++++++++++++++++------------------
1 file changed, 32 insertions(+), 30 deletions(-)

Toggle diff (76 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 782d1fae6f..4929c6dcc7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27165,37 +27165,39 @@ (define-public python-dbusmock
"1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
(build-system python-build-system)
(arguments
- `(#:modules ((guix build python-build-system)
- (guix build utils)
- (ice-9 match))
+ (list #:modules `((guix build python-build-system)
+ (guix build utils)
+ (ice-9 match))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "tests/test_code.py"
- (("/bin/bash") (which "bash")))
- (substitute* "dbusmock/testcase.py"
- (("'dbus-daemon'")
- (string-append "'" (assoc-ref inputs "dbus")
- "/bin/dbus-daemon'")))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (match (primitive-fork)
- (0 ;child process
- (execlp "pytest" "pytest" "-vv"))
- (pytest-pid
- (let loop ()
- ;; Reap child processes; otherwise, python-dbusmock would
- ;; waste time polling for the dbus processes it spawns to
- ;; be reaped, in vain.
- (match (waitpid WAIT_ANY)
- ((pid . status)
- (if (= pid pytest-pid)
- (unless (zero? status)
- (error "`pytest' exited with status" status))
- (loop)))))))))))))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "tests/test_code.py"
+ (("/bin/bash")
+ (which "bash")))
+ (substitute* "dbusmock/testcase.py"
+ (("'dbus-daemon'")
+ (string-append "'" (assoc-ref inputs "dbus")
+ "/bin/dbus-daemon'")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (match (primitive-fork)
+ (0 ;child process
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ (let loop ()
+ ;; Reap child processes; otherwise, python-dbusmock
+ ;; would waste time polling for the dbus processes
+ ;; it spawns to be reaped, in vain.
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status"
+ status))
+ (loop)))))))))))))
(native-inputs
(list dbus python-pytest which))
(inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 03/10] gnu: python-dbusmock: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
230e6b36d03b8cd45295fddf8706c7272d09011f.1697982039.git.ludo@gnu.org
Having a dependency on (guix build syscalls) this deep in the stack
would make it much harder to change syscalls.scm.

* gnu/packages/python-xyz.scm (python-dbusmock)[native-inputs]: Remove TINY.
[arguments]: Remove #:imported-modules, and remove (guix build syscalls)
from #:modules. Rewrite ‘check’ phase to reap processes from the build
process itself.
---
gnu/packages/python-xyz.scm | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d094c6e451..782d1fae6f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27165,12 +27165,10 @@ (define-public python-dbusmock
"1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
(build-system python-build-system)
(arguments
- `(#:imported-modules (,@%python-build-system-modules
- (guix build syscalls))
- #:modules ((guix build python-build-system)
- (guix build syscalls)
+ `(#:modules ((guix build python-build-system)
(guix build utils)
(ice-9 match))
+
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
@@ -27186,20 +27184,20 @@ (define-public python-dbusmock
(when tests?
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; Use tini so that signals are properly handled and
- ;; doubly-forked processes get reaped; otherwise,
- ;; python-dbusmock would waste time polling for the dbus
- ;; processes it spawns to be reaped, in vain.
- (execlp "tini" "--" "pytest" "-vv"))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`pytest' exited with status"
- status))))))))))))
+ (execlp "pytest" "pytest" "-vv"))
+ (pytest-pid
+ (let loop ()
+ ;; Reap child processes; otherwise, python-dbusmock would
+ ;; waste time polling for the dbus processes it spawns to
+ ;; be reaped, in vain.
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid pytest-pid)
+ (unless (zero? status)
+ (error "`pytest' exited with status" status))
+ (loop)))))))))))))
(native-inputs
- (list dbus python-pytest tini which))
+ (list dbus python-pytest which))
(inputs
(list dbus))
(propagated-inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 05/10] gnu: python-dbusmock: Use ‘search-input-file’.
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
1ad6565e4a0516ee89d1d14b84ac062f670c347d.1697982040.git.ludo@gnu.org
* gnu/packages/python-xyz.scm (python-dbusmock)[arguments]: In
‘patch-paths’ phase, use ‘search-input-file’ instead of ‘assoc-ref’.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4929c6dcc7..65c23cb318 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27178,8 +27178,8 @@ (define-public python-dbusmock
(which "bash")))
(substitute* "dbusmock/testcase.py"
(("'dbus-daemon'")
- (string-append "'" (assoc-ref inputs "dbus")
- "/bin/dbus-daemon'")))))
+ (object->string
+ (search-input-file inputs "/bin/dbus-daemon"))))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 06/10] gnu: polkit: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
9998cd64698ce4e211452306cbd159154d4839ef.1697982040.git.ludo@gnu.org
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.
---
gnu/packages/polkit.scm | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index 6fe7824a57..2f733dd703 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -95,10 +95,7 @@ (define-public polkit
(build-system meson-build-system)
(arguments
(list
- #:imported-modules `(,@%meson-build-system-modules
- (guix build syscalls))
#:modules '((guix build meson-build-system)
- (guix build syscalls)
(guix build utils)
(ice-9 match))
#:configure-flags
@@ -130,24 +127,23 @@ (define-public polkit
(replace 'check
(lambda* (#:key tests? test-options #:allow-other-keys)
(when tests?
- ;; Run the test suite through tini to ensure signals are
- ;; properly handled and zombie processes reaped.
(match (primitive-fork)
(0 ;child process
- (set-child-subreaper!)
- ;; Use tini so that signals are properly handled and
- ;; 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"
+ (apply execlp "meson" "meson"
+ "test" "-t" "0" "--print-errorlogs"
test-options))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`meson test' exited with status"
- status))))))))))))
+ (meson-pid
+ ;; Reap child processes; otherwise, python-dbusmock would
+ ;; waste time polling for the dbus processes it spawns to
+ ;; be reaped, in vain.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid meson-pid)
+ (unless (zero? status)
+ (error "`meson test' exited with status"
+ status))
+ (loop)))))))))))))
(inputs
(list duktape expat elogind linux-pam nspr))
(propagated-inputs
@@ -162,8 +158,7 @@ (define-public polkit
perl
pkg-config
python
- python-dbusmock
- tini))
+ python-dbusmock))
(home-page "https://www.freedesktop.org/wiki/Software/polkit/")
(synopsis "Authorization API for privilege management")
(description "Polkit is an application-level toolkit for defining and
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 07/10] gnu: public-inbox: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
5e7e25542f40bc869303339e54a98705d7dc0331.1697982040.git.ludo@gnu.org
* gnu/packages/mail.scm (public-inbox)[arguments]: Remove #:imported-modules.
Remove (guix build syscalls) from #:modules. Rewrite ‘check’ phase to
reap processes from the build process.
[native-inputs]: Remove TINI.
---
gnu/packages/mail.scm | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index be458a2d92..fc5cde38ce 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
@@ -4242,10 +4242,7 @@ (define-public public-inbox
(file-name (git-file-name name version))))
(build-system perl-build-system)
(arguments
- `(#:imported-modules (,@%perl-build-system-modules
- (guix build syscalls))
- #:modules ((guix build perl-build-system)
- (guix build syscalls)
+ `(#:modules ((guix build perl-build-system)
(guix build utils)
(ice-9 match))
#:phases
@@ -4282,18 +4279,20 @@ (define-public public-inbox
(setenv "TMP" "/tmp")
(setenv "TMPDIR" "/tmp")
- ;; Use tini so that signals are properly handled and
- ;; doubly-forked processes get reaped; otherwise,
- ;; lei-daemon is kept as a zombie and the testsuite
- ;; fails thinking that it didn't quit as it should.
- (set-child-subreaper!)
- (apply execlp "tini" "--"
+ (apply execlp "make"
"make" "check" test-flags))
- (pid
- (match (waitpid pid)
- ((_ . status)
- (unless (zero? status)
- (error "`make check' exited with status" status))))))
+ (make-pid
+ ;; Reap child processes; otherwise, lei-daemon is kept as
+ ;; a zombie and the testsuite fails thinking that it
+ ;; didn't quit as it should.
+ (let loop ()
+ (match (waitpid WAIT_ANY)
+ ((pid . status)
+ (if (= pid make-pid)
+ (unless (zero? status)
+ (error "`make check' exited with status"
+ status))
+ (loop)))))))
(format #t "test suite not run~%"))))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -4313,7 +4312,7 @@ (define-public public-inbox
(find-files (string-append out "/bin")))))))))
(native-inputs
(list ;; For testing.
- lsof openssl tini))
+ lsof openssl))
(inputs
(append
(if (not (target-64bit?))
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 08/10] build-system/ant: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
d734a55f14604c4347aa61d65a232513b2018e4e.1697982040.git.ludo@gnu.org
The module has been unused since
a6343af22161b21ddbc4143a2b6a60d1ee860eb0.

* guix/build-system/ant.scm (%ant-build-system-modules): Remove (guix
build syscalls).
---
guix/build-system/ant.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index cfb033f6a5..e191fd3c99 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -43,7 +43,6 @@ (define %ant-build-system-modules
(guix build maven plugin)
(guix build maven pom)
(guix build java-utils)
- (guix build syscalls)
,@%gnu-build-system-modules))
(define (default-jdk)
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 09/10] build-system/android-ndk: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
6f1e66ede9331a4f1c66bc3fa3b955f21d0870da.1697982040.git.ludo@gnu.org
The (guix build syscalls) module was unused.

* guix/build-system/android-ndk.scm (%android-ndk-build-system-modules):
Remove (guix build syscalls).
---
guix/build-system/android-ndk.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/guix/build-system/android-ndk.scm b/guix/build-system/android-ndk.scm
index 047f884b19..aa7cc06279 100644
--- a/guix/build-system/android-ndk.scm
+++ b/guix/build-system/android-ndk.scm
@@ -31,7 +31,6 @@ (define-module (guix build-system android-ndk)
(define %android-ndk-build-system-modules
;; Build-side modules imported by default.
`((guix build android-ndk-build-system)
- (guix build syscalls)
,@%gnu-build-system-modules))
(define* (android-ndk-build name inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:43
[PATCH v2 10/10] build-system/dub: Remove dependency on (guix build syscalls).
(address . 66525@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
1f926dea6d76e6e41a3275637eb9f2e13bbb2e8d.1697982040.git.ludo@gnu.org
The (guix build syscalls) module was unused.

* guix/build-system/dub.scm (%dub-build-system-modules): Remove (guix
build syscalls).
---
guix/build-system/dub.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index b4011cdb83..951c084398 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -59,7 +59,6 @@ (define (default-ld-gold-wrapper)
(define %dub-build-system-modules
;; Build-side modules imported by default.
`((guix build dub-build-system)
- (guix build syscalls)
,@%gnu-build-system-modules))
(define* (dub-build name inputs
--
2.41.0
L
L
Ludovic Courtès wrote on 22 Oct 2023 15:50
control message for bug #66682
(address . control@debbugs.gnu.org)
87jzrepxzd.fsf@gnu.org
block 66682 by 66525
quit
M
M
Maxim Cournoyer wrote on 23 Oct 2023 03:54
Re: [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 66525@debbugs.gnu.org)
877cne9k85.fsf@gmail.com
Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (15 lines)
> Hello!
>
> Here’s an updated version of this patch set; changes compared to v1:
>
> • Update outdated comment in one of the packages;
>
> • Remove dependency on (guix build syscalls) of the following build
> systems: ant, dub, android-ndk.
>
> I’ve pushed this as ‘wip-syscall-update’ and got ci.guix to build it:
>
> https://ci.guix.gnu.org/jobset/syscall-update
>
> As discussed earlier, I’ll send a merge request.

OK. It seems the branch was already mostly built (72% vs 73% for
master), so it should be good.

I'd still like to have something like bug#65595 implemented in Cuirass
so that it'd be easy to list all regressions that have to do with a
topic branch. Currently failed builds are all grouped in the outputs,
whether it's for already or newly failing packages, which is less useful
in the context of feature branches.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 23 Oct 2023 12:09
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 66525@debbugs.gnu.org)
87msw9hcpi.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (9 lines)
>> I’ve pushed this as ‘wip-syscall-update’ and got ci.guix to build it:
>>
>> https://ci.guix.gnu.org/jobset/syscall-update
>>
>> As discussed earlier, I’ll send a merge request.
>
> OK. It seems the branch was already mostly built (72% vs 73% for
> master), so it should be good.

Yes. (For the record, that’s almost 14K builds in 18 hours; the
x86_64/i686 builds were most likely completed in half of that time.)

Now merged as 48c1a74b2461d42dc0df202d8353640b3b64ac62!

Toggle quote (6 lines)
> I'd still like to have something like bug#65595 implemented in Cuirass
> so that it'd be easy to list all regressions that have to do with a
> topic branch. Currently failed builds are all grouped in the outputs,
> whether it's for already or newly failing packages, which is less useful
> in the context of feature branches.

It’s something where the Data Service really shines because it knows the
derivations of each package of each revision, and it can compare
substitute availability.

Perhaps what we need is closer integration and/or user interface
improvement. For example, it’s not trivial from
a comparison against the ‘master’ branch.

Ludo’.
L
L
Ludovic Courtès wrote on 23 Oct 2023 12:10
control message for bug #66525
(address . control@debbugs.gnu.org)
87lebthcp3.fsf@gnu.org
close 66525
quit
M
M
Maxim Cournoyer wrote on 23 Oct 2023 17:12
Re: [bug#66525] [PATCH v2 00/10] Remove dependency of polkit, python-dbusmock, etc. on (guix build syscalls)
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 66525@debbugs.gnu.org)
87msw974q8.fsf@gmail.com
Hey Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (18 lines)
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>>> I’ve pushed this as ‘wip-syscall-update’ and got ci.guix to build it:
>>>
>>> https://ci.guix.gnu.org/jobset/syscall-update
>>>
>>> As discussed earlier, I’ll send a merge request.
>>
>> OK. It seems the branch was already mostly built (72% vs 73% for
>> master), so it should be good.
>
> Yes. (For the record, that’s almost 14K builds in 18 hours; the
> x86_64/i686 builds were most likely completed in half of that time.)
>
> Now merged as 48c1a74b2461d42dc0df202d8353640b3b64ac62!

I'm surprised even the ARM machines managed to build so many packages
that fast! Great :-).

Toggle quote (10 lines)
>> I'd still like to have something like bug#65595 implemented in Cuirass
>> so that it'd be easy to list all regressions that have to do with a
>> topic branch. Currently failed builds are all grouped in the outputs,
>> whether it's for already or newly failing packages, which is less useful
>> in the context of feature branches.
>
> It’s something where the Data Service really shines because it knows the
> derivations of each package of each revision, and it can compare
> substitute availability.

There doesn't seem to be a technical limitation in allowing to filter on
'newly broken' packages; we can already see in the shared bag of 'failed
builds' that some are new failures (they have a down arrow icon), so
Cuirass already has that data; it's just not possibly to query it precisely,
unless I'm missing something.

--
Thanks,
Maxim
?