From unknown Mon Jun 16 23:56:10 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#38871 <38871@debbugs.gnu.org> To: bug#38871 <38871@debbugs.gnu.org> Subject: Status: Add a check before activating modprobe Reply-To: bug#38871 <38871@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:56:10 +0000 retitle 38871 Add a check before activating modprobe reassign 38871 guix-patches submitter 38871 kanichos@yandex.ru severity 38871 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 02 07:13:57 2020 Received: (at submit) by debbugs.gnu.org; 2 Jan 2020 12:13:57 +0000 Received: from localhost ([127.0.0.1]:38347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imzMT-0000z1-6e for submit@debbugs.gnu.org; Thu, 02 Jan 2020 07:13:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:55569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imzMQ-0000yt-RS for submit@debbugs.gnu.org; Thu, 02 Jan 2020 07:13:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49644) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imzMP-00069c-Ae for guix-patches@gnu.org; Thu, 02 Jan 2020 07:13:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imzMN-0000gP-Au for guix-patches@gnu.org; Thu, 02 Jan 2020 07:13:52 -0500 Received: from forward400p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:105]:52837) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1imzMM-0000eI-Nb for guix-patches@gnu.org; Thu, 02 Jan 2020 07:13:51 -0500 Received: from mxback21g.mail.yandex.net (mxback21g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:321]) by forward400p.mail.yandex.net (Yandex) with ESMTP id 868BB1BC0EB8 for ; Thu, 2 Jan 2020 15:13:46 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback21g.mail.yandex.net (mxback/Yandex) with ESMTP id tTF4BEt3D9-DjLCDmVT; Thu, 02 Jan 2020 15:13:45 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1577967225; bh=F4mHCXl7OLvKBE4eTqaHjcpymAB63BRYJlBZ6iH97+E=; h=Message-Id:Date:Subject:To:From; b=tIXj3bTR0OPVysglcZ5/HwuDRlL9iT4+rXnrI39Chy6xar/X+Jf4od5lNZb2PPkD/ KrMC9t9KbRnkEEBfXS7JMHAeWnoH8WYj9hl7R+EWQ/Z82j8Bd2jTXvXMhSdHErCwd9 Fos9nwVvisyDV/dco9n76zHx8vnsmQ8e+LudgkMc= Authentication-Results: mxback21g.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva2-d0266d205f48.qloud-c.yandex.net with HTTP; Thu, 02 Jan 2020 15:13:45 +0300 From: kanichos@yandex.ru To: guix-patches Subject: Add a check before activating modprobe MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 02 Jan 2020 15:13:45 +0300 Message-Id: <2023261577967225@iva2-d0266d205f48.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:1472:2741:0:8b7:105 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Currently an activation service unconditionally tries to set up a modprobe wrapper by writing to /proc/sys/kernel/modprobe. This breaks if the kernel is built without loadable module support, Shepherd completely aborts. I believe there is no reason for it to be so. Just add a simple check for the existence of this /proc node. --- gnu/build/activation.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index c6c7e7fd3b..f7a5e53e79 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -269,9 +269,10 @@ second element is the name it should appear at, such as: (define (activate-modprobe modprobe) "Tell the kernel to use MODPROBE to load modules." - (call-with-output-file "/proc/sys/kernel/modprobe" - (lambda (port) - (display modprobe port)))) + (if (file-exists? "/proc/sys/kernel/modprobe") + (call-with-output-file "/proc/sys/kernel/modprobe" + (lambda (port) + (display modprobe port))))) (define (activate-firmware directory) "Tell the kernel to look for device firmware under DIRECTORY. This -- 2.23.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 10:32:48 2020 Received: (at 38871-done) by debbugs.gnu.org; 6 Jan 2020 15:32:48 +0000 Received: from localhost ([127.0.0.1]:46523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioUN5-0005yE-TC for submit@debbugs.gnu.org; Mon, 06 Jan 2020 10:32:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioUN4-0005xv-8a for 38871-done@debbugs.gnu.org; Mon, 06 Jan 2020 10:32:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ioUMy-000609-TZ; Mon, 06 Jan 2020 10:32:40 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=58808 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ioUMx-0001vF-2Y; Mon, 06 Jan 2020 10:32:39 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: kanichos@yandex.ru Subject: Re: [bug#38871] Add a check before activating modprobe References: <2023261577967225@iva2-d0266d205f48.qloud-c.yandex.net> Date: Mon, 06 Jan 2020 16:32:36 +0100 In-Reply-To: <2023261577967225@iva2-d0266d205f48.qloud-c.yandex.net> (kanichos@yandex.ru's message of "Thu, 02 Jan 2020 15:13:45 +0300") Message-ID: <87k164bnxn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38871-done Cc: 38871-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, kanichos@yandex.ru skribis: > Currently an activation service unconditionally tries to set up a modprob= e wrapper by writing to /proc/sys/kernel/modprobe. This breaks if the kerne= l is built without loadable module support, Shepherd completely aborts. I b= elieve there is no reason for it to be so. Just add a simple check for the = existence of this /proc node. > > --- > gnu/build/activation.scm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm > index c6c7e7fd3b..f7a5e53e79 100644 > --- a/gnu/build/activation.scm > +++ b/gnu/build/activation.scm > @@ -269,9 +269,10 @@ second element is the name it should appear at, such= as: >=20=20 > (define (activate-modprobe modprobe) > "Tell the kernel to use MODPROBE to load modules." > - (call-with-output-file "/proc/sys/kernel/modprobe" > - (lambda (port) > - (display modprobe port)))) > + (if (file-exists? "/proc/sys/kernel/modprobe") > + (call-with-output-file "/proc/sys/kernel/modprobe" Applied with minor tweaks. However, I suspect other issues will come up if you try to use a kernel without loadable module support. For instance, you=E2=80=99ll have to set: (initrd-modules '()) in your OS config file. Thanks, Ludo=E2=80=99. From unknown Mon Jun 16 23:56:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Feb 2020 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator