Received: (at 71482) by debbugs.gnu.org; 5 Oct 2024 18:06:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 05 14:06:37 2024 Received: from localhost ([127.0.0.1]:39595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sx9Ap-00069j-F6 for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 14:06:37 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:26789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kaelyn.alexi@HIDDEN>) id 1sx9Al-00069Q-0Q for 71482 <at> debbugs.gnu.org; Sat, 05 Oct 2024 14:06:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1728151579; x=1728410779; bh=yOWiwSLWiURUJcTaJDtTvatb1MDp7Ztg7x5JksRIN+8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=OLwXezJf37EbMLx+n0yoFo+6zCBU1Ub1dx4iIK/PvN+8bEfYkdTGea1+13tqdVPbl Rge1q9xqhDip+tuWJk2Z0oanfWNzdpUcWVyf89k5waQNH07QGDend8Wis0xMGykgrA GNbtRzWEgbAG2mI4pph+gppfBpcIU6DM3gRff0QoV1Ju8DICm0vaM0jzl/+r8XH5Ks DY1dxwNLw08quKkAagMphbU+sBlTDvlQ5ETTm+myRs0PKmwwtIGBEqfB4vxtVXjLAJ KTtQAaBqMpYl4O6XQqTIgE47K2gVY3NreEKI7w7/2n7rgwFNDEa3JOfZ7AG/78/63m JnTc82CPMv6PA== Date: Sat, 05 Oct 2024 18:06:17 +0000 To: Zheng Junjie <zhengjunjie@HIDDEN> From: Kaelyn <kaelyn.alexi@HIDDEN> Subject: Re: [bug#71482] [PATCH v2] gnu: zfs: Split the kernel module out of the base package. Message-ID: <ac_G9z36Sp0y4VLUx_uyT4NdWWkcl9ywjoIYPwIG-EHxBbZ5CVTrIT4x3e08VoiIav_oHYt4kt208Di5oB3I3fHQXnbzv7oxkn9l78q8WTo=@protonmail.com> In-Reply-To: <87ploettgw.fsf@HIDDEN> References: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@HIDDEN> <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> <87ploettgw.fsf@HIDDEN> Feedback-ID: 34709329:user:proton X-Pm-Message-ID: 48b6615b44fdbf4f119bf25d37e49251659de47c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71482 Cc: 71482 <at> debbugs.gnu.org, Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, On Saturday, October 5th, 2024 at 4:17 PM, Zheng Junjie <zhengjunjie@iscas.= ac.cn> wrote: >=20 >=20 > Kaelyn Takata via Guix-patches via guix-patches@HIDDEN writes: >=20 > > Split the ZFS user-space tools and kernel modules into separate package= s, with > > a new make-zfs-for-kernel procedure for easily creating ZFS kernel modu= le > > packages for a specific kernel package. The generated kernel module pac= kage > > includes the kernel version for which it was built in the name of the p= ackage, > > such as "zfs-for-linux-libre-6.6.32-version". > >=20 > > & gnu/packages/file-systems.scm (zfs): Change to be the user-space tool= s. > > (make-zfs-for-kernel): New procedure which accepts a single 'kernel-pac= kage' > > argument. > >=20 > > Change-Id: Ib2d0e2b0f031d2ab3105d6b46ecd73bde1aa8564 > > --- > > gnu/packages/file-systems.scm | 126 ++++++++++++++++++++-------------- > > 1 file changed, 73 insertions(+), 53 deletions(-) > >=20 > > 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 raid5atemyhomework@protonm= ail.com > > ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r stefan@HIDDEN > > ;;; Copyright =C2=A9 2021 Noisytoot noisytoot@HIDDEN > > -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata kaelyn.alexi@protonmail.= com > > +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata kaelyn.alexi@proto= nmail.com > > ;;; Copyright =C2=A9 2022 Brian Cully bjc@HIDDEN > > ;;; Copyright =C2=A9 2023 Aaron Covrig aaron.covrig.us@HIDDEN > > ;;; Copyright =C2=A9 2024 Ahmad Draidi a.r.draidi@HIDDEN > > @@ -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" #$output > > + "/lib/dracut") > > + (string-append "--with-udevdir=3D" #$output > > + "/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 #$output 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:module) > > - "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) >=20 >=20 > Just to be clear, I don't know much about ZFS licensing issues. >=20 > i don't think need a procedure, just a package, If I understand the code > correctly, gnu/services.scm (linux-builder-service-type) will replace > #:linux to target-linux, and see > linux-builder-configuration->system-entry , package-for-kernel. Thanks for the pointer to some functionality I wasn't aware of! I'll have t= o look into it to see if it is sufficient for building the ZFS module for a= rbitrary kernel packages without also building the module for the default l= inux-libre kernel, and at the time it is needed. At least right now, I also= make use of the function for providing the right ZFS kernel module for inc= lusion into my initramfs images, so I worry that (linux-builder-service-typ= e)--based on its name-- ay fix up / provide the correct ZFS module too late= for uses like the initramfs or a ZFS root. Though to emphasize, I'm going = to look into those mechanisms to understand them better. ;) Cheers, Kaelyn >=20 > > + (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") > >=20 > > base-commit: b7c94d528875415ea7ec6225d88a6b3d55fa2e14
guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Oct 2024 18:06:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 05 14:06:39 2024 Received: from localhost ([127.0.0.1]:39597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sx9As-00069y-HN for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 14:06:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:57836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kaelyn.alexi@HIDDEN>) id 1sx9An-00069b-03 for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 14:06:36 -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 <kaelyn.alexi@HIDDEN>) id 1sx9Ah-0006Af-Dl for guix-patches@HIDDEN; Sat, 05 Oct 2024 14:06:27 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <kaelyn.alexi@HIDDEN>) id 1sx9Ae-00013c-U3 for guix-patches@HIDDEN; Sat, 05 Oct 2024 14:06:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1728151579; x=1728410779; bh=yOWiwSLWiURUJcTaJDtTvatb1MDp7Ztg7x5JksRIN+8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=OLwXezJf37EbMLx+n0yoFo+6zCBU1Ub1dx4iIK/PvN+8bEfYkdTGea1+13tqdVPbl Rge1q9xqhDip+tuWJk2Z0oanfWNzdpUcWVyf89k5waQNH07QGDend8Wis0xMGykgrA GNbtRzWEgbAG2mI4pph+gppfBpcIU6DM3gRff0QoV1Ju8DICm0vaM0jzl/+r8XH5Ks DY1dxwNLw08quKkAagMphbU+sBlTDvlQ5ETTm+myRs0PKmwwtIGBEqfB4vxtVXjLAJ KTtQAaBqMpYl4O6XQqTIgE47K2gVY3NreEKI7w7/2n7rgwFNDEa3JOfZ7AG/78/63m JnTc82CPMv6PA== Date: Sat, 05 Oct 2024 18:06:17 +0000 To: Zheng Junjie <zhengjunjie@HIDDEN> From: Kaelyn <kaelyn.alexi@HIDDEN> Subject: Re: [bug#71482] [PATCH v2] gnu: zfs: Split the kernel module out of the base package. Message-ID: <ac_G9z36Sp0y4VLUx_uyT4NdWWkcl9ywjoIYPwIG-EHxBbZ5CVTrIT4x3e08VoiIav_oHYt4kt208Di5oB3I3fHQXnbzv7oxkn9l78q8WTo=@protonmail.com> In-Reply-To: <87ploettgw.fsf@HIDDEN> References: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@HIDDEN> <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> <87ploettgw.fsf@HIDDEN> Feedback-ID: 34709329:user:proton X-Pm-Message-ID: 48b6615b44fdbf4f119bf25d37e49251659de47c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.16; envelope-from=kaelyn.alexi@HIDDEN; helo=mail-4316.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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 71482 <at> debbugs.gnu.org, Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Hi, On Saturday, October 5th, 2024 at 4:17 PM, Zheng Junjie <zhengjunjie@iscas.= ac.cn> wrote: >=20 >=20 > Kaelyn Takata via Guix-patches via guix-patches@HIDDEN writes: >=20 > > Split the ZFS user-space tools and kernel modules into separate package= s, with > > a new make-zfs-for-kernel procedure for easily creating ZFS kernel modu= le > > packages for a specific kernel package. The generated kernel module pac= kage > > includes the kernel version for which it was built in the name of the p= ackage, > > such as "zfs-for-linux-libre-6.6.32-version". > >=20 > > & gnu/packages/file-systems.scm (zfs): Change to be the user-space tool= s. > > (make-zfs-for-kernel): New procedure which accepts a single 'kernel-pac= kage' > > argument. > >=20 > > Change-Id: Ib2d0e2b0f031d2ab3105d6b46ecd73bde1aa8564 > > --- > > gnu/packages/file-systems.scm | 126 ++++++++++++++++++++-------------- > > 1 file changed, 73 insertions(+), 53 deletions(-) > >=20 > > 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 raid5atemyhomework@protonm= ail.com > > ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r stefan@HIDDEN > > ;;; Copyright =C2=A9 2021 Noisytoot noisytoot@HIDDEN > > -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata kaelyn.alexi@protonmail.= com > > +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata kaelyn.alexi@proto= nmail.com > > ;;; Copyright =C2=A9 2022 Brian Cully bjc@HIDDEN > > ;;; Copyright =C2=A9 2023 Aaron Covrig aaron.covrig.us@HIDDEN > > ;;; Copyright =C2=A9 2024 Ahmad Draidi a.r.draidi@HIDDEN > > @@ -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" #$output > > + "/lib/dracut") > > + (string-append "--with-udevdir=3D" #$output > > + "/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 #$output 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:module) > > - "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) >=20 >=20 > Just to be clear, I don't know much about ZFS licensing issues. >=20 > i don't think need a procedure, just a package, If I understand the code > correctly, gnu/services.scm (linux-builder-service-type) will replace > #:linux to target-linux, and see > linux-builder-configuration->system-entry , package-for-kernel. Thanks for the pointer to some functionality I wasn't aware of! I'll have t= o look into it to see if it is sufficient for building the ZFS module for a= rbitrary kernel packages without also building the module for the default l= inux-libre kernel, and at the time it is needed. At least right now, I also= make use of the function for providing the right ZFS kernel module for inc= lusion into my initramfs images, so I worry that (linux-builder-service-typ= e)--based on its name-- ay fix up / provide the correct ZFS module too late= for uses like the initramfs or a ZFS root. Though to emphasize, I'm going = to look into those mechanisms to understand them better. ;) Cheers, Kaelyn >=20 > > + (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") > >=20 > > base-commit: b7c94d528875415ea7ec6225d88a6b3d55fa2e14
guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.Received: (at 71482) by debbugs.gnu.org; 5 Oct 2024 16:18:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 05 12:18:05 2024 Received: from localhost ([127.0.0.1]:39478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sx7Tm-0000EZ-9A for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 12:18:05 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:40508 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zhengjunjie@HIDDEN>) id 1sx7Tg-0000E2-Qf for 71482 <at> debbugs.gnu.org; Sat, 05 Oct 2024 12:18:01 -0400 Received: from m (unknown [107.174.64.25]) by APP-01 (Coremail) with SMTP id qwCowACHb36eZgFnpRf1Aw--.24189S2; Sun, 06 Oct 2024 00:17:40 +0800 (CST) From: Zheng Junjie <zhengjunjie@HIDDEN> To: Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> Subject: Re: [bug#71482] [PATCH v2] gnu: zfs: Split the kernel module out of the base package. In-Reply-To: <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> (Kaelyn Takata via Guix-patches via's message of "Sun, 22 Sep 2024 19:52:02 +0000") References: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@HIDDEN> <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> Date: Sun, 06 Oct 2024 00:17:19 +0800 Message-ID: <87ploettgw.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: qwCowACHb36eZgFnpRf1Aw--.24189S2 X-Coremail-Antispam: 1UD129KBjvJXoW3AFWUZFyDGw1kCr48Zr43Jrb_yoW3Zr4UpF 129w4akr1vvw1kJw40qF4kuryYgas2kr1Y934DArnFkw4YyF1IvrW7KFZ3ZF17GwnrGay7 Jws8ta15WFyUWFDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvvb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWUJVW8JwA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_Jr0_Gr1lnx0Ee4C267I2x7xF54xIwI0E7I0Y6sxI4wAS0I0E0xvY zxvE52x082IY62kv0487M2AExVA0xI801c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2 z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73Uj IFyTuYvjxU6cdbDUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71482 Cc: Kaelyn Takata <kaelyn.alexi@HIDDEN>, 71482 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> writes: > Split the ZFS user-space tools and kernel modules into separate packages,= with > a new make-zfs-for-kernel procedure for easily creating ZFS kernel module > packages for a specific kernel package. The generated kernel module packa= ge > includes the kernel version for which it was built in the name of the pac= kage, > 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-packa= ge' > 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 <raid5atemyhomework@protonm= ail.com> > ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r <stefan@HIDDEN> > ;;; Copyright =C2=A9 2021 Noisytoot <noisytoot@HIDDEN> > -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata <kaelyn.alexi@HIDDEN= om> > +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata <kaelyn.alexi@proton= mail.com> > ;;; Copyright =C2=A9 2022 Brian Cully <bjc@HIDDEN> > ;;; Copyright =C2=A9 2023 Aaron Covrig <aaron.covrig.us@HIDDEN> > ;;; Copyright =C2=A9 2024 Ahmad Draidi <a.r.draidi@HIDDEN> > @@ -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" #$o= utput > + "/lib/dracut") > + (string-append "--with-udevdir=3D" #$out= put > + "/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 #$out= put 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:mo= dule) > - "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=20 > +(define-public (make-zfs-for-kernel kernel-package) Just to be clear, I don't know much about ZFS licensing issues. i don't think need a procedure, just a package, If I understand the code correctly, gnu/services.scm (linux-builder-service-type) will replace #:linux to target-linux, and see linux-builder-configuration->system-entry , package-for-kernel. > + (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-cou= nt))) > + '()) > + ,@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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmcBZo8ACgkQO1qpk+Gi 3/C9/w//XWm+CskKVS183urjH6pPteLfJjfgPfuT+KSPt3SyiCv/LWMSbDZqodgZ cPl/ZdYhBtucxA14kzVqRxdlcjBPA3ELvGWM07zbj+Ls7JwOwx/Mp0zAcuINOKnp kxks5Wlzt0lGMf2P36/MECyVxSE0EjDE3SBVNvkPsb3nizYDThZCjxja1yFvq15r jxWjFfRbUI9HaXCZqrSt78k1wR7YpAJcW1li4hpaqQPpP80tkckiQ0ExWC4cfLNt FJ7VebstMOd/uRcQ60t+Nwu7cGIgajAQS+xcNryaLxgM4WlsT0Y++QvYNnrXkIYa XsEWfg0H7tck94K3q7OXTUHtXdWygxzU/mBZc4VjJYlFBN4jsVrNDz1D3PcdB6mM 58rJXF31S4APIVw4Pn52cGh2VUqhfDpBpLFKO+xHtJOpd/w61D1JUqy6F2vAJkx0 maE1Ix3ihFekLr9HQHRvyBZVq0EmLTVYr/wBSkyJgr0OoUGR2cvYBgOtDe9tFyJv haWzmUdgZs9LD34XSK431kSI0UyIWmZo4dekBxZgpc/++3wQw5iNbeYn+5yrbBcH 13CTIufBV4mCwLqpeLXtOJJvb/VQhWxD8IgBHbak+orsE2UevwUvsO2tvZHRZ1/Z Ny1JlMK127A1PvHEKeLBoRmRkmlHnJ2JMUVD6VfaVw+mWW2V9B4= =yHWg -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Oct 2024 16:18:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 05 12:18:10 2024 Received: from localhost ([127.0.0.1]:39480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sx7Tq-0000F5-UV for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 12:18:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:42726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zhengjunjie@HIDDEN>) id 1sx7Tl-0000EL-Fk for submit <at> debbugs.gnu.org; Sat, 05 Oct 2024 12:18:05 -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 <zhengjunjie@HIDDEN>) id 1sx7Tg-0003Nw-DH for guix-patches@HIDDEN; Sat, 05 Oct 2024 12:17:56 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from <zhengjunjie@HIDDEN>) id 1sx7Tc-0004Ql-Uo for guix-patches@HIDDEN; Sat, 05 Oct 2024 12:17:55 -0400 Received: from m (unknown [107.174.64.25]) by APP-01 (Coremail) with SMTP id qwCowACHb36eZgFnpRf1Aw--.24189S2; Sun, 06 Oct 2024 00:17:40 +0800 (CST) From: Zheng Junjie <zhengjunjie@HIDDEN> To: Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> Subject: Re: [bug#71482] [PATCH v2] gnu: zfs: Split the kernel module out of the base package. In-Reply-To: <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> (Kaelyn Takata via Guix-patches via's message of "Sun, 22 Sep 2024 19:52:02 +0000") References: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@HIDDEN> <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> Date: Sun, 06 Oct 2024 00:17:19 +0800 Message-ID: <87ploettgw.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: qwCowACHb36eZgFnpRf1Aw--.24189S2 X-Coremail-Antispam: 1UD129KBjvJXoW3AFWUZFyDGw1kCr48Zr43Jrb_yoW3Zr4UpF 129w4akr1vvw1kJw40qF4kuryYgas2kr1Y934DArnFkw4YyF1IvrW7KFZ3ZF17GwnrGay7 Jws8ta15WFyUWFDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvvb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWUJVW8JwA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_Jr0_Gr1lnx0Ee4C267I2x7xF54xIwI0E7I0Y6sxI4wAS0I0E0xvY zxvE52x082IY62kv0487M2AExVA0xI801c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2 z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73Uj IFyTuYvjxU6cdbDUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.21; envelope-from=zhengjunjie@HIDDEN; helo=cstnet.cn X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Kaelyn Takata <kaelyn.alexi@HIDDEN>, 71482 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Kaelyn Takata via Guix-patches via <guix-patches@HIDDEN> writes: > Split the ZFS user-space tools and kernel modules into separate packages,= with > a new make-zfs-for-kernel procedure for easily creating ZFS kernel module > packages for a specific kernel package. The generated kernel module packa= ge > includes the kernel version for which it was built in the name of the pac= kage, > 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-packa= ge' > 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 <raid5atemyhomework@protonm= ail.com> > ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r <stefan@HIDDEN> > ;;; Copyright =C2=A9 2021 Noisytoot <noisytoot@HIDDEN> > -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata <kaelyn.alexi@HIDDEN= om> > +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata <kaelyn.alexi@proton= mail.com> > ;;; Copyright =C2=A9 2022 Brian Cully <bjc@HIDDEN> > ;;; Copyright =C2=A9 2023 Aaron Covrig <aaron.covrig.us@HIDDEN> > ;;; Copyright =C2=A9 2024 Ahmad Draidi <a.r.draidi@HIDDEN> > @@ -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" #$o= utput > + "/lib/dracut") > + (string-append "--with-udevdir=3D" #$out= put > + "/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 #$out= put 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:mo= dule) > - "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=20 > +(define-public (make-zfs-for-kernel kernel-package) Just to be clear, I don't know much about ZFS licensing issues. i don't think need a procedure, just a package, If I understand the code correctly, gnu/services.scm (linux-builder-service-type) will replace #:linux to target-linux, and see linux-builder-configuration->system-entry , package-for-kernel. > + (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-cou= nt))) > + '()) > + ,@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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmcBZo8ACgkQO1qpk+Gi 3/C9/w//XWm+CskKVS183urjH6pPteLfJjfgPfuT+KSPt3SyiCv/LWMSbDZqodgZ cPl/ZdYhBtucxA14kzVqRxdlcjBPA3ELvGWM07zbj+Ls7JwOwx/Mp0zAcuINOKnp kxks5Wlzt0lGMf2P36/MECyVxSE0EjDE3SBVNvkPsb3nizYDThZCjxja1yFvq15r jxWjFfRbUI9HaXCZqrSt78k1wR7YpAJcW1li4hpaqQPpP80tkckiQ0ExWC4cfLNt FJ7VebstMOd/uRcQ60t+Nwu7cGIgajAQS+xcNryaLxgM4WlsT0Y++QvYNnrXkIYa XsEWfg0H7tck94K3q7OXTUHtXdWygxzU/mBZc4VjJYlFBN4jsVrNDz1D3PcdB6mM 58rJXF31S4APIVw4Pn52cGh2VUqhfDpBpLFKO+xHtJOpd/w61D1JUqy6F2vAJkx0 maE1Ix3ihFekLr9HQHRvyBZVq0EmLTVYr/wBSkyJgr0OoUGR2cvYBgOtDe9tFyJv haWzmUdgZs9LD34XSK431kSI0UyIWmZo4dekBxZgpc/++3wQw5iNbeYn+5yrbBcH 13CTIufBV4mCwLqpeLXtOJJvb/VQhWxD8IgBHbak+orsE2UevwUvsO2tvZHRZ1/Z Ny1JlMK127A1PvHEKeLBoRmRkmlHnJ2JMUVD6VfaVw+mWW2V9B4= =yHWg -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.Received: (at 71482) by debbugs.gnu.org; 22 Sep 2024 19:52:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 22 15:52:42 2024 Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ssSdN-0006sb-GL for submit <at> 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 <kaelyn.alexi@HIDDEN>) id 1ssSdI-0006sB-3a for 71482 <at> 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 To: 71482 <at> debbugs.gnu.org From: Kaelyn Takata <kaelyn.alexi@HIDDEN> Subject: [PATCH v2] gnu: zfs: Split the kernel module out of the base package. Message-ID: <bce99c396e12032bc9c5d241483c224d30e3c387.1727034635.git.kaelyn.alexi@HIDDEN> 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-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71482 Cc: Kaelyn Takata <kaelyn.alexi@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) 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 <raid5atemyhomework@protonmai= l.com> ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r <stefan@HIDDEN> ;;; Copyright =C2=A9 2021 Noisytoot <noisytoot@HIDDEN> -;;; Copyright =C2=A9 2021, 2023 Kaelyn Takata <kaelyn.alexi@HIDDEN= > +;;; Copyright =C2=A9 2021, 2023, 2024 Kaelyn Takata <kaelyn.alexi@protonma= il.com> ;;; Copyright =C2=A9 2022 Brian Cully <bjc@HIDDEN> ;;; Copyright =C2=A9 2023 Aaron Covrig <aaron.covrig.us@HIDDEN> ;;; Copyright =C2=A9 2024 Ahmad Draidi <a.r.draidi@HIDDEN> @@ -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
guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 10 Jun 2024 17:10:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 10 13:10:31 2024 Received: from localhost ([127.0.0.1]:47350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sGiXO-0006cE-7t for submit <at> debbugs.gnu.org; Mon, 10 Jun 2024 13:10:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:33972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kaelyn.alexi@HIDDEN>) id 1sGiOt-00069Y-EF for submit <at> debbugs.gnu.org; Mon, 10 Jun 2024 13:01:45 -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 <kaelyn.alexi@HIDDEN>) id 1sGi9O-0007qt-0C for guix-patches@HIDDEN; Mon, 10 Jun 2024 12:45:47 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <kaelyn.alexi@HIDDEN>) id 1sGi9J-0002so-Bj for guix-patches@HIDDEN; Mon, 10 Jun 2024 12:45:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718037930; x=1718297130; bh=y+4dO3hV+HZTdKPFyr/1I1UtrBwTxjjRylJYYmnqlp8=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=W3JzGpq4HM0OW9n3ag9shYTrm+20grKxL3WbMwcf4zzz2DEWwkOShrXwIXRydPP6U jfJZ3k+t3E51SWMToDUS+rUoccy79N/QYBrfRh6AhffSMIzvRJ5otNKNF/LMS4d931 ylnbv9rEt3QQLGtXINbkdvmCZkAZuYtcp9KwGkTd+GfDTF43A0/+48LWOd8ihby2Pp D2cbKsZFXt7aImiv9xrEoFfU8k5CQhVMwtOXzGC9aQ6UOortZykBZ3NKqmfbIr2kMG CB7l8JYzNgF/LMMdXli1FJDnkK2q0sPAfVtQ67Hj8RSdw6XtwCu7QvlVmMbQvC1P/J ibeKMWCGwUX6A== Date: Mon, 10 Jun 2024 16:45:26 +0000 To: guix-patches@HIDDEN From: Kaelyn Takata <kaelyn.alexi@HIDDEN> Subject: [PATCH] gnu: zfs: Split the kernel module out of the base package. Message-ID: <8681cce4ff0cb548ff8bd527a77a5206c6d63e24.1718037851.git.kaelyn.alexi@HIDDEN> Feedback-ID: 34709329:user:proton X-Pm-Message-ID: 488a38d69a0dae78015d2e60b18ceacad3b5b2f8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.22; envelope-from=kaelyn.alexi@HIDDEN; helo=mail-4322.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit Cc: Kaelyn Takata <kaelyn.alexi@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) 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 | 124 ++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 52 deletions(-) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index fa7da35898..78121c1ec2 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -1444,7 +1444,6 @@ (define-public zfs (package (name "zfs") (version "2.2.4") - (outputs '("out" "module" "src")) (source (origin (method url-fetch) @@ -1453,33 +1452,19 @@ (define-public zfs "/zfs-" version ".tar.gz")) (sha256 (base32 "1h0yqchirzsn2gll1w2gclb13hr8511z67lf85cigm43frgr144p")= ))) - (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. @@ -1511,14 +1496,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"))) @@ -1548,31 +1525,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 @@ -1592,6 +1560,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: df5648daa1a5d097a430131bbff353b865b476b6 --=20 2.45.1
Kaelyn Takata <kaelyn.alexi@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#71482
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.