From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eB8GCF858190BwAA0tVLHw (envelope-from ) for ; Mon, 04 Jan 2021 15:50:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yIfFA185819ULQAAbx9fmQ (envelope-from ) for ; Mon, 04 Jan 2021 15:50:55 +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 AE7339402D4 for ; Mon, 4 Jan 2021 15:50:50 +0000 (UTC) Received: from localhost ([::1]:53452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwS89-00008C-Ip for larch@yhetil.org; Mon, 04 Jan 2021 10:50:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwS7O-00006v-OA for guix-patches@gnu.org; Mon, 04 Jan 2021 10:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwS7O-0001ww-Cf for guix-patches@gnu.org; Mon, 04 Jan 2021 10:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kwS7O-0001Xx-AD for guix-patches@gnu.org; Mon, 04 Jan 2021 10:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45403] [PATCH] gnu: zfs: Split into packages specific for each of our major supported kernel versions. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Jan 2021 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45403 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Danny Milosavljevic X-Debbugs-Original-Cc: Tobias Geerinckx-Rice , "45403@debbugs.gnu.org" <45403@debbugs.gnu.org>, Tobias Geerinckx-Rice via Guix-patches via Received: via spool by submit@debbugs.gnu.org id=B.16097753515861 (code B ref -1); Mon, 04 Jan 2021 15:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jan 2021 15:49:11 +0000 Received: from localhost ([127.0.0.1]:60003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwS6Y-0001WT-WF for submit@debbugs.gnu.org; Mon, 04 Jan 2021 10:49:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:47186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kwS6X-0001WF-8k for submit@debbugs.gnu.org; Mon, 04 Jan 2021 10:49:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwS6X-0008Jt-0N for guix-patches@gnu.org; Mon, 04 Jan 2021 10:49:09 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:23723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwS6U-0001ds-Fa for guix-patches@gnu.org; Mon, 04 Jan 2021 10:49:08 -0500 Date: Mon, 04 Jan 2021 15:49:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609775343; bh=B4cgb6tHzmKqVjborxtizkeHWchKMk98//7NMPpiE3w=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=TIZp6LiBhKMxBJfrvr9a6L++aiY+vZkPhBU+CzkdVQDRmECjSUCOIKlvr2+CJb0qG GtNdWjXKNF1k2it+YVoT0kqWvqLYRxuj/QxxlYjxcCHv47bzz4GYAZkuljK2InivLE cPVY5qFEVmxmWiGEdSlk1TYd2zjRL1NmGE4ogBAU= Message-ID: In-Reply-To: <20210104145818.0fcd9a0d@scratchpost.org> References: <87tusaa5mf.fsf@nckx> <20210104145818.0fcd9a0d@scratchpost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.135; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40135.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45403@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: raid5atemyhomework , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.83 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=TIZp6LiB; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: AE7339402D4 X-Spam-Score: -2.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: oiCCbq8VIpCf This doesn't work, for two reasons: * The kernel-module is in the output "module" of the `zfs` package. The co= de specifically checks for `(package? module)`, but we have to specify it a= s `(list system-zfs "module")`. * ZFS is primarily managed via userspace tools, that's what ZFS users know = how to use, and we should support that so that Guix users can ask non-Guix = ZFS users for help with their ZFS problems. The userspace tools are includ= ed in the package. If the base `zfs` package cannot compile because it's i= ncompatible with the default kernel, then the userspace tools are nonexiste= nt and there is no way to manage ZFS. * So, for example we can't just remove the "module" output and have the `= .ko` installed in the default "out" output, our core problem is we need to = compile a ZFS module ***and*** userspace tools. * We can try to split the compilation to separate the ZFS module from the= userspace tool, but that risks brittleness and subtle incompatibilities be= tween a ZFS module compiled for your local kernel (which cannot be the late= st and greatest kernel since the kernel does not maintain interface compati= bility with kernel modules and the ZFS module is always having to catch up)= , and ZFS userspace tool compiled for the default latest-and-greatest kerne= l (even if we somehow manage to compile ***just*** the userspace tools with= the latest kernel, there may be implicit assumptions about kernel constant= s and so on passed from the userspace tools to the kernel module, which may= cause problems and birttleness). So it's just safer to always override the `zfs` `#:linux` with the system k= ernel, and install it in `(packages ...)` and in `(kernel-loadable-modules = ...)`. * We get compileability as long as older kernel is used. * We ensure that the userspace tool is built for the same kernel module for= a compatible kernel, at all generations of the `guix system`. Thanks raid5atemyhomework > Why is this needed? KERNEL-LOADABLE-MODULES are already automatically > adapted in this way. > > See this in gnu/system.scm : > > (define* (operating-system-directory-base-entries os) > "Return the basic entries of the 'system' directory of OS for use as the > value of the SYSTEM-SERVICE-TYPE service." > (let* ((locale (operating-system-locale-directory os)) > (kernel (operating-system-kernel os)) > (hurd (operating-system-hurd os)) > (modules (operating-system-kernel-loadable-modules os)) > (kernel (if hurd > kernel > (profile > (content (packages->manifest > > (cons kernel > (map (lambda (module) > (if (package? module) > (package-for-kernel ker= nel <----- > mod= ule) > module)) > modules)))) > (hooks (list linux-module-database))))) > (initrd (and (not hurd) (operating-system-initrd-file os))) > (params (operating-system-boot-parameters-file os))) > `(("kernel" ,kernel) > ,@(if hurd `(("hurd" ,hurd)) '()) > ("parameters" ,params) > ,@(if initrd `(("initrd" ,initrd)) '()) > ("locale" ,locale)))) ;used by libc