From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: 01/02: services: Allow modprobe to use "/etc/modprobe.d". Date: Tue, 07 Apr 2020 11:35:45 +0200 Message-ID: <87pncjbpu6.fsf@gnu.org> References: <20200405110749.5469.24356@vcs0.savannah.gnu.org> <20200405110750.E368020A26@vcs0.savannah.gnu.org> <87v9mdhbxk.fsf@gnu.org> <00d7800adbfc1fa955ed503c1ba38e00@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35038) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLke5-0004eW-VG for guix-devel@gnu.org; Tue, 07 Apr 2020 05:35:51 -0400 In-Reply-To: <00d7800adbfc1fa955ed503c1ba38e00@waegenei.re> (Brice Waegeneire's message of "Mon, 06 Apr 2020 07:54:47 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Brice Waegeneire Cc: guix-devel@gnu.org Hi, Brice Waegeneire skribis: > On 2020-04-05 21:15, Ludovic Court=C3=A8s wrote: >> guix-commits@gnu.org skribis: >>> #~(begin >>> (setenv "LINUX_MODULE_DIRECTORY" >>> "/run/booted-system/kernel/lib/modules") >>> + ;; FIXME: Remove this crutch when the patch >>> #40422, >>> + ;; updating to kmod 27 is merged. >>> + (setenv "MODPROBE_OPTIONS" >>> + "-C /etc/modprobe.d") >> >> [...] >> >>> + (services (cons* (service kernel-module-loader-service-type >>> + '("ddcci" "ddcci_backlight")) >>> + (simple-service 'ddcci-config etc-service-type >>> + (list `("modprobe.d/ddcci.conf" >>> + ,ddcci-config))) >>> + %base-services)) >> >> Looking at this, I was wondering if it would be possible to not use >> /etc/modprobe.d and instead have a way to tell the modprobe wrapper to >> pass =E2=80=9C-C /gnu/store/=E2=80=A6-modprobe.d=E2=80=9D, which would c= ontain the right thing. >> >> Thoughts? > > What's the issue with using /etc/modrpobe.d? In general, use of the global file system name space isn=E2=80=99t great: i= t=E2=80=99s ambiguous (compare to a /gnu/store reference) and doesn=E2=80=99t work well= upon rollback or reconfigure (things that refer to /etc end up referring to the =E2=80=9Cnew=E2=80=9D /etc after reconfigure, even though that might no= t actually work.) Conversely, =E2=80=9C-C /gnu/store/=E2=80=A6-modprobe.d=E2=80=9D unambiguou= sly refers to the intended directory. WDYT? > As noted in the comments I thought setting MODPROBE_OPTIONS was kinda > of a > hack; #40422[0] was there to fix it. But if you think it's appropriate > to > use this environment variable it can be done in a future > =E2=80=9Ckernel-module-configuration-service-type=E2=80=9D we discussed w= ith Danny[1]. Sure, no problem! > Instead of extending =E2=80=9Cetc-service-type=E2=80=9D we would use > =E2=80=9Cactivation-service-type=E2=80=9D, as =E2=80=9C%modprobe-wrapper= =E2=80=9D is currently put > in place by a simple activation service. Makes sense. Thank you, Ludo=E2=80=99.