From patchwork Mon Oct 7 20:12:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 68767 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 3985327BBE2; Mon, 7 Oct 2024 21:18:50 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 4170127BBE9 for ; Mon, 7 Oct 2024 21:18:49 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxuBN-0001Fp-Fx; Mon, 07 Oct 2024 16:18:17 -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 1sxuB3-0000u5-5p for guix-patches@gnu.org; Mon, 07 Oct 2024 16:17:57 -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 1sxuB2-0002WG-T9 for guix-patches@gnu.org; Mon, 07 Oct 2024 16:17:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=avW/Wa9y0v6xUdBCgVlkJOETSKKTx7LqMYiBf2tr5p0=; b=uOu4B43FrPlVeRdaG+1YwJ2Ctzpjy2NLtSH9CqAiV430aJHHBW7mp5QLFJJNbwhf0XHmk/EHe1OLHkJ+ACcJhriPQdCugLhmvJCVH95udgHq0OQhzZO+zLItUnlOYY/7AMrzN2Hlg15kQyLig6j9IQPqdp6m32ZDComooY1hcgv8xJiwwoK2NjjZKFP7YcXEehocxNFI3Y8e6MlN+YDwSTm9IadqPZCjHGwlV/nhao+6kv9gZDrPzmnsL/l4uHk6KvrDaoh71cj505AbWA2gFmyiwORj238PiXIBeRi5ulX4eyMEqUnPJ+IEWeO0yiwWnbH3vF7U05ABo7Vu6bhv+w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sxuBA-0001k5-GI for guix-patches@gnu.org; Mon, 07 Oct 2024 16:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71327] [PATCH v2 5/7] gnu: libblockdev: Use gexps. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Oct 2024 20:18:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71327 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71327@debbugs.gnu.org Cc: iskarian@mgsn.dev, maxim.cournoyer@gmail.com Received: via spool by 71327-submit@debbugs.gnu.org id=B71327.17283322536601 (code B ref 71327); Mon, 07 Oct 2024 20:18:04 +0000 Received: (at 71327) by debbugs.gnu.org; 7 Oct 2024 20:17:33 +0000 Received: from localhost ([127.0.0.1]:48386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxuAf-0001iN-4A for submit@debbugs.gnu.org; Mon, 07 Oct 2024 16:17:33 -0400 Received: from 3.mo550.mail-out.ovh.net ([46.105.60.232]:54345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sxuAb-0001hz-Ql for 71327@debbugs.gnu.org; Mon, 07 Oct 2024 16:17:31 -0400 Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.25.152]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4XMr6S5zS0z1WkT for <71327@debbugs.gnu.org>; Mon, 7 Oct 2024 20:17:20 +0000 (UTC) Received: from ghost-submission-55b549bf7b-crf8t (unknown [10.108.54.32]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C89BE1FD1D; Mon, 7 Oct 2024 20:17:19 +0000 (UTC) Received: from ngraves.fr ([37.59.142.100]) by ghost-submission-55b549bf7b-crf8t with ESMTPSA id 3HGDGM9BBGdVdQUAx9YrFw (envelope-from ); Mon, 07 Oct 2024 20:17:19 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-100R0032c623ef8-488e-4a94-bf63-dc84caf6bc8e, A12302D5D8CF0E033BA678025A323BF4FAD59D46) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 86.246.19.221 Date: Mon, 7 Oct 2024 22:12:31 +0200 Message-ID: <20241007201652.15133-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241007201652.15133-1-ngraves@ngraves.fr> References: <20241007201652.15133-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 4742290408007328465 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvledgudeglecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeelffejteeutefhfeekfffffedvudekjeekgfeludeitdfhkeevhfeivdfhffeggeenucfkphepuddvjedrtddrtddruddpkeeirddvgeeirdduledrvddvuddpfeejrdehledrudegvddruddttdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepjedufedvjeesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtddpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=avW/Wa9y0v6xUdBCgVlkJOETSKKTx7LqMYiBf2tr5p0=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1728332240; v=1; b=XR80VAQP3VKqlAJ5tzN7B3FxrYDlaELTQQogGcY8GLPf4LogYLi34VGMlq1qfXQ9Ku86H4Zn WJxUaRrNGYTZQtzgyD6vgUQRK9JYym7aukZif2INYHOPKYXQueJ1MHO+DqNnSXnWeB8oZ344Fwg MxoP213X6Gbku+NVijjzUHfMYQSGZOqVaq4jxWeOLB/bnsfO7dE4OpiR1JFrmSI7uTKP0FDyxTf Mzle1P+/iTQQhxdxyBxow5r41CgdY805KXlCp79gxCw3EisN3+Qt7w6d4TdZcnmWy3yyf1IzUFI kwiY9U0PvO/zcufF5TDwJHBDd4A8RNniSriz69ofdBw+w== 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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 From: Maxim Cournoyer * gnu/packages/disk.scm (libblockdev) [phases]: Use gexps. {patch-plugin-paths}: Use search-input-file. Change-Id: I61f9b3dfdd4dc249fb0f59abb99826a8e759bb42 --- gnu/packages/disk.scm | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 1278eb2aca..e9b21763e1 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -1191,19 +1191,26 @@ (define-public libblockdev "1ny2glwmb5dcdv2x0giinbyma9fhk59z8117k1kr15pm7yjk7jx5")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-configuration-directory - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-configuration-directory + (lambda _ (substitute* "src/lib/blockdev.c" - (("/etc/libblockdev/conf.d/" path) (string-append out path)))))) - (add-after 'unpack 'patch-plugin-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* (find-files "src/plugins" "\\.c$") - (("(gchar \\*arg.+\\{\")([^\"]+)" all start program) - ;; XXX: Use 'search-input-file' when available. - (string-append start (or (which program) program))))))))) + (("/etc/libblockdev/conf.d/" path) + (string-append #$output path))))) + (add-after 'unpack 'patch-plugin-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "src/plugins" "\\.c$") + (("(gchar \\*arg.+\\{\")([^\"]+)" all start program) + (string-append + start (or (false-if-exception + (search-input-file inputs + (string-append "bin/" program))) + (false-if-exception + (search-input-file inputs + (string-append "sbin/" program))) + program))))))))) (native-inputs (list gobject-introspection pkg-config