From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cAVPHZIL9V8fVgAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 01:00:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 9J8WGZIL9V+/DwAAB5/wlQ (envelope-from ) for ; Wed, 06 Jan 2021 01:00:02 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 171419402A0 for ; Wed, 6 Jan 2021 01:00:02 +0000 (UTC) Received: from localhost ([::1]:59450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwxBA-0003Dq-TC for larch@yhetil.org; Tue, 05 Jan 2021 20:00:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwxB3-0003Dk-IX for guix-devel@gnu.org; Tue, 05 Jan 2021 19:59:53 -0500 Received: from zancanaro.com.au ([45.76.117.151]:40182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwxB0-0002TA-Hi for guix-devel@gnu.org; Tue, 05 Jan 2021 19:59:53 -0500 Received: by zancanaro.com.au (Postfix, from userid 116) id 9FE5B215A9; Wed, 6 Jan 2021 00:59:47 +0000 (UTC) Received: from jolteon (unknown [27.96.215.68]) by zancanaro.com.au (Postfix) with ESMTPSA id 87EE5215A6; Wed, 6 Jan 2021 00:59:46 +0000 (UTC) References: <_1CLe9QSGsoMlu5WxBMXm4CbFLM_M9iRG1XQF9GDsK0GP208jpngdymfix4tAfoLP94mhMTt-Tx6OP2xN_n78Jhx5KQzkiqPpIci_44C9OI=@protonmail.com> <4nnVFhbpUhipplsq55mHX9KtoMK9s0rZDC3D8rgKQ5O0nUtnapdkHZfPcAVpECgW1mnYm1BbmvyQ4SyTgvNyUgVgzM29gh6b8OL7p3YvczM=@protonmail.com> <20210103165008.6517c1bf@scratchpost.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Carlo Zancanaro To: raid5atemyhomework Subject: Re: ZFS on Guix In-reply-to: Date: Wed, 06 Jan 2021 11:59:45 +1100 Message-ID: <87lfd698xq.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=45.76.117.151; envelope-from=carlo@zancanaro.id.au; helo=zancanaro.com.au X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.34 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 171419402A0 X-Spam-Score: -2.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: QV15mjqn1KVq Hi raid5atemyhomework, On Wed, Jan 06 2021, raid5atemyhomework wrote: > I have this patch below for creating a new=20 > `kernel-loadable-module-service-type`, which can be extended by=20 > another service to add kernel-loadable modules provided by=20 > packages, hope for a review. I tried out building a VM using this patch and it seemed to work=20 properly. I was able to add a kernel module by extending=20 kernel-loadable-module-service-type, and then load it in the=20 running VM with modprobe. I only have superficial comments about the patch itself. Hopefully=20 someone else will provide a better review than I can. > From 984602faba1e18b9eb64e62970147aab653d997f Mon Sep 17=20 > 00:00:00 2001 > From: raid5atemyhomework > Date: Tue, 5 Jan 2021 22:27:56 +0800 > Subject: [PATCH] gnu: Add 'kernel-loadable-module-service-type'=20 > for services > to extend with kernel-loadable modules. This will need a proper commit message before being committed.=20 Guix generally follows the GNU Change Log style[1]. You can see=20 examples of what commit messages look like by looking at other=20 commits in the repository. > +;; Only used by the KERNEL-LOADABLE-MODULE-SERVICE-TYPE. I would remove this comment. This is a description of the current=20 state, rather than a restriction on how it should be used. As a=20 description, it might get out of date (if we use=20 values elsewhere), and it doesn't=20 add much value (because it can be easily verified, and the record=20 type isn't exported). If you indent this to be normative, the=20 comment should explain why this type should not be used elsewhere. > + (return `(("kernel" ,kernel) > + ,@(if hurd `(("hurd" ,hurd)) '())))))) > +(define (kernel-builder-configuration-add-modules config=20 > modules) > + "Constructs a kernel builder configuration that has its=20 > modules extended." Put empty lines between definitions here ... > + "Register packages containing kernel-loadable=20 > modules and adds them > +to the system."))) > +(define (kernel-loadable-module-service kernel hurd modules) > + "Constructs the service that sets up kernel loadable=20 > modules." ... and here. It would also be worth adding a test to=20 gnu/tests/linux-modules.scm to test loading modules through this=20 service. Other than that, it looks good to me and it seems to work in my=20 limited testing. =F0=9F=91=8D Good job! Carlo [1]: https://www.gnu.org/prep/standards/html_node/Change-Logs.html