From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QLO9DaR18GYxXgAA62LTzQ:P1 (envelope-from ) for ; Sun, 22 Sep 2024 19:53:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QLO9DaR18GYxXgAA62LTzQ (envelope-from ) for ; Sun, 22 Sep 2024 21:53:08 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nOY1i78x; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=io7p4ZwD; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727034788; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=C+BdiNdX1t9NygovyzDDxBz6mu5+ZXtPDbBAhfFWQM0=; b=abBw+Ano8MURVgvH8sz0n02wr5/kORvbgJ/MjH+mxjaMzmwO1YiKIvf+az3MKfol3iNb+f LzmSJr7aYNJlj6w2NSjjMLANn2eLtVVD22EkemjnLIT55Cm3xdVZ+VDXnbMu6iMG/hSsFI Il8UUED244UltMdHXbK90gmgW6fQ0a7/+OpPPQlj/iH01aejppQJCjfeNvHJpcG9+s9PCx vxcKd56iPiXmx1oWurf5Czv9UDppFU+QF+DRLCyObsarflOWgAdpiPIyuEirbjuISgyamz oWdNsJkzsp6cqxJ8mT5TjUOhuOgPBxEpGMlWTqJSMiSBgD93O8ObxUDYmZ9SmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727034788; a=rsa-sha256; cv=none; b=lJuhit5JqeRirMWx0R3hN/M+P2d98wpbB3pUouo/R/nC0zp9HTmogQZlVrmnEQH266rEC/ QrR/XUz8IpjPE8l/6PVQS2Bz/ltfhe0K6aGsBbAkZ/Yd61hBpQwmZ4YJT3+vpOfo52Jyox q6HGXQVuJSOS6cxVvSSz0DdqlvUs0eW/1JlGII9GWVwOloVYWjCI1hrwrqrLqo0ZQH3Hhr ttfDyxmsADf4WPU2H/RT1SS/BSKPKvAiDMVqeWgsbR+zA6hCkeYtTqcLv6wkUznIVE4Pii LkRE6bPWDrRSRthblHdUUCuA6lNi6kjka+e2oCKLKYfGDJ8edGQjrnuy36eekA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nOY1i78x; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=io7p4ZwD; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" 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 90F656AA11 for ; Sun, 22 Sep 2024 21:53:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssSdP-0004xQ-Rs; Sun, 22 Sep 2024 15:52:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssSdO-0004t4-E0 for guix-patches@gnu.org; Sun, 22 Sep 2024 15:52:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssSdO-0002dX-4O for guix-patches@gnu.org; Sun, 22 Sep 2024 15:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:In-Reply-To:References:Subject; bh=C+BdiNdX1t9NygovyzDDxBz6mu5+ZXtPDbBAhfFWQM0=; b=nOY1i78xogiVT4kTPAOOWY1VQQSgxpMpWMV7TogU4ifMsmhIsrDwwzlfebiHDfiUOPRDvuUOk5h28X+vsalUTbpkl7AxwuJzOwIBrsVCiy0aDw716W/b4eedRPI9qjW+rWyj29jP9K36kXSywX6q7O4Z2sfOSBnhzg1h9Th1eBMaE/cDpq9pw6bDVxSdVPZlVbX/V6IpoMc9tf6UufU2DAMBPev1F1ZFPddZSDdl+T8ITBOtv8HNkeVbozP45QydS6BSris92RTjAlWWvKQh+Db2VNBVcvEFIwau/UN8O5pi2Q7xC4Tco5f3BiBJgFJ+flZ+RnPaMb8Xmb9PQG0U5w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ssSdi-0006tQ-1H for guix-patches@gnu.org; Sun, 22 Sep 2024 15:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71482] [PATCH v2] gnu: zfs: Split the kernel module out of the base package. References: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@protonmail.com> In-Reply-To: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@protonmail.com> Resent-From: Kaelyn Takata Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 22 Sep 2024 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71482 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71482@debbugs.gnu.org Cc: Kaelyn Takata Received: via spool by 71482-submit@debbugs.gnu.org id=B71482.172703476226457 (code B ref 71482); Sun, 22 Sep 2024 19:53:01 +0000 Received: (at 71482) by debbugs.gnu.org; 22 Sep 2024 19:52:42 +0000 Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssSdN-0006sb-GL for submit@debbugs.gnu.org; Sun, 22 Sep 2024 15:52:42 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:31109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssSdI-0006sB-3a for 71482@debbugs.gnu.org; Sun, 22 Sep 2024 15:52:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1727034726; x=1727293926; bh=C+BdiNdX1t9NygovyzDDxBz6mu5+ZXtPDbBAhfFWQM0=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=io7p4ZwDVZCsXDSNM2lQchfCNFCd6mA8HpGmJSHXI+GfcnQXhgDcSye5C2rQk33G5 lD0sgd6Qw+geV3uUH4W2BJVCD8r72TYGJuBMRabySbjfCMZZfRs8nqRNOkcl6YJQsq vb9cmmOzRc2lE7C5/bQxgyHgQhQDBWf0QmcWlOnQwmpw35BlLckBn9q9G22Ww2JAwH Rv8ZnEBTAd2eqrWNrDXxiuOEciTVUyl6yklDrvgf2vLegUBlNR7XBp58aFUHWqrTgK NGUrX74VxYNyEineOBPHyIJYYY9Yz/et2vn0r+7sZskf7e0MFqGYvbFKOQmiKb0D/A srnLkYabcgtfw== Date: Sun, 22 Sep 2024 19:52:02 +0000 Message-ID: Feedback-ID: 34709329:user:proton X-Pm-Message-ID: f45563588ef5a2173f7f4f0c5352727466a56d3e MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Reply-to: Kaelyn Takata X-ACL-Warn: , Kaelyn Takata via Guix-patches From: Kaelyn Takata via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.91 X-Spam-Score: -4.91 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Queue-Id: 90F656AA11 X-TUID: +4lZep/Aggyt Split the ZFS user-space tools and kernel modules into separate packages, w= ith a new make-zfs-for-kernel procedure for easily creating ZFS kernel module packages for a specific kernel package. The generated kernel module package includes the kernel version for which it was built in the name of the packa= ge, such as "zfs-for-linux-libre-6.6.32-version". & gnu/packages/file-systems.scm (zfs): Change to be the user-space tools. (make-zfs-for-kernel): New procedure which accepts a single 'kernel-package= ' argument. Change-Id: Ib2d0e2b0f031d2ab3105d6b46ecd73bde1aa8564 --- gnu/packages/file-systems.scm | 126 ++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 53 deletions(-) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 059bdf67a9..ceaaf7f3ab 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -9,7 +9,7 @@ ;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r ;;; Copyright =C2=A9 2021 Noisytoot -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata ;;; Copyright =C2=A9 2022 Brian Cully ;;; Copyright =C2=A9 2023 Aaron Covrig ;;; Copyright =C2=A9 2024 Ahmad Draidi @@ -1564,7 +1564,6 @@ (define-public zfs (package (name "zfs") (version "2.2.6") - (outputs '("out" "module" "src")) (source (origin (method url-fetch) @@ -1573,33 +1572,19 @@ (define-public zfs "/zfs-" version ".tar.gz")) (sha256 (base32 "19x2a8k25i3y6nr7nx5aaqrpnp55vjmrw86p06zpgpf578804bn9")= ))) - (build-system linux-module-build-system) + (build-system gnu-build-system) (arguments (list - ;; The ZFS kernel module should not be downloaded since the license - ;; terms don't allow for distributing it, only building it locally. - #:substitutable? #f - ;; Tests cannot run in an unprivileged build environment. - #:tests? #f + #:configure-flags #~(list "--with-config=3Duser" + (string-append "--prefix=3D" #$output) + (string-append "--with-dracutdir=3D" #$out= put + "/lib/dracut") + (string-append "--with-udevdir=3D" #$outpu= t + "/lib/udev") + (string-append "--with-mounthelperdir=3D" = #$output + "/sbin")) #:phases #~(modify-phases %standard-phases - (add-after 'configure 'really-configure - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "configure" - (("-/bin/sh") (string-append "-" (which "sh")))) - (invoke "./configure" - "--with-config=3Dall" - (string-append "--prefix=3D" #$output) - (string-append "--with-dracutdir=3D" #$output - "/lib/dracut") - (string-append "--with-udevdir=3D" #$output - "/lib/udev") - (string-append "--with-mounthelperdir=3D" #$output - "/sbin") - (string-append "--with-linux=3D" - (search-input-directory - inputs - "lib/modules/build"))))) (add-after 'unpack 'patch-source (lambda* (#:key inputs #:allow-other-keys) ;; New feature "compatibility=3D" in 2.1.0. @@ -1631,14 +1616,6 @@ (define-public zfs ;; Just use 'modprobe' in message to user, since Guix ;; does not have a traditional /sbin/ (("'/sbin/modprobe ") "'modprobe ")) - (substitute* "configure" - (("/etc/default") - (string-append #$output "/etc/default")) - (("/etc/bash_completion.d") - (string-append #$output "/etc/bash_completion.d"))) - (substitute* "Makefile.in" - (("/usr/share/initramfs-tools") - (string-append #$output "/usr/share/initramfs-tools"))) (substitute* "contrib/initramfs/Makefile.am" (("/usr/share/initramfs-tools") (string-append #$output "/usr/share/initramfs-tools"))) @@ -1668,31 +1645,22 @@ (define-public zfs (dirname (which "sed")) ":" (dirname (which "gawk"))))) (substitute* '("Makefile.am" "Makefile.in") - (("\\$\\(prefix)/src") (string-append #$output:src "/src")= )) + (("@initconfdir@") (string-append #$output "/etc/default")= ) + (("/usr/share/initramfs-tools" dir) (string-append #$outpu= t dir))) (substitute* (find-files "udev/rules.d/" ".rules.in$") (("/sbin/modprobe") (search-input-file inputs "/bin/modprobe"))))) - (replace 'build - (lambda _ (invoke "make"))) (replace 'install - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod"))) - (invoke "make" "install" - (string-append "DEFAULT_INITCONF_DIR=3D" - #$output "/etc/default") - (string-append "DEPMOD=3D" - (search-input-file - (or native-inputs inputs) - "/bin/depmod")) - (string-append "INSTALL_PATH=3D" #$output) - (string-append "INSTALL_MOD_PATH=3D" #$output:modu= le) - "INSTALL_MOD_STRIP=3D1") - (install-file - "contrib/bash_completion.d/zfs" - (string-append #$output - "/share/bash-completion/completions"))))))= )) + (lambda _ + (invoke "make" "install" + (string-append "DEFAULT_INITCONF_DIR=3D" + #$output "/etc/default") + (string-append "INSTALL_PATH=3D" #$output) + (string-append "bashcompletiondir=3D" + #$output + "/share/bash-completion/completions")= )))))) (native-inputs - (list attr kmod pkg-config)) + (list attr kmod pkg-config python)) (inputs (list eudev kmod libaio @@ -1712,6 +1680,58 @@ (define-public zfs community.") (license license:cddl1.0))) =20 +(define-public (make-zfs-for-kernel kernel-package) + (package + (inherit zfs) + (name (string-join (list (package-name zfs) + "for" + (package-name kernel-package) + (package-version kernel-package) + "version") + "-")) + (build-system linux-module-build-system) + (arguments + (substitute-keyword-arguments + (strip-keyword-arguments '(#:configure-flags) + (package-arguments zfs)) + ((#:linux _ #f) kernel-package) + ((#:substitutable? _ #t) #f) + ((#:phases phases) + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-source + (assoc-ref #$phases 'patch-source)) + (add-after 'configure 'really-configure + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "configure" + (("-/bin/sh") (string-append "-" (which "sh")))) + (invoke "./configure" + "--with-config=3Dkernel" + (string-append "--prefix=3D" #$output) + (string-append "--with-udevdir=3D" #$output + "/lib/udev") + (string-append "--with-linux=3D" + (search-input-directory + inputs + "lib/modules/build"))))) + (replace 'build + (lambda* (#:key (make-flags '()) (parallel-build? #t) + #:allow-other-keys) + (apply invoke "make" + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count= ))) + '()) + ,@make-flags)))) + (replace 'install + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let* ((kmod (assoc-ref (or native-inputs inputs) "kmod"))= ) + (invoke "make" "-C" "module" "install" + (string-append "DEPMOD=3D" + (search-input-file + (or native-inputs inputs) + "/bin/depmod")) + (string-append "INSTALL_MOD_PATH=3D" #$output) + "INSTALL_MOD_STRIP=3D1")))))))))) + (define-public zfs-auto-snapshot (package (name "zfs-auto-snapshot") base-commit: b7c94d528875415ea7ec6225d88a6b3d55fa2e14 --=20 2.46.0