From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 13 07:44:35 2020 Received: (at submit) by debbugs.gnu.org; 13 Apr 2020 11:44:35 +0000 Received: from localhost ([127.0.0.1]:59309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNxVz-0003ui-2N for submit@debbugs.gnu.org; Mon, 13 Apr 2020 07:44:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:32815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNxVx-0003uZ-Dk for submit@debbugs.gnu.org; Mon, 13 Apr 2020 07:44:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33283) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNxVw-0005A9-7K for guix-patches@gnu.org; Mon, 13 Apr 2020 07:44:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNxVu-0008Gh-1g for guix-patches@gnu.org; Mon, 13 Apr 2020 07:44:32 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:32974) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jNxVt-0008CQ-Rq for guix-patches@gnu.org; Mon, 13 Apr 2020 07:44:29 -0400 Received: from dayas.fritz.box (unknown [185.128.244.187]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 876213368164; Mon, 13 Apr 2020 13:44:27 +0200 (CEST) From: Danny Milosavljevic To: guix-patches@gnu.org Subject: [PATCH] system: Automatically adjust linux-module packages to use the operating-system's kernel. Date: Mon, 13 Apr 2020 13:43:59 +0200 Message-Id: <20200413114359.26652-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 85.13.145.193 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic 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: -1.7 (-) * gnu/system.scm (package-for-kernel): New procedure. (operating-system-directory-base-entries): Use it. * gnu/tests/linux-module.scm: Test it. --- gnu/system.scm | 18 +++++++++++++++++- gnu/tests/linux-modules.scm | 11 ++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index fd456c6206..53c16233a1 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -32,6 +32,7 @@ #:use-module (guix derivations) #:use-module (guix profiles) #:use-module (guix ui) + #:use-module (guix utils) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages guile) @@ -472,6 +473,16 @@ OS." (file-append (operating-system-kernel os) "/" (system-linux-image-file-name))) =20 +(define (package-for-kernel target-kernel module-package) + "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if +possible (that is if there's a LINUX keyword argument in the build syste= m)." + (package + (inherit module-package) + (arguments + (substitute-keyword-arguments (package-arguments module-package) + ((#:linux kernel #f) + target-kernel))))) + (define* (operating-system-directory-base-entries os) "Return the basic entries of the 'system' directory of OS for use as t= he value of the SYSTEM-SERVICE-TYPE service." @@ -486,7 +497,12 @@ value of the SYSTEM-SERVICE-TYPE service." (kernel (profile-derivation (packages->manifest - (cons kernel modules)) + (cons kernel + (map (lambda (module) + (if (package? module) + (package-for-kernel kernel modul= e) + module)) + modules))) #:hooks (if has-modules? (list linux-module-database) '()))) diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 788bdc848a..953b132ef7 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -28,8 +28,10 @@ #:use-module (guix derivations) #:use-module (guix gexp) #:use-module (guix modules) + #:use-module (guix packages) #:use-module (guix monads) #:use-module (guix store) + #:use-module (guix utils) #:export (%test-loadable-kernel-modules-0 %test-loadable-kernel-modules-1 %test-loadable-kernel-modules-2)) @@ -118,5 +120,12 @@ with one extra module.") (description "Tests loadable kernel modules facility of with two extra modules.") (value (run-loadable-kernel-modules-test - (list acpi-call-linux-module ddcci-driver-linux) + (list acpi-call-linux-module + (package + (inherit ddcci-driver-linux) + (arguments + `(#:linux #f + ,@(strip-keyword-arguments '(#:linux) + (package-arguments + ddcci-driver-linux))))= )) '("acpi_call" "ddcci"))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 14 03:40:06 2020 Received: (at 40595) by debbugs.gnu.org; 14 Apr 2020 07:40:06 +0000 Received: from localhost ([127.0.0.1]:33158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOGAw-0002UL-8Z for submit@debbugs.gnu.org; Tue, 14 Apr 2020 03:40:06 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:56815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOGAu-0002Tl-8Y for 40595@debbugs.gnu.org; Tue, 14 Apr 2020 03:40:05 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay2-d.mail.gandi.net (Postfix) with ESMTPA id A3B4240014 for <40595@debbugs.gnu.org>; Tue, 14 Apr 2020 07:39:57 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 14 Apr 2020 07:39:57 +0000 From: Brice Waegeneire To: 40595@debbugs.gnu.org Subject: Re: [PATCH] system: Automatically adjust linux-module packages to use the Message-ID: X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40595 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: -1.7 (-) Hello Danny, Thanks for the patch, I needed such feature. It works well and the test pass; LGTM! - Brice From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 14:57:44 2020 Received: (at 40595) by debbugs.gnu.org; 22 Apr 2020 18:57:44 +0000 Received: from localhost ([127.0.0.1]:53237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRKZ6-00055f-Do for submit@debbugs.gnu.org; Wed, 22 Apr 2020 14:57:44 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRKZ4-00055S-Hf for 40595@debbugs.gnu.org; Wed, 22 Apr 2020 14:57:43 -0400 Received: from webmail.gandi.net (webmail18.sd4.0x35.net [10.200.201.18]) (Authenticated sender: brice@waegenei.re) by relay5-d.mail.gandi.net (Postfix) with ESMTPA id E958D1C0006 for <40595@debbugs.gnu.org>; Wed, 22 Apr 2020 18:57:35 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 22 Apr 2020 18:57:35 +0000 From: Brice Waegeneire To: 40595@debbugs.gnu.org Subject: #40595 Need a rebase Message-ID: <519959959ea79cd1dcafb869320313a9@waegenei.re> X-Sender: brice@waegenei.re User-Agent: Roundcube Webmail/1.3.8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40595 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: -1.7 (-) Hello Danny, Looks like this patch need to be rebased. Cheers, - Brice From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 22 17:00:03 2020 Received: (at 40595-done) by debbugs.gnu.org; 22 Apr 2020 21:00:03 +0000 Received: from localhost ([127.0.0.1]:53428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRMTT-0008K9-24 for submit@debbugs.gnu.org; Wed, 22 Apr 2020 17:00:03 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:54418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRMTR-0008JD-Ez for 40595-done@debbugs.gnu.org; Wed, 22 Apr 2020 17:00:02 -0400 Received: from localhost (80-110-126-163.cgn.dynamic.surfer.at [80.110.126.163]) by dd26836.kasserver.com (Postfix) with ESMTPSA id F0A6E336531D; Wed, 22 Apr 2020 22:59:59 +0200 (CEST) Date: Wed, 22 Apr 2020 22:59:57 +0200 From: Danny Milosavljevic To: Brice Waegeneire Subject: Re: [bug#40595] [PATCH] system: Automatically adjust linux-module packages to use the Message-ID: <20200422225957.652aad1d@scratchpost.org> In-Reply-To: References: <20200413114359.26652-1-dannym@scratchpost.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/jH=g8bIYi8_sX.CO.0Vx8zi"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40595-done Cc: 40595-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: -1.7 (-) --Sig_/jH=g8bIYi8_sX.CO.0Vx8zi Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Brice, yes, indeed. Thanks. I've rebased it and pushed it to guix master as commit f91ad0b13d8d3d5b1ae9= 2e209b1be6e8473385ba. --Sig_/jH=g8bIYi8_sX.CO.0Vx8zi Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6gsE0ACgkQ5xo1VCww uqWPGQgAoiKhBlNn4OXZWMDZ6UonsVJa+5C3DdwZyM07vvUPyWJKiP4MwOKBMD0R fTy6wD5tHmj7R9c+rBN8Sp5E0L9LxsThh0CdPzNSYxR1pNfa/GicxSCpvTXMedP9 kGdytULoQS6LOkLjphig+jSX1TPArdd16rS7PDPAgmhhNwpnCR8QLnRwV1iF7/6t IYiAArnGAZ1d3UJmeU59ShG4NxoUu/75r5yxYZDDXRyaQDVr6iRSHI85b08BkxJo dKTj9yGlGYnzesM+ZpNBrdX7qoZa0OyHJoMT+ZKrVua4FU11fOZS15RV8Evv+RZl dUD6nnX3s7nDgg7vqjzY6e4me0MJyA== =NwzB -----END PGP SIGNATURE----- --Sig_/jH=g8bIYi8_sX.CO.0Vx8zi-- From unknown Sun Jun 22 22:43:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 May 2020 11:24:08 +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