From patchwork Sun Jun 6 18:52:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Sundberg X-Patchwork-Id: 29982 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 A22B027BC83; Sun, 6 Jun 2021 23:13:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5B6AD27BC78 for ; Sun, 6 Jun 2021 23:13:11 +0100 (BST) Received: from localhost ([::1]:37314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq114-0001oL-Dl for patchwork@mira.cbaines.net; Sun, 06 Jun 2021 18:13:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq10w-0001nh-RT for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lq10w-0002lk-Kw for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lq10w-0003hF-DS for guix-patches@gnu.org; Sun, 06 Jun 2021 18:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 06 Jun 2021 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48889@debbugs.gnu.org Cc: Ryan Sundberg X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162301757314178 (code B ref -1); Sun, 06 Jun 2021 22:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2021 22:12:53 +0000 Received: from localhost ([127.0.0.1]:54100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lq10k-0003gY-RF for submit@debbugs.gnu.org; Sun, 06 Jun 2021 18:12:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:56232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpxst-0002t7-2Q for submit@debbugs.gnu.org; Sun, 06 Jun 2021 14:52:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpxss-0002ju-D9 for guix-patches@gnu.org; Sun, 06 Jun 2021 14:52:30 -0400 Received: from mail.arctype.co ([138.68.9.245]:55384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpxsq-00084g-Bl for guix-patches@gnu.org; Sun, 06 Jun 2021 14:52:30 -0400 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 087CD11FB7C; Sun, 6 Jun 2021 11:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1623005547; bh=wdgPSt3GvZQvZ4M72O3bDobFAG/RZbq/LnxQpD1ecQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bLxLviQrb016QiJLNNmDjrz8NDgGQzcqi6lBSsRbPcZu9JxbKE9SIS35N7BuxZUUa p/fvdVK3ckrcuYdvvqs1aUenS8AB4jUJy24QERQtd+1CCAieJmDNv29V9AZ3Qb2z/a rOhlaYAvPYEb6ElIjAVP9n4p7LvkyIv/3s3ameoqBk1SbAPQMd1pou82T+M+ZlOyKi 7jWBTMtKTRSp3S/BEIAbgf/KBqP+RhpWsro9Z2ekuoE0NdCwkbGS0ijqQbWpF16lzN 9+KyoCuttqGD9vB8mAH1/GrdmPzU8ZXB+Wi2y8OI84MMGZ1usAuEhc92Ofoa31R1wz FNo0bi4gRXWZQ== Date: Sun, 6 Jun 2021 11:52:02 -0700 Message-Id: <20210606185204.17617-2-ryan@arctype.co> In-Reply-To: <20210606185204.17617-1-ryan@arctype.co> References: <20210606185204.17617-1-ryan@arctype.co> MIME-Version: 1.0 Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 06 Jun 2021 18:12:49 -0400 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" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches X-Patchwork-Original-From: Ryan Sundberg via Guix-patches via From: Ryan Sundberg X-getmail-retrieved-from-mailbox: Patches Removes hardcoded paths assumed in /sbin and /bin compiled into the `rbd` tool. Patch originally discussed at https://github.com/ceph/ceph/pull/20938 and rejected by upstream for ambiguous security concerns related to relative paths. --- .../patches/ceph-relative-paths.patch | 22 +++++++++++++++++++ gnu/packages/storage.scm | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ceph-relative-paths.patch diff --git a/gnu/packages/patches/ceph-relative-paths.patch b/gnu/packages/patches/ceph-relative-paths.patch new file mode 100644 index 0000000000..e1b1d3599f --- /dev/null +++ b/gnu/packages/patches/ceph-relative-paths.patch @@ -0,0 +1,22 @@ +diff --git a/src/common/module.c b/src/common/module.c +index f19f74324c..53355b8185 100644 +--- a/src/common/module.c ++++ b/src/common/module.c +@@ -66,7 +66,7 @@ int module_has_param(const char *module, const char *param) + char command[128]; + + snprintf(command, sizeof(command), +- "/sbin/modinfo -F parm %s | /bin/grep -q ^%s:", ++ "modinfo -F parm %s | grep -q ^%s:", + module, param); + + return run_command(command) == 0; +@@ -76,7 +76,7 @@ int module_load(const char *module, const char *options) + { + char command[128]; + +- snprintf(command, sizeof(command), "/sbin/modprobe %s %s", ++ snprintf(command, sizeof(command), "modprobe %s %s", + module, (options ? options : "")); + + return run_command(command); diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index d53327df75..b4f7d5e301 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -64,7 +64,7 @@ (base32 "0lmdri415hqczc9565s5m5568pnj97ipqxgnw6085kps0flwq5zh")) (patches - (search-patches "ceph-disable-cpu-optimizations.patch")) + (search-patches "ceph-disable-cpu-optimizations.patch" "ceph-relative-paths.patch")) (modules '((guix build utils))) (snippet '(begin