From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bengt Richter Subject: Re: 01/02: services: Allow modprobe to use "/etc/modprobe.d". Date: Mon, 6 Apr 2020 11:29:48 +0200 Message-ID: <20200406092948.GA2930@LionPure> References: <20200405110749.5469.24356@vcs0.savannah.gnu.org> <20200405110750.E368020A26@vcs0.savannah.gnu.org> <87v9mdhbxk.fsf@gnu.org> <00d7800adbfc1fa955ed503c1ba38e00@waegenei.re> Reply-To: Bengt Richter 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]:42698) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLO51-0002JQ-EF for guix-devel@gnu.org; Mon, 06 Apr 2020 05:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLO50-00049Y-5T for guix-devel@gnu.org; Mon, 06 Apr 2020 05:30:07 -0400 Content-Disposition: inline In-Reply-To: <00d7800adbfc1fa955ed503c1ba38e00@waegenei.re> 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, Ludo, On +2020-04-06 07:54:47 +0000, Brice Waegeneire wrote: > Hello Ludo', >=20 > 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") > >=20 > > [...] > >=20 > > > + (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)) > >=20 > > 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 t= o > > pass =E2=80=9C-C /gnu/store/=E2=80=A6-modprobe.d=E2=80=9D, which woul= d contain the right thing. > >=20 > > Thoughts? >=20 > What's the issue with using /etc/modrpobe.d? > I would think the fundamental issue is pure vs impure dependencies: i.e., /gnu/... vs /var/guix vs /elsewhere/... IIUC, the consequence of using /etc/... or ~/... or other non-/gnu/... is that if you want to run something in a container with chrooted root, you have to cow-fake /etc and all the rest of non-/gnu/... environment, so your executable is not as generally usable as possible if nuisance adjustments were not necessary. People who might want to use it anyway have to think about a bunch of stuff not relevant to what they actually want to do -- they will wind up debugging functionally-irrelevant implementation stuff. Maybe I misunderstand, but are you and Ludo on the same page re the fundamental concept of guix and how it plays in various contexts? (allowing for "practicality beats purity"[1] when absolutely necessary ;-= ) > As noted in the comments I thought setting MODPROBE_OPTIONS was kinda o= f 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= with Danny[1]. > 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-wrappe= r=E2=80=9D is currently put > in place by a simple activation service. >=20 > [0]: https://issues.guix.info/issue/40422 > [1]: https://issues.guix.info/issue/40274#29 >=20 > - Brice >=20 [1] python -c 'import this' --=20 Regards, Bengt Richter