From patchwork Fri Oct 13 15:47:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54805 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7BEF927BBED; Fri, 13 Oct 2023 16:49:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A23C327BBEA for ; Fri, 13 Oct 2023 16:49:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrKPb-0008Pa-3M; Fri, 13 Oct 2023 11:49:15 -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 1qrKP8-0008Hv-Dv for guix-patches@gnu.org; Fri, 13 Oct 2023 11:48:47 -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 1qrKP3-0005rs-R5 for guix-patches@gnu.org; Fri, 13 Oct 2023 11:48:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrKPQ-0007O6-SG for guix-patches@gnu.org; Fri, 13 Oct 2023 11:49:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66525] [PATCH 6/7] gnu: polkit: Remove dependency on (guix build syscalls). Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Oct 2023 15:49: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?= Received: via spool by 66525-submit@debbugs.gnu.org id=B66525.169721212828232 (code B ref 66525); Fri, 13 Oct 2023 15:49:04 +0000 Received: (at 66525) by debbugs.gnu.org; 13 Oct 2023 15:48:48 +0000 Received: from localhost ([127.0.0.1]:47175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKP9-0007L7-S2 for submit@debbugs.gnu.org; Fri, 13 Oct 2023 11:48:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKP4-0007JD-ON for 66525@debbugs.gnu.org; Fri, 13 Oct 2023 11:48:43 -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 1qrKOc-0005o9-DC; Fri, 13 Oct 2023 11:48:14 -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=lph36ZU9akmssS2zxAhK6eE2vHn3QeT2zjJ1zbSDW6s=; b=IoJDNcVwUhw/CS8fhSZO ePmtG38DpYNeWTOXCOb4tJ/WCXtBLkmgvwG6yWzglHPlwg3M2kHJ3JYtZij1MHPP3vFUgxRN9j07x sDLAcr8ORL7bQ2bNfM2xp/uzNWqOguOpPGtLR5PZzk7oZPGmx2TR9R4f/g/Bu5k7xOyRNE8Ltd+zB Vsl01Dq66MWjbF5Wkt5xNabP8tKQxTFlE9zQ29CHYKq/loy0Si4flgzgK6bVup2VhNFxDd+QeuEB+ m7n6TMtTq0H60NZ/QalII6ClBlu/RKpLFrVED7eGHogQ4zFqSlgqHyKIsH/bCssoumvKsQyGo2Al5 H0NyqP64bLmkaA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 13 Oct 2023 17:47:49 +0200 Message-ID: <6fc608f82eed9b32bfdbb9c39ce5b186f7acf2f5.1697211312.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(-) 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