From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id yFHZFlMnNWUuSQEA9RJhRA:P1 (envelope-from ) for ; Sun, 22 Oct 2023 15:44:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yFHZFlMnNWUuSQEA9RJhRA (envelope-from ) for ; Sun, 22 Oct 2023 15:44:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2124B3FEFA for ; Sun, 22 Oct 2023 15:44:51 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=l8jBH+L+; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697982291; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qdQabaGhUMAPoeoz0tmsyiK383qlGZbfSUJaXyj02go=; b=LMEU1BWeKCUe4IGB8eEr+bit3sjQ4qgY6TXSc719/2npfdEF4ABGEk3W386Bkg8PCmB/ps YN0FGKcvArvvfwRxiPvCom6q2LEeGoRIjctow0jHbiqsDdtRzEU70eWIW5e9mNX+4JSxBt 1TZEwmXfMFzfmZvWU75niXdEyyMEoW2EuKjZO9j2kKbTHbaqh3P1TNKHTi6MTkirOsCUtO yIsnJwPfJ+V5zLuh7joWQcWS6fkPiTqP31xrUcCBle3/4eBuawCaCLASl11psx6lcyz2fl dCmBWKOJ8TGY2W/x80Bt7BR2kXOdGHxIf8sL3HjG/xvzCe0R0P1lAX8mXIW0Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=l8jBH+L+; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697982291; a=rsa-sha256; cv=none; b=ZgKDmTmmZ0xCfqcZyWtBOXcGrXwy9yGnujTMeKqm2AmQNAqBrvmxznpJXJp5ML4vpQdx+p EEykgdRzrDjRrIm8UojZ5JYv8JgWSfqCrEFwRKmfBpCnq+mkpZn7zZbvuukrfXhiUiuqJZ fK5HEfbvivg4PP2sNYhSIhyX21v4LB6G9qU54qRbo43TbcW4z6Ar6qAH0/BP5JWX7tW7s8 V0ZSj9zcAzUSFiikOnQURVMa0ACDnf7x5X+38Q8mA2L32FzpwBewEg/RE1oxKpitl/MSZm qIklpgFYdvnkUTHFBmWn1HVbwcIJUfTs4pltCrtr7YqohUE0rQOiDW1iHCi62Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quYl0-0004GO-UW; Sun, 22 Oct 2023 09:44:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quYl0-0004G4-9c for guix-patches@gnu.org; Sun, 22 Oct 2023 09:44:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quYl0-0003Sm-1i; Sun, 22 Oct 2023 09:44:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quYlM-0000aQ-2M; Sun, 22 Oct 2023 09:45:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66525] [PATCH v2 03/10] gnu: python-dbusmock: Remove dependency on (guix build syscalls). Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Sun, 22 Oct 2023 13:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66525@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , jgart Received: via spool by 66525-submit@debbugs.gnu.org id=B66525.16979822802134 (code B ref 66525); Sun, 22 Oct 2023 13:45:04 +0000 Received: (at 66525) by debbugs.gnu.org; 22 Oct 2023 13:44:40 +0000 Received: from localhost ([127.0.0.1]:45699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quYkx-0000YF-Ur for submit@debbugs.gnu.org; Sun, 22 Oct 2023 09:44:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quYkq-0000Wu-3r for 66525@debbugs.gnu.org; Sun, 22 Oct 2023 09:44:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quYkH-0003Jc-Cf; Sun, 22 Oct 2023 09:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=qdQabaGhUMAPoeoz0tmsyiK383qlGZbfSUJaXyj02go=; b=l8jBH+L+j7i+PaoXU0J4 mdJP3N4TOOxPP4Pxi9DIxCuvYxWhtb0z3ehgYMT+x5TI/qedpBx/oDdmOS04U9u9pTX0UrLXWsKiM C70aFa1Lv+6RoAabtucjAldqFNerVVSJo+9Crjb9M3Fz0/ojdFASXb5BzXVpYNlD9IP6FdZuG55XE YUPQ6ho+cYRfAfRss0oAfGgpze1WNP9yUf4OTj7aunk+xzmI51KFADgWAlqr7lbDVzZzDBA5Zzbzj ckIdN8a3g72qP8vxyej1HdV7z8pWzwBUyHI9u9WuRAQrVU27ioHBcoP5oIueGBSyX8wbnR3oaGr5C B7ObKIOS9OdJHQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 22 Oct 2023 15:43:27 +0200 Message-ID: <230e6b36d03b8cd45295fddf8706c7272d09011f.1697982039.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: <87o7gywndy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.80 X-Spam-Score: -5.80 X-Migadu-Queue-Id: 2124B3FEFA X-Migadu-Scanner: mx2.migadu.com X-TUID: Mp6CQPZZcfxG 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(-) 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