From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Loading modules built using linux-module-build-system Date: Thu, 14 Nov 2019 17:31:43 +0100 Message-ID: <20191114173143.6924e46e@scratchpost.org> References: <877e8snntp.fsf@jlicht.xyz> <20191021202733.3c340770@scratchpost.org> <20191021204857.5dff6e9b@scratchpost.org> <20191021233925.0ba18a4c@scratchpost.org> <87k18x3r3g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/vsZB_ilz/baZyRbU87303.="; protocol="application/pgp-signature"; micalg=pgp-sha256 Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46310) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVI2E-0003Jz-M3 for guix-devel@gnu.org; Thu, 14 Nov 2019 11:31:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVI2D-0000WF-GT for guix-devel@gnu.org; Thu, 14 Nov 2019 11:31:54 -0500 In-Reply-To: <87k18x3r3g.fsf@gnu.org> 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.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org --Sig_/vsZB_ilz/baZyRbU87303.= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Tue, 22 Oct 2019 14:24:51 +0200 Ludovic Court=C3=A8s wrote: > I=E2=80=99m wondering if we could avoid clobbering the global profile wit= h the > kernel and module packages, though (as is currently the case.) Sounds good. > > (define* (operating-system-profile os) > > "Return a derivation that builds the system profile of OS." > > (mlet* %store-monad > > - ((services -> (operating-system-services os)) > > - (profile (fold-services services > > - #:target-type profile-service-type))) > > + ((kernel -> (operating-system-kernel os)) > > + (services -> (operating-system-services os)) > > + (profile (cons kernel (fold-services services > > + #:target-type > > + profile-service-type)))) > > (match profile > > (("profile" profile) > > (return profile))))) =20 >=20 > The value of =E2=80=98profile=E2=80=99 above can never match this pattern= , or am I > missing something? Ahhhhh! Now I see it. > Besides, I wonder how much is missing from (gnu build linux-modules) to > do this without resorting to kmod. :-) True :) > Maybe we should not add this hook by default, to avoid overhead for a > very unusual use case. The caller of =E2=80=98profile-derivation=E2=80= =99 could add it > when needed. I think the eventual overhead of it is minimal because it can just check whether "lib/modules" is anywhere in the source and if not, skip everything. > Thinking more about it, what about handling the union/profile thing in > =E2=80=98operating-system-directory-base-entries=E2=80=99? We could stil= l use > =E2=80=98profile-derivation=E2=80=99 with the hook you wrote, but we=E2= =80=99d be able to keep > that here instead of adding it to (guix profiles). Should we just change out the "kernel" entry to be the union? After all, that's what actually happens at runtime as far as the Linux kernel is concerned. > Also, if we take that route, we would probably need a > =E2=80=98linux-module-packages=E2=80=99 field in . Or make the `kernel` field a list, including linux-libre ;-) --Sig_/vsZB_ilz/baZyRbU87303.= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl3NgW8ACgkQ5xo1VCww uqWeZwf6AuXzJ+qjZ4TQ+hHT8sH9FGDWwYIHC94KsVVw0+he1NW7Emn8xOiOqcU6 zUHu2P4NtlcN29DnW0GLFiCD60WYhXg9kAmZe0wZ4hPsl4RzKcDogUXT1HY/Haw5 GrZaOCmFzA2lMl7WCaACDJMruJOukboTpHBvPpvucJDbmFPMvqJ1pe+b+6MOTvX/ jliwe7PYzJD5BDLGRXjEwukDztK9omxMkcXKUrPMryCmccH230TdqXZt1Pl7xtGS zBC0Okp9ay5AIkGauaaezQPTg9mPQxpXNTV1TQwvyexIozFfjzds6+JzH7l32aHH NoQMVXrQYknlIH+rBW2c5Y7emjaj4w== =qQsm -----END PGP SIGNATURE----- --Sig_/vsZB_ilz/baZyRbU87303.=--