GNU bug report logs - #45692
[PATCH 0/4] Even Better ZFS Support on Guix

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: raid5atemyhomework <raid5atemyhomework@HIDDEN>; Keywords: patch; merged with #45643, #45703; dated Wed, 6 Jan 2021 15:53:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 21 Sep 2021 09:48:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 21 05:48:19 2021
Received: from localhost ([127.0.0.1]:44973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mScNu-0002wY-Vf
	for submit <at> debbugs.gnu.org; Tue, 21 Sep 2021 05:48:19 -0400
Received: from mail-wr1-f41.google.com ([209.85.221.41]:41706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1mScNt-0002wI-KK
 for 45692 <at> debbugs.gnu.org; Tue, 21 Sep 2021 05:48:17 -0400
Received: by mail-wr1-f41.google.com with SMTP id w29so37295125wra.8
 for <45692 <at> debbugs.gnu.org>; Tue, 21 Sep 2021 02:48:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=gHfAP+oINr4nAdM/796LieILRgBrNWRY39snHO10bI8=;
 b=kl+zFegZHlL5Xsk3NRCeipIvomrmpMpaaL+FEiMIMIVRV1HebSSbZ0etteMq3hoTrP
 5IH9I+n8d0jCoD9KU2ACiBdEIo43H73tyK+Q+YCQn0xarJn4lgDgtc4+ybaxGp2QLRS6
 DN0AsSxeUXwRDoJ73U9QmGSWJ1gOh4rgMYJn0UNbkRPiyQENuKTnJJwQ0TsUtQ/ZUpjO
 ISPaPqNOyGcoEV7ENQdRxqOegiJ+VTDPyLFAHymJO11AtOqrmwh9BtczCjxirqPJlHpn
 jOJwkVjd5IgZmhMgfvoaciwatOP5WX6knofSaIfT730nefJuSI5nNQxfK3YnkXSvPtW5
 y/SA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=gHfAP+oINr4nAdM/796LieILRgBrNWRY39snHO10bI8=;
 b=b8NXmivti3g+5yVvcaOYenW3btEvHjIUHAa+x6OD/AiwbLJV/q1G+ViECHZFwrIr2u
 SFr6qf9+G4BrgQS3tP5bCg4Va6ENZlZKxeJswr6dn+SdYJMbGg8fFljyqxE5vr9oi+5v
 9o13NdHks86QdXQbFSjs3VDdh2LqIkDGVC80vQCpzZHqTr+k4FnRarZ3dNF4ZRnZVt3W
 X/1Dm0UAsDj4tXxyKVWePe5YFQecol95WRXipycjZ72aAa+gfx+fquFKP390nIE2QE8X
 Gya4VIp3fatsUorgbQME67ppUdRBxJG70XlBlJ1n2KK4L4YdihqOM5qBQFrVHDP5+PN7
 2N0w==
X-Gm-Message-State: AOAM531ST+dB6z09723Rufrasr9DyQjqH1tYNoEAc8qqIaqI6Evsnmgf
 KPZZtf3EyF1jeOK3EzGPVij45VC4FriS1A==
X-Google-Smtp-Source: ABdhPJyeu405Ty3qxggewB+X/vpY68U8Q7fVw4SVn9NecNjxr3BOYYWNvQpzqBPv25MqkV2TGAuvtg==
X-Received: by 2002:adf:eec3:: with SMTP id a3mr33832815wrp.276.1632217691570; 
 Tue, 21 Sep 2021 02:48:11 -0700 (PDT)
Received: from lili ([88.126.110.68])
 by smtp.gmail.com with ESMTPSA id h15sm18210795wrc.19.2021.09.21.02.48.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 21 Sep 2021 02:48:11 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
 <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
 <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@HIDDEN>
 <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com>
 <rmMF4W9-i83r1QlsxtUWrmdYs6NCCNISRWGv148VJKP9RXrBF5KpBHSYBv5lNi20PMlHbz-TGom3M_m_M_qLTTvwiXxy-zX-sVXcjJoYudM=@protonmail.com>
Date: Tue, 21 Sep 2021 11:42:09 +0200
In-Reply-To: <rmMF4W9-i83r1QlsxtUWrmdYs6NCCNISRWGv148VJKP9RXrBF5KpBHSYBv5lNi20PMlHbz-TGom3M_m_M_qLTTvwiXxy-zX-sVXcjJoYudM=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Wed, 15 Sep 2021
 14:04:33 +0000")
Message-ID: <865yuub6z2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: Maxime Devos <maximedevos@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.0 (-)

Hi,

On Wed, 15 Sep 2021 at 14:04, raid5atemyhomework <raid5atemyhomework@HIDDEN> wrote:

>> Okay. I'm busy right now, so will get around to updating the patch next week.
>
> Scratch that, I'm busy this week as well, maybe next next week.

Hope that you will find the time next next week. :-)

Just a comment to ease the application of patch.  Once rebased on
origin/master, you should create the patch set using:

  git format-patch --base=origin/master

because then it ends with this, for instance,

--8<---------------cut here---------------start------------->8---
base-commit: d14221bf65cfbe7f8f5b7cac44132087cab70bf5
-- 
2.28.0
--8<---------------cut here---------------end--------------->8---

which provide the commit where the patch applies and thus ease work at
review time, IMHO.  See details [1].

Cheers,
simon


1: <http://issues.guix.gnu.org/issue/43946>




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 15 Sep 2021 14:04:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 10:04:54 2021
Received: from localhost ([127.0.0.1]:52794 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQVWw-0005XN-M7
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 10:04:54 -0400
Received: from mail-40132.protonmail.ch ([185.70.40.132]:25708)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mQVWt-0005X3-Nr
 for 45692 <at> debbugs.gnu.org; Wed, 15 Sep 2021 10:04:52 -0400
Date: Wed, 15 Sep 2021 14:04:33 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1631714685;
 bh=QMD0voH1/LSk5bWev8c/2QyZaDiyvWChIpAh4rRMFqU=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=VvgBOdD+FI4d5LVIYizDL7xZ5QahOB0Ha3IeqwP6mG4efXhAbJWbz5NEKbHYNl5iy
 5+bnB0jkPIaXvU25g51e/8Huj54K1D8Lprz3MZkv0+A/RL9O/dNn1974IWtGFEA3Tv
 Sa5wJlL0HNqT2KAKF/5y6tUEt+tFRNXD4UQhcjTw=
To: Maxime Devos <maximedevos@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <rmMF4W9-i83r1QlsxtUWrmdYs6NCCNISRWGv148VJKP9RXrBF5KpBHSYBv5lNi20PMlHbz-TGom3M_m_M_qLTTvwiXxy-zX-sVXcjJoYudM=@protonmail.com>
In-Reply-To: <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
 <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
 <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@HIDDEN>
 <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>,
 zimoun <zimon.toutoune@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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

hello,

>
> > Hi,
> > To be clear, I don't oppose the inclusion of the ZFS service
> > on basis of the licensing anymore.
>
> Okay. I'm busy right now, so will get around to updating the patch next w=
eek.

Scratch that, I'm busy this week as well, maybe next next week.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 8 Sep 2021 01:23:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 07 21:23:30 2021
Received: from localhost ([127.0.0.1]:58082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNmJG-0001zv-G5
	for submit <at> debbugs.gnu.org; Tue, 07 Sep 2021 21:23:30 -0400
Received: from mail-40141.protonmail.ch ([185.70.40.141]:48596)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mNmJE-0001zi-Ag
 for 45692 <at> debbugs.gnu.org; Tue, 07 Sep 2021 21:23:29 -0400
Date: Wed, 08 Sep 2021 01:23:15 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1631064202;
 bh=pZnsy+Jaqce/oQwm9mZCJmbJoXakH7tRswnhpuyvrAI=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=IgR11+hAnh1mP+6n0SGTovdQkVdD8mhZCWQA5/7j6mwdAIVCz+x57679rV+EvrWWr
 5p0ajp7CmEv90WEZjM/u7ycNOHCBH04FmTo4yNL0nvmcPeiZPqxXxZZeFIr2kpuR6V
 Bpu7S0wDYQAem3RaiIdXCNn3RQ3/gKRLMVBgg9ww=
To: Maxime Devos <maximedevos@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com>
In-Reply-To: <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
 <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
 <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>,
 zimoun <zimon.toutoune@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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Good morning Maxime,

> Hi,
>
> To be clear, I don't oppose the inclusion of the ZFS service
> on basis of the licensing anymore.

Okay.  I'm busy right now, so will get around to updating the patch next we=
ek.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 7 Sep 2021 09:54:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 07 05:54:42 2021
Received: from localhost ([127.0.0.1]:55444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNXoQ-0003wP-BQ
	for submit <at> debbugs.gnu.org; Tue, 07 Sep 2021 05:54:42 -0400
Received: from albert.telenet-ops.be ([195.130.137.90]:58760)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mNXoO-0003wF-H3
 for 45692 <at> debbugs.gnu.org; Tue, 07 Sep 2021 05:54:41 -0400
Received: from butterfly.local ([188.188.3.227])
 by albert.telenet-ops.be with bizsmtp
 id qxue250054tskic06xuedh; Tue, 07 Sep 2021 11:54:39 +0200
Message-ID: <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
From: Maxime Devos <maximedevos@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 07 Sep 2021 11:54:37 +0200
In-Reply-To: <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
 <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-1qF204nGQGxFxBKrU/dF"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1631008479; bh=dWSZ0jl6eQYcLwAgvoC0fZ8SUNAmHgaOC8Kr2dwkIdM=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=G5npzbgsjgcORtggGpkB10/iL/orcd2KFfYD0sxi9GS4pyUNfk1gBn+sumNzZqRCU
 iios4stdcWiDroJK4poOikDvKuJyLowbz8w+ASgnsde2v1mcD+RzsfIL3u5faWxs5H
 N1Q1vhEgBWs5V+If/Ms+t9W9MExL6c1rrEyisPJq/bmaEeVPgYalcsCAtePMEsRxlQ
 SfKsPkzJAgVK3ctxUS9BWj9tvUGvrFEKVCSYKMszl49l7Da+UuxAz1dsPTdqpbkBpi
 YfTTEySptzZQCNyDaBdW3jnKf5gcgYE2ZVOZ+eA1eLmgtq9SUXmY8FCCiSD/m6CD4H
 bk9SmRzxO7svA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)


--=-1qF204nGQGxFxBKrU/dF
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

To be clear, I don't oppose the inclusion of the ZFS service
on basis of the licensing anymore.

Greetings,
Maxime.

--=-1qF204nGQGxFxBKrU/dF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTc23RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qbmAP4yvk4xrMoXmrJXtKz6oiodwmQC
JmzTBft+Bab9yikspQD8DAjVFCC1VZP8eopu+NvS1DZV5d0DC1bb+8hTOQZ9HgI=
=etW1
-----END PGP SIGNATURE-----

--=-1qF204nGQGxFxBKrU/dF--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 17:18:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 13:18:16 2021
Received: from localhost ([127.0.0.1]:54366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNIG8-0001KS-0i
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 13:18:16 -0400
Received: from mail-qt1-f171.google.com ([209.85.160.171]:36595)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1mNIG6-0001KF-7C
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 13:18:14 -0400
Received: by mail-qt1-f171.google.com with SMTP id d11so5913097qtw.3
 for <45692 <at> debbugs.gnu.org>; Mon, 06 Sep 2021 10:18:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=nQ9Us+S2tBHAO0c+NBZuszC/Vud47KfG5vYqXxMe6N4=;
 b=TO5qqCngCWZ/z5maEA77V8MBMXilBrwF+Psn4bDw+yoTrzpKuSoCNdBhokC58Dm6Jz
 V9KHaWEUZFF+3iPQC5QMezLFvfz6FGhPsc+G5s5vAjoBsGrKZs0WfTr/ZgndLdyOI/sG
 OsgQCyIB/Xay1ZaXoyraFBkXnn+ufprEYWIhVi/PLJMbMLPJnAqDzq1t8/VU3SKXRCR2
 jMT+bbo8NB1GmZfCdCqCV4byAm8v2MDg/yAWwl+OcOkV+zoxh4ZEMB3arU1yUWR9Dv2p
 ddnELFLLqfiUq95J/JDeM2Y2YFw+BEn78oLmD1JVWpG+UVFiYH3rFuy+r6WWCHeDS0KR
 2RtA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=nQ9Us+S2tBHAO0c+NBZuszC/Vud47KfG5vYqXxMe6N4=;
 b=VC3g8UOCnXkDlUCvnx4TYYQi6Cv76puuX2sLlwh3QaV1QinNCZYQstX9UP6w1KaI/e
 8u0FuZBwJzihbXme9jqS1SwkkffzoDELUGvkw6L0usYw/x5EZcePoBv/rROL12LP2Lyw
 3sZeIYLOl/MaPosYNFrO4kWKcSGq114szuQAqVGWEEPkW65MJ1QhUUkZ0wKmyGkFvEQW
 07VFiOqjdAesgygnflCPRPBy6te4nnKt39Q0sK7ydoXsRrIed59bm+74G/hA1LbqjszR
 THcYsrbfkvozf7tXNEg9gF4dbXibFp3WwimyOFs1yIht748p3QDjmsAOpVxr1eHEseI4
 5Prg==
X-Gm-Message-State: AOAM530n7Dhv1nMVYyZfDuD8qqVAMZkxg97hjKULuTD5kwapZJkbryAW
 ayWh1ZevJWjoFACD0dQDoHHO8OeVlnNSFUnthbeoJvPIrmg=
X-Google-Smtp-Source: ABdhPJzaQ6L+P2HrDFW4bcIyE5/vORv7VFIRQ/FwnG86peaxmC6zP3sWz7YsQTh9uyGscaz86CjZOGYMc63UUfs6nVA=
X-Received: by 2002:a05:622a:164d:: with SMTP id
 y13mr11959865qtj.409.1630948688500; 
 Mon, 06 Sep 2021 10:18:08 -0700 (PDT)
MIME-Version: 1.0
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
In-Reply-To: <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Mon, 6 Sep 2021 19:17:57 +0200
Message-ID: <CAJ3okZ2US0-n_0DUuzWrZNjThSoi=K1Mz+yXLQ6o81FeUahMqw@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
To: Maxime Devos <maximedevos@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.0 (-)

Hi Maxime,

On Mon, 6 Sept 2021 at 12:41, Maxime Devos <maximedevos@HIDDEN> wrote:

> =E2=80=98Nevertheless, there may be arguments for contributory and/or ind=
irect copyright
> infringement in many jurisdictions. We present no specific analysis ourse=
lves on
> the efficacy of a contributory infringement claim regarding source-only d=
istributions
> of ZFS and Linux. However, in our GPL litigation experience, we have noti=
ced that
> judges are savvy at sniffing out attempts to circumvent legal requirement=
s, and they
> are skeptical about attempts to exploit loopholes. Furthermore, we cannot=
 predict
> Oracle's view =E2=80=94 given its past willingness to enforce copyleft li=
censes, and Oracle's
> recent attempts to adjudicate the limits of copyright in Court. Downstrea=
m users should
> consider carefully before engaging in even source-only distribution.=E2=
=80=99

The =C2=AB Nevertheless =C2=BB is because the previous sentence is:

--8<---------------cut here---------------start------------->8---
[=E2=80=A6] Therefore, the analysis is simpler, and we find no specific cla=
use
in either license that prohibits source-only redistribution of Linux and
ZFS, even on the same distribution media.

Nevertheless, [=E2=80=A6]
--8<---------------cut here---------------end--------------->8---

My understanding is:

 - binary distribution violates licenses
 - source-only distribution appears to be fine
 - SFC cannot guarantee because all the arguments about source-only
distribution have never been tested in Court.

Moreover, they write an explicit paragraph why =C2=AB You cannot and should
not rely on this document as legal advice. =C2=BB ;-)


> I don't quite see a GPL violation anymore if we only distribute unmodifie=
d

Good. :-)

> source code.  However, what about freedom (1) and (3) (freedom to [...] a=
nd
> change the program in source form and (3) distribute modified versions)?

Each license is free [1].  Therefore, they respect all the freedoms.
The issue is about linking the result and distribute the binary.

1: <https://directory.fsf.org/wiki/License:CDDL-1.0>

> (*) raid5atemyhomework noted that guix does _not_ distribute source code,
> it only points to source code locations.  I don't quite agree.  From my
> point of view, on whose server the source code is hosted is merely a
> technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code=
 distribution.
> Besides, ci.guix.gnu.org keeps a copy of the source code, and
> (guix download) will try to download from ci.guix.gnu.org.

Indeed, ci.guix.gnu.org keeps a copy of (as much as possible) source
code.  But ci.guix.gnu.org does not distribute all the corresponding
binaries: see 'arguments' '#:substitutable? #f'.  It is already the
case for the package 'zfs':

--8<---------------cut here---------------start------------->8---
    (arguments
     `(;; The ZFS kernel module should not be downloaded since the license
       ;; terms don't allow for distributing it, only building it locally.
       #:substitutable? #f
--8<---------------cut here---------------end--------------->8---

<https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/file-systems.=
scm?id=3Da4ffe3d145b00736f5fdf53ee2c70a7e48592e83#n1175>

As explained in the initial submission [2], this patch set is just a
"glue" usable by the user locally.  No binaries on the Guix side is
involved. All the source-code is under free license.

2: <http://issues.guix.gnu.org/45692#0>


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 14:22:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 10:22:27 2021
Received: from localhost ([127.0.0.1]:54201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNFVy-00059x-Lx
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 10:22:27 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:40492
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mNFVw-00059j-5R
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 10:22:25 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1630938136;
 bh=1y1QYsTC9XJWOI9m6obsA7ufb2CPRb79SgVac9qBUxM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=hTgcZgOJs4lW5U+HtSzx9joT+byC7HrT14rthFfUjE2HsjZ3yRsYjmLB4rgtX9Zeo
 JO4fkc9SUei37nXa0gLChRlDBPEX5geCDn8ItZZUGePeKS3589TXyIUaJWRPJ6Rfrd
 dEwiLvv9gSlsnK40O2h/cuwhWPmKenmbIK0tkHR8=
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
In-Reply-To: <TkQVzGpSd-9nTC6ySmiXXhv44YUNayYAYe8w9Jtmqx_mlY4hQqgnGStksZG9HOaXjHTz9bHs3bhI43CLiQhHLEuBDA_xZGXnd6rGoEutyuk=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <87k0jw3upm.fsf@HIDDEN>
 <TkQVzGpSd-9nTC6ySmiXXhv44YUNayYAYe8w9Jtmqx_mlY4hQqgnGStksZG9HOaXjHTz9bHs3bhI43CLiQhHLEuBDA_xZGXnd6rGoEutyuk=@protonmail.com>
Date: Mon, 06 Sep 2021 16:22:15 +0200
Message-ID: <87a6kp238o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Mon, Sep 06 2021, raid5atemyhomework via Guix-patches via
 wrote: > Hello Xinglu Chen, > > Thank you for your interest. You are welcome!
 Thank you for working on ZFS support! 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Mon, Sep 06 2021, raid5atemyhomework via Guix-patches via
    wrote: > Hello Xinglu Chen, > > Thank you for your interest. You are welcome!
    Thank you for working on ZFS support! 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 06 2021, raid5atemyhomework via Guix-patches via wrote:

> Hello Xinglu Chen,
>
> Thank you for your interest.

You are welcome!  Thank you for working on ZFS support!

>> You might want to bring up the topic of subsystem maintainers on the
>> guix-devel mailing list to get some more attention.
>
> Not personally interested.
>
>
>> > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} =
snapshots.
>> > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep t=
heir
>> > +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
>> > +
>> > +@end table
>> > +@end deftp
>>
>> IIUC, there is not way specify ZFS pools in the =E2=80=98file-systems=E2=
=80=99 field of
>> an <operating-system> record. Does this mean that ZFS as the root file
>> system is not supported, and if so, is there a particular reason for
>> this?
>
> No, and as you saw, that requires some more work.
>
> In particular, older versions of this patchset included the ability to
> add ZFS pools / datasets `file-system` objects, but the exact
> implementation was objected to, with no suggestion for what
> alternative to use instead.  Since I thought it was contentious, I
> removed it entirely instead.
>
> Note that ZFS-on-Root on Guix is even harder because of the need to
> put loading in `initrd`, and a lot of coding as well, not just
> `file-system`s support.
>
> Given the sheer lack of review and etc etc, I am not encouraged to
> write more code that will remain unreviewed and unmerged.  Maybe if
> this gets merged as-is, I will, but otherwise, I don't see the point.

I understand your feeling; hopefully we can get the patch merged soon!
:-)

>> The field name usually just contains the package name, so =E2=80=98zfs=
=E2=80=99 and
>> =E2=80=98zfs-auto-snapshot=E2=80=99 instead of =E2=80=98base-zfs=E2=80=
=99 and =E2=80=98base-zfs-auto-snapshot=E2=80=99.
>
>
> The point is that the service does **NOT** use `base-zfs` directly ---
> it creates a new version of that package, targeted towards the
> specific kernel you provided.  This is necessary since internal kernel
> APIs and ABIs may change between versions, even minor v=3D=3Dersions
> (Linux has no commitment to keeping kernel interfaces stable, it only
> has a commitment to keeping userspace interfaces stable, and OpenZFS
> **requires** the kernel interfaces, so it is safest to compile
> specifically to the kernel version that is used).
>
> Thus the ***`base-`*** prefixes: the `zfs-service-type` does not use
> the `base-zfs` and `base-zfs-autosnapshot` packages as-is, they are
> instead used as the basis for the actual packages that are compiled
> and installed into the system.  I thought this would be sufficiently
> different from other services, which use package names as-is (but use
> the packages as-is, without inheriting from them, unlike this service)
> that the `base-` prefix was justified.

Ah, that makes sense, then I am fine with keeping it as-is.

>> > -                       ;; Output to current-error-port, otherwise the
>> >
>> >
>> > -                       ;; user will not see any prompts for passwords
>> >
>> >
>> > -                       ;; of encrypted datasets.
>> >
>> >
>> > -                       ;; XXX Maybe better to explicitly open /dev/co=
nsole ?
>> >
>> >
>>
>> Seeing this comment, I assume that encrypted pools are supported, right?
>
> Encrypted datasets are supported, yes.  If you set
> `keylocation=3Dprompt` then the `init` process will pause and ask for
> the password on the console.  You can even use
> `keylocation=3Dfile:///some/keyfile`, I also tested that in a VM.  My
> own production setup (which doesn't use this service, but includes
> some code copy-pasted from this service) uses
> `keylocation=3Dfile:///*elided*`.

Cool, hopefully I will get to test this soon.  :-)

>> > -        '(frequent hourly daily weekly monthly))))
>> >
>> >
>>
>> Maybe use something like
>>
>> (map first %default-auto-snapshot-keep)
>>
>> to avoid having to changing it if things change in the future.
>
> Good idea, thank you.
>
> Thanks
> raid5atemyhomework

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE2JBcVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x569AQAKOa1GC9J2NI4Giv8VSgLtSdUGjq
5H9j6ad5sah7rnjtUX5khDTx2lovNjQA/85PSf/o90OVKruTyRikkfBTdj2Qcq8G
BsWwXJBlDLO6aWwyBBNI/w9yyUh6+tSmJtKLZ6T0LZJuTEL7fWmTACDFazxi09dZ
mDGnZ3He8/fYo26PmsOp8HDMPLOj2qLlsHQJa1vCVYQLr58FEm/KpBNBwwVx/i8V
hEZa4KBv71ZwxuTZ/Z6sT7Sm3IMQsSr45cjoyKnZ2EHFW1G/UKyOvBdyQKNQwe0M
69Jt774j2rUOlVTiYtRnPMmbYZEkwiBMV3p5RT2aKJWwerbs2o6T6/cYmMmpmmzS
Ntcn87LlM1UwVmujCNUvrg8DLWTFsB0xHpoV2p+cFWsTS6Vt//RfFCravD+Pf9Fc
dMlyX033iXRu9MNuPQy+qCIsmqGbeRY70SfAcJ0uSLIlHi3a3GZMi+dziGEv47xi
buYadS/ai+Z9FohPb89O0vUu8ZXdpZF1V1PojN8wyFoic32Fm1jEikBNB1FBOsUu
ibhvn+plkti+MfXrKr2FX7VD8L7ZXUdLLCN0TBZ/dk9l1c5V1q0prX88kdN3rDoo
Q9sfI795NUiab1kka9iC6I7PAfLOJyKNUh4Xs56w04itQauFl90YJ0luCKPVJJLn
GOp9NNddgUuRaGMx
=QVNI
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 11:08:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 07:08:38 2021
Received: from localhost ([127.0.0.1]:52144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNCUQ-0007tz-5a
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 07:08:38 -0400
Received: from mail-40132.protonmail.ch ([185.70.40.132]:34593)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mNCUM-0007tj-Ev
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 07:08:36 -0400
Date: Mon, 06 Sep 2021 11:08:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1630926507;
 bh=PEY7r3S6ortpSMdtQkpSbcbQ6f6kF4aoHsRX8WduhFc=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=pvo+aa2DEJQs4jgu1SunK6qrA9RiOhUGX2dfrhLJ5nbioLHl8Xva6HCcG10C48jzX
 IfZPq6Yu5pH56UtN58XLOd3ogdJ0RwfpZtCrmRUdNHeyTIKo4fU0A3ND/mb/Gas9EY
 MHS58YH+cp5MzxIR8PUc/xL93qYu2o+kPOBARiOA=
To: Maxime Devos <maximedevos@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <84VZkrMdtpnHj3fTyW5llNzMcTOVnkpIKR7xkrJqC_6hjYVSSQCYchxbgIuLF6cP5L_4v5nDGjdFyP5_qeSt1e26Tv7Ga1r59ey0j-dvgt0=@protonmail.com>
In-Reply-To: <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
 <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>,
 zimoun <zimon.toutoune@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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Maxime,
> > Other said, the distribution of the zfs.ko is an issue, not
> > provide a way to build it locally. Well, it does not appear to be a GPL
> > violation, IIUC the SFC analysis.
>
> I neglected that the terms of the GPL that come into play depend on wheth=
er
> one is only distributing source code () or also binaries, and whether one=
 is
> distributing modified source code.
> I don't quite see a GPL violation anymore if we only distribute unmodifie=
d
> source code. However, what about freedom (1) and (3) (freedom to [...] an=
d
> change the program in source form and (3) distribute modified versions)?
> I was going to write something here about why that would not be (legally)
> possible because of the CDDL and GPL, but I forgot why it wouldn't be
> possible. Maybe it is actually possible?
> () raid5atemyhomework noted that guix does not distribute source code,it =
only points to source code locations. I don't quite agree. From my
> point of view, on whose server the source code is hosted is merely a
> technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code=
 distribution.
> Besides, ci.guix.gnu.org keeps a copy of the source code, and
> (guix download) will try to download from ci.guix.gnu.org.

*shrug* if so, take note that the `zfs` package modifies the build system a=
nd even some of the source code in order to adapt it to the slightly differ=
ent Guix environment (in particular, Guix does not give an FHS to packages =
being built, so we need to point some paths directly to absolute paths).

I am not really interested in modifying the patch unless the license issue =
is resolved, so I will wait until Guix maintainers can actually agree on wh=
ether there is a license violation or not.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 10:52:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 06:52:58 2021
Received: from localhost ([127.0.0.1]:52092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNCFG-0005Js-Ge
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:52:58 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:32995)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mNCFE-0005Jc-D8
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:52:57 -0400
Date: Mon, 06 Sep 2021 10:52:45 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1630925569;
 bh=KLaCTLUUj33Gwy6dkOsbZTG7+wZy0iXzPuAkmArHKu8=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=kB8by9wAqYYwIfz1e2SvQU59upy8NRQfCtW9yf3tPOYN+JpelvlG5cv8GPFOgB7lE
 GX6tQiHtlpJ+25Oqm8WaqYXgKFBdvxqJJp82EnuH+0OOtab9423YiMOPFp62UXACFz
 hSuKryJdIxL+wMDe/hQVf4YQDof6ufAFtDKLwbaE=
To: Xinglu Chen <public@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <TkQVzGpSd-9nTC6ySmiXXhv44YUNayYAYe8w9Jtmqx_mlY4hQqgnGStksZG9HOaXjHTz9bHs3bhI43CLiQhHLEuBDA_xZGXnd6rGoEutyuk=@protonmail.com>
In-Reply-To: <87k0jw3upm.fsf@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <87k0jw3upm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Xinglu Chen,

Thank you for your interest.

> You might want to bring up the topic of subsystem maintainers on the
> guix-devel mailing list to get some more attention.

Not personally interested.


> > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} s=
napshots.
> > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep th=
eir
> > +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
> > +
> > +@end table
> > +@end deftp
>
> IIUC, there is not way specify ZFS pools in the =E2=80=98file-systems=
=E2=80=99 field of
> an <operating-system> record. Does this mean that ZFS as the root file
> system is not supported, and if so, is there a particular reason for
> this?

No, and as you saw, that requires some more work.

In particular, older versions of this patchset included the ability to add =
ZFS pools / datasets `file-system` objects, but the exact implementation wa=
s objected to, with no suggestion for what alternative to use instead.  Sin=
ce I thought it was contentious, I removed it entirely instead.

Note that ZFS-on-Root on Guix is even harder because of the need to put loa=
ding in `initrd`, and a lot of coding as well, not just `file-system`s supp=
ort.

Given the sheer lack of review and etc etc, I am not encouraged to write mo=
re code that will remain unreviewed and unmerged.  Maybe if this gets merge=
d as-is, I will, but otherwise, I don't see the point.


> The field name usually just contains the package name, so =E2=80=98zfs=
=E2=80=99 and
> =E2=80=98zfs-auto-snapshot=E2=80=99 instead of =E2=80=98base-zfs=E2=80=
=99 and =E2=80=98base-zfs-auto-snapshot=E2=80=99.


The point is that the service does **NOT** use `base-zfs` directly --- it c=
reates a new version of that package, targeted towards the specific kernel =
you provided.  This is necessary since internal kernel APIs and ABIs may ch=
ange between versions, even minor v=3D=3Dersions (Linux has no commitment t=
o keeping kernel interfaces stable, it only has a commitment to keeping use=
rspace interfaces stable, and OpenZFS **requires** the kernel interfaces, s=
o it is safest to compile specifically to the kernel version that is used).

Thus the ***`base-`*** prefixes: the `zfs-service-type` does not use the `b=
ase-zfs` and `base-zfs-autosnapshot` packages as-is, they are instead used =
as the basis for the actual packages that are compiled and installed into t=
he system.  I thought this would be sufficiently different from other servi=
ces, which use package names as-is (but use the packages as-is, without inh=
eriting from them, unlike this service) that the `base-` prefix was justifi=
ed.

> > -                       ;; Output to current-error-port, otherwise the
> >
> >
> > -                       ;; user will not see any prompts for passwords
> >
> >
> > -                       ;; of encrypted datasets.
> >
> >
> > -                       ;; XXX Maybe better to explicitly open /dev/con=
sole ?
> >
> >
>
> Seeing this comment, I assume that encrypted pools are supported, right?

Encrypted datasets are supported, yes.  If you set `keylocation=3Dprompt` t=
hen the `init` process will pause and ask for the password on the console. =
 You can even use `keylocation=3Dfile:///some/keyfile`, I also tested that =
in a VM.  My own production setup (which doesn't use this service, but incl=
udes some code copy-pasted from this service) uses `keylocation=3Dfile:///*=
elided*`.


> > -        '(frequent hourly daily weekly monthly))))
> >
> >
>
> Maybe use something like
>
> (map first %default-auto-snapshot-keep)
>
> to avoid having to changing it if things change in the future.

Good idea, thank you.

Thanks
raid5atemyhomework





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 10:41:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 06:41:08 2021
Received: from localhost ([127.0.0.1]:52070 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNC3n-0002qG-M8
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:41:07 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:59134)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mNC3k-0002q5-Gv
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 06:41:07 -0400
Received: from butterfly.local ([213.132.129.254])
 by michel.telenet-ops.be with bizsmtp
 id qah02500T5VU3ct06ah2He; Mon, 06 Sep 2021 12:41:03 +0200
Message-ID: <a4eb0f76fc225c04039d8a2f83223e6de1a2b21b.camel@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
From: Maxime Devos <maximedevos@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Date: Mon, 06 Sep 2021 12:40:53 +0200
In-Reply-To: <86bl56jfdn.fsf@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <86bl56jfdn.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-00URjjkmLg5XFM0gsQkX"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630924863; bh=wKKwJ/tAXr/wc6ILzYdP3Rr5ZqC1iJ0Yt9eqyjY3BKg=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=IIHAjE7J30DfLr2UlDJIK2OOtMhqT7S8pmD3f8vrrA2G91yKTzr9MRccBk3E/VGR1
 3eXfHPhSKDej07Uo+PYSG00lAuzHDx0hxmHcH/7LsAu5JBsTy3b9GLGHt/GY0KOo2u
 f8Sggn+/fmCbzNyciz/S0bdUY3wbIrd9nP2YzCP8pQqIFesrSc+Xdg4kNze2Fr4Vbb
 y0phaDCnscrjtZ4h4dj0j08LDVU7LuWEkoszviu1Fh1xO+y0i9NehB8Ae1/boG+Rhq
 0/HVCywllQHNrBbRTgVmDtYLPrkQASIZsQUjytLAPNF+denyenhoSDjj0e1aktFC/p
 QGxh0papFybTQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)


--=-00URjjkmLg5XFM0gsQkX
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

zimoun schreef op ma 06-09-2021 om 10:08 [+0200]:
> Hi Maxime.

Hi zimoun,

>=20
> On Thu, 02 Sep 2021 at 22:57, Maxime Devos <maximedevos@HIDDEN> wrote=
:
>=20
> > See also <https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/>;.
>=20
> Reading the Software Freedom Conservancy analysis, from my
> understanding, the issue is about distributing the resulting *binary*
> Linux+ZFS.

Previously I thought that =E2=80=98Is The Analysis Different With Source-On=
ly Distribution?=E2=80=99
somehow did not apply here, though I cannot remember the reasoning well (ma=
ybe
my reasoning was bogus?).

However, SFC did note in that section:

=E2=80=98Nevertheless, there may be arguments for contributory and/or indir=
ect copyright
infringement in many jurisdictions. We present no specific analysis ourselv=
es on
the efficacy of a contributory infringement claim regarding source-only dis=
tributions
of ZFS and Linux. However, in our GPL litigation experience, we have notice=
d that
judges are savvy at sniffing out attempts to circumvent legal requirements,=
 and they
are skeptical about attempts to exploit loopholes. Furthermore, we cannot p=
redict
Oracle's view =E2=80=94 given its past willingness to enforce copyleft lice=
nses, and Oracle's
recent attempts to adjudicate the limits of copyright in Court. Downstream =
users should
consider carefully before engaging in even source-only distribution.=E2=80=
=99

I'm completely unfamiliar with the notion of =E2=80=98contributory copyring=
 infringement=E2=80=99
or =E2=80=98indirect copyright infringement=E2=80=99.  =E2=80=98Savvy judge=
s skeptical at attempts to
exploit loopholes=E2=80=99 seems plausible to me in my inexpert opinion.

>   Other said, the distribution of the zfs.ko is an issue, not
> provide a way to build it locally.  Well, it does not appear to be a GPL
> violation, IIUC the SFC analysis.

I neglected that the terms of the GPL that come into play depend on whether
one is only distributing source code (*) or also binaries, and whether one =
is
distributing _modified_ source code.

I don't quite see a GPL violation anymore if we only distribute unmodified
source code.  However, what about freedom (1) and (3) (freedom to [...] and
change the program in source form and (3) distribute modified versions)?
I was going to write something here about why that would not be (legally)
possible because of the CDDL and GPL, but I forgot why it wouldn't be
possible.  Maybe it is actually possible?

(*) raid5atemyhomework noted that guix does _not_ distribute source code,
it only points to source code locations.  I don't quite agree.  From my
point of view, on whose server the source code is hosted is merely a
technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code d=
istribution.
Besides, ci.guix.gnu.org keeps a copy of the source code, and
(guix download) will try to download from ci.guix.gnu.org.

> Thanks for taking the time to carefully review all the aspects.

Greetings,
Maxime

--=-00URjjkmLg5XFM0gsQkX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTXwNRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kMuAP4643cECusxy+LaPDPqCdgvBOnO
aJuyd5rIiDoRRariMQEA17L6e8O1pfR/eGQicTL/PYkK/USvvl34oo+nEvtAEAw=
=3dxq
-----END PGP SIGNATURE-----

--=-00URjjkmLg5XFM0gsQkX--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 08:30:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 04:30:33 2021
Received: from localhost ([127.0.0.1]:51680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mNA1R-0002lu-0J
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 04:30:33 -0400
Received: from mail-wm1-f54.google.com ([209.85.128.54]:51919)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1mNA1N-0002lc-Pm
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 04:30:30 -0400
Received: by mail-wm1-f54.google.com with SMTP id n39so2248858wms.1
 for <45692 <at> debbugs.gnu.org>; Mon, 06 Sep 2021 01:30:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=ycCfhRwSuLN7DCwsYgwe5yvJRnQfbGHr6RAXCDUp2uM=;
 b=hEkdemQk8THToqaOI2m2zLYRRRUFUUSDlsnxZtch43PmXVCRkUhzQZE6QSc/k1Rnlu
 AAyDPT7PDZvQsVWCw+fhJ7KVYS74Ied6+k91qGgczE8OBxy6fjkAE2e1LUVUrOcJ0lnU
 EFCDJs4+7u0jrNiAsXAmQKZSKkVMEQ9BFuuDtT0lCbIk0GpNa2OeuK1+4ggBiEpA2we4
 LmSnfAqybN8+Hel05VwTYhxDYCFjvwNSBu7SSE21fbXO0sl7ijUlAnVKIxyIMB0IQTSr
 ogstyHq/zawj5a2O74Eb/f1lTvwgGn9qFdU+s/b4etYn6XztM2YKkWOr5PXInSAHFCH4
 l5CQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=ycCfhRwSuLN7DCwsYgwe5yvJRnQfbGHr6RAXCDUp2uM=;
 b=PRHQEEHcTU21tbzDYzOayNqtVj8o5eE6KkkWJxiHr2qPNozuhMCS0NlbmIl9Qay2gS
 SqkICI38toeCZxs4123fx6CiRwX8P8brGUsyTkYY5o5EbytCM4InktCz/cG5CBdkHnQe
 SN8RyLG7xY9hoB6/vQSiC2ULiy8fu+mrKELV0+SOsNpvNpILHHeWihp7PohmW6ssUpzv
 r3jr3DNcX9KZ5Lclid9M0FhgL/xWQ9S0i6T3pnu96wMYLr2Nz78qFME5RFK8VXNc+HbI
 +734k49KrKMhL/tt8kjqSihzjj+yADXLRDeJCqZzf8ZvBQv+JMRxkdPVkhfGlZF11bwJ
 ou9Q==
X-Gm-Message-State: AOAM5337NAV6uwyY1QBWovzOGBqN3eaypg9EwWDPhmSRZZZzYJ6IfE5r
 ojM32rt8QhRiUUxZzL+ZAnfqgmX0Ukw=
X-Google-Smtp-Source: ABdhPJwLfJ0hI0wRSsmBHmLt6xzSvdW9LRvBY0AgXWHQNc9qilHGZolIx5Rs4iFqN7F46djicpQt3w==
X-Received: by 2002:a7b:cc07:: with SMTP id f7mr10283623wmh.145.1630917023914; 
 Mon, 06 Sep 2021 01:30:23 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id q13sm7174684wrv.79.2021.09.06.01.30.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 06 Sep 2021 01:30:23 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
Date: Mon, 06 Sep 2021 10:08:04 +0200
In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 (Maxime Devos's message of "Thu, 02 Sep 2021 22:57:09 +0200")
Message-ID: <86bl56jfdn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.0 (-)

Hi Maxime.

On Thu, 02 Sep 2021 at 22:57, Maxime Devos <maximedevos@HIDDEN> wrote:

> See also <https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/>.

Reading the Software Freedom Conservancy analysis, from my
understanding, the issue is about distributing the resulting *binary*
Linux+ZFS.  Other said, the distribution of the zfs.ko is an issue, not
provide a way to build it locally.  Well, it does not appear to be a GPL
violation, IIUC the SFC analysis.

Thanks for taking the time to carefully review all the aspects.

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 08:00:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 06 04:00:32 2021
Received: from localhost ([127.0.0.1]:51605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mN9YO-0001rD-1p
	for submit <at> debbugs.gnu.org; Mon, 06 Sep 2021 04:00:32 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:41753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1mN9YN-0001qz-8j
 for 45692 <at> debbugs.gnu.org; Mon, 06 Sep 2021 04:00:31 -0400
Received: by mail-wr1-f49.google.com with SMTP id u9so8433941wrg.8
 for <45692 <at> debbugs.gnu.org>; Mon, 06 Sep 2021 01:00:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=11QvE/qB8tJwDaHionQqe/xTdUG5yVAkP03kqVbMy24=;
 b=SdQ/JTmzMfx4MphV6NeGWL+XiWuo/T6z9XZ5Q1ywtEYiPJmKYWSvD8AesltUTGBtw5
 ZiUtEDJ93Fu4NK0jzdocVJAtzHSMzjEyV3RkcQx9nZI43Eu73X/wW3Vb89c95dIizWLF
 PH7taS+K+RUYvgl9M9IBk2IHc2wzD57trzj5IYyfYLI4pb5qMm5l68L5lCAvrEUz6GCR
 FWl2dmNK5CEFL9JQ0onduihM1RPC5E4bGRio7tNSXEVAUUIVxBTuKNQmbmbZpxUMAuiE
 WnfzDq95xhM63hPQCddZvsOSUxZejZrSa9WvQ4YCVr6Js3b4QMR2SnvsyR/Skk2qKDDE
 gTeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=11QvE/qB8tJwDaHionQqe/xTdUG5yVAkP03kqVbMy24=;
 b=Nbb+0laZV6lNWs0XKfDMGvzODuu1gUg0mV7Zo1X1GoI9MtqSSjMV4hBPqYcrzrfZCK
 0C1nro+292PCpB2/6pkBXLyJGXRWY0U6jIfxULhn3Il+5uWhEQJflXAcIHtEpGRKnM37
 cVOBevXVQUDKLUmmLJCyCek7Y5IVVSABz1Z7dwCDtn6W720Po7NCWCENiz5SWpYTbPix
 Ksulr/L08BzaJhwxXZEgamwD9g7pQ9BhEwE2U9+rwJ+VLKYvHIy1FEw7NMLGlqMp8pDM
 mSNoBOptzoPtbAt4gb1/3iCBWA7unFQITjUB2lJkWDRO/iH23OYbcW/f0UbciE3nvv3q
 vcIA==
X-Gm-Message-State: AOAM5339kY73SoYiCV1y4zhIELuyH1woGFlW7RrVuZR3/vDUG6yWPdgk
 QT+NKotQxUCJQvdLPILll+M=
X-Google-Smtp-Source: ABdhPJyE3WnBoRPJCW3KX/lCQFWGNH2V5VzYLO284VNM19ktHgDURLv/pEgP00ACddhL3kLdhlEWgQ==
X-Received: by 2002:adf:e68e:: with SMTP id r14mr11863355wrm.395.1630915225181; 
 Mon, 06 Sep 2021 01:00:25 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id s205sm6532676wme.4.2021.09.06.01.00.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 06 Sep 2021 01:00:24 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Mason Loring Bliss <mason@HIDDEN>
Subject: Re: [bug#45692]
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <20210902212359.GU6420@HIDDEN>
Date: Mon, 06 Sep 2021 09:59:16 +0200
In-Reply-To: <20210902212359.GU6420@HIDDEN> (Mason Loring Bliss's message
 of "Thu, 2 Sep 2021 17:24:00 -0400")
Message-ID: <86lf4ajfsb.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: Maxime Devos <maximedevos@HIDDEN>, guix-maintainers@HIDDEN,
 45692 <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: -1.0 (-)

Hi Mason,

On Thu, 02 Sep 2021 at 17:24, Mason Loring Bliss <mason@HIDDEN> wrote:

>                            Gaslighting in an attempt to sabotage the
> adoption of high-quality free software is somewhat poor form and not at all
> useful.

Using such language (emphasized by the subject), you are not creating a
positive environment.  Please be respectful when differing viewpoints
and experiences.  And please assume good faith avoiding to jump in
negative opinionated conclusions.

Thanks,
simon




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 4 Sep 2021 21:19:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 17:19:21 2021
Received: from localhost ([127.0.0.1]:48804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMd4F-0004Cw-6K
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 17:19:21 -0400
Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46232
 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <public@HIDDEN>) id 1mMd4C-0004Ch-B0
 for 45692 <at> debbugs.gnu.org; Sat, 04 Sep 2021 17:19:14 -0400
From: Xinglu Chen <public@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz;
 s=mail; t=1630790343;
 bh=uOq2ubofzi8diZUbFXFlWTQ5F6sQlUX2EYspmM+QmbA=;
 h=From:To:Subject:In-Reply-To:References:Date;
 b=Q+XwyVGkOnXmxAZkC4tDVzHIWm0S9Kg04QMpt5U9C6W2kA3rU4LunybU346aRjSR8
 d2AsmriWIqY2AbHOeiPbl0un8YPT+uYdeB19uYwqO+E9JPQGSeGnq6sz6689XO6NWC
 G6wIHuRTgQQM8XwBiO6AbfgiK3MNniz35KnNgIZE=
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
In-Reply-To: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
Date: Sat, 04 Sep 2021 23:19:01 +0200
Message-ID: <87k0jw3upm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 2.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via
 wrote: > Hello nonexistent reviewer,
 > > I updated this patch to latest `origin/master`
 because the previous > version has bitrotted and will not `git am` cleanly
 anymore. > > There are no changes relative t [...] 
 Content analysis details:   (2.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: yoctocell.xyz (xyz)]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
 dynamic-looking rDNS
 0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps
X-Debbugs-Envelope-To: 45692
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.9 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via
    wrote: > Hello nonexistent reviewer, > > I updated this patch to latest `origin/master`
    because the previous > version has bitrotted and will not `git am` cleanly
    anymore. > > There are no changes relative t [...] 
 
 Content analysis details:   (2.9 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.0 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: yoctocell.xyz (xyz)]
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager
  0.0 PDS_RDNS_DYNAMIC_FP    RDNS_DYNAMIC with FP steps

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via wrote:

> Hello nonexistent reviewer,
>
> I updated this patch to latest `origin/master` because the previous
> version has bitrotted and will not `git am` cleanly anymore.
>
> There are no changes relative to v3, just rebased it so that the patch ap=
plies cleanly.
>
> Testing has been very minimal: I created a VM with the added service,
> then ran it in a VM session that included additional devices (qcow2
> files) from a previous VM run that formatted those as devices of a ZFS
> pool, and confirmed that the new VM could read it and manage that
> pool.
>
>
> Is there any chance this will get reviewed or should I just not bother
> and move on with my life and forget about Guix?
>
>
> At this point as well, I would like to point out what I think is a
> failing of how the Guix distribution is managed.
>
> Guix does not assign any particular committers to any particular tasks or=
 areas.
> The intent is that any committer can review and commit any particular pat=
ch.
>
> However, this fails as the Guix project has grown.
>
> No single committer wants to review ***all*** the available patches,
> and this is understandable, as the Guix project has grown
> significantly and includes a wide variety of people with diverging
> interests and as an open-source project you cannot really require that
> particular people look at particular things.  Unfortunately, I do not
> know *who* committers are, and more importantly, *which* committer
> might be interested in this ZFS service type.  Because "any committer
> can review and commit any patch!!" there is no particular list or
> table I can refer to, to figure out who might be useful to ping for
> this patchset.
>
> At the same time, because no committer is interested in *all* patches
> I cannot just ping some particular person and expect to somehow get on
> some list somewhere that tells me "you will be the 48486th patch that
> will be reviewed by <foo> who is interested in all patches".
>
>
> It is very discouraging to work on this code for a few weeks, release
> it, not get any reviews, and end up in a situation where I have to
> make annoying small changes just to keep the patch from bitrotting.
>
> I understand that there are few possible reviewers, but if potential
> new contributors get discouraged from contributing because they do not
> see their code actually getting in, then you really cannot expect the
> number of reviewers to increase, either.
>
> I think it would be nice if I could at least be told some number of
> people who *might* be interested in this patch, or just throw the
> towel and not bother.

You might want to bring up the topic of subsystem maintainers on the
guix-devel mailing list to get some more attention.

I am just some random ZFS user, so maybe take my comments with a pinch
of salt.

I haven=E2=80=99t followed the thread that closely, so apologies if some of=
 my
questions have already been answered.

>
> Thanks
> raid5atemyhomework
>
>
> From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001
> From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
> Date: Mon, 22 Mar 2021 16:26:28 +0800
> Subject: [PATCH] gnu: Add ZFS service type.
>
> * gnu/services/file-systems.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * gnu/services/base.scm: Export dependency->shepherd-service-name.
> * doc/guix.texi (ZFS File System): New subsection.
> ---
>  doc/guix.texi                 | 351 ++++++++++++++++++++++++++++++++++
>  gnu/local.mk                  |   2 +
>  gnu/services/base.scm         |   4 +-
>  gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++
>  4 files changed, 651 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/services/file-systems.scm
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index b3c16e6507..e21c47d7ca 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
>  Copyright @copyright{} 2021 Raghav Gururajan@*
>  Copyright @copyright{} 2021 Domagoj Stolfa@*
>  Copyright @copyright{} 2021 Hui Lu@*
> +Copyright @copyright{} 2021 raid5atemyhomework@*
>
>  Permission is granted to copy, distribute and/or modify this document
>  under the terms of the GNU Free Documentation License, Version 1.3 or
> @@ -14265,6 +14266,356 @@ a file system declaration such as:
>  compress-force=3Dzstd,space_cache=3Dv2"))
>  @end lisp
>
> +
> +@node ZFS File System
> +@subsection ZFS File System
> +
> +Support for ZFS file systems is provided on Guix by the OpenZFS project.
> +OpenZFS currently only supports Linux-Libre and is not available on the
> +Hurd.
> +
> +OpenZFS is free software; unfortunately its license is incompatible with
> +the GNU General Public License (GPL), the license of the Linux kernel,
> +which means they cannot be distributed together.  However, as a user,
> +you can choose to build ZFS and use it together with Linux; you can
> +even rely on Guix to automate this task.  See
> +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
> +the Free Software Foundation} for more information.
> +
> +As a large and complex kernel module, OpenZFS has to be compiled for a
> +specific version of Linux-Libre.  At times, the latest OpenZFS package
> +available in Guix is not compatible with the latest Linux-Libre version.
> +Thus, directly installing the @code{zfs} package can fail.
> +
> +Instead, you are recommended to select a specific older long-term-support
> +Linux-Libre kernel.  Do not use @code{linux-libre-lts}, as even the
> +latest long-term-support kernel may be too new for @code{zfs}.  Instead,
> +explicitly select a specific older version, such as @code{linux-libre-5.=
10},
> +and upgrade it manually later as new long-term-support kernels become
> +available that you have confirmed is compatible with the latest available
> +OpenZFS version on Guix.
> +
> +For example, you can modify your system configuration file to a specific
> +Linux-Libre version and add the @code{zfs-service-type} service.
> +
> +@lisp
> +(use-modules (gnu))
> +(use-package-modules
> +  #;@dots{}
> +  linux)
> +(use-service-modules
> +  #;@dots{}
> +  file-systems)
> +
> +(define my-kernel linux-libre-5.10)
> +
> +(operating-system
> +  (kernel my-kernel)
> +  #;@dots{}
> +  (services
> +    (cons* (service zfs-service-type
> +                    (zfs-configuration
> +                      (kernel my-kernel)))
> +           #;@dots{}
> +           %desktop-services))
> +  #;@dots{})
> +@end lisp
> +
> +@defvr {Scheme Variable} zfs-service-type
> +This is the type for a service that adds ZFS support to your operating
> +system.  The service is configured using a @code{zfs-configuration}
> +record.
> +
> +Here is an example use:
> +
> +@lisp
> +(service zfs-service-type
> +  (zfs-configuration
> +    (kernel linux-libre-5.4)))
> +@end lisp
> +@end defvr
> +
> +@deftp {Data Type} zfs-configuration
> +This data type represents the configuration of the ZFS support in Guix
> +System.  Its fields are:
> +
> +@table @asis
> +@item @code{kernel}
> +The package of the Linux-Libre kernel to compile OpenZFS for.  This field
> +is always required.  It @emph{must} be the same kernel you use in your
> +@code{operating-system} form.
> +
> +@item @code{base-zfs} (default: @code{zfs})
> +The OpenZFS package that will be compiled for the given Linux-Libre kern=
el.
> +
> +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot})
> +The @code{zfs-auto-snapshot} package to use.  It will be modified to
> +specifically use the OpenZFS compiled for your kernel.
> +
> +@item @code{dependencies} (default: @code{'()})
> +A list of @code{<file-system>} or @code{<mapped-device>} records that mu=
st
> +be mounted or opened before OpenZFS scans for pools to import.  For exam=
ple,
> +if you have set up LUKS containers as leaf VDEVs in a pool, you have to
> +include their corresponding @code{<mapped-ddevice>} records so that Open=
ZFS
> +can import the pool correctly at bootup.
> +
> +@item @code{auto-mount?} (default: @code{#t})
> +Whether to mount datasets with the ZFS @code{mountpoint} property automa=
tically
> +at startup.  This is the behavior that ZFS users usually expect.  You mi=
ght
> +set this to @code{#f} for an operating system intended as a ``rescue'' s=
ystem
> +that is intended to help debug problems with the disks rather than actua=
lly
> +work in production.
> +
> +@item @code{auto-scrub} (default: @code{'weekly})
> +Specifies how often to scrub all pools.  Can be the symbols @code{'weekl=
y} or
> +@code{'monthly}, or a schedule specification understood by
> +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as
> +@code{"0 3 * * 6"} for ``every 3AM on Saturday''.
> +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommen=
ded}).
> +
> +The general guideline is to scrub weekly when using consumer-quality dri=
ves, and
> +to scrub monthly when using enterprise-quality drives.
> +
> +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} =
scrubs
> +are done on midnight on the first day of each month.
> +
> +@item @code{auto-snapshot?} (default: @code{#t})
> +Specifies whether to auto-snapshot by default.  If @code{#t}, then snaps=
hots
> +are automatically created except for ZFS datasets with the
> +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}.
> +
> +If @code{#f}, snapshots will not be automatically created, unless the ZFS
> +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to
> +@code{true}.
> +
> +@item @code{auto-snapshot-keep} (default: @code{'()})
> +Specifies an association list of symbol-number pairs, indicating the num=
ber
> +of automatically-created snapshots to retain for each frequency type.
> +
> +If not specified via this field, by default there are 4 @code{frequent},=
 24
> +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} s=
napshots.
> +
> +For example:
> +
> +@lisp
> +(zfs-configuration
> +  (kernel my-kernel)
> +  (auto-snapshot-keep
> +    '((frequent . 8)
> +      (hourly . 12))))
> +@end lisp
> +
> +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} sna=
pshots.
> +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their
> +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
> +
> +@end table
> +@end deftp

IIUC, there is not way specify ZFS pools in the =E2=80=98file-systems=E2=80=
=99 field of
an <operating-system> record.  Does this mean that ZFS as the root file
system is not supported, and if so, is there a particular reason for
this?

> +
> +@subsubsection ZFS Auto-Snapshot
> +
> +The ZFS service on Guix System supports auto-snapshots as implemented in=
 the
> +Solaris operating system.
> +
> +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{w=
eekly},
> +and @code{monthly} snapshots are created automatically for ZFS datasets =
that
> +have auto-snapshot enabled.  They will be named, for example,
> +@code{zfs-auto-snap_frequent-2021-03-22-1415}.  You can continue to use
> +manually-created snapshots as long as they do not conflict with the nami=
ng
> +convention used by auto-snapshot.  You can also safely manually destroy
> +automatically-created snapshots, for example to free up space.
> +
> +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a
> +per-dataset level.  Sub-datasets will inherit this property from their p=
arent
> +dataset, but can have their own property.
> +
> +You @emph{must} set this property to @code{true} or @code{false} exactly,
> +otherwise it will be treated as if the property is unset.
> +
> +For example:
> +
> +@example
> +# zfs list -o name
> +NAME
> +tank
> +tank/important-data
> +tank/tmp
> +# zfs set com.sun:auto-snapshot=3Dtrue tank
> +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp
> +@end example
> +
> +The above will set @code{tank} and @code{tank/important-data} to be
> +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot.
> +
> +If the @code{com.sun:auto-snapshot} property is not set for a dataset
> +(the default when pools and datasets are created), then whether
> +auto-snapshot is done or not will depend on the @code{auto-snapshot?}
> +field of the @code{zfs-configuration} record.
> +
> +There are also @code{com.sun:auto-snapshot:frequent},
> +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily},
> +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:mon=
thly}
> +properties that give finer-grained control of whether to auto-snapshot a
> +dataset at a particular schedule.
> +
> +The number of snapshots kept for all datasets can be overridden via the
> +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record.
> +There is currently no support to have different numbers of snapshots to
> +keep for different datasets.
> +
> +@subsubsection ZVOLs
> +
> +ZFS supports ZVOLs, block devices that ZFS exposes to the operating
> +system in the @code{/dev/zvol/} directory.  The ZVOL will have the same
> +resilience and self-healing properties as other datasets on your ZFS poo=
l.
> +ZVOLs can also be snapshotted (and will be included in auto-snapshotting
> +if enabled), which snapshots the state of the block device, effectively
> +snapshotting the hosted file system.
> +
> +You can put any file system inside the ZVOL.  However, in order to mount=
 this
> +file system at system start, you need to add @code{%zfs-zvol-dependency}=
 as a
> +dependency of each file system inside a ZVOL.
> +
> +@defvr {Scheme Variable} %zfs-zvol-dependency
> +An artificial @code{<mapped-device>} which tells the file system mounting
> +service to wait for ZFS to provide ZVOLs before mounting the
> +@code{<file-system>} dependent on it.
> +@end defvr
> +
> +For example, suppose you create a ZVOL and put an ext4 filesystem
> +inside it:
> +
> +@example
> +# zfs create -V 100G tank/ext4-on-zfs
> +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs
> +# mkdir /ext4-on-zfs
> +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs
> +@end example
> +
> +You can then set this up to be mounted at boot by adding this to the
> +@code{file-systems} field of your @code{operating-system} record:
> +
> +@lisp
> +(file-system
> +  (device "/dev/zvol/tank/ext4-on-zfs")
> +  (mount-point "/ext4-on-zfs")
> +  (type "ext4")
> +  (dependencies (list %zfs-zvol-dependency)))
> +@end lisp
> +
> +You @emph{must not} add @code{%zfs-zvol-dependency} to your
> +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must
> +not} add it (or any @code{<file-system>}s dependent on it) to the
> +@code{dependencies} field of @code{zfs-configuration}.  Finally, you
> +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually
> +instantiate @code{zfs-service-type} on your system.

I am not familiar with ZVOLs, so I can=E2=80=99t really comment on that.

> +@subsubsection Unsupported Features
> +
> +Some common features and uses of ZFS are currently not supported, or not
> +fully supported, on Guix.
> +
> +@enumerate
> +@item
> +Shepherd-managed daemons that are configured to read from or write to ZFS
> +mountpoints need to include @code{user-processes} in their @code{require=
ment}
> +field.  This is the earliest that ZFS file systems are assured of being
> +mounted.
> +
> +Generally, most daemons will, directly or indirectly, require
> +@code{networking}, or @code{user-processes}, or both.  Most implementati=
ons
> +of @code{networking} will also require @code{user-processes} so daemons =
that
> +require only @code{networking} will also generally start up after
> +@code{user-processes}.  A notable exception, however, is
> +@code{static-networking-service-type}.  You will need to explicitly add
> +@code{user-processes} as a @code{requirement} of your @code{static-netwo=
rking}
> +record.
> +
> +@item
> +@code{mountpoint=3Dlegacy} ZFS file systems.  The handlers for the Guix =
mounting
> +system have not yet been modified to support ZFS, and will expect @code{=
/dev}
> +paths in the @code{<file-system>}'s @code{device} field, but ZFS file sy=
stems
> +are referred to via non-path @code{pool/file/system} names.  Such file s=
ystems
> +also need to be mounted @emph{after} OpenZFS has scanned for pools.
> +
> +You can still manually mount these file systems after system boot; what =
is
> +only unsupported is mounting them automatically at system boot by specif=
ying
> +them in @code{<file-system>} records of your @code{operating-system}.
> +
> +@item
> +@code{/home} on ZFS.  Guix will create home directories for users, but t=
his
> +process currently cannot be scheduled after ZFS file systems are mounted.
> +Thus, the ZFS file system might be mounted @emph{after} Guix has created
> +home directories at boot, at which point OpenZFS will refuse to mount si=
nce
> +the mountpoint is not empty.  However, you @emph{can} create an ext4, xf=
s,
> +btrfs, or other supported file system inside a ZVOL, have that depend on
> +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home}
> +directory; they will be scheduled to mount before the @code{user-homes}
> +process.
> +
> +Similarly, other locations like @code{/var}, @code{/gnu/store} and so
> +on cannot be reliably put in a ZFS file system, though they may be
> +possible to create as other file systems inside ZVOL containers.
> +
> +@item
> +@code{/} and @code{/boot} on ZFS.  These require Guix to expose more of
> +the @code{initrd} very early boot process to services.  It also requires
> +Guix to have the ability to explicitly load modules while still in
> +@code{initrd} (currently kernel modules loaded by
> +@code{kernel-module-loader-service-type} are loaded after @code{/} is
> +mounted).  Further, since one of ZFS's main advantages is that it can
> +continue working despite the loss of one or more devices, it makes sense
> +to also support installing the bootloader on all devices of the pool that
> +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the
> +loss of one device, the bootloader should also be able to survive the lo=
ss
> +of one device.

Ah, OK, this answered my previous question.

> +@item
> +ZVOL swap devices.  Mapped swap devices need to be listed in
> +@code{mapped-devices} to ensure they are opened before the system attemp=
ts
> +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to
> +@code{mapped-devices}.
> +
> +This will also require significant amounts of testing, as various kernel
> +build options and patches may affect how swapping works, which are possi=
bly
> +different on Guix System compared to other distributions that this featu=
re is
> +known to work on.
> +
> +@item
> +ZFS Event Daemon.  Support for this has not been written yet, patches are
> +welcome.  The main issue is how to design this in a Guix style while
> +supporting legacy shell-script styles as well.  In particular, OpenZFS i=
tself
> +comes with a number of shell scripts intended for ZFS Event Daemon, and =
we
> +need to figure out how the user can choose to use or not use the provided
> +scripts (and configure any settings they have) or override with their own
> +custom code (which could be shell scripts they have written and trusted =
from
> +previous ZFS installations).
> +
> +As-is, you can create your own service that activates the ZFS Event Daem=
on
> +by creating the @file{/etc/zfs/zed} directory and filling it appropriate=
ly,
> +then launching @code{zed}.
> +
> +@item
> +@file{/etc/zfs/zpool.cache}.  Currently the ZFS support on Guix always f=
orces
> +scanning of all devices at bootup to look for ZFS pools.  For systems wi=
th
> +dozens or hundreds of storage devices, this can lead to slow bootup.  On=
e issue
> +is that tools should really not write to @code{/etc} which is supposed t=
o be for
> +configuration; possibly it could be moved to @code{/var} instead.  Anoth=
er issue
> +is that if Guix ever supports @code{/} on ZFS, we would need to somehow =
keep the
> +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is=
 in the
> +@code{/} mount point.
> +
> +@item
> +@code{zfs share}.  This will require some (unknown amount of) work to in=
tegrate
> +into the Samba and NFS services of Guix.  You @emph{can} manually set up=
 Samba
> +and NFS to share any mounted ZFS datasets by setting up their configurat=
ions
> +properly; it just can't be done for you by @code{zfs share} and the
> +@code{sharesmb} and @code{sharenfs} properties.
> +@end enumerate
> +
> +Hopefully, support for the above only requires code to be written, o use=
rs
> +are encouraged to hack on Guix to implement the above features.
> +
>  @node Mapped Devices
>  @section Mapped Devices
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index b944c671af..a2ff871277 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -43,6 +43,7 @@
>  # Copyright =C2=A9 2021 Philip McGrath <philip@HIDDEN>
>  # Copyright =C2=A9 2021 Arun Isaac <arunisaac@HIDDEN>
>  # Copyright =C2=A9 2021 Sharlatan Hellseher <sharlatanus@HIDDEN>
> +# Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
>  #
>  # This file is part of GNU Guix.
>  #
> @@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D				\
>    %D%/services/docker.scm			\
>    %D%/services/authentication.scm		\
>    %D%/services/file-sharing.scm			\
> +  %D%/services/file-systems.scm			\
>    %D%/services/games.scm			\
>    %D%/services/ganeti.scm			\
>    %D%/services/getmail.scm				\
> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index ab3e441a7b..bcca24f93a 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -185,7 +185,9 @@
>
>              references-file
>
> -            %base-services))
> +            %base-services
> +
> +            dependency->shepherd-service-name))
>
>  ;;; Commentary:
>  ;;;
> diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
> new file mode 100644
> index 0000000000..0b1aae38ac
> --- /dev/null
> +++ b/gnu/services/file-systems.scm
> @@ -0,0 +1,295 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonm=
ail.com>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu services file-systems)
> +  #:use-module (gnu packages file-systems)
> +  #:use-module (gnu services)
> +  #:use-module (gnu services base)
> +  #:use-module (gnu services linux)
> +  #:use-module (gnu services mcron)
> +  #:use-module (gnu services shepherd)
> +  #:use-module (gnu system mapped-devices)
> +  #:use-module (guix gexp)
> +  #:use-module (guix packages)
> +  #:use-module (guix records)
> +  #:export (zfs-service-type
> +
> +            zfs-configuration
> +            zfs-configuration?
> +            zfs-configuration-kernel
> +            zfs-configuration-base-zfs
> +            zfs-configuration-base-zfs-auto-snapshot
> +            zfs-configuration-dependencies
> +            zfs-configuration-auto-mount?
> +            zfs-configuration-auto-scrub
> +            zfs-configuration-auto-snapshot?
> +            zfs-configuration-auto-snapshot-keep
> +
> +            %zfs-zvol-dependency))
> +
> +(define-record-type* <zfs-configuration>
> +  zfs-configuration
> +  make-zfs-configuration
> +  zfs-configuration?
> +
> +  ; linux-libre kernel you want to compile the base-zfs module for.
> +  (kernel                     zfs-configuration-kernel)
> +
> +  ; the OpenZFS package that will be modified to compile for the
> +  ; given kernel.
> +  (base-zfs                   zfs-configuration-base-zfs
> +                              (default zfs))

The field name usually just contains the package name, so =E2=80=98zfs=E2=
=80=99 and
=E2=80=98zfs-auto-snapshot=E2=80=99 instead of =E2=80=98base-zfs=E2=80=99 a=
nd =E2=80=98base-zfs-auto-snapshot=E2=80=99.

> +  ; the zfs-auto-snapshot package that will be modified to compile
> +  ; for the given kernel.
> +  (base-zfs-auto-snapshot     zfs-configuration-base-zfs-auto-snapshot
> +                              (default zfs-auto-snapshot))
> +
> +  ; list of <mapped-device> or <file-system> objects that must be
> +  ; opened/mounted before we import any ZFS pools.
> +  (dependencies               zfs-configuration-dependencies
> +                              (default '()))
> +
> +  ; #t if mountable datasets are to be mounted automatically.
> +  ; #f if not mounting.
> +  ; #t is the expected behavior on other operating systems, the
> +  ; #f is only supported for "rescue" operating systems where
> +  ; the user wants lower-level control of when to mount.
> +  (auto-mount?                zfs-configuration-auto-mount?
> +                              (default #t))
> +
> +  ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an
> +  ; mcron time specification that can be given to `job`, or #f to
> +  ; disable.
> +  (auto-scrub                 zfs-configuration-auto-scrub
> +                              (default 'weekly))
> +
> +  ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse`
> +  ; disables auto-snapshot per dataset), #f if no auto-snapshotting
> +  ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot
> +  ; per dataset).
> +  (auto-snapshot?             zfs-configuration-auto-snapshot?
> +                              (default #t))
> +
> +  ; association list of symbol-number pairs to indicate the number
> +  ; of automatic snapshots to keep for each of 'frequent, 'hourly,
> +  ; 'daily, 'weekly, and 'monthly.
> +  ; e.g. '((frequent . 8) (hourly . 12))
> +  (auto-snapshot-keep         zfs-configuration-auto-snapshot-keep
> +                              (default '())))
> +
> +(define %default-auto-snapshot-keep
> +  '((frequent . 4)
> +    (hourly . 24)
> +    (daily . 31)
> +    (weekly . 8)
> +    (monthly . 12)))
> +
> +(define %auto-snapshot-mcron-schedule
> +  '((frequent .  "0,15,30,45 * * * *")
> +    (hourly .    "0 * * * *")
> +    (daily .     "0 0 * * *")
> +    (weekly .    "0 0 * * 7")
> +    (monthly .   "0 0 1 * *")))
> +
> +;; A synthetic and unusable MAPPED-DEVICE intended for use when
> +;; the user has created a mountable filesystem inside a ZFS
> +;; zvol and wants it mounted inside the configuration.scm.
> +(define %zfs-zvol-dependency
> +  (mapped-device
> +    (source '())
> +    (targets '("zvol/*"))
> +    (type #f)))
> +
> +(define (make-zfs-package conf)
> +  (let ((kernel    (zfs-configuration-kernel conf))
> +        (base-zfs  (zfs-configuration-base-zfs conf)))
> +    (package
> +      (inherit base-zfs)
> +      (arguments (cons* #:linux kernel
> +                        (package-arguments base-zfs))))))
> +
> +(define (make-zfs-auto-snapshot-package conf)
> +  (let ((zfs                    (make-zfs-package conf))
> +        (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapsho=
t conf)))
> +    (package
> +      (inherit base-zfs-auto-snapshot)
> +      (inputs `(("zfs" ,zfs))))))
> +
> +(define (zfs-loadable-modules conf)
> +  (list (list (make-zfs-package conf) "module")))
> +
> +(define (zfs-shepherd-services conf)
> +  (let* ((zfs-package     (make-zfs-package conf))
> +         (zpool           (file-append zfs-package "/sbin/zpool"))
> +         (zfs             (file-append zfs-package "/sbin/zfs"))
> +         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
> +         (scheme-modules  `((srfi srfi-1)
> +                            (srfi srfi-34)
> +                            (srfi srfi-35)
> +                            (rnrs io ports)
> +                            ,@%default-modules)))
> +    (define zfs-scan
> +      (shepherd-service
> +        (provision '(zfs-scan))
> +        (requirement `(root-file-system
> +                       kernel-module-loader
> +                       udev
> +                       ,@(map dependency->shepherd-service-name
> +                              (zfs-configuration-dependencies conf))))
> +        (documentation "Scans for and imports ZFS pools.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error importing pools: ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     ; TODO: optionally use a cachefile.
> +                     (invoke #$zpool "import" "-a" "-N"))))
> +        ;; Why not one-shot?  Because we don't really want to rescan
> +        ;; this each time a requiring process is restarted, as scanning
> +        ;; can take a long time and a lot of I/O.
> +        (stop #~(const #f))))
> +
> +    (define device-mapping-zvol/*
> +      (shepherd-service
> +        (provision '(device-mapping-zvol/*))
> +        (requirement '(zfs-scan))
> +        (documentation "Waits for all ZFS ZVOLs to be opened.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error opening zvols: ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     (invoke #$zvol_wait))))
> +        (stop #~(const #f))))
> +
> +    (define zfs-auto-mount
> +      (shepherd-service
> +        (provision '(zfs-auto-mount))
> +        (requirement '(zfs-scan))
> +        (documentation "Mounts all non-legacy mounted ZFS filesystems.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error mounting file systems:=
 ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     ;; Output to current-error-port, otherwise the
> +                     ;; user will not see any prompts for passwords
> +                     ;; of encrypted datasets.
> +                     ;; XXX Maybe better to explicitly open /dev/console=
 ?

Seeing this comment, I assume that encrypted pools are supported, right?

> +                     (with-output-to-port (current-error-port)
> +                       (lambda ()
> +                         (invoke #$zfs "mount" "-a" "-l"))))))
> +        (stop #~(lambda _
> +                  ;; Make sure that Shepherd does not have a CWD that
> +                  ;; is a mounted ZFS filesystem, which would prevent
> +                  ;; unmounting.
> +                  (chdir "/")
> +                  (invoke #$zfs "unmount" "-a" "-f")))))
> +
> +    `(,zfs-scan
> +      ,device-mapping-zvol/*
> +      ,@(if (zfs-configuration-auto-mount? conf)
> +            `(,zfs-auto-mount)
> +            '()))))
> +
> +(define (zfs-user-processes conf)
> +  (if (zfs-configuration-auto-mount? conf)
> +      '(zfs-auto-mount)
> +      '(zfs-scan)))
> +
> +(define (zfs-mcron-auto-snapshot-jobs conf)
> +  (let* ((user-auto-snapshot-keep      (zfs-configuration-auto-snapshot-=
keep conf))
> +         ;; assoc-ref has earlier entries overriding later ones.
> +         (auto-snapshot-keep           (append user-auto-snapshot-keep
> +                                               %default-auto-snapshot-ke=
ep))
> +         (auto-snapshot?               (zfs-configuration-auto-snapshot?=
 conf))
> +         (zfs-auto-snapshot-package    (make-zfs-auto-snapshot-package c=
onf))
> +         (zfs-auto-snapshot            (file-append zfs-auto-snapshot-pa=
ckage
> +                                                    "/sbin/zfs-auto-snap=
shot")))
> +    (map
> +      (lambda (label)
> +        (let ((keep   (assoc-ref auto-snapshot-keep label))
> +              (sched  (assoc-ref %auto-snapshot-mcron-schedule label)))
> +          #~(job '#$sched
> +                 (string-append #$zfs-auto-snapshot
> +                                " --quiet --syslog "
> +                                " --label=3D" #$(symbol->string label)
> +                                " --keep=3D" #$(number->string keep)
> +                                " //"))))
> +      '(frequent hourly daily weekly monthly))))

Maybe use something like

  (map first %default-auto-snapshot-keep)

to avoid having to changing it if things change in the future.

> +(define (zfs-mcron-auto-scrub-jobs conf)
> +  (let* ((zfs-package    (make-zfs-package conf))
> +         (zpool          (file-append zfs-package "/sbin/zpool"))
> +         (auto-scrub     (zfs-configuration-auto-scrub conf))
> +         (sched          (cond
> +                           ((eq? auto-scrub 'weekly)  "0 0 * * 7")
> +                           ((eq? auto-scrub 'monthly) "0 0 1 * *")
> +                           (else                      auto-scrub))))
> +    (list
> +      #~(job '#$sched
> +             ;; Suppress errors: if there are no ZFS pools, the
> +             ;; scrub will not be given any arguments, which makes
> +             ;; it error out.
> +             (string-append "(" #$zpool " scrub `" #$zpool " list -o nam=
e -H` "
> +                            "> /dev/null 2>&1) "
> +                            "|| exit 0")))))
> +
> +(define (zfs-mcron-jobs conf)
> +  (append (zfs-mcron-auto-snapshot-jobs conf)
> +          (if (zfs-configuration-auto-scrub conf)
> +              (zfs-mcron-auto-scrub-jobs conf)
> +              '())))
> +
> +(define zfs-service-type
> +  (service-type
> +    (name 'zfs)
> +    (extensions
> +      (list ;; Install OpenZFS kernel module into kernel profile.
> +            (service-extension linux-loadable-module-service-type
> +                               zfs-loadable-modules)
> +            ;; And load it.
> +            (service-extension kernel-module-loader-service-type
> +                               (const '("zfs")))
> +            ;; Make sure ZFS pools and datasets are mounted at
> +            ;; boot.
> +            (service-extension shepherd-root-service-type
> +                               zfs-shepherd-services)
> +            ;; Make sure user-processes don't start until
> +            ;; after ZFS does.
> +            (service-extension user-processes-service-type
> +                               zfs-user-processes)
> +            ;; Install automated scrubbing and snapshotting.
> +            (service-extension mcron-service-type
> +                               zfs-mcron-jobs)
> +
> +            ;; Install ZFS management commands in the system
> +            ;; profile.
> +            (service-extension profile-service-type
> +                               (compose list make-zfs-package))
> +            ;; Install ZFS udev rules.
> +            (service-extension udev-service-type
> +                               (compose list make-zfs-package))))
> +    (description "Installs ZFS, an advanced filesystem and volume manage=
r.")))
> --
> 2.31.1

I haven=E2=80=99t tested anything, but the rest looks good!  :-)

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEz4sUVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x57YcQAKLhO/BZbp3/pfkF/9xrol6wZO3b
nUY6rw3m1oi5mjEx7wLdSonltbkxoXQnZuAqnlIe1NXLldd7AQ5f4Lx3Uw9myB+l
f0FjC1ks5Cp6yWhqgWp04o94mAxTEQ/yHB1jEMIhkM2PTaYyAIcil1dEOjJITD9b
Imx0tl93imfo+LAy1mBQvqb9ONimK1ixr6Xvu8IM6Cu85qTHVE18Pt3ugS25wvit
Fi+te5NAWMYHQ+2sbPQjGdlVCnTNYNEI7fL4Bse9+Y82WPdCeKPqay01MR4U0WbS
P28KNmNqNtefL2dYoImARVckKdOP83NQzEtNaQY8VD32xNAcW/dfAKlcxLuLkfI+
s1QUnYTnY9//AYhCao6b5MKn2iLAWJ68Ij7t2D8iEXLTFzi1l7zyGiKvJKlvmucN
mWoKGCfmLOp0xxki4CC0mVkBGDRwA+QrPGqXDljbCWoAaOpEywnqX88cUxPq5+Jw
niConf+Bc/GYdmdqWbWp+NUqpXGPax96jsys9lBKoiEV/8DOGnyKsB3XLFtLv2oH
wa4SoeeKexF9E7BIDABLts/kTPZG7VcWN4Vl0IVymIHF6aQBxpCk4GbHUH4voVNg
/7oP2OZCQn9HOiClWN7awllCVISX7b/nmxijx/81UnsDzDWThtkacjtfyFqZalxX
0d2CLc4s27HWzU6C
=Ql/1
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 4 Sep 2021 18:59:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 14:59:12 2021
Received: from localhost ([127.0.0.1]:48594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMash-0004my-NP
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 14:59:12 -0400
Received: from mail-4319.protonmail.ch ([185.70.43.19]:37299)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mMase-0004mi-SL
 for 45692 <at> debbugs.gnu.org; Sat, 04 Sep 2021 14:59:09 -0400
Date: Sat, 04 Sep 2021 18:58:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1630781941;
 bh=PiQfI+fQQ0L6ZcQpluowyB0lM+YSbtZo/u9o6KgdLf4=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=ti9RzpJ2j6D6Mdz2Plo8dMDlU304PnYSwSXEyduDQAyHV3yRwOOGfDHJrMIPNBbp/
 Q0BwNDC2EsaTcTO48cP3+EJsSiGT16IPwKlYThNIpLafVIKpmpSITzoBXnt1ZbuvbV
 Z9v9d8Ke8UPDRy+dpVmMVd+UGITRVgN+8QgnXlAY=
To: Maxime Devos <maximedevos@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <cS37T52dLINzNDyX2L5AnMaw2a0o1G1M3r16AKa9Piya2m5WzPRF-hThegq8C0vQ3KsfNIxeXCtMTKoVRd4KWsFbFPJtdhf0aqhvEPjXss8=@protonmail.com>
In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello again Maxime,

> > +OpenZFS currently only supports Linux-Libre and is not available on th=
e
> > +Hurd.
> > +
> > +OpenZFS is free software; unfortunately its license is incompatible wi=
th
> > +the GNU General Public License (GPL), the license of the Linux kernel,
> > +which means they cannot be distributed together. However, as a user,
> > +you can choose to build ZFS and use it together with Linux; you can
> > +even rely on Guix to automate this task. See
> > +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
> > +the Free Software Foundation} for more information.
>
> That analysis says explicitely that the CDDL is incompatible with the GPL=
,
> and that they cannot be legally linked together. E.g., see the second quo=
ted
> paragraph:
>
> =E2=80=98A copyleft license, including any version of the GNU GPL or GNU =
AGPL, requires
> augmented versions to be free under the same license -- the same requirem=
ent it
> applies to modification of the code.1 I wrote a copyleft license for GNU =
programs
> to ensure that all users of all versions of them would get the freedoms I=
 intended
> to give them.
>
> It is not enough to require that the combined program be free software so=
mehow. It
> must be released, as a whole, under the original copyleft license, to ens=
ure that:
> (1) subsequent users get the exact same freedoms and (2) subsequent inter=
mediaries
> do not get more opportunity than first-stage intermediaries to make the p=
rogram nonfree.=E2=80=99


I think the key word you miss here is "released", i.e. "It must be released=
, as a whole, under the original copyleft license."

Looking at the GPLv2, the word "release" is never used, however I believe t=
he "release" word in the FSF analysis would be considered as a synonym of "=
distribute" in this context.

The GPLv2 mentions "distribute" many times, but provides no definition of t=
he word.
My understanding is that "distribute" used in GPL means "to provide or make=
 available to at least one person that asks for a copy from you, via some m=
edium".
The GPLv2 imposes many restrictions on the ability to "distribute", so it s=
eems reasonable to consider it an important point.

Now, as I have pointed out, the existing package definition in `gnu/package=
s/file-systems.scm` specifically disables making a binary copy ("substitute=
" in Guix parlance) available.
In addition, my understanding is that when compiling from source, the `sour=
ce` field is what is used, and the `source` field in the `gnu/packages/file=
-systems.scm` refers to github.com, not any Guix server.

There is no text in GPLv2 which restricts compilation.
However, it can be argued that compilation is a form of translation from so=
urce code to machine-executable binary, and the text does mention "translat=
ion is included without limitation in the term 'modification'".

GPLv2 restricts modification with three terms:

a.  You should have prominent notices on modified files.
b.  Extra restriction on copies you ***distribute*** or ***publish***.
c.  Extra restriction if the program is interactive and prints copyright no=
tices normally.

(a) does not apply since the linking process used (a form of dynamic linkin=
g) does not actually modify any files; presumably only in-memory tables or =
some such are modified.
(b) does not apply if "distribute" is not what is being done by Guix here.
(c) does not apply since the Linux kernel is not interactive (and even so, =
does not print copyright notices, not even in debug logs).

On the CDDL side, neither "compile" nor "translate" is ever used, but for c=
ompleteness let us consider compile =3D=3D translate =3D=3D modify.
Modifications are specifically allowed under conditions in section 3.
However, again, section 3 is titled "distribution obligations", meaning the=
y only apply on *distribution*.

So I think the issue here really is: Does Guix "distribute" the ZFS linked =
with Linux?
My understanding is that the mere existence of code to perform that linking=
 does not in fact *distribute* the code (linking is not the same as distrib=
uting); I believe the key point of "distribute" is that a third party gets =
a copy.  And at least, the code I added in this patch does not provide any =
copy of the compiled code to anyone else; it just stores it on the local ma=
chine's disk, in a cpio archive that is used in the system's bootup.  The c=
opy, in the execution of the code I added, is never provided to anyone else=
, so I think my patch is unproblematic

Quick question: does `guix publish` respect `#:substitutable? #f`?  If `gui=
x publish` respects `#:substitutable? #f` then it seems to me that even the=
 point "Guix should make at least an attempt to warn users of possibly lega=
l gray areas when distributing" does not apply, too: Guix by itself would n=
ot (should not, really; that should be the point of `#:substituable? #f`) p=
ublish the compiled code anyway, users who specifically want to publish ZFS=
 and Linux linked together would need to modify the `guix publish` code, an=
d such a user would be running a fork of Guix, not Guix itself, thus should=
 be made aware of this.

Indeed, if `guix publish` does *not* respect `#:substitutable? #f`, I think=
 it would be more effective to protect users against potential legal gray a=
reas for `guix publish` to respect that flag, and for us to then audit exis=
ting non-GPLv2-compatible kernel modules and ensure they are `#:substitutab=
le? #f`, then to put up a warning; a warning might be overlooked, but an ou=
tright refusal to publish cannot.

Thanks
raid5atemyhomework





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 3 Sep 2021 12:42:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 08:42:12 2021
Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mM8WK-0000Tb-0U
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 08:42:12 -0400
Received: from mail-4318.protonmail.ch ([185.70.43.18]:34747)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mM8WH-0000TO-9g
 for 45692 <at> debbugs.gnu.org; Fri, 03 Sep 2021 08:42:10 -0400
Date: Fri, 03 Sep 2021 12:41:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1630672921;
 bh=CfmColcHtExzctjfoPwVCCLr1NstiiH+evlsrqtWeW0=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=AyyR0kbbyXUrHWOHzCeP4mXMrFoAlS7HeM/5t0R0HyybWjlEPeAYtUy2QM4nqJIq6
 phM4t6TFFSq/qwKfioGRZyEFFeOB6Aja0cT5ut5g+Tp4iFvWvIFXlqgDP8w8XJF552
 8dZUQWzp/o+UVcWnKdHlnouudkhqvsXjEw0IzAYA=
To: Maxime Devos <maximedevos@HIDDEN>,
 Efraim Flashner <efraim@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <J8OknoQ6k_2BTBa5PUlSVldvmdbPN81V3IMT3ipJ3XfgPwfUV8TeC5K-8lIWVOHn4NkDSJnHu1X3hYXAT9AAJNeTZDTNwZtgpmEPfpOEmow=@protonmail.com>
In-Reply-To: <d89a03fc0603bd173476527a96cdb50f02454460.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
 <d89a03fc0603bd173476527a96cdb50f02454460.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Greetings Maxime,

> Maxime Devos schreef op do 02-09-2021 om 22:57 [+0200]:
>
> > Hi,
> > Some comments on the code. Spoiler: the code is presumably good,
> > but there's a GPL violation.
>
> Nevermind, it's apparently less of an issue than I expected?
> See the links to IRC at https://issues.guix.gnu.org/50347.

Note that this patch does ***not*** add ZFS to the Guix project.
Instead, this patch creates a convenient service that uses the existing `zf=
s` package and builds the user system so that the user downloads the ZFS so=
urce code, compiles it, and links it to the kernel on the system.

In #50347, you refer to this analysis: https://sfconservancy.org/blog/2016/=
feb/25/zfs-and-linux/

I quote this part:

> ## Is The Analysis Different With Source-Only Distribution?
>
> ...
>
> Pure distribution of source with no binaries is undeniably different. Whe=
n
> distributing source code and no binaries, requirements in those sections =
of
> GPLv2 and CDDLv1 that cover modification and/or binary (or =E2=80=9CExecu=
table=E2=80=9D, as
> CDDLv1 calls it) distribution do not activate. Therefore, the analysis is
> simpler, and we find no specific clause in either license that prohibits
> source-only redistribution of Linux and ZFS, even on the same distributio=
n
> media.

This is in line with the analysis already quoted in the documentation added=
: https://www.fsf.org/licensing/zfs-and-linux

Guix does ***not*** distribute any binaries; see the file `gnu/packages/fil=
e-systems.scm` in the **current** `master` branch of Guix:

>     `(;; The ZFS kernel module should not be downloaded since the license
>       ;; terms don't allow for distributing it, only building it locally.
>       #:substitutable? #f

Note that the above code ***predates*** this patch: fe338d7f009 (Efraim Fla=
shner 2019-12-19 11:47:49 +0200 1188)
Also CCing Efraim here --- presumably he had some choice arguments about ho=
w `zfs` got into `gnu/packages/file-systems.scm` in the first place.

If the CDDL-GPL incompatibility is problematic, then why is it only being b=
rought up now, why did it not get brought up in 2019, when Efraim was submi=
tting the patch that put the ZFS package into Guix in the first place?

The code in this patch does not do anything that the user cannot do with th=
eir own scripts (indeed, I prototyped much of the code in my own `configura=
tion.scm`).
The code in this patch also does not link, directly or indirectly, into the=
 ZFS kernel module.
At worst, the code in this patch executes the binaries that are the output =
of compilation, but since it is invoked as a separate binary running in a s=
eparate process, there is no legal basis for considering this as "linking",=
 as opposed to merely invoking a separate program (if merely invoking a sep=
arate program was enough to "link", then Windows cannot run any free softwa=
re).

Your referred document then makes some speculation that even source distrib=
ution might be problematic.
However, Guix does *not* even distribute sources, by my understanding --- t=
he Guix build downloads from https://github.com/openzfs/zfs/releases/ witho=
ut going through any Guix servers, so this should be even less of a problem=
.
If anyone is at legal risk, it is github, not Guix, for distributing the so=
urces --- and it would be very strange for Oracle to not go after github fo=
r distributing source code that is intended to be linked to GPL code, but g=
o after Guix; Guix is a much more niche project than the openzfs/zfs projec=
t on github.
(my understanding is that Oracle implicitly allows the existence of openzfs=
/zfs, even has some maintainers of the project on their payroll, so it woul=
d be very strange to go after software that just downloads the source code =
from that project, compiles it, links it, and does ***not*** distribute it =
(`#:substitutable? #f`))

My understanding (and my argument) is that the already-existing code introd=
uced in fe338d7f009 does not represent a distribution of any ZFS code, not =
even source:

* The existing fe338d7f009 code tells Guix to download from a github server=
, not from Guix.
* The existing fe338d7f009 code specifically tells Cuirass to not provide a=
 binary substitute, so Guix end-users must download from github, not from a=
ny Guix servers.
  * Thus, even if source distribution is legally problematic, Guix does not=
 even distribute the source; the existing fe338d7f009 code just downloads i=
t from an existing distributor.
  * That Oracle tolerates the continued existence of https://github.com/ope=
nzfs/zfs undermines any legal argument Oracle might make if somebody else b=
uilds a script that downloads ZFS from https://github.com/openzfs/zfd and c=
ompiles it and links it to GPL code locally without redistributing; that pr=
oject already contains human-readable instructions on how to download, buil=
d, and link ZFS to a Linux kernel, the existing fe338d7f009 code merely tra=
nslated that text to a machine-readable program.
    If Oracle thinks this is legally problematic, they should have demanded=
 shutdown of the https://github.com/openzfs/zfs project first, a much more =
popular project than Guix.
* The actual code in this patch does not directly invoke the ZFS kernel mod=
ule.
  * The actual code in this patch does link the ZFS kernel module to the ke=
rnel of the *local* system, but does not make this linked version available=
 to others; it is only available locally on the system of the user that inv=
okes this actual code.
    Again, this is merely a translation (to machine-readable text instructi=
ons) of human-readable text instructions on how to link the ZFS kernel modu=
le to the Linux kernel, text available publicly on https://github.com/openz=
fs/zfs.
  * The actual code in this patch invokes the ZFS tools as separate program=
s, thus does not link with them.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 3 Sep 2021 12:23:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 08:23:26 2021
Received: from localhost ([127.0.0.1]:43242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mM8EA-0006KB-BC
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 08:23:26 -0400
Received: from albert.telenet-ops.be ([195.130.137.90]:54450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mM8E7-0006Jz-P3
 for 45692 <at> debbugs.gnu.org; Fri, 03 Sep 2021 08:23:24 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by albert.telenet-ops.be with bizsmtp
 id pQPM2500E0mfAB406QPM3f; Fri, 03 Sep 2021 14:23:22 +0200
Message-ID: <1061ab2fff72300fee6d29760b3c5e92c80969cb.camel@HIDDEN>
Subject: Re: [bug#45692] Gaslighting
From: Maxime Devos <maximedevos@HIDDEN>
To: Mason Loring Bliss <mason@HIDDEN>, 45692 <at> debbugs.gnu.org
Date: Fri, 03 Sep 2021 14:22:12 +0200
In-Reply-To: <20210902212359.GU6420@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <20210902212359.GU6420@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-haUH6l6e3qre/WuSWVL9"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630671802; bh=hnEXTblwE4mnxzgK1iHoBkEAY57rOIj2gn2W0blvXnM=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=KxreDYo/ym6+1cQ6izIDvGHWWvVXW6UyKWgFPSPhh/RaY+clGa6D5kZyv9++O/X7v
 N9RfNp53yvHOE/zk3rbdOvNFqJfaWfpvVm5Yv0vzR1OPiIPQj21Q5hBkczuLVMfSpS
 9qFig1mCT8CKA4EzMa7RqmBEKOewqzHQ4Gz2yzWMncrc5yOw51LXlaVlSq+FCrddXx
 j3yXGeNtWtNqNJgGBJtpKCUGDSZPVxtBfmrSKKXde/rvTlD3mT/RtYB2lirmYYuPzy
 5j9bf+mKFkVAdTDCyog6jvtjn2G8c2SrS7QOa7nV6Kby7T6u2OK/ChPM5xaeMtCKhz
 hVV2HCOC31wUA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
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.7 (-)


--=-haUH6l6e3qre/WuSWVL9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Mason Loring Bliss schreef op do 02-09-2021 om 17:24 [-0400]:
> Maxime writes,
>  =20
>     > The GPL violation is very unfortunate. It would have been nice to
>     > have some ZFS support in Guix.
>=20
> There is no GPL violation. Gaslighting in an attempt to sabotage the
> adoption of high-quality free software is somewhat poor form and not at a=
ll
> useful.

Indeed, gaslighing is poor form and not at all useful.  But why are you sug=
gesting
I'm gaslightling here?  Did you just read these last two sentences of the e=
-mail?
If you read all of it, you'd have seen my explanation of why I believe ther=
e's
a GPL violation, and two relevant links to articles by SFLC and FSF.=20

Also see IRC logs:
https://logs.guix.gnu.org/guix/2021-09-02.log
https://logs.guix.gnu.org/guix/2021-09-03.log

While ultimately it's a matter for the courts to decide on,
I believe I've reasonable grounds to believe it's a GPL violation
and explained why, so I don't see any gaslightling here.

And I'm not =E2=80=98sabotaging=E2=80=99 anything.  In fact, I'm _helping_ =
adoption of ZFS,
by reviewing the patch and giving some suggestions.  There is just the prac=
tical
problem of the in-my-eyes probable GPL violation (your opinion on whether i=
t's
a GPL violation might vary).

> To be clear, the one singular thing that would be a GPL violation would b=
e
> Guix building Linux with ZFS built in and then distributing that binary.
> Users can build ZFS into their kernels and use them and that's fine as lo=
ng
> as they don't distribute them. Guix can script this to make it easy for
> users to build ZFS into their kernels and that would not be a violation.
> The only possible violation is distribution of a binary Linux kernel with
> ZFS compiled into it.

See the previous mail and the IRC logs for why I find this reasoning rather
flimsy.

> Hope that helps.

No, your libel about =E2=80=98Maxime is gaslighting=E2=80=99 doesn't help. =
 And your paragraph
about why you think there's no GPL violation here is nothing I haven't read=
 before.

I probably won't be reading and replying to your mails anymore.

Bye,
Maxime

--=-haUH6l6e3qre/WuSWVL9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTITdRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rHFAP40RtS29HE3qLvCXcNA+nJvJN0e
50xYoGAaCo2P6HtwMwD/bQpz/sEfYZbo5NC8GEydG6suvedO+esfi69siO998wM=
=dfiW
-----END PGP SIGNATURE-----

--=-haUH6l6e3qre/WuSWVL9--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 22:22:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 02 18:22:45 2021
Received: from localhost ([127.0.0.1]:42276 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLv6b-0007ZA-6e
	for submit <at> debbugs.gnu.org; Thu, 02 Sep 2021 18:22:45 -0400
Received: from michel.telenet-ops.be ([195.130.137.88]:54306)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mLv6X-0007Z0-RN
 for 45692 <at> debbugs.gnu.org; Thu, 02 Sep 2021 18:22:43 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by michel.telenet-ops.be with bizsmtp
 id pANg250060mfAB406ANg8U; Fri, 03 Sep 2021 00:22:40 +0200
Message-ID: <d89a03fc0603bd173476527a96cdb50f02454460.camel@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
From: Maxime Devos <maximedevos@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>, 
 "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
Date: Fri, 03 Sep 2021 00:22:39 +0200
In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-4lkkw7Fcfoep7xveFJvR"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630621360; bh=bEfq9+hZP8QJgyjbXQIZsOMqV4t7dWkg/K44Fw7OV90=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=Vv/ijOGnnOcqHLZtTlowUSc11WZwCWM0dOe3IHtv9kxhk55FmagWj0UdEEmcTlFEe
 nzwDDT9K9d6oWwXM81ZOX+R2fSaobSji6zf1MSP27aYAULF86GqJcC7YsuaHIqCErz
 ljHDXBtxbp5k+4DQ9MIZr0/UJA32ltUwUsE5ofbnrrIp2xoZCMIYYPbnkVeZzJWTKK
 OtZI3JtSXOVBQlK3VSagsdy4hfuNZJRrPacizrKOgsdoZi/AULAAKBPOmRDBzMh0yj
 9Fju/SxG6tX1SFsLqhu3mf53qyPOqy2GJMfLdO3g9cH53zEydE/aVZsGwe9sLssQWB
 ySz/qfqGJvgCg==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
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.7 (-)


--=-4lkkw7Fcfoep7xveFJvR
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Maxime Devos schreef op do 02-09-2021 om 22:57 [+0200]:
> Hi,
>=20
> Some comments on the code.  Spoiler: the code is presumably good,
> but there's a GPL violation.

Nevermind, it's apparently less of an issue than I expected?
See the links to IRC at <https://issues.guix.gnu.org/50347>.

Greetings,
Maxime.

--=-4lkkw7Fcfoep7xveFJvR
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTFOrxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hI3AQD9KtkmuVjtu3HdqJTsigvecanY
0v6UU0A1ogwfdSD3YQEA/0kXZFSV+NbwfSXgEO3k0/I9AqQMcCpGSEm33Zx/AwQ=
=HNvs
-----END PGP SIGNATURE-----

--=-4lkkw7Fcfoep7xveFJvR--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 21:51:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 02 17:51:39 2021
Received: from localhost ([127.0.0.1]:42240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLucR-0006mx-P8
	for submit <at> debbugs.gnu.org; Thu, 02 Sep 2021 17:51:39 -0400
Received: from yangtze.blisses.org ([144.202.50.44]:53068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mason@HIDDEN>) id 1mLuBr-00069l-HH
 for 45692 <at> debbugs.gnu.org; Thu, 02 Sep 2021 17:24:08 -0400
Received: from cocytus.blisses.org (cocytus.blisses.org [64.223.129.151])
 by yangtze.blisses.org (Postfix) with ESMTP id E3D8317BD70
 for <45692 <at> debbugs.gnu.org>; Thu,  2 Sep 2021 17:24:01 -0400 (EDT)
Date: Thu, 2 Sep 2021 17:24:00 -0400
From: Mason Loring Bliss <mason@HIDDEN>
To: 45692 <at> debbugs.gnu.org
Subject: Gaslighting
Message-ID: <20210902212359.GU6420@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="zu8lIfFVzXMVnfzp"
Content-Disposition: inline
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
X-Mailman-Approved-At: Thu, 02 Sep 2021 17:51:35 -0400
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 (-)


--zu8lIfFVzXMVnfzp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Maxime writes,
 =20
    > The GPL violation is very unfortunate. It would have been nice to
    > have some ZFS support in Guix.

There is no GPL violation. Gaslighting in an attempt to sabotage the
adoption of high-quality free software is somewhat poor form and not at all
useful.

To be clear, the one singular thing that would be a GPL violation would be
Guix building Linux with ZFS built in and then distributing that binary.
Users can build ZFS into their kernels and use them and that's fine as long
as they don't distribute them. Guix can script this to make it easy for
users to build ZFS into their kernels and that would not be a violation.
The only possible violation is distribution of a binary Linux kernel with
ZFS compiled into it.

Hope that helps.

--=20
Mason Loring Bliss             mason@HIDDEN            Ewige Blumenkra=
ft!
(if awake 'sleep (aref #(sleep dream) (random 2))) -- Hamlet, Act III, Scen=
e I

--zu8lIfFVzXMVnfzp
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEEXtBZz1axB5rEDCEnrJXcHbvJVUFAmExQO0ACgkQnrJXcHbv
JVVz6A//ZGgw66e0hV0UbUOpIPoaj4gjaWPOReW44xgRyi8dP5qtwrpmzBIaCvBh
5ONEnP8cOVQWJlF2bXk05pMiAp7c+n66ZY6IupEfMDbxqeCsHrUfJ9jAKWxEgJCK
26EnK0qbA+RCPloHnkFiKYbgDsvIqB5Rv9c76XT8zL3QCw4Eo0gcJX5Gcm4CKPC4
uQCd7rEDoowFJDZVfC/z+BtV6fzmomLpuceUlA3jvIIK/c2/umsdauwoB33Q8zaV
hCt6CffpZEX7XmVv4wWJGKcCcojUDiqaBXN+8K7Z5aPNJFqLYMj6Vupvld2R4oyo
rq9mlqPu5jEmwF9I6N0QIO7F/4ndLGxB685Lzm3aXmzd4KD1HBQEtzUvuAustunn
CENyh8mtdftM4sWhsFLKd4OSNYzHNDGG/2mm9JFDLqiHGP0CBZpr5JVQC9iBgRYq
Bn+IlUl9YmfRkMUUJOBIYrKfrQQCga3NPgvskCh6etiduXd48WVtnfIXot8BCeGT
eJ49Q5r+D0V/Sx1wyVhgva+k1xkO3LkiQKSUob4kPumdlSUL4I+XYuLV3WtdA536
crQlXeJIEAiYRXUZYNdK0xsRNj4HUE5E5FQhWmFQAuPR6f26CWbD2qjqh+/+Tm5/
lVHDIFnqZAPsdXKDNye3fCeZNfZiZ7TUtXMw78/7KKoX3P4JgGw=
=Td5w
-----END PGP SIGNATURE-----

--zu8lIfFVzXMVnfzp--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 20:57:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 02 16:57:34 2021
Received: from localhost ([127.0.0.1]:42207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLtm5-0005Wu-Bq
	for submit <at> debbugs.gnu.org; Thu, 02 Sep 2021 16:57:34 -0400
Received: from albert.telenet-ops.be ([195.130.137.90]:50538)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1mLtlx-0005Wf-9v
 for 45692 <at> debbugs.gnu.org; Thu, 02 Sep 2021 16:57:27 -0400
Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d])
 by albert.telenet-ops.be with bizsmtp
 id p8xK250040mfAB4068xKZb; Thu, 02 Sep 2021 22:57:19 +0200
Message-ID: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@HIDDEN>
Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type.
From: Maxime Devos <maximedevos@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>, 
 "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
Date: Thu, 02 Sep 2021 22:57:09 +0200
In-Reply-To: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-JuVAzqRhKAJpPFmNf5J/"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21;
 t=1630616239; bh=MQkamP+fxxwYhMxws7hGO9oO9KsHWSWd29/r//QL70M=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=f0baQuUquzZuWXWwu6ICVPO8Uww2HfDxuBs+eBw4ihK0y65gvTOZiovHKOdo0O1pR
 J4apr5kuidrRAaiQfm5qUCI0yJxkM+JxcpDslAypDVog8GpKCBhphRRMP8ykimiKHw
 0PtZedE/i92Yi6k4hYzLGLcXfNjr05k8Cb5pL7k8LS52IH8jMGwCzfqcLX55xCaXgv
 VqoICnDuaFvWPqDmmeQQ0pYE6InwIpeBompbT7qyQEK+1vP2h1E01DjqkNnRhy44ZE
 ZabMYvdphbQzaZclZAsoTz9lv4BZVujBjxlGZjsECt410wuhqT3Y5WjZhy2xMo9ClI
 llncuNDlWhCNg==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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.7 (-)


--=-JuVAzqRhKAJpPFmNf5J/
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

Some comments on the code.  Spoiler: the code is presumably good,
but there's a GPL violation.

> From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001
> From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
> Date: Mon, 22 Mar 2021 16:26:28 +0800
> Subject: [PATCH] gnu: Add ZFS service type.
>=20
> * gnu/services/file-systems.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * gnu/services/base.scm: Export dependency->shepherd-service-name.
> * doc/guix.texi (ZFS File System): New subsection.
> ---
>  doc/guix.texi                 | 351 ++++++++++++++++++++++++++++++++++
>  gnu/local.mk                  |   2 +
>  gnu/services/base.scm         |   4 +-
>  gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++
>  4 files changed, 651 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/services/file-systems.scm
>=20
> diff --git a/doc/guix.texi b/doc/guix.texi
> index b3c16e6507..e21c47d7ca 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
>  Copyright @copyright{} 2021 Raghav Gururajan@*
>  Copyright @copyright{} 2021 Domagoj Stolfa@*
>  Copyright @copyright{} 2021 Hui Lu@*
> +Copyright @copyright{} 2021 raid5atemyhomework@*
>=20
>  Permission is granted to copy, distribute and/or modify this document
>  under the terms of the GNU Free Documentation License, Version 1.3 or
> @@ -14265,6 +14266,356 @@ a file system declaration such as:
>  compress-force=3Dzstd,space_cache=3Dv2"))
>  @end lisp
>=20
> +
> +@node ZFS File System
> +@subsection ZFS File System
> +
> +Support for ZFS file systems is provided on Guix by the OpenZFS project.

This is worded a bit misleading: it doesn't seem like OpenZFS is providing
Guix-specific support, except in the more general sense that OpenZFS provid=
es a
ZFS kernel module and utilities to _everyone_.  Suggestion:

=E2=80=98Support for ZFS file systems in Guix is based on the OpenZFS proje=
ct.=E2=80=99

> +OpenZFS currently only supports Linux-Libre and is not available on the
> +Hurd.
> +
> +OpenZFS is free software; unfortunately its license is incompatible with
> +the GNU General Public License (GPL), the license of the Linux kernel,
> +which means they cannot be distributed together.  However, as a user,
> +you can choose to build ZFS and use it together with Linux; you can
> +even rely on Guix to automate this task.  See
> +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
> +the Free Software Foundation} for more information.

That analysis says explicitely that the CDDL is incompatible with the GPL,
and that they cannot be legally linked together.  E.g., see the second quot=
ed
paragraph:

=E2=80=98A copyleft license, including any version of the GNU GPL or GNU AG=
PL, requires
augmented versions to be free under the same license -- the same requiremen=
t it
applies to modification of the code.1 I wrote a copyleft license for GNU pr=
ograms
to ensure that all users of all versions of them would get the freedoms I i=
ntended
to give them.

It is not enough to require that the combined program be free software some=
how. It
must be released, as a whole, **under the original copyleft license**, to e=
nsure that:
(1) subsequent users get the exact same freedoms and (2) subsequent interme=
diaries
do not get more opportunity than first-stage intermediaries to make the pro=
gram nonfree.=E2=80=99

(emphasis mine)

See also <https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/>.

The argument =E2=80=98it's the _user_ that's building & linking, not =E2=80=
=98the guix project=E2=80=99=E2=80=99 doesn't
seem convincing to me.  We're still linking the kernel and OpenZFS kernel m=
odule,
we're just doing it lazily (in the SRFI-45 sense).

Until Sun's copyright expires or Oracle relicenses their ZFS code,
I don't think we can legally provide the ZFS kernel module in guix
(the user space tools should be fine, but they are useless without the kern=
el
modules I assume, so maybe remove them too?).

> +As a large and complex kernel module, OpenZFS has to be compiled for a
> +specific version of Linux-Libre.  At times, the latest OpenZFS package
> +available in Guix is not compatible with the latest Linux-Libre version.
> +Thus, directly installing the @code{zfs} package can fail.
> +
> +Instead, you are recommended to select a specific older long-term-suppor=
t
> +Linux-Libre kernel.  Do not use @code{linux-libre-lts}, as even the
> +latest long-term-support kernel may be too new for @code{zfs}.  Instead,
> +explicitly select a specific older version, such as @code{linux-libre-5.=
10},
> +and upgrade it manually later as new long-term-support kernels become
> +available that you have confirmed is compatible with the latest availabl=
e
> +OpenZFS version on Guix.
> +
> +For example, you can modify your system configuration file to a specific
> +Linux-Libre version and add the @code{zfs-service-type} service.
> +
> +@lisp
> +(use-modules (gnu))
> +(use-package-modules
> +  #;@dots{}
> +  linux)
> +(use-service-modules
> +  #;@dots{}
> +  file-systems)
> +
> +(define my-kernel linux-libre-5.10)
> +
> +(operating-system
> +  (kernel my-kernel)
> +  #;@dots{}
> +  (services
> +    (cons* (service zfs-service-type
> +                    (zfs-configuration
> +                      (kernel my-kernel)))
> +           #;@dots{}
> +           %desktop-services))
> +  #;@dots{})
> +@end lisp
> +
> +@defvr {Scheme Variable} zfs-service-type
> +This is the type for a service that adds ZFS support to your operating
> +system.  The service is configured using a @code{zfs-configuration}
> +record.
> +
> +Here is an example use:
> +
> +@lisp
> +(service zfs-service-type
> +  (zfs-configuration
> +    (kernel linux-libre-5.4)))
> +@end lisp
> +@end defvr
> +
> +@deftp {Data Type} zfs-configuration
> +This data type represents the configuration of the ZFS support in Guix
> +System.  Its fields are:
> +
> +@table @asis
> +@item @code{kernel}
> +The package of the Linux-Libre kernel to compile OpenZFS for.  This fiel=
d
> +is always required.  It @emph{must} be the same kernel you use in your
> +@code{operating-system} form.
> +
> +@item @code{base-zfs} (default: @code{zfs})
> +The OpenZFS package that will be compiled for the given Linux-Libre kern=
el.
> +
> +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot})
> +The @code{zfs-auto-snapshot} package to use.  It will be modified to
> +specifically use the OpenZFS compiled for your kernel.
> +
> +@item @code{dependencies} (default: @code{'()})
> +A list of @code{<file-system>} or @code{<mapped-device>} records that mu=
st
> +be mounted or opened before OpenZFS scans for pools to import.  For exam=
ple,
> +if you have set up LUKS containers as leaf VDEVs in a pool, you have to
> +include their corresponding @code{<mapped-ddevice>} records so that Open=
ZFS
> +can import the pool correctly at bootup.
> +
> +@item @code{auto-mount?} (default: @code{#t})
> +Whether to mount datasets with the ZFS @code{mountpoint} property automa=
tically
> +at startup.  This is the behavior that ZFS users usually expect.  You mi=
ght
> +set this to @code{#f} for an operating system intended as a ``rescue'' s=
ystem
> +that is intended to help debug problems with the disks rather than actua=
lly
> +work in production.
> +
> +@item @code{auto-scrub} (default: @code{'weekly})
> +Specifies how often to scrub all pools.  Can be the symbols @code{'weekl=
y} or
> +@code{'monthly}, or a schedule specification understood by
> +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as
> +@code{"0 3 * * 6"} for ``every 3AM on Saturday''.
> +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommen=
ded}).
> +
> +The general guideline is to scrub weekly when using consumer-quality dri=
ves, and
> +to scrub monthly when using enterprise-quality drives.
> +
> +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} =
scrubs
> +are done on midnight on the first day of each month.
> +
> +@item @code{auto-snapshot?} (default: @code{#t})
> +Specifies whether to auto-snapshot by default.  If @code{#t}, then snaps=
hots
> +are automatically created except for ZFS datasets with the
> +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}.
> +
> +If @code{#f}, snapshots will not be automatically created, unless the ZF=
S
> +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to
> +@code{true}.
> +
> +@item @code{auto-snapshot-keep} (default: @code{'()})
> +Specifies an association list of symbol-number pairs, indicating the num=
ber
> +of automatically-created snapshots to retain for each frequency type.
> +
> +If not specified via this field, by default there are 4 @code{frequent},=
 24
> +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} s=
napshots.
> +
> +For example:
> +
> +@lisp
> +(zfs-configuration
> +  (kernel my-kernel)
> +  (auto-snapshot-keep
> +    '((frequent . 8)
> +      (hourly . 12))))
> +@end lisp
> +
> +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} sna=
pshots.
> +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep thei=
r
> +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
> +
> +@end table
> +@end deftp
> +
> +@subsubsection ZFS Auto-Snapshot
> +
> +The ZFS service on Guix System supports auto-snapshots as implemented in=
 the
> +Solaris operating system.
> +
> +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{w=
eekly},
> +and @code{monthly} snapshots are created automatically for ZFS datasets =
that
> +have auto-snapshot enabled.  They will be named, for example,
> +@code{zfs-auto-snap_frequent-2021-03-22-1415}.  You can continue to use
> +manually-created snapshots as long as they do not conflict with the nami=
ng
> +convention used by auto-snapshot.  You can also safely manually destroy
> +automatically-created snapshots, for example to free up space.
> +
> +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on =
a
> +per-dataset level.  Sub-datasets will inherit this property from their p=
arent
> +dataset, but can have their own property.
> +
> +You @emph{must} set this property to @code{true} or @code{false} exactly=
,
> +otherwise it will be treated as if the property is unset.
> +
> +For example:
> +
> +@example
> +# zfs list -o name
> +NAME
> +tank
> +tank/important-data
> +tank/tmp
> +# zfs set com.sun:auto-snapshot=3Dtrue tank
> +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp
> +@end example
> +
> +The above will set @code{tank} and @code{tank/important-data} to be
> +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot.
> +
> +If the @code{com.sun:auto-snapshot} property is not set for a dataset
> +(the default when pools and datasets are created), then whether
> +auto-snapshot is done or not will depend on the @code{auto-snapshot?}
> +field of the @code{zfs-configuration} record.
> +
> +There are also @code{com.sun:auto-snapshot:frequent},
> +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily},
> +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:mon=
thly}
> +properties that give finer-grained control of whether to auto-snapshot a
> +dataset at a particular schedule.
> +
> +The number of snapshots kept for all datasets can be overridden via the
> +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record.
> +There is currently no support to have different numbers of snapshots to
> +keep for different datasets.
> +
> +@subsubsection ZVOLs
> +
> +ZFS supports ZVOLs, block devices that ZFS exposes to the operating
> +system in the @code{/dev/zvol/} directory.  The ZVOL will have the same
> +resilience and self-healing properties as other datasets on your ZFS poo=
l.
> +ZVOLs can also be snapshotted (and will be included in auto-snapshotting
> +if enabled), which snapshots the state of the block device, effectively
> +snapshotting the hosted file system.
> +
> +You can put any file system inside the ZVOL.  However, in order to mount=
 this
> +file system at system start, you need to add @code{%zfs-zvol-dependency}=
 as a
> +dependency of each file system inside a ZVOL.
> +
> +@defvr {Scheme Variable} %zfs-zvol-dependency
> +An artificial @code{<mapped-device>} which tells the file system mountin=
g
> +service to wait for ZFS to provide ZVOLs before mounting the
> +@code{<file-system>} dependent on it.
> +@end defvr
> +
> +For example, suppose you create a ZVOL and put an ext4 filesystem
> +inside it:
> +
> +@example
> +# zfs create -V 100G tank/ext4-on-zfs
> +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs
> +# mkdir /ext4-on-zfs
> +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs
> +@end example
> +
> +You can then set this up to be mounted at boot by adding this to the
> +@code{file-systems} field of your @code{operating-system} record:
> +
> +@lisp
> +(file-system
> +  (device "/dev/zvol/tank/ext4-on-zfs")
> +  (mount-point "/ext4-on-zfs")
> +  (type "ext4")
> +  (dependencies (list %zfs-zvol-dependency)))
> +@end lisp
> +
> +You @emph{must not} add @code{%zfs-zvol-dependency} to your
> +@code{operating-system}'s @code{mapped-devices} field, and you @emph{mus=
t
> +not} add it (or any @code{<file-system>}s dependent on it) to the
> +@code{dependencies} field of @code{zfs-configuration}.  Finally, you
> +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually
> +instantiate @code{zfs-service-type} on your system.
> +
> +@subsubsection Unsupported Features
> +
> +Some common features and uses of ZFS are currently not supported, or not
> +fully supported, on Guix.
> +
> +@enumerate
> +@item
> +Shepherd-managed daemons that are configured to read from or write to ZF=
S
> +mountpoints need to include @code{user-processes} in their @code{require=
ment}
> +field.  This is the earliest that ZFS file systems are assured of being
> +mounted.
> +
> +Generally, most daemons will, directly or indirectly, require
> +@code{networking}, or @code{user-processes}, or both.  Most implementati=
ons
> +of @code{networking} will also require @code{user-processes} so daemons =
that
> +require only @code{networking} will also generally start up after
> +@code{user-processes}.  A notable exception, however, is
> +@code{static-networking-service-type}.  You will need to explicitly add
> +@code{user-processes} as a @code{requirement} of your @code{static-netwo=
rking}
> +record.
> +
> +@item
> +@code{mountpoint=3Dlegacy} ZFS file systems.  The handlers for the Guix =
mounting
> +system have not yet been modified to support ZFS, and will expect @code{=
/dev}
> +paths in the @code{<file-system>}'s @code{device} field, but ZFS file sy=
stems
> +are referred to via non-path @code{pool/file/system} names.  Such file s=
ystems
> +also need to be mounted @emph{after} OpenZFS has scanned for pools.
> +
> +You can still manually mount these file systems after system boot; what =
is
> +only unsupported is mounting them automatically at system boot by specif=
ying
> +them in @code{<file-system>} records of your @code{operating-system}.
> +
> +@item
> +@code{/home} on ZFS.  Guix will create home directories for users, but t=
his
> +process currently cannot be scheduled after ZFS file systems are mounted=
.
> +Thus, the ZFS file system might be mounted @emph{after} Guix has created
> +home directories at boot, at which point OpenZFS will refuse to mount si=
nce
> +the mountpoint is not empty.  However, you @emph{can} create an ext4, xf=
s,
> +btrfs, or other supported file system inside a ZVOL, have that depend on
> +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home}
> +directory; they will be scheduled to mount before the @code{user-homes}
> +process.
> +
> +Similarly, other locations like @code{/var}, @code{/gnu/store} and so
> +on cannot be reliably put in a ZFS file system, though they may be
> +possible to create as other file systems inside ZVOL containers.
> +
> +@item
> +@code{/} and @code{/boot} on ZFS.  These require Guix to expose more of
> +the @code{initrd} very early boot process to services.  It also requires
> +Guix to have the ability to explicitly load modules while still in
> +@code{initrd} (currently kernel modules loaded by
> +@code{kernel-module-loader-service-type} are loaded after @code{/} is
> +mounted).  Further, since one of ZFS's main advantages is that it can
> +continue working despite the loss of one or more devices, it makes sense
> +to also support installing the bootloader on all devices of the pool tha=
t
> +contains the @code{/} and @code{/boot}; after all, if ZFS can survive th=
e
> +loss of one device, the bootloader should also be able to survive the lo=
ss
> +of one device.
> +
> +@item
> +ZVOL swap devices.  Mapped swap devices need to be listed in
> +@code{mapped-devices} to ensure they are opened before the system attemp=
ts
> +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to
> +@code{mapped-devices}.
> +
> +This will also require significant amounts of testing, as various kernel
> +build options and patches may affect how swapping works, which are possi=
bly
> +different on Guix System compared to other distributions that this featu=
re is
> +known to work on.
> +
> +@item
> +ZFS Event Daemon.  Support for this has not been written yet, patches ar=
e
> +welcome.  The main issue is how to design this in a Guix style while
> +supporting legacy shell-script styles as well.  In particular, OpenZFS i=
tself
> +comes with a number of shell scripts intended for ZFS Event Daemon, and =
we
> +need to figure out how the user can choose to use or not use the provide=
d
> +scripts (and configure any settings they have) or override with their ow=
n
> +custom code (which could be shell scripts they have written and trusted =
from
> +previous ZFS installations).
> +
> +As-is, you can create your own service that activates the ZFS Event Daem=
on
> +by creating the @file{/etc/zfs/zed} directory and filling it appropriate=
ly,
> +then launching @code{zed}.
> +
> +@item
> +@file{/etc/zfs/zpool.cache}.  Currently the ZFS support on Guix always f=
orces
> +scanning of all devices at bootup to look for ZFS pools.  For systems wi=
th
> +dozens or hundreds of storage devices, this can lead to slow bootup.  On=
e issue
> +is that tools should really not write to @code{/etc} which is supposed t=
o be for
> +configuration; possibly it could be moved to @code{/var} instead.  Anoth=
er issue
> +is that if Guix ever supports @code{/} on ZFS, we would need to somehow =
keep the
> +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is=
 in the
> +@code{/} mount point.
> +
> +@item
> +@code{zfs share}.  This will require some (unknown amount of) work to in=
tegrate
> +into the Samba and NFS services of Guix.  You @emph{can} manually set up=
 Samba
> +and NFS to share any mounted ZFS datasets by setting up their configurat=
ions
> +properly; it just can't be done for you by @code{zfs share} and the
> +@code{sharesmb} and @code{sharenfs} properties.
> +@end enumerate
> +
> +Hopefully, support for the above only requires code to be written, o use=
rs

o users -> and users

> +are encouraged to hack on Guix to implement the above features.
> +
>  @node Mapped Devices
>  @section Mapped Devices

I'm not familiar enough with ZFS to understand all that text above; I'll as=
sume
it's fine.

> diff --git a/gnu/local.mk b/gnu/local.mk
> index b944c671af..a2ff871277 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -43,6 +43,7 @@
>  # Copyright =C2=A9 2021 Philip McGrath <philip@HIDDEN>
>  # Copyright =C2=A9 2021 Arun Isaac <arunisaac@HIDDEN>
>  # Copyright =C2=A9 2021 Sharlatan Hellseher <sharlatanus@HIDDEN>
> +# Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
>  #
>  # This file is part of GNU Guix.
>  #
> @@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D				\
>    %D%/services/docker.scm			\
>    %D%/services/authentication.scm		\
>    %D%/services/file-sharing.scm			\
> +  %D%/services/file-systems.scm			\
>    %D%/services/games.scm			\
>    %D%/services/ganeti.scm			\
>    %D%/services/getmail.scm				\
> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index ab3e441a7b..bcca24f93a 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -185,7 +185,9 @@
>=20
>              references-file
>=20
> -            %base-services))
> +            %base-services
> +
> +            dependency->shepherd-service-name))
>=20
>  ;;; Commentary:
>  ;;;
> diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.sc=
m
> new file mode 100644
> index 0000000000..0b1aae38ac
> --- /dev/null
> +++ b/gnu/services/file-systems.scm
> @@ -0,0 +1,295 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonm=
ail.com>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (a=
t
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>;.
> +
> +(define-module (gnu services file-systems)
> +  #:use-module (gnu packages file-systems)
> +  #:use-module (gnu services)
> +  #:use-module (gnu services base)
> +  #:use-module (gnu services linux)
> +  #:use-module (gnu services mcron)
> +  #:use-module (gnu services shepherd)
> +  #:use-module (gnu system mapped-devices)
> +  #:use-module (guix gexp)
> +  #:use-module (guix packages)
> +  #:use-module (guix records)
> +  #:export (zfs-service-type
> +
> +            zfs-configuration
> +            zfs-configuration?
> +            zfs-configuration-kernel
> +            zfs-configuration-base-zfs
> +            zfs-configuration-base-zfs-auto-snapshot
> +            zfs-configuration-dependencies
> +            zfs-configuration-auto-mount?
> +            zfs-configuration-auto-scrub
> +            zfs-configuration-auto-snapshot?
> +            zfs-configuration-auto-snapshot-keep
> +
> +            %zfs-zvol-dependency))
> +
> +(define-record-type* <zfs-configuration>
> +  zfs-configuration
> +  make-zfs-configuration
> +  zfs-configuration?
> +
> +  ; linux-libre kernel you want to compile the base-zfs module for.
If a comment is on a line of its own, it's normally ";;".
";" is usually only for comments on the same line as some expression.

> +  (kernel                     zfs-configuration-kernel)


> +  ; the OpenZFS package that will be modified to compile for the
> +  ; given kernel.
> +  (base-zfs                   zfs-configuration-base-zfs
> +                              (default zfs))
> +
> +  ; the zfs-auto-snapshot package that will be modified to compile
> +  ; for the given kernel.
> +  (base-zfs-auto-snapshot     zfs-configuration-base-zfs-auto-snapshot
> +                              (default zfs-auto-snapshot))
> +
> +  ; list of <mapped-device> or <file-system> objects that must be
> +  ; opened/mounted before we import any ZFS pools.
> +  (dependencies               zfs-configuration-dependencies
> +                              (default '()))
> +
> +  ; #t if mountable datasets are to be mounted automatically.
Gramatically simpler: #t to mount all mountable datasets by default.

> +  ; #f if not mounting.
> +  ; #t is the expected behavior on other operating systems, the
> +  ; #f is only supported for "rescue" operating systems where
> +  ; the user wants lower-level control of when to mount.
> +  (auto-mount?                zfs-configuration-auto-mount?
> +                              (default #t))
> +
> +  ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an
> +  ; mcron time specification that can be given to `job`, or #f to
> +  ; disable.
> +  (auto-scrub                 zfs-configuration-auto-scrub
> +                              (default 'weekly))
> +
> +  ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse`
--> #t if auto-snapshot is the default
or
--> #t to auto-snapshot by default

> +  ; disables auto-snapshot per dataset), #f if no auto-snapshotting
> +  ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot
> +  ; per dataset).
> +  (auto-snapshot?             zfs-configuration-auto-snapshot?
> +                              (default #t))
> +
> +  ; association list of symbol-number pairs to indicate the number
> +  ; of automatic snapshots to keep for each of 'frequent, 'hourly,
> +  ; 'daily, 'weekly, and 'monthly.
> +  ; e.g. '((frequent . 8) (hourly . 12))
> +  (auto-snapshot-keep         zfs-configuration-auto-snapshot-keep
> +                              (default '())))

Seems a reasonable structure, though I'm not familiar with ZFS.
=20
> +(define %default-auto-snapshot-keep
> +  '((frequent . 4)
> +    (hourly . 24)
> +    (daily . 31)
> +    (weekly . 8)
> +    (monthly . 12)))
> +
> +(define %auto-snapshot-mcron-schedule
> +  '((frequent .  "0,15,30,45 * * * *")
> +    (hourly .    "0 * * * *")
> +    (daily .     "0 0 * * *")
> +    (weekly .    "0 0 * * 7")
> +    (monthly .   "0 0 1 * *")))
> +
> +;; A synthetic and unusable MAPPED-DEVICE intended for use when
> +;; the user has created a mountable filesystem inside a ZFS
> +;; zvol and wants it mounted inside the configuration.scm.
> +(define %zfs-zvol-dependency
> +  (mapped-device
> +    (source '())
> +    (targets '("zvol/*"))
> +    (type #f)))
> +
> +(define (make-zfs-package conf)
> +  (let ((kernel    (zfs-configuration-kernel conf))
> +        (base-zfs  (zfs-configuration-base-zfs conf)))
> +    (package
> +      (inherit base-zfs)
> +      (arguments (cons* #:linux kernel
> +                        (package-arguments base-zfs))))))
> +
> +(define (make-zfs-auto-snapshot-package conf)
> +  (let ((zfs                    (make-zfs-package conf))
> +        (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapsho=
t conf)))
> +    (package
> +      (inherit base-zfs-auto-snapshot)
> +      (inputs `(("zfs" ,zfs))))))
> +
> +(define (zfs-loadable-modules conf)
> +  (list (list (make-zfs-package conf) "module")))
> +
> +(define (zfs-shepherd-services conf)
> +  (let* ((zfs-package     (make-zfs-package conf))
> +         (zpool           (file-append zfs-package "/sbin/zpool"))
> +         (zfs             (file-append zfs-package "/sbin/zfs"))
> +         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
> +         (scheme-modules  `((srfi srfi-1)
> +                            (srfi srfi-34)
> +                            (srfi srfi-35)
> +                            (rnrs io ports)
> +                            ,@%default-modules)))
> +    (define zfs-scan
> +      (shepherd-service
> +        (provision '(zfs-scan))
> +        (requirement `(root-file-system
> +                       kernel-module-loader
> +                       udev
> +                       ,@(map dependency->shepherd-service-name
> +                              (zfs-configuration-dependencies conf))))
> +        (documentation "Scans for and imports ZFS pools.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error importing pools: ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     ; TODO: optionally use a cachefile.
> +                     (invoke #$zpool "import" "-a" "-N"))))
> +        ;; Why not one-shot?  Because we don't really want to rescan
> +        ;; this each time a requiring process is restarted, as scanning
> +        ;; can take a long time and a lot of I/O.
> +        (stop #~(const #f))))
> +
> +    (define device-mapping-zvol/*
> +      (shepherd-service
> +        (provision '(device-mapping-zvol/*))
> +        (requirement '(zfs-scan))
> +        (documentation "Waits for all ZFS ZVOLs to be opened.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error opening zvols: ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     (invoke #$zvol_wait))))
> +        (stop #~(const #f))))
> +
> +    (define zfs-auto-mount
> +      (shepherd-service
> +        (provision '(zfs-auto-mount))
> +        (requirement '(zfs-scan))
> +        (documentation "Mounts all non-legacy mounted ZFS filesystems.")
> +        (modules scheme-modules)
> +        (start #~(lambda _
> +                   (guard (c ((message-condition? c)
> +                              (format (current-error-port)
> +                                      "zfs: error mounting file systems:=
 ~s~%"
> +                                      (condition-message c))
> +                              #f))
> +                     ;; Output to current-error-port, otherwise the
> +                     ;; user will not see any prompts for passwords
> +                     ;; of encrypted datasets.
> +                     ;; XXX Maybe better to explicitly open /dev/console=
 ?
> +                     (with-output-to-port (current-error-port)
> +                       (lambda ()
> +                         (invoke #$zfs "mount" "-a" "-l"))))))
> +        (stop #~(lambda _
> +                  ;; Make sure that Shepherd does not have a CWD that
> +                  ;; is a mounted ZFS filesystem, which would prevent
> +                  ;; unmounting.
> +                  (chdir "/")
> +                  (invoke #$zfs "unmount" "-a" "-f")))))
> +
> +    `(,zfs-scan
> +      ,device-mapping-zvol/*
> +      ,@(if (zfs-configuration-auto-mount? conf)
> +            `(,zfs-auto-mount)
> +            '()))))

Service definition seems reasonable, but agan, I'm no ZFS expert.

> +(define (zfs-user-processes conf)
> +  (if (zfs-configuration-auto-mount? conf)
> +      '(zfs-auto-mount)
> +      '(zfs-scan)))
> +
> +(define (zfs-mcron-auto-snapshot-jobs conf)
> +  (let* ((user-auto-snapshot-keep      (zfs-configuration-auto-snapshot-=
keep conf))
> +         ;; assoc-ref has earlier entries overriding later ones.
> +         (auto-snapshot-keep           (append user-auto-snapshot-keep
> +                                               %default-auto-snapshot-ke=
ep))
> +         (auto-snapshot?               (zfs-configuration-auto-snapshot?=
 conf))
> +         (zfs-auto-snapshot-package    (make-zfs-auto-snapshot-package c=
onf))
> +         (zfs-auto-snapshot            (file-append zfs-auto-snapshot-pa=
ckage
> +                                                    "/sbin/zfs-auto-snap=
shot")))
> +    (map
> +      (lambda (label)
> +        (let ((keep   (assoc-ref auto-snapshot-keep label))
> +              (sched  (assoc-ref %auto-snapshot-mcron-schedule label)))
> +          #~(job '#$sched
> +                 (string-append #$zfs-auto-snapshot
> +                                " --quiet --syslog "
> +                                " --label=3D" #$(symbol->string label)
> +                                " --keep=3D" #$(number->string keep)
> +                                " //"))))
> +      '(frequent hourly daily weekly monthly))))
> +
> +(define (zfs-mcron-auto-scrub-jobs conf)
> +  (let* ((zfs-package    (make-zfs-package conf))
> +         (zpool          (file-append zfs-package "/sbin/zpool"))
> +         (auto-scrub     (zfs-configuration-auto-scrub conf))
> +         (sched          (cond
> +                           ((eq? auto-scrub 'weekly)  "0 0 * * 7")
> +                           ((eq? auto-scrub 'monthly) "0 0 1 * *")
> +                           (else                      auto-scrub))))
> +    (list
> +      #~(job '#$sched
> +
> +             ;; Suppress errors: if there are no ZFS pools, the
> +             ;; scrub will not be given any arguments, which makes
> +             ;; it error out.
> +             (string-append "(" #$zpool " scrub `" #$zpool " list -o nam=
e -H` "
> +                            "> /dev/null 2>&1) "
> +                            "|| exit 0")))))

I think people here would prefer something in Guile, e.g. using 'invoke'.
For redirecting to "/dev/null", maybe with-output-to-port, with-error-to-po=
rt
and (%make-void-port "w0") can be used.  Doing this in Guile would avoid an=
y
potential issues with whitespace and the escape rules for bash.

> +(define (zfs-mcron-jobs conf)
> +  (append (zfs-mcron-auto-snapshot-jobs conf)
> +          (if (zfs-configuration-auto-scrub conf)
> +              (zfs-mcron-auto-scrub-jobs conf)
> +              '())))
> +
> +(define zfs-service-type
> +  (service-type
> +    (name 'zfs)
> +    (extensions
> +      (list ;; Install OpenZFS kernel module into kernel profile.
> +            (service-extension linux-loadable-module-service-type
> +                               zfs-loadable-modules)
> +            ;; And load it.
> +            (service-extension kernel-module-loader-service-type
> +                               (const '("zfs")))
> +            ;; Make sure ZFS pools and datasets are mounted at
> +            ;; boot.
> +            (service-extension shepherd-root-service-type
> +                               zfs-shepherd-services)
> +            ;; Make sure user-processes don't start until
> +            ;; after ZFS does.
> +            (service-extension user-processes-service-type
> +                               zfs-user-processes)
> +            ;; Install automated scrubbing and snapshotting.
> +            (service-extension mcron-service-type
> +                               zfs-mcron-jobs)
> +
> +            ;; Install ZFS management commands in the system
> +            ;; profile.
> +            (service-extension profile-service-type
> +                               (compose list make-zfs-package))

FWIW, I (YMMV) expect that the only packages guix installs in the system
profile are those listed in the 'packages' field whenever feasible.
Though adding zfs to the system profile when ZFS file systems seems
reasonable.

Apparently the consensus seems to be that putting the file system utilities
into the system profile automatically is useful and not problematic:
<https://issues.guix.gnu.org/issue/39505>, <https://issues.guix.gnu.org/491=
28>,
so putting it there is probably ok?

> +            ;; Install ZFS udev rules.
> +            (service-extension udev-service-type
> +                               (compose list make-zfs-package))))
> +    (description "Installs ZFS, an advanced filesystem and volume manage=
r.")))

Also, a more general comment: ideally most top-level procedures have a docs=
tring
or comment explaining what they are for and how they are used.

Overall, the code seems to be quite reasonable (I haven't tested it though)
with a minor issues.

If it weren't for the GPL violation, I was going to recommend that the patc=
h
would be merged (after resolving the minor issues) --- there is the issue t=
hat
there are very few people familiar enough with ZFS to review this, so I tho=
ught
it might be reasonable to consider you =E2=80=98the guix expert on ZFS=E2=
=80=99, with the idea
that if someone has ZFS problems, they would be directed to you, and if som=
eone
has ZFS-related patches, you would try to review them, and that over time, =
guix
will attract some reviewers understanding ZFS well-enough to review ZFS thi=
ngs,
so after some time, you wouldn't have do all that on your own.

The GPL violation is very unfortunate.  It would have been nice to have som=
e
ZFS support in Guix.

Greetings,
Maxime

--=-JuVAzqRhKAJpPFmNf5J/
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTE6pRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7m4EAQC3+kJXHerw2bosfiGR8KvicdZp
P7Gc/H63OE4cJpAE4wD/StWqivX/tD02Iq4KlMI+m2b6ut3aMvkiBuc+FhRIOwo=
=Pcik
-----END PGP SIGNATURE-----

--=-JuVAzqRhKAJpPFmNf5J/--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 31 Aug 2021 00:48:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 30 20:48:56 2021
Received: from localhost ([127.0.0.1]:60648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mKrxQ-0007VW-3z
	for submit <at> debbugs.gnu.org; Mon, 30 Aug 2021 20:48:56 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:61403)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mKrxJ-0007V3-Db
 for 45692 <at> debbugs.gnu.org; Mon, 30 Aug 2021 20:48:54 -0400
Date: Tue, 31 Aug 2021 00:48:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1630370922;
 bh=5I92XzehBCdtMXpBHi+5vD6IwfTkSmTYycUkLYGqoGI=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=Tzm5/VItHqwocSMEAdlSaZTGGc/Qou0ywWZmW35LtHZhrDQEdZPeDdP3rJiqdpNas
 d0iiktAMrkoWuh6+MtBVCBqBKhSOM8msYn/HM6v+XVD/V93+9UXBmkj5do4azOIX4I
 /RFtND+PwVyHKjPWY6i3+zO60MdTT+0c/RReXG0c=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <9Vr2H4nOppX9ANzsGjyQEbM0mUl4LcJAsmEwScnDh084gLHotpSwNrX3-TOt1QaqrOQwAsww03POWafkdxUVI-7DLfKDheVvGTL6AHUijFM=@protonmail.com>
In-Reply-To: <zPNx3dOuiEZ1x2lQZ8YojpSU7BLzUbtBfBsdaoDsOiArEJoPo6zNeVLk1uQP_rs9Gy4kMBtgtD47yd-0DS0FhrBSL-wNWsJCXGg2rswoifQ=@protonmail.com>
References: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <YIcuycFkyDDf7q5ttD0uN6nKeWVS3jtw-J_vmF0roEg_MgXbCAgoGKtMdTFRPkqO09C0B6hSIP3TWvUYZRhqng0bLwP88zkViwqyQQMMj5s=@protonmail.com>
 <zPNx3dOuiEZ1x2lQZ8YojpSU7BLzUbtBfBsdaoDsOiArEJoPo6zNeVLk1uQP_rs9Gy4kMBtgtD47yd-0DS0FhrBSL-wNWsJCXGg2rswoifQ=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.1 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,TRACKER_ID
 shortcircuit=no autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

YOOOOOOOOOHOOOOOOOOOOOOOO




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Aug 2021 11:43:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 10 07:43:51 2021
Received: from localhost ([127.0.0.1]:58581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDQAh-0003si-AW
	for submit <at> debbugs.gnu.org; Tue, 10 Aug 2021 07:43:51 -0400
Received: from mail-4318.protonmail.ch ([185.70.43.18]:17761)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mDQAe-0003sD-Kp
 for 45692 <at> debbugs.gnu.org; Tue, 10 Aug 2021 07:43:49 -0400
Date: Tue, 10 Aug 2021 11:43:32 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1628595821;
 bh=2CBSpvewlxHlOjEbCRLq1QqkmJsAwpZBoCY9EnDr+zs=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=QDjENGhu4ITOLlf7JHx2Tt2aJhXf6E/eBinZIRVMGeRJBc/Dgd0WzzIdp3cDeVal4
 5scKDJajKkbSySacKT8A2pn60+8UQTo60QO+c8PoypA/7nkmT9JHizfp6dMG3gQhqg
 Ri9EFHFaWDJzFKBpFs8B4fa8oQljgtOqzcaqUrbk=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <zPNx3dOuiEZ1x2lQZ8YojpSU7BLzUbtBfBsdaoDsOiArEJoPo6zNeVLk1uQP_rs9Gy4kMBtgtD47yd-0DS0FhrBSL-wNWsJCXGg2rswoifQ=@protonmail.com>
In-Reply-To: <YIcuycFkyDDf7q5ttD0uN6nKeWVS3jtw-J_vmF0roEg_MgXbCAgoGKtMdTFRPkqO09C0B6hSIP3TWvUYZRhqng0bLwP88zkViwqyQQMMj5s=@protonmail.com>
References: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
 <YIcuycFkyDDf7q5ttD0uN6nKeWVS3jtw-J_vmF0roEg_MgXbCAgoGKtMdTFRPkqO09C0B6hSIP3TWvUYZRhqng0bLwP88zkViwqyQQMMj5s=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

BUMPITY BUMPITY BUMP BUMP BUMP




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 1 Aug 2021 09:41:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 01 05:41:37 2021
Received: from localhost ([127.0.0.1]:35534 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mA7yT-0006qi-2h
	for submit <at> debbugs.gnu.org; Sun, 01 Aug 2021 05:41:37 -0400
Received: from mail-40135.protonmail.ch ([185.70.40.135]:56162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1mA7yQ-0006qQ-Jj
 for 45692 <at> debbugs.gnu.org; Sun, 01 Aug 2021 05:41:35 -0400
Date: Sun, 01 Aug 2021 09:41:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1627810887;
 bh=pwYKT/nhnBO9sbCdsUibUhxqN3uKbyTwLMA+BDkBChk=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=NaQZiqQdFoyovWO6O5WIO85sdTDOrtKxsbDPmudOif836UOx2CdEUJWHhh8VEp3af
 BGtyifPO8TzZpWzRtb1ZoUyVUu8dWSefF+bgZQyrjt4BKdgBmmrKppl0+gMs1zN07p
 smjD2m0QWsDrRH4PRgIhozcVrIdvJw3jrYtUmfiU=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <YIcuycFkyDDf7q5ttD0uN6nKeWVS3jtw-J_vmF0roEg_MgXbCAgoGKtMdTFRPkqO09C0B6hSIP3TWvUYZRhqng0bLwP88zkViwqyQQMMj5s=@protonmail.com>
In-Reply-To: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
References: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

BUMP




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 25 Jul 2021 14:32:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 10:32:08 2021
Received: from localhost ([127.0.0.1]:49104 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7fAi-00063H-1G
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 10:32:08 -0400
Received: from mail-40138.protonmail.ch ([185.70.40.138]:44313)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1m7fAc-00062j-Mg
 for 45692 <at> debbugs.gnu.org; Sun, 25 Jul 2021 10:32:02 -0400
Date: Sun, 25 Jul 2021 14:31:45 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1627223510;
 bh=G401Hf2cn60LfSnJr6Wxnq5IDzgqvYoTAfzVfNnmOM0=;
 h=Date:To:From:Reply-To:Subject:From;
 b=UAnbXGVmU/cXLdVvEF5QNsPVNH3NiSJoUGFUdL0v/E1SNT+dlAheIJKiaQ9hqrUrV
 iDe/SBsH2F8G8BJGkkCEYpwifk6bvBrYDC9oxo+9cTbuxCbOrE1eqy9iSt5gHPc5jN
 ognZOte8aMG9JJixZnny3kGvYK/TrIrTrT5zyh7s=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH v4 3/3] gnu: Add ZFS service type.
Message-ID: <XEBTiombw9FV1thMVWHGYkA24tfj5sFr49f5kAQw7MoEai8i-TGy9bVYW6WGjPSmC8vd6BCX4MqzR2lPsEp2-PXFvE2d4PPrvkYyYIbX8RY=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello nonexistent reviewer,

I updated this patch to latest `origin/master` because the previous version=
 has bitrotted and will not `git am` cleanly anymore.

There are no changes relative to v3, just rebased it so that the patch appl=
ies cleanly.

Testing has been very minimal: I created a VM with the added service, then =
ran it in a VM session that included additional devices (qcow2 files) from =
a previous VM run that formatted those as devices of a ZFS pool, and confir=
med that the new VM could read it and manage that pool.


Is there any chance this will get reviewed or should I just not bother and =
move on with my life and forget about Guix?


At this point as well, I would like to point out what I think is a failing =
of how the Guix distribution is managed.

Guix does not assign any particular committers to any particular tasks or a=
reas.
The intent is that any committer can review and commit any particular patch=
.

However, this fails as the Guix project has grown.

No single committer wants to review ***all*** the available patches, and th=
is is understandable, as the Guix project has grown significantly and inclu=
des a wide variety of people with diverging interests and as an open-source=
 project you cannot really require that particular people look at particula=
r things.
Unfortunately, I do not know *who* committers are, and more importantly, *w=
hich* committer might be interested in this ZFS service type.
Because "any committer can review and commit any patch!!" there is no parti=
cular list or table I can refer to, to figure out who might be useful to pi=
ng for this patchset.

At the same time, because no committer is interested in *all* patches I can=
not just ping some particular person and expect to somehow get on some list=
 somewhere that tells me "you will be the 48486th patch that will be review=
ed by <foo> who is interested in all patches".


It is very discouraging to work on this code for a few weeks, release it, n=
ot get any reviews, and end up in a situation where I have to make annoying=
 small changes just to keep the patch from bitrotting.

I understand that there are few possible reviewers, but if potential new co=
ntributors get discouraged from contributing because they do not see their =
code actually getting in, then you really cannot expect the number of revie=
wers to increase, either.

I think it would be nice if I could at least be told some number of people =
who *might* be interested in this patch, or just throw the towel and not bo=
ther.


Thanks
raid5atemyhomework


From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Mon, 22 Mar 2021 16:26:28 +0800
Subject: [PATCH] gnu: Add ZFS service type.

* gnu/services/file-systems.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/services/base.scm: Export dependency->shepherd-service-name.
* doc/guix.texi (ZFS File System): New subsection.
---
 doc/guix.texi                 | 351 ++++++++++++++++++++++++++++++++++
 gnu/local.mk                  |   2 +
 gnu/services/base.scm         |   4 +-
 gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++
 4 files changed, 651 insertions(+), 1 deletion(-)
 create mode 100644 gnu/services/file-systems.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index b3c16e6507..e21c47d7ca 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@*
 Copyright @copyright{} 2021 Raghav Gururajan@*
 Copyright @copyright{} 2021 Domagoj Stolfa@*
 Copyright @copyright{} 2021 Hui Lu@*
+Copyright @copyright{} 2021 raid5atemyhomework@*

 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -14265,6 +14266,356 @@ a file system declaration such as:
 compress-force=3Dzstd,space_cache=3Dv2"))
 @end lisp

+
+@node ZFS File System
+@subsection ZFS File System
+
+Support for ZFS file systems is provided on Guix by the OpenZFS project.
+OpenZFS currently only supports Linux-Libre and is not available on the
+Hurd.
+
+OpenZFS is free software; unfortunately its license is incompatible with
+the GNU General Public License (GPL), the license of the Linux kernel,
+which means they cannot be distributed together.  However, as a user,
+you can choose to build ZFS and use it together with Linux; you can
+even rely on Guix to automate this task.  See
+@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
+the Free Software Foundation} for more information.
+
+As a large and complex kernel module, OpenZFS has to be compiled for a
+specific version of Linux-Libre.  At times, the latest OpenZFS package
+available in Guix is not compatible with the latest Linux-Libre version.
+Thus, directly installing the @code{zfs} package can fail.
+
+Instead, you are recommended to select a specific older long-term-support
+Linux-Libre kernel.  Do not use @code{linux-libre-lts}, as even the
+latest long-term-support kernel may be too new for @code{zfs}.  Instead,
+explicitly select a specific older version, such as @code{linux-libre-5.10=
},
+and upgrade it manually later as new long-term-support kernels become
+available that you have confirmed is compatible with the latest available
+OpenZFS version on Guix.
+
+For example, you can modify your system configuration file to a specific
+Linux-Libre version and add the @code{zfs-service-type} service.
+
+@lisp
+(use-modules (gnu))
+(use-package-modules
+  #;@dots{}
+  linux)
+(use-service-modules
+  #;@dots{}
+  file-systems)
+
+(define my-kernel linux-libre-5.10)
+
+(operating-system
+  (kernel my-kernel)
+  #;@dots{}
+  (services
+    (cons* (service zfs-service-type
+                    (zfs-configuration
+                      (kernel my-kernel)))
+           #;@dots{}
+           %desktop-services))
+  #;@dots{})
+@end lisp
+
+@defvr {Scheme Variable} zfs-service-type
+This is the type for a service that adds ZFS support to your operating
+system.  The service is configured using a @code{zfs-configuration}
+record.
+
+Here is an example use:
+
+@lisp
+(service zfs-service-type
+  (zfs-configuration
+    (kernel linux-libre-5.4)))
+@end lisp
+@end defvr
+
+@deftp {Data Type} zfs-configuration
+This data type represents the configuration of the ZFS support in Guix
+System.  Its fields are:
+
+@table @asis
+@item @code{kernel}
+The package of the Linux-Libre kernel to compile OpenZFS for.  This field
+is always required.  It @emph{must} be the same kernel you use in your
+@code{operating-system} form.
+
+@item @code{base-zfs} (default: @code{zfs})
+The OpenZFS package that will be compiled for the given Linux-Libre kernel=
.
+
+@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot})
+The @code{zfs-auto-snapshot} package to use.  It will be modified to
+specifically use the OpenZFS compiled for your kernel.
+
+@item @code{dependencies} (default: @code{'()})
+A list of @code{<file-system>} or @code{<mapped-device>} records that must
+be mounted or opened before OpenZFS scans for pools to import.  For exampl=
e,
+if you have set up LUKS containers as leaf VDEVs in a pool, you have to
+include their corresponding @code{<mapped-ddevice>} records so that OpenZF=
S
+can import the pool correctly at bootup.
+
+@item @code{auto-mount?} (default: @code{#t})
+Whether to mount datasets with the ZFS @code{mountpoint} property automati=
cally
+at startup.  This is the behavior that ZFS users usually expect.  You migh=
t
+set this to @code{#f} for an operating system intended as a ``rescue'' sys=
tem
+that is intended to help debug problems with the disks rather than actuall=
y
+work in production.
+
+@item @code{auto-scrub} (default: @code{'weekly})
+Specifies how often to scrub all pools.  Can be the symbols @code{'weekly}=
 or
+@code{'monthly}, or a schedule specification understood by
+@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as
+@code{"0 3 * * 6"} for ``every 3AM on Saturday''.
+It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende=
d}).
+
+The general guideline is to scrub weekly when using consumer-quality drive=
s, and
+to scrub monthly when using enterprise-quality drives.
+
+@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc=
rubs
+are done on midnight on the first day of each month.
+
+@item @code{auto-snapshot?} (default: @code{#t})
+Specifies whether to auto-snapshot by default.  If @code{#t}, then snapsho=
ts
+are automatically created except for ZFS datasets with the
+@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}.
+
+If @code{#f}, snapshots will not be automatically created, unless the ZFS
+dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to
+@code{true}.
+
+@item @code{auto-snapshot-keep} (default: @code{'()})
+Specifies an association list of symbol-number pairs, indicating the numbe=
r
+of automatically-created snapshots to retain for each frequency type.
+
+If not specified via this field, by default there are 4 @code{frequent}, 2=
4
+@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna=
pshots.
+
+For example:
+
+@lisp
+(zfs-configuration
+  (kernel my-kernel)
+  (auto-snapshot-keep
+    '((frequent . 8)
+      (hourly . 12))))
+@end lisp
+
+The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps=
hots.
+@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their
+defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
+
+@end table
+@end deftp
+
+@subsubsection ZFS Auto-Snapshot
+
+The ZFS service on Guix System supports auto-snapshots as implemented in t=
he
+Solaris operating system.
+
+@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee=
kly},
+and @code{monthly} snapshots are created automatically for ZFS datasets th=
at
+have auto-snapshot enabled.  They will be named, for example,
+@code{zfs-auto-snap_frequent-2021-03-22-1415}.  You can continue to use
+manually-created snapshots as long as they do not conflict with the naming
+convention used by auto-snapshot.  You can also safely manually destroy
+automatically-created snapshots, for example to free up space.
+
+The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a
+per-dataset level.  Sub-datasets will inherit this property from their par=
ent
+dataset, but can have their own property.
+
+You @emph{must} set this property to @code{true} or @code{false} exactly,
+otherwise it will be treated as if the property is unset.
+
+For example:
+
+@example
+# zfs list -o name
+NAME
+tank
+tank/important-data
+tank/tmp
+# zfs set com.sun:auto-snapshot=3Dtrue tank
+# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp
+@end example
+
+The above will set @code{tank} and @code{tank/important-data} to be
+auto-snapshot, while @code{tank/tmp} will not be auto-snapshot.
+
+If the @code{com.sun:auto-snapshot} property is not set for a dataset
+(the default when pools and datasets are created), then whether
+auto-snapshot is done or not will depend on the @code{auto-snapshot?}
+field of the @code{zfs-configuration} record.
+
+There are also @code{com.sun:auto-snapshot:frequent},
+@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily},
+@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month=
ly}
+properties that give finer-grained control of whether to auto-snapshot a
+dataset at a particular schedule.
+
+The number of snapshots kept for all datasets can be overridden via the
+@code{auto-snapshot-keep} field of the @code{zfs-configuration} record.
+There is currently no support to have different numbers of snapshots to
+keep for different datasets.
+
+@subsubsection ZVOLs
+
+ZFS supports ZVOLs, block devices that ZFS exposes to the operating
+system in the @code{/dev/zvol/} directory.  The ZVOL will have the same
+resilience and self-healing properties as other datasets on your ZFS pool.
+ZVOLs can also be snapshotted (and will be included in auto-snapshotting
+if enabled), which snapshots the state of the block device, effectively
+snapshotting the hosted file system.
+
+You can put any file system inside the ZVOL.  However, in order to mount t=
his
+file system at system start, you need to add @code{%zfs-zvol-dependency} a=
s a
+dependency of each file system inside a ZVOL.
+
+@defvr {Scheme Variable} %zfs-zvol-dependency
+An artificial @code{<mapped-device>} which tells the file system mounting
+service to wait for ZFS to provide ZVOLs before mounting the
+@code{<file-system>} dependent on it.
+@end defvr
+
+For example, suppose you create a ZVOL and put an ext4 filesystem
+inside it:
+
+@example
+# zfs create -V 100G tank/ext4-on-zfs
+# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs
+# mkdir /ext4-on-zfs
+# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs
+@end example
+
+You can then set this up to be mounted at boot by adding this to the
+@code{file-systems} field of your @code{operating-system} record:
+
+@lisp
+(file-system
+  (device "/dev/zvol/tank/ext4-on-zfs")
+  (mount-point "/ext4-on-zfs")
+  (type "ext4")
+  (dependencies (list %zfs-zvol-dependency)))
+@end lisp
+
+You @emph{must not} add @code{%zfs-zvol-dependency} to your
+@code{operating-system}'s @code{mapped-devices} field, and you @emph{must
+not} add it (or any @code{<file-system>}s dependent on it) to the
+@code{dependencies} field of @code{zfs-configuration}.  Finally, you
+@emph{must not} use @code{%zfs-zvol-dependency} unless you actually
+instantiate @code{zfs-service-type} on your system.
+
+@subsubsection Unsupported Features
+
+Some common features and uses of ZFS are currently not supported, or not
+fully supported, on Guix.
+
+@enumerate
+@item
+Shepherd-managed daemons that are configured to read from or write to ZFS
+mountpoints need to include @code{user-processes} in their @code{requireme=
nt}
+field.  This is the earliest that ZFS file systems are assured of being
+mounted.
+
+Generally, most daemons will, directly or indirectly, require
+@code{networking}, or @code{user-processes}, or both.  Most implementation=
s
+of @code{networking} will also require @code{user-processes} so daemons th=
at
+require only @code{networking} will also generally start up after
+@code{user-processes}.  A notable exception, however, is
+@code{static-networking-service-type}.  You will need to explicitly add
+@code{user-processes} as a @code{requirement} of your @code{static-network=
ing}
+record.
+
+@item
+@code{mountpoint=3Dlegacy} ZFS file systems.  The handlers for the Guix mo=
unting
+system have not yet been modified to support ZFS, and will expect @code{/d=
ev}
+paths in the @code{<file-system>}'s @code{device} field, but ZFS file syst=
ems
+are referred to via non-path @code{pool/file/system} names.  Such file sys=
tems
+also need to be mounted @emph{after} OpenZFS has scanned for pools.
+
+You can still manually mount these file systems after system boot; what is
+only unsupported is mounting them automatically at system boot by specifyi=
ng
+them in @code{<file-system>} records of your @code{operating-system}.
+
+@item
+@code{/home} on ZFS.  Guix will create home directories for users, but thi=
s
+process currently cannot be scheduled after ZFS file systems are mounted.
+Thus, the ZFS file system might be mounted @emph{after} Guix has created
+home directories at boot, at which point OpenZFS will refuse to mount sinc=
e
+the mountpoint is not empty.  However, you @emph{can} create an ext4, xfs,
+btrfs, or other supported file system inside a ZVOL, have that depend on
+@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home}
+directory; they will be scheduled to mount before the @code{user-homes}
+process.
+
+Similarly, other locations like @code{/var}, @code{/gnu/store} and so
+on cannot be reliably put in a ZFS file system, though they may be
+possible to create as other file systems inside ZVOL containers.
+
+@item
+@code{/} and @code{/boot} on ZFS.  These require Guix to expose more of
+the @code{initrd} very early boot process to services.  It also requires
+Guix to have the ability to explicitly load modules while still in
+@code{initrd} (currently kernel modules loaded by
+@code{kernel-module-loader-service-type} are loaded after @code{/} is
+mounted).  Further, since one of ZFS's main advantages is that it can
+continue working despite the loss of one or more devices, it makes sense
+to also support installing the bootloader on all devices of the pool that
+contains the @code{/} and @code{/boot}; after all, if ZFS can survive the
+loss of one device, the bootloader should also be able to survive the loss
+of one device.
+
+@item
+ZVOL swap devices.  Mapped swap devices need to be listed in
+@code{mapped-devices} to ensure they are opened before the system attempts
+to use them, but you cannot currently add @code{%zfs-zvol-dependency} to
+@code{mapped-devices}.
+
+This will also require significant amounts of testing, as various kernel
+build options and patches may affect how swapping works, which are possibl=
y
+different on Guix System compared to other distributions that this feature=
 is
+known to work on.
+
+@item
+ZFS Event Daemon.  Support for this has not been written yet, patches are
+welcome.  The main issue is how to design this in a Guix style while
+supporting legacy shell-script styles as well.  In particular, OpenZFS its=
elf
+comes with a number of shell scripts intended for ZFS Event Daemon, and we
+need to figure out how the user can choose to use or not use the provided
+scripts (and configure any settings they have) or override with their own
+custom code (which could be shell scripts they have written and trusted fr=
om
+previous ZFS installations).
+
+As-is, you can create your own service that activates the ZFS Event Daemon
+by creating the @file{/etc/zfs/zed} directory and filling it appropriately=
,
+then launching @code{zed}.
+
+@item
+@file{/etc/zfs/zpool.cache}.  Currently the ZFS support on Guix always for=
ces
+scanning of all devices at bootup to look for ZFS pools.  For systems with
+dozens or hundreds of storage devices, this can lead to slow bootup.  One =
issue
+is that tools should really not write to @code{/etc} which is supposed to =
be for
+configuration; possibly it could be moved to @code{/var} instead.  Another=
 issue
+is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke=
ep the
+@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i=
n the
+@code{/} mount point.
+
+@item
+@code{zfs share}.  This will require some (unknown amount of) work to inte=
grate
+into the Samba and NFS services of Guix.  You @emph{can} manually set up S=
amba
+and NFS to share any mounted ZFS datasets by setting up their configuratio=
ns
+properly; it just can't be done for you by @code{zfs share} and the
+@code{sharesmb} and @code{sharenfs} properties.
+@end enumerate
+
+Hopefully, support for the above only requires code to be written, o users
+are encouraged to hack on Guix to implement the above features.
+
 @node Mapped Devices
 @section Mapped Devices

diff --git a/gnu/local.mk b/gnu/local.mk
index b944c671af..a2ff871277 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -43,6 +43,7 @@
 # Copyright =C2=A9 2021 Philip McGrath <philip@HIDDEN>
 # Copyright =C2=A9 2021 Arun Isaac <arunisaac@HIDDEN>
 # Copyright =C2=A9 2021 Sharlatan Hellseher <sharlatanus@HIDDEN>
+# Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmail.=
com>
 #
 # This file is part of GNU Guix.
 #
@@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\
   %D%/services/docker.scm=09=09=09\
   %D%/services/authentication.scm=09=09\
   %D%/services/file-sharing.scm=09=09=09\
+  %D%/services/file-systems.scm=09=09=09\
   %D%/services/games.scm=09=09=09\
   %D%/services/ganeti.scm=09=09=09\
   %D%/services/getmail.scm=09=09=09=09\
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index ab3e441a7b..bcca24f93a 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -185,7 +185,9 @@

             references-file

-            %base-services))
+            %base-services
+
+            dependency->shepherd-service-name))

 ;;; Commentary:
 ;;;
diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
new file mode 100644
index 0000000000..0b1aae38ac
--- /dev/null
+++ b/gnu/services/file-systems.scm
@@ -0,0 +1,295 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services file-systems)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services linux)
+  #:use-module (gnu services mcron)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system mapped-devices)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix records)
+  #:export (zfs-service-type
+
+            zfs-configuration
+            zfs-configuration?
+            zfs-configuration-kernel
+            zfs-configuration-base-zfs
+            zfs-configuration-base-zfs-auto-snapshot
+            zfs-configuration-dependencies
+            zfs-configuration-auto-mount?
+            zfs-configuration-auto-scrub
+            zfs-configuration-auto-snapshot?
+            zfs-configuration-auto-snapshot-keep
+
+            %zfs-zvol-dependency))
+
+(define-record-type* <zfs-configuration>
+  zfs-configuration
+  make-zfs-configuration
+  zfs-configuration?
+
+  ; linux-libre kernel you want to compile the base-zfs module for.
+  (kernel                     zfs-configuration-kernel)
+
+  ; the OpenZFS package that will be modified to compile for the
+  ; given kernel.
+  (base-zfs                   zfs-configuration-base-zfs
+                              (default zfs))
+
+  ; the zfs-auto-snapshot package that will be modified to compile
+  ; for the given kernel.
+  (base-zfs-auto-snapshot     zfs-configuration-base-zfs-auto-snapshot
+                              (default zfs-auto-snapshot))
+
+  ; list of <mapped-device> or <file-system> objects that must be
+  ; opened/mounted before we import any ZFS pools.
+  (dependencies               zfs-configuration-dependencies
+                              (default '()))
+
+  ; #t if mountable datasets are to be mounted automatically.
+  ; #f if not mounting.
+  ; #t is the expected behavior on other operating systems, the
+  ; #f is only supported for "rescue" operating systems where
+  ; the user wants lower-level control of when to mount.
+  (auto-mount?                zfs-configuration-auto-mount?
+                              (default #t))
+
+  ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an
+  ; mcron time specification that can be given to `job`, or #f to
+  ; disable.
+  (auto-scrub                 zfs-configuration-auto-scrub
+                              (default 'weekly))
+
+  ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse`
+  ; disables auto-snapshot per dataset), #f if no auto-snapshotting
+  ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot
+  ; per dataset).
+  (auto-snapshot?             zfs-configuration-auto-snapshot?
+                              (default #t))
+
+  ; association list of symbol-number pairs to indicate the number
+  ; of automatic snapshots to keep for each of 'frequent, 'hourly,
+  ; 'daily, 'weekly, and 'monthly.
+  ; e.g. '((frequent . 8) (hourly . 12))
+  (auto-snapshot-keep         zfs-configuration-auto-snapshot-keep
+                              (default '())))
+
+(define %default-auto-snapshot-keep
+  '((frequent . 4)
+    (hourly . 24)
+    (daily . 31)
+    (weekly . 8)
+    (monthly . 12)))
+
+(define %auto-snapshot-mcron-schedule
+  '((frequent .  "0,15,30,45 * * * *")
+    (hourly .    "0 * * * *")
+    (daily .     "0 0 * * *")
+    (weekly .    "0 0 * * 7")
+    (monthly .   "0 0 1 * *")))
+
+;; A synthetic and unusable MAPPED-DEVICE intended for use when
+;; the user has created a mountable filesystem inside a ZFS
+;; zvol and wants it mounted inside the configuration.scm.
+(define %zfs-zvol-dependency
+  (mapped-device
+    (source '())
+    (targets '("zvol/*"))
+    (type #f)))
+
+(define (make-zfs-package conf)
+  (let ((kernel    (zfs-configuration-kernel conf))
+        (base-zfs  (zfs-configuration-base-zfs conf)))
+    (package
+      (inherit base-zfs)
+      (arguments (cons* #:linux kernel
+                        (package-arguments base-zfs))))))
+
+(define (make-zfs-auto-snapshot-package conf)
+  (let ((zfs                    (make-zfs-package conf))
+        (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot =
conf)))
+    (package
+      (inherit base-zfs-auto-snapshot)
+      (inputs `(("zfs" ,zfs))))))
+
+(define (zfs-loadable-modules conf)
+  (list (list (make-zfs-package conf) "module")))
+
+(define (zfs-shepherd-services conf)
+  (let* ((zfs-package     (make-zfs-package conf))
+         (zpool           (file-append zfs-package "/sbin/zpool"))
+         (zfs             (file-append zfs-package "/sbin/zfs"))
+         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
+         (scheme-modules  `((srfi srfi-1)
+                            (srfi srfi-34)
+                            (srfi srfi-35)
+                            (rnrs io ports)
+                            ,@%default-modules)))
+    (define zfs-scan
+      (shepherd-service
+        (provision '(zfs-scan))
+        (requirement `(root-file-system
+                       kernel-module-loader
+                       udev
+                       ,@(map dependency->shepherd-service-name
+                              (zfs-configuration-dependencies conf))))
+        (documentation "Scans for and imports ZFS pools.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error importing pools: ~s~%"
+                                      (condition-message c))
+                              #f))
+                     ; TODO: optionally use a cachefile.
+                     (invoke #$zpool "import" "-a" "-N"))))
+        ;; Why not one-shot?  Because we don't really want to rescan
+        ;; this each time a requiring process is restarted, as scanning
+        ;; can take a long time and a lot of I/O.
+        (stop #~(const #f))))
+
+    (define device-mapping-zvol/*
+      (shepherd-service
+        (provision '(device-mapping-zvol/*))
+        (requirement '(zfs-scan))
+        (documentation "Waits for all ZFS ZVOLs to be opened.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error opening zvols: ~s~%"
+                                      (condition-message c))
+                              #f))
+                     (invoke #$zvol_wait))))
+        (stop #~(const #f))))
+
+    (define zfs-auto-mount
+      (shepherd-service
+        (provision '(zfs-auto-mount))
+        (requirement '(zfs-scan))
+        (documentation "Mounts all non-legacy mounted ZFS filesystems.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error mounting file systems: ~=
s~%"
+                                      (condition-message c))
+                              #f))
+                     ;; Output to current-error-port, otherwise the
+                     ;; user will not see any prompts for passwords
+                     ;; of encrypted datasets.
+                     ;; XXX Maybe better to explicitly open /dev/console ?
+                     (with-output-to-port (current-error-port)
+                       (lambda ()
+                         (invoke #$zfs "mount" "-a" "-l"))))))
+        (stop #~(lambda _
+                  ;; Make sure that Shepherd does not have a CWD that
+                  ;; is a mounted ZFS filesystem, which would prevent
+                  ;; unmounting.
+                  (chdir "/")
+                  (invoke #$zfs "unmount" "-a" "-f")))))
+
+    `(,zfs-scan
+      ,device-mapping-zvol/*
+      ,@(if (zfs-configuration-auto-mount? conf)
+            `(,zfs-auto-mount)
+            '()))))
+
+(define (zfs-user-processes conf)
+  (if (zfs-configuration-auto-mount? conf)
+      '(zfs-auto-mount)
+      '(zfs-scan)))
+
+(define (zfs-mcron-auto-snapshot-jobs conf)
+  (let* ((user-auto-snapshot-keep      (zfs-configuration-auto-snapshot-ke=
ep conf))
+         ;; assoc-ref has earlier entries overriding later ones.
+         (auto-snapshot-keep           (append user-auto-snapshot-keep
+                                               %default-auto-snapshot-keep=
))
+         (auto-snapshot?               (zfs-configuration-auto-snapshot? c=
onf))
+         (zfs-auto-snapshot-package    (make-zfs-auto-snapshot-package con=
f))
+         (zfs-auto-snapshot            (file-append zfs-auto-snapshot-pack=
age
+                                                    "/sbin/zfs-auto-snapsh=
ot")))
+    (map
+      (lambda (label)
+        (let ((keep   (assoc-ref auto-snapshot-keep label))
+              (sched  (assoc-ref %auto-snapshot-mcron-schedule label)))
+          #~(job '#$sched
+                 (string-append #$zfs-auto-snapshot
+                                " --quiet --syslog "
+                                " --label=3D" #$(symbol->string label)
+                                " --keep=3D" #$(number->string keep)
+                                " //"))))
+      '(frequent hourly daily weekly monthly))))
+
+(define (zfs-mcron-auto-scrub-jobs conf)
+  (let* ((zfs-package    (make-zfs-package conf))
+         (zpool          (file-append zfs-package "/sbin/zpool"))
+         (auto-scrub     (zfs-configuration-auto-scrub conf))
+         (sched          (cond
+                           ((eq? auto-scrub 'weekly)  "0 0 * * 7")
+                           ((eq? auto-scrub 'monthly) "0 0 1 * *")
+                           (else                      auto-scrub))))
+    (list
+      #~(job '#$sched
+             ;; Suppress errors: if there are no ZFS pools, the
+             ;; scrub will not be given any arguments, which makes
+             ;; it error out.
+             (string-append "(" #$zpool " scrub `" #$zpool " list -o name =
-H` "
+                            "> /dev/null 2>&1) "
+                            "|| exit 0")))))
+
+(define (zfs-mcron-jobs conf)
+  (append (zfs-mcron-auto-snapshot-jobs conf)
+          (if (zfs-configuration-auto-scrub conf)
+              (zfs-mcron-auto-scrub-jobs conf)
+              '())))
+
+(define zfs-service-type
+  (service-type
+    (name 'zfs)
+    (extensions
+      (list ;; Install OpenZFS kernel module into kernel profile.
+            (service-extension linux-loadable-module-service-type
+                               zfs-loadable-modules)
+            ;; And load it.
+            (service-extension kernel-module-loader-service-type
+                               (const '("zfs")))
+            ;; Make sure ZFS pools and datasets are mounted at
+            ;; boot.
+            (service-extension shepherd-root-service-type
+                               zfs-shepherd-services)
+            ;; Make sure user-processes don't start until
+            ;; after ZFS does.
+            (service-extension user-processes-service-type
+                               zfs-user-processes)
+            ;; Install automated scrubbing and snapshotting.
+            (service-extension mcron-service-type
+                               zfs-mcron-jobs)
+
+            ;; Install ZFS management commands in the system
+            ;; profile.
+            (service-extension profile-service-type
+                               (compose list make-zfs-package))
+            ;; Install ZFS udev rules.
+            (service-extension udev-service-type
+                               (compose list make-zfs-package))))
+    (description "Installs ZFS, an advanced filesystem and volume manager.=
")))
--
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 25 Jul 2021 14:04:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 10:04:00 2021
Received: from localhost ([127.0.0.1]:49068 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7ejY-0005KQ-AC
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 10:04:00 -0400
Received: from mail-40140.protonmail.ch ([185.70.40.140]:39543)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1m7ejV-0005KB-Tw
 for 45692 <at> debbugs.gnu.org; Sun, 25 Jul 2021 10:03:59 -0400
Date: Sun, 25 Jul 2021 14:03:41 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1627221831;
 bh=wNOwRdzIr5RlG7ooigT2PlJfMn8/cvrgsETyMIckmLE=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=voaHjUDVDZc/uheun2hIv8vDyh1ExD8OXQStB1A5fPMwjys661FqSquBgSt5dyKT0
 VFbgVgbdBr/bpBP6NUZYOV14oEAaSFgfOAJaHO+JYMsKymj9KAmnQLwIP1552XIA0Q
 Zj84kaW7Ne+66gAj2k7G14wmfVG3BpoLmS/+NPLg=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH v3 3/3] gnu: Add ZFS service type.
Message-ID: <uiFKaz-Xf0_3ZvrgI6DeH7rHSFnWiJ6bw9L3qzudFIrMH297q-OTPNRYQT26c8l14uylsg3pWJiW4gFmtGSQ_bEbLNE53NR35QZoDHaF6CE=@protonmail.com>
In-Reply-To: <ECVfxCKtS2pEf-XrbGUETYDOd1gNFzwvZc8s2AdO5zwbpHoFaK4XmW6QxYmDF1bhJsKB3_8sbnyNarpBm1v9gaqEAMbOkAK14OulJQpBoc0=@protonmail.com>
References: <ECVfxCKtS2pEf-XrbGUETYDOd1gNFzwvZc8s2AdO5zwbpHoFaK4XmW6QxYmDF1bhJsKB3_8sbnyNarpBm1v9gaqEAMbOkAK14OulJQpBoc0=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Because it has been so long, the latest patch has bitrotted.

I really think at this point shaming people into reviewing this is my only =
option.

Give me a few hours or days to get a new patch that applies cleanly to orig=
in/master.

Thanks
raid5atemyhomewkr




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 23 Jul 2021 15:12:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 11:12:04 2021
Received: from localhost ([127.0.0.1]:44315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m6wqK-0003v1-8b
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2021 11:12:04 -0400
Received: from mail-4319.protonmail.ch ([185.70.43.19]:25835)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1m6wqI-0003uS-9L
 for 45692 <at> debbugs.gnu.org; Fri, 23 Jul 2021 11:12:03 -0400
Date: Fri, 23 Jul 2021 15:11:50 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1627053115;
 bh=4DxGQOmqTQcfJZN8Sff4y6qsVid/PlfeoIWcdbajAc8=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=SD8CxKwZIBsppcB6ySEkYw1bwnrhAiPRNRqjNA1rCDu5tirMqK1mKEmmGoEVQtNfs
 U1v3fPmZcP6iQ5t2nyp9GEXnnSnZQOt6z9+7jYFv59Apl1vNHruDfQGAZrNsNuUn+M
 R0KONsho9dv6s6bNg/bI1XytX5YqXJytuVRiONrQ=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS
 Support on Guix
Message-ID: <I2RNgCmKJ864TRprR4B41C6P5TGTfPu--zIzvoKCVSoeD6AkXNVVhsDJP-Ck8mWCvd6tK1cvCQRyN13xDqFWUR-239BzqvNqErJb8G5okdI=@protonmail.com>
In-Reply-To: <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <K_sz_FR8KdZSXDYUr6uI-jabQq0PqKjVANb1wWph8rK6Yy0wLIq8vj5cMNuRlWWNZKL4BFfRQoni1elqjzbCW7FYvCdLrSC2x-1N97_RU34=@protonmail.com>
 <ffa79fc37bb8f8f4152a22497060e2ebd6f9c19a.camel@HIDDEN>
 <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Can I get any particular feedback here at this point, from anyone at all?






Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 13 May 2021 13:08:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 13 09:08:07 2021
Received: from localhost ([127.0.0.1]:41648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lhB4R-0008TF-5f
	for submit <at> debbugs.gnu.org; Thu, 13 May 2021 09:08:07 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:39840)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1lhB4P-0008T7-VH
 for 45692 <at> debbugs.gnu.org; Thu, 13 May 2021 09:08:06 -0400
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 3D081336057C;
 Thu, 13 May 2021 15:08:04 +0200 (CEST)
Date: Thu, 13 May 2021 15:08:03 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot.
Message-ID: <20210513150803.27df82a2@HIDDEN>
In-Reply-To: <WQzldY7UPtjV-mvfe9NX5iz4_vihtDIPFCKMwHPRr40rLtQBPzsfO0OEyqnicuhwdxvztREkhl4riP07QT2uX6PScQNTFq5fxZ9a93tREKM=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com>
 <20210511160434.6b88bba3@HIDDEN>
 <WQzldY7UPtjV-mvfe9NX5iz4_vihtDIPFCKMwHPRr40rLtQBPzsfO0OEyqnicuhwdxvztREkhl4riP07QT2uX6PScQNTFq5fxZ9a93tREKM=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/c=A1zVnKJWr5WTCj5KM9UfI";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

--Sig_/c=A1zVnKJWr5WTCj5KM9UfI
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

thanks for the explanation!

Pushed zfs-auto-snapshot to guix master as commit ba3b295a3ee956ac7500b5f9b=
b1d151b28ab30ed.

--Sig_/c=A1zVnKJWr5WTCj5KM9UfI
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmCdJLMACgkQ5xo1VCww
uqV55AgAm7RU9/STq0MECt9hjSFZSYJY/k1A1+f0IaP9eWE6SPW8/C06opazXK/c
xRnA+WFXadKnkgL+9C9heJu6S8BXJbpd6qWoKX5bUpVhEyTC4wAPCjuoWtTtxFPf
nrdby0RnQSvWEHYafo5bHscD+deZV8sT6XniK+t5lgOSWzrVpIjfXX4rI3p/I7jY
joshzV4flFzcGZG6W5Vs759mQMmTRJAk3P5/czlnn4xMNbQxF8prq12rIs/81pQd
b2s7zoD/xNqU59fG6yBApsp0BrcIm1tRSfYXx4je14V35URcv9XfuCvC6iahcVqg
dP85SvmLV2fDGlWN8a0ev42/eLQIuw==
=INaF
-----END PGP SIGNATURE-----

--Sig_/c=A1zVnKJWr5WTCj5KM9UfI--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 13 May 2021 01:21:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 12 21:21:48 2021
Received: from localhost ([127.0.0.1]:40933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lh02u-0000vg-A8
	for submit <at> debbugs.gnu.org; Wed, 12 May 2021 21:21:48 -0400
Received: from mail-40138.protonmail.ch ([185.70.40.138]:33811)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lh02r-0000vP-Mo
 for 45692 <at> debbugs.gnu.org; Wed, 12 May 2021 21:21:47 -0400
Date: Thu, 13 May 2021 01:21:33 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1620868898;
 bh=ExaDA5EOcT4dIZ4jfVjLNBE41emd66bx4u2BpNLKp54=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=fSlX5LbFPSfJ8XQC259QYcoGpA4/3Yqda+If77qBG2LPQt0Yxdbui7vcvpm+D5ICz
 WcaYatfakOHXur/vq6pHqO+ogqws+ZFpItoG63SQ0bhrqzAjvSL95qXlthByqlLXcM
 qOoWBaBOIlzBaFO+hBuiT7e2EsUaIBtCySBI89LQ=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot.
Message-ID: <WQzldY7UPtjV-mvfe9NX5iz4_vihtDIPFCKMwHPRr40rLtQBPzsfO0OEyqnicuhwdxvztREkhl4riP07QT2uX6PScQNTFq5fxZ9a93tREKM=@protonmail.com>
In-Reply-To: <20210511160434.6b88bba3@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com>
 <20210511160434.6b88bba3@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Danny,

> Hi,
>
> > -                  (invoke "make" "install"
> >
> >
> > -                          "PREFIX=3D"
> >
> >
> > -                          (string-append "DESTDIR=3D" out)))
> >
> >
>
> Are you sure about that?
>
> Usually, DESTDIR is in order to supply a temporary build root (which will=
 not
> be referred-to by the installed programs--because that directory will be
> deleted after the build) and PREFIX is in order to supply an actual
> installation directory (installed programs can refer to that whenever the=
y
> want).
>
> Is it different for this program?
>
> Also, I'd suggest to use #:make-flags so other phases can also see the PR=
EFIX
> chosen. Otherwise, those could erroneously default to another prefix (for
> loading of config files at runtime etc).
>
> What do you think?

Yes, I am quite sure; the program uses a custom `Makefile` that is fairly s=
imple and can be trivially quoted here for your review:

```Makefile
PREFIX :=3D /usr/local

all:

install:
=09install -d $(DESTDIR)/etc/cron.d
=09install -d $(DESTDIR)/etc/cron.daily
=09install -d $(DESTDIR)/etc/cron.hourly
=09install -d $(DESTDIR)/etc/cron.weekly
=09install -d $(DESTDIR)/etc/cron.monthly
=09install -m 0644 etc/zfs-auto-snapshot.cron.frequent $(DESTDIR)/etc/cron.=
d/zfs-auto-snapshot
=09install etc/zfs-auto-snapshot.cron.hourly   $(DESTDIR)/etc/cron.hourly/z=
fs-auto-snapshot
=09install etc/zfs-auto-snapshot.cron.daily    $(DESTDIR)/etc/cron.daily/zf=
s-auto-snapshot
=09install etc/zfs-auto-snapshot.cron.weekly   $(DESTDIR)/etc/cron.weekly/z=
fs-auto-snapshot
=09install etc/zfs-auto-snapshot.cron.monthly  $(DESTDIR)/etc/cron.monthly/=
zfs-auto-snapshot
=09install -d $(DESTDIR)$(PREFIX)/share/man/man8
=09install -m 0644 src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/ma=
n8/zfs-auto-snapshot.8
=09install -d $(DESTDIR)$(PREFIX)/sbin
=09install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snaps=
hot

uninstall:
=09rm $(DESTDIR)/etc/cron.d/zfs-auto-snapshot
=09rm $(DESTDIR)/etc/cron.hourly/zfs-auto-snapshot
=09rm $(DESTDIR)/etc/cron.daily/zfs-auto-snapshot
=09rm $(DESTDIR)/etc/cron.weekly/zfs-auto-snapshot
=09rm $(DESTDIR)/etc/cron.monthly/zfs-auto-snapshot
=09rm $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8
=09rm $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot
```

Notice how it does not modify any of the source files at all, so the source=
s do not refer to anything provided in `$PREFIX`.  However, it does create =
directories in `$DESTDIR`, so it has to use `$DESTDIR`.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 11 May 2021 14:17:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 10:17:05 2021
Received: from localhost ([127.0.0.1]:37018 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgTC4-0006ME-SV
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 10:17:04 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:36220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1lgTC3-0006Lq-Mj
 for 45692 <at> debbugs.gnu.org; Tue, 11 May 2021 10:17:04 -0400
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 108FD3362612;
 Tue, 11 May 2021 16:17:01 +0200 (CEST)
Date: Tue, 11 May 2021 16:17:00 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 1/3] gnu: Allow services to install
 kernel-loadable modules.
Message-ID: <20210511161700.30208638@HIDDEN>
In-Reply-To: <VQKkOa-eyRygylIYZoOrs8rI2MCV0e9iMe4ZXaFZZoEsT2UasU5NJjDRY4gge12_eBJrDYONBtVJ1qoojdiueq8LOmzSHl8wCZup8Fc9tR4=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <VQKkOa-eyRygylIYZoOrs8rI2MCV0e9iMe4ZXaFZZoEsT2UasU5NJjDRY4gge12_eBJrDYONBtVJ1qoojdiueq8LOmzSHl8wCZup8Fc9tR4=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/PePUeF8pcvWKvBQ/Y_yTebW";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

--Sig_/PePUeF8pcvWKvBQ/Y_yTebW
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Pushed this patch to guix master as commit a3df382525ac515d1aa083f7f5bd3bd3=
1eb1df40.

--Sig_/PePUeF8pcvWKvBQ/Y_yTebW
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmCakdwACgkQ5xo1VCww
uqW1Xwf+LDsPUcMzmaFmYOgNRFjOC5mfd/2cJnUDJEMBsedSkSd+VL0CVe0iI/G0
ylTMzAIkNREGb9E6C79AR+yh5SxfwhgjOzR6J+Nq9WKt9ZBvP4ujPS8nkxOHdwrA
egXmhxdty7Qu6GD1AGMG1+wzcBe7U1oH5CTlA1GvjbQTJ29uHIFgBNlLtHisWqZc
bLN2C4yjv52Qjsd9uenhFHXcsvlWT/yp5BUdeJ4cJ1PBCNSI9+PADABAIQc39epD
Ef2/uhb0+XZKpZPmk3Z6F9EgjAEWMMvbiqxX+CT5/cb9ZVUMh9eCgo13GLFG6j+g
xMRZMN3oFQn89i2eMjB2jnXbwF91jw==
=OiQJ
-----END PGP SIGNATURE-----

--Sig_/PePUeF8pcvWKvBQ/Y_yTebW--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 11 May 2021 14:05:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 11 10:05:47 2021
Received: from localhost ([127.0.0.1]:36982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lgT19-00064M-KP
	for submit <at> debbugs.gnu.org; Tue, 11 May 2021 10:05:47 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:35430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1lgT18-000649-Lx
 for 45692 <at> debbugs.gnu.org; Tue, 11 May 2021 10:05:47 -0400
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 0C3493362D7F;
 Tue, 11 May 2021 16:05:44 +0200 (CEST)
Date: Tue, 11 May 2021 16:05:42 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot.
Message-ID: <20210511160434.6b88bba3@HIDDEN>
In-Reply-To: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

Hi,

> +                (invoke "make" "install"
> +                        "PREFIX="
> +                        (string-append "DESTDIR=" out)))

Are you sure about that?

Usually, DESTDIR is in order to supply a temporary build root (which will not
be referred-to by the installed programs--because that directory will be
deleted after the build) and PREFIX is in order to supply an actual
installation directory (installed programs can refer to that whenever they
want).

Is it different for this program?

Also, I'd suggest to use #:make-flags so other phases can also see the PREFIX
chosen.  Otherwise, those could erroneously default to another prefix (for
loading of config files at runtime etc).

What do you think?




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 29 Mar 2021 04:39:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 29 00:39:37 2021
Received: from localhost ([127.0.0.1]:47470 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lQjgf-0007rx-HN
	for submit <at> debbugs.gnu.org; Mon, 29 Mar 2021 00:39:37 -0400
Received: from mail-40137.protonmail.ch ([185.70.40.137]:25068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lQjgd-0007rj-L4
 for 45692 <at> debbugs.gnu.org; Mon, 29 Mar 2021 00:39:36 -0400
Date: Mon, 29 Mar 2021 04:39:26 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1616992768;
 bh=hrTMIorCjSrx0Al3eyoZR9XyV1MlB6lt7axkIWHL2AY=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=n0dAtFtZNDHdzQStpKvhPIle77tHD6hdcaU3SG2EDiSc7T54zXbYb0a47IEJqOhMz
 Y3CmlNlzVx/3ifoPPb3mnZHpVg7jbN1KN9p8KebDLbH1a798M4567eMyvWJS8BBCrS
 hRAAgZlgX1srll1fqOxOKBWxSsX6YynrNvHBl6F8=
To: =?utf-8?Q?L=C3=A9o_Le_Bouter?= <lle-bout@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS
 Support on Guix
Message-ID: <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com>
In-Reply-To: <ffa79fc37bb8f8f4152a22497060e2ebd6f9c19a.camel@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <K_sz_FR8KdZSXDYUr6uI-jabQq0PqKjVANb1wWph8rK6Yy0wLIq8vj5cMNuRlWWNZKL4BFfRQoni1elqjzbCW7FYvCdLrSC2x-1N97_RU34=@protonmail.com>
 <ffa79fc37bb8f8f4152a22497060e2ebd6f9c19a.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


> On Mon, 2021-03-22 at 14:33 +0000, raid5atemyhomework via Guix-patches
> via wrote:
>
> > Personally I'm not particularly motivated to push this anymore. I
> > have a frankenstein's `configuration.scm` that gets me the bits of
> > ZFS functionality that I absolutely need, with the rest something I'm
> > just living without, and while it would be nice to have some out-
> > of-the-box support for ZFS (or at least make it easy to get a box to
> > get support for ZFS out of), I personally don't need it at this
> > point.
>
> I understand your frustration but also understand that the people who
> are able to review your patches can't make themselves available in the
> way you desire, there's lots of pending patches to GNU Guix and as much
> as ZFS support is valuable, there's also lots of other things that are
> valuable and are in the backlog.
>
> > Patch 1/3 corresponds to the original Patch 1/4. Patch 2/3 has no
> > corresponding patch in the original patch set, but is the same patch
> > as https://issues.guix.gnu.org/47134 which nobody is looking at, as
> > usual. Patch 3/3 corresponds to the original Patch 4/4.
>
> Please do not blame or shame us for not looking at patches, it's not
> very nice, we do our best, at all times. We are overworked and the
> people who are knowledgeable about GNU Guix and Scheme particularily
> so. I don't feel like I am knowledgeable about Scheme and GNU Guix
> enough to review your patches, sorry for that.

Okay.

Thanks
raid5atemyhomework





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 28 Mar 2021 12:55:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 28 08:55:18 2021
Received: from localhost ([127.0.0.1]:45514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lQUwo-0001df-2o
	for submit <at> debbugs.gnu.org; Sun, 28 Mar 2021 08:55:18 -0400
Received: from mail.zaclys.net ([178.33.93.72]:54069)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lle-bout@HIDDEN>) id 1lQUwl-0001dL-GP
 for 45692 <at> debbugs.gnu.org; Sun, 28 Mar 2021 08:55:16 -0400
Received: from guix-xps.local (82-64-145-38.subs.proxad.net [82.64.145.38])
 (authenticated bits=0)
 by mail.zaclys.net (8.14.7/8.14.7) with ESMTP id 12SCt847049688
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Sun, 28 Mar 2021 14:55:08 +0200
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.zaclys.net 12SCt847049688
Authentication-Results: mail.zaclys.net;
 dmarc=fail (p=reject dis=none) header.from=zaclys.net
Authentication-Results: mail.zaclys.net;
 spf=fail smtp.mailfrom=lle-bout@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaclys.net;
 s=default; t=1616936108;
 bh=1TK40wrwptZSXbcShmWZlFEcODzxAvGnZ/MY1grg+yk=;
 h=Subject:From:To:Date:In-Reply-To:References:From;
 b=PWbt8A3EU2UBmpvRhaOWM5mLWUhwqVAGT50ZcSEcT+2J+AbLIU1tR/xrxLOUqf8JC
 04OUFM2vW3U4rtU8VLNylMr5KJi6nWai7wGSNW84zwzCO4zZ9whQbh3yjxQJNAMw6+
 l2ViVAmfwIsL01WsYnkHbuxcEk2hWjssD/D1TbGs=
Message-ID: <ffa79fc37bb8f8f4152a22497060e2ebd6f9c19a.camel@HIDDEN>
Subject: Re: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS
 Support on Guix
From: =?ISO-8859-1?Q?L=E9o?= Le Bouter <lle-bout@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
Date: Sun, 28 Mar 2021 14:55:03 +0200
In-Reply-To: <K_sz_FR8KdZSXDYUr6uI-jabQq0PqKjVANb1wWph8rK6Yy0wLIq8vj5cMNuRlWWNZKL4BFfRQoni1elqjzbCW7FYvCdLrSC2x-1N97_RU34=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <K_sz_FR8KdZSXDYUr6uI-jabQq0PqKjVANb1wWph8rK6Yy0wLIq8vj5cMNuRlWWNZKL4BFfRQoni1elqjzbCW7FYvCdLrSC2x-1N97_RU34=@protonmail.com>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-yDUacXRpvAmJ28SsXPe+"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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 (-)


--=-yDUacXRpvAmJ28SsXPe+
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks a lot for the patches!

On Mon, 2021-03-22 at 14:33 +0000, raid5atemyhomework via Guix-patches
via wrote:
> Personally I'm not particularly motivated to push this anymore.  I
> have a frankenstein's `configuration.scm` that gets me the bits of
> ZFS functionality that I absolutely need, with the rest something I'm
> just living without, and while it would be *nice* to have *some* out-
> of-the-box support for ZFS (or at least make it easy to get a box to
> get support for ZFS out of), I personally don't need it at this
> point.

I understand your frustration but also understand that the people who
are able to review your patches can't make themselves available in the
way you desire, there's lots of pending patches to GNU Guix and as much
as ZFS support is valuable, there's also lots of other things that are
valuable and are in the backlog.

> Patch 1/3 corresponds to the original Patch 1/4.  Patch 2/3 has no
> corresponding patch in the original patch set, but is the same patch
> as https://issues.guix.gnu.org/47134 which nobody is looking at, as
> usual.  Patch 3/3 corresponds to the original Patch 4/4.

Please do not blame or shame us for not looking at patches, it's not
very nice, we do our best, at all times. We are overworked and the
people who are knowledgeable about GNU Guix and Scheme particularily
so. I don't feel like I am knowledgeable about Scheme and GNU Guix
enough to review your patches, sorry for that.

L=C3=A9o

--=-yDUacXRpvAmJ28SsXPe+
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBgfKcACgkQRaix6GvN
EKYfYw/+N51EZdVvf6GLz3EyT1f6fTeAB+XoBj8iCKFLXdNPe1dop67AW2djKQDR
4pIn1jN+gFqcP9P4NsyNLCT7KWyrYJ7AHa9vYKa0AZ5WEoNlmfsX+debqbLB3MlS
R3oXPLoQcTqvDoR+s07g6hX5HcG42CQIlMVyHA3NzboCEC/RIzeWsJDZb50ctVYJ
44yDgRQ1Ejhwx50T0bIk4OZR+/tpEgrqjPU+rYobcCi+YFDkqtkvFsiau7gVoNZ3
uHJb8T9Yw21vUPtgQsP+T/2EUA8sUiVyeykXh2KKEcV/Z/C5BjYGTEpWZ2e7LM2v
p1Vn/qxQVPUYNE/x+l7u7XH/cF2CyQw1o2dZdu/ZwosLcNxbzt6R9g1MSeXS9IKa
LON8F1oTKKBVjAfhqvCov6uCuEHFfVWi7EFhGe6a2JIljApLK+0KXoFDTa5/4HKP
ERF0/MH9keTIKiWH1l35r4UIIyccU67gkxqCFNTgr6BlZW33qyHUhHqQljbUB5qr
ibUdoF/R6/Whxk+aGJ5bnw32BxwKdT9oty7nq1rrVXC+zf5KN4p4A1Sb5aTY2EU0
9qL3OvF3Wd+u8Y+/7cbBwAA06HhJ1EQYrn5szKUp4hx909z0OuoUEkXUA81HE6FI
U8jDvw3ZDNPfc9VW3+y8OoDSijd0A5IYuX1UcHyZPsgZXxQbdEA=
=qHhm
-----END PGP SIGNATURE-----

--=-yDUacXRpvAmJ28SsXPe+--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:35:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 10:35:42 2021
Received: from localhost ([127.0.0.1]:58249 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOLeb-0001xb-NA
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:35:42 -0400
Received: from mail-40135.protonmail.ch ([185.70.40.135]:33449)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lOLeY-0001xH-9d
 for 45692 <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:35:36 -0400
Date: Mon, 22 Mar 2021 14:35:22 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1616423726;
 bh=9PtqP++rDIoVYVwYXmmlkhWAcNn7cKWB1EdEnjdRF6M=;
 h=Date:To:From:Reply-To:Subject:From;
 b=C0Xwo5F2fCCsH4IbLsPPS3GuUc5SUHJRXChAorhrs/dp53HB4tVDkpAlyUi2XuGH4
 XAzcYvhiy9RvtoSTfXYqaCNMsIbwIg49VR3TnDgOJ+aS9VEuJM8EPHTVBxpT4ecO5k
 luOGxZwAVAIMkypKWiAvYPyOjVBKU36WK2jst5GY=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH v3 3/3] gnu: Add ZFS service type.
Message-ID: <ECVfxCKtS2pEf-XrbGUETYDOd1gNFzwvZc8s2AdO5zwbpHoFaK4XmW6QxYmDF1bhJsKB3_8sbnyNarpBm1v9gaqEAMbOkAK14OulJQpBoc0=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From 7c039aee628bdb0188c0da27defb591f7791053e Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Mon, 22 Mar 2021 16:26:28 +0800
Subject: [PATCH 3/3] gnu: Add ZFS service type.

* gnu/services/file-systems.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/services/base.scm: Export dependency->shepherd-service-name.
* doc/guix.texi (ZFS File System): New subsection.
---
 doc/guix.texi                 | 351 ++++++++++++++++++++++++++++++++++
 gnu/local.mk                  |   2 +
 gnu/services/base.scm         |   4 +-
 gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++
 4 files changed, 651 insertions(+), 1 deletion(-)
 create mode 100644 gnu/services/file-systems.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 86b22f3673..a2a092b31b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -87,6 +87,7 @@ Copyright @copyright{} 2020 Daniel Brooks@*
 Copyright @copyright{} 2020 John Soo@*
 Copyright @copyright{} 2020 Jonathan Brielmaier@*
 Copyright @copyright{} 2020 Edgar Vincent@*
+Copyright @copyright{} 2021 raid5atemyhomework@*

 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -14095,6 +14096,356 @@ a file system declaration such as:
 compress-force=3Dzstd,space_cache=3Dv2"))
 @end lisp

+
+@node ZFS File System
+@subsection ZFS File System
+
+Support for ZFS file systems is provided on Guix by the OpenZFS project.
+OpenZFS currently only supports Linux-Libre and is not available on the
+Hurd.
+
+OpenZFS is free software; unfortunately its license is incompatible with
+the GNU General Public License (GPL), the license of the Linux kernel,
+which means they cannot be distributed together.  However, as a user,
+you can choose to build ZFS and use it together with Linux; you can
+even rely on Guix to automate this task.  See
+@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
+the Free Software Foundation} for more information.
+
+As a large and complex kernel module, OpenZFS has to be compiled for a
+specific version of Linux-Libre.  At times, the latest OpenZFS package
+available in Guix is not compatible with the latest Linux-Libre version.
+Thus, directly installing the @code{zfs} package can fail.
+
+Instead, you are recommended to select a specific older long-term-support
+Linux-Libre kernel.  Do not use @code{linux-libre-lts}, as even the
+latest long-term-support kernel may be too new for @code{zfs}.  Instead,
+explicitly select a specific older version, such as @code{linux-libre-5.10=
},
+and upgrade it manually later as new long-term-support kernels become
+available that you have confirmed is compatible with the latest available
+OpenZFS version on Guix.
+
+For example, you can modify your system configuration file to a specific
+Linux-Libre version and add the @code{zfs-service-type} service.
+
+@lisp
+(use-modules (gnu))
+(use-package-modules
+  #;@dots{}
+  linux)
+(use-service-modules
+  #;@dots{}
+  file-systems)
+
+(define my-kernel linux-libre-5.10)
+
+(operating-system
+  (kernel my-kernel)
+  #;@dots{}
+  (services
+    (cons* (service zfs-service-type
+                    (zfs-configuration
+                      (kernel my-kernel)))
+           #;@dots{}
+           %desktop-services))
+  #;@dots{})
+@end lisp
+
+@defvr {Scheme Variable} zfs-service-type
+This is the type for a service that adds ZFS support to your operating
+system.  The service is configured using a @code{zfs-configuration}
+record.
+
+Here is an example use:
+
+@lisp
+(service zfs-service-type
+  (zfs-configuration
+    (kernel linux-libre-5.4)))
+@end lisp
+@end defvr
+
+@deftp {Data Type} zfs-configuration
+This data type represents the configuration of the ZFS support in Guix
+System.  Its fields are:
+
+@table @asis
+@item @code{kernel}
+The package of the Linux-Libre kernel to compile OpenZFS for.  This field
+is always required.  It @emph{must} be the same kernel you use in your
+@code{operating-system} form.
+
+@item @code{base-zfs} (default: @code{zfs})
+The OpenZFS package that will be compiled for the given Linux-Libre kernel=
.
+
+@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot})
+The @code{zfs-auto-snapshot} package to use.  It will be modified to
+specifically use the OpenZFS compiled for your kernel.
+
+@item @code{dependencies} (default: @code{'()})
+A list of @code{<file-system>} or @code{<mapped-device>} records that must
+be mounted or opened before OpenZFS scans for pools to import.  For exampl=
e,
+if you have set up LUKS containers as leaf VDEVs in a pool, you have to
+include their corresponding @code{<mapped-ddevice>} records so that OpenZF=
S
+can import the pool correctly at bootup.
+
+@item @code{auto-mount?} (default: @code{#t})
+Whether to mount datasets with the ZFS @code{mountpoint} property automati=
cally
+at startup.  This is the behavior that ZFS users usually expect.  You migh=
t
+set this to @code{#f} for an operating system intended as a ``rescue'' sys=
tem
+that is intended to help debug problems with the disks rather than actuall=
y
+work in production.
+
+@item @code{auto-scrub} (default: @code{'weekly})
+Specifies how often to scrub all pools.  Can be the symbols @code{'weekly}=
 or
+@code{'monthly}, or a schedule specification understood by
+@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as
+@code{"0 3 * * 6"} for ``every 3AM on Saturday''.
+It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende=
d}).
+
+The general guideline is to scrub weekly when using consumer-quality drive=
s, and
+to scrub monthly when using enterprise-quality drives.
+
+@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc=
rubs
+are done on midnight on the first day of each month.
+
+@item @code{auto-snapshot?} (default: @code{#t})
+Specifies whether to auto-snapshot by default.  If @code{#t}, then snapsho=
ts
+are automatically created except for ZFS datasets with the
+@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}.
+
+If @code{#f}, snapshots will not be automatically created, unless the ZFS
+dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to
+@code{true}.
+
+@item @code{auto-snapshot-keep} (default: @code{'()})
+Specifies an association list of symbol-number pairs, indicating the numbe=
r
+of automatically-created snapshots to retain for each frequency type.
+
+If not specified via this field, by default there are 4 @code{frequent}, 2=
4
+@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna=
pshots.
+
+For example:
+
+@lisp
+(zfs-configuration
+  (kernel my-kernel)
+  (auto-snapshot-keep
+    '((frequent . 8)
+      (hourly . 12))))
+@end lisp
+
+The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps=
hots.
+@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their
+defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}).
+
+@end table
+@end deftp
+
+@subsubsection ZFS Auto-Snapshot
+
+The ZFS service on Guix System supports auto-snapshots as implemented in t=
he
+Solaris operating system.
+
+@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee=
kly},
+and @code{monthly} snapshots are created automatically for ZFS datasets th=
at
+have auto-snapshot enabled.  They will be named, for example,
+@code{zfs-auto-snap_frequent-2021-03-22-1415}.  You can continue to use
+manually-created snapshots as long as they do not conflict with the naming
+convention used by auto-snapshot.  You can also safely manually destroy
+automatically-created snapshots, for example to free up space.
+
+The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a
+per-dataset level.  Sub-datasets will inherit this property from their par=
ent
+dataset, but can have their own property.
+
+You @emph{must} set this property to @code{true} or @code{false} exactly,
+otherwise it will be treated as if the property is unset.
+
+For example:
+
+@example
+# zfs list -o name
+NAME
+tank
+tank/important-data
+tank/tmp
+# zfs set com.sun:auto-snapshot=3Dtrue tank
+# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp
+@end example
+
+The above will set @code{tank} and @code{tank/important-data} to be
+auto-snapshot, while @code{tank/tmp} will not be auto-snapshot.
+
+If the @code{com.sun:auto-snapshot} property is not set for a dataset
+(the default when pools and datasets are created), then whether
+auto-snapshot is done or not will depend on the @code{auto-snapshot?}
+field of the @code{zfs-configuration} record.
+
+There are also @code{com.sun:auto-snapshot:frequent},
+@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily},
+@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month=
ly}
+properties that give finer-grained control of whether to auto-snapshot a
+dataset at a particular schedule.
+
+The number of snapshots kept for all datasets can be overridden via the
+@code{auto-snapshot-keep} field of the @code{zfs-configuration} record.
+There is currently no support to have different numbers of snapshots to
+keep for different datasets.
+
+@subsubsection ZVOLs
+
+ZFS supports ZVOLs, block devices that ZFS exposes to the operating
+system in the @code{/dev/zvol/} directory.  The ZVOL will have the same
+resilience and self-healing properties as other datasets on your ZFS pool.
+ZVOLs can also be snapshotted (and will be included in auto-snapshotting
+if enabled), which snapshots the state of the block device, effectively
+snapshotting the hosted file system.
+
+You can put any file system inside the ZVOL.  However, in order to mount t=
his
+file system at system start, you need to add @code{%zfs-zvol-dependency} a=
s a
+dependency of each file system inside a ZVOL.
+
+@defvr {Scheme Variable} %zfs-zvol-dependency
+An artificial @code{<mapped-device>} which tells the file system mounting
+service to wait for ZFS to provide ZVOLs before mounting the
+@code{<file-system>} dependent on it.
+@end defvr
+
+For example, suppose you create a ZVOL and put an ext4 filesystem
+inside it:
+
+@example
+# zfs create -V 100G tank/ext4-on-zfs
+# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs
+# mkdir /ext4-on-zfs
+# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs
+@end example
+
+You can then set this up to be mounted at boot by adding this to the
+@code{file-systems} field of your @code{operating-system} record:
+
+@lisp
+(file-system
+  (device "/dev/zvol/tank/ext4-on-zfs")
+  (mount-point "/ext4-on-zfs")
+  (type "ext4")
+  (dependencies (list %zfs-zvol-dependency)))
+@end lisp
+
+You @emph{must not} add @code{%zfs-zvol-dependency} to your
+@code{operating-system}'s @code{mapped-devices} field, and you @emph{must
+not} add it (or any @code{<file-system>}s dependent on it) to the
+@code{dependencies} field of @code{zfs-configuration}.  Finally, you
+@emph{must not} use @code{%zfs-zvol-dependency} unless you actually
+instantiate @code{zfs-service-type} on your system.
+
+@subsubsection Unsupported Features
+
+Some common features and uses of ZFS are currently not supported, or not
+fully supported, on Guix.
+
+@enumerate
+@item
+Shepherd-managed daemons that are configured to read from or write to ZFS
+mountpoints need to include @code{user-processes} in their @code{requireme=
nt}
+field.  This is the earliest that ZFS file systems are assured of being
+mounted.
+
+Generally, most daemons will, directly or indirectly, require
+@code{networking}, or @code{user-processes}, or both.  Most implementation=
s
+of @code{networking} will also require @code{user-processes} so daemons th=
at
+require only @code{networking} will also generally start up after
+@code{user-processes}.  A notable exception, however, is
+@code{static-networking-service-type}.  You will need to explicitly add
+@code{user-processes} as a @code{requirement} of your @code{static-network=
ing}
+record.
+
+@item
+@code{mountpoint=3Dlegacy} ZFS file systems.  The handlers for the Guix mo=
unting
+system have not yet been modified to support ZFS, and will expect @code{/d=
ev}
+paths in the @code{<file-system>}'s @code{device} field, but ZFS file syst=
ems
+are referred to via non-path @code{pool/file/system} names.  Such file sys=
tems
+also need to be mounted @emph{after} OpenZFS has scanned for pools.
+
+You can still manually mount these file systems after system boot; what is
+only unsupported is mounting them automatically at system boot by specifyi=
ng
+them in @code{<file-system>} records of your @code{operating-system}.
+
+@item
+@code{/home} on ZFS.  Guix will create home directories for users, but thi=
s
+process currently cannot be scheduled after ZFS file systems are mounted.
+Thus, the ZFS file system might be mounted @emph{after} Guix has created
+home directories at boot, at which point OpenZFS will refuse to mount sinc=
e
+the mountpoint is not empty.  However, you @emph{can} create an ext4, xfs,
+btrfs, or other supported file system inside a ZVOL, have that depend on
+@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home}
+directory; they will be scheduled to mount before the @code{user-homes}
+process.
+
+Similarly, other locations like @code{/var}, @code{/gnu/store} and so
+on cannot be reliably put in a ZFS file system, though they may be
+possible to create as other file systems inside ZVOL containers.
+
+@item
+@code{/} and @code{/boot} on ZFS.  These require Guix to expose more of
+the @code{initrd} very early boot process to services.  It also requires
+Guix to have the ability to explicitly load modules while still in
+@code{initrd} (currently kernel modules loaded by
+@code{kernel-module-loader-service-type} are loaded after @code{/} is
+mounted).  Further, since one of ZFS's main advantages is that it can
+continue working despite the loss of one or more devices, it makes sense
+to also support installing the bootloader on all devices of the pool that
+contains the @code{/} and @code{/boot}; after all, if ZFS can survive the
+loss of one device, the bootloader should also be able to survive the loss
+of one device.
+
+@item
+ZVOL swap devices.  Mapped swap devices need to be listed in
+@code{mapped-devices} to ensure they are opened before the system attempts
+to use them, but you cannot currently add @code{%zfs-zvol-dependency} to
+@code{mapped-devices}.
+
+This will also require significant amounts of testing, as various kernel
+build options and patches may affect how swapping works, which are possibl=
y
+different on Guix System compared to other distributions that this feature=
 is
+known to work on.
+
+@item
+ZFS Event Daemon.  Support for this has not been written yet, patches are
+welcome.  The main issue is how to design this in a Guix style while
+supporting legacy shell-script styles as well.  In particular, OpenZFS its=
elf
+comes with a number of shell scripts intended for ZFS Event Daemon, and we
+need to figure out how the user can choose to use or not use the provided
+scripts (and configure any settings they have) or override with their own
+custom code (which could be shell scripts they have written and trusted fr=
om
+previous ZFS installations).
+
+As-is, you can create your own service that activates the ZFS Event Daemon
+by creating the @file{/etc/zfs/zed} directory and filling it appropriately=
,
+then launching @code{zed}.
+
+@item
+@file{/etc/zfs/zpool.cache}.  Currently the ZFS support on Guix always for=
ces
+scanning of all devices at bootup to look for ZFS pools.  For systems with
+dozens or hundreds of storage devices, this can lead to slow bootup.  One =
issue
+is that tools should really not write to @code{/etc} which is supposed to =
be for
+configuration; possibly it could be moved to @code{/var} instead.  Another=
 issue
+is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke=
ep the
+@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i=
n the
+@code{/} mount point.
+
+@item
+@code{zfs share}.  This will require some (unknown amount of) work to inte=
grate
+into the Samba and NFS services of Guix.  You @emph{can} manually set up S=
amba
+and NFS to share any mounted ZFS datasets by setting up their configuratio=
ns
+properly; it just can't be done for you by @code{zfs share} and the
+@code{sharesmb} and @code{sharenfs} properties.
+@end enumerate
+
+Hopefully, support for the above only requires code to be written, so user=
s
+are encouraged to hack on Guix to implement the above features.
+
 @node Mapped Devices
 @section Mapped Devices

diff --git a/gnu/local.mk b/gnu/local.mk
index 3d4147a879..6fd8284a9b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -40,6 +40,7 @@
 # Copyright =C2=A9 2020 Malte Frank Gerdes <mate.f.gerdes@HIDDEN>
 # Copyright =C2=A9 2020 Vinicius Monego <monego@HIDDEN>
 # Copyright =C2=A9 2021 Bj=C3=B6rn H=C3=B6fling <bjoern.hoefling@bjoernhoe=
fling.de>
+# Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmail.=
com>
 #
 # This file is part of GNU Guix.
 #
@@ -607,6 +608,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\
   %D%/services/docker.scm=09=09=09\
   %D%/services/authentication.scm=09=09\
   %D%/services/file-sharing.scm=09=09=09\
+  %D%/services/file-systems.scm=09=09=09\
   %D%/services/games.scm=09=09=09\
   %D%/services/ganeti.scm=09=09=09\
   %D%/services/getmail.scm=09=09=09=09\
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f50bcfdcb4..09a2d7c45b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -187,7 +187,9 @@

             references-file

-            %base-services))
+            %base-services
+
+            dependency->shepherd-service-name))

 ;;; Commentary:
 ;;;
diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
new file mode 100644
index 0000000000..0b1aae38ac
--- /dev/null
+++ b/gnu/services/file-systems.scm
@@ -0,0 +1,295 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services file-systems)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services linux)
+  #:use-module (gnu services mcron)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system mapped-devices)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix records)
+  #:export (zfs-service-type
+
+            zfs-configuration
+            zfs-configuration?
+            zfs-configuration-kernel
+            zfs-configuration-base-zfs
+            zfs-configuration-base-zfs-auto-snapshot
+            zfs-configuration-dependencies
+            zfs-configuration-auto-mount?
+            zfs-configuration-auto-scrub
+            zfs-configuration-auto-snapshot?
+            zfs-configuration-auto-snapshot-keep
+
+            %zfs-zvol-dependency))
+
+(define-record-type* <zfs-configuration>
+  zfs-configuration
+  make-zfs-configuration
+  zfs-configuration?
+
+  ; linux-libre kernel you want to compile the base-zfs module for.
+  (kernel                     zfs-configuration-kernel)
+
+  ; the OpenZFS package that will be modified to compile for the
+  ; given kernel.
+  (base-zfs                   zfs-configuration-base-zfs
+                              (default zfs))
+
+  ; the zfs-auto-snapshot package that will be modified to compile
+  ; for the given kernel.
+  (base-zfs-auto-snapshot     zfs-configuration-base-zfs-auto-snapshot
+                              (default zfs-auto-snapshot))
+
+  ; list of <mapped-device> or <file-system> objects that must be
+  ; opened/mounted before we import any ZFS pools.
+  (dependencies               zfs-configuration-dependencies
+                              (default '()))
+
+  ; #t if mountable datasets are to be mounted automatically.
+  ; #f if not mounting.
+  ; #t is the expected behavior on other operating systems, the
+  ; #f is only supported for "rescue" operating systems where
+  ; the user wants lower-level control of when to mount.
+  (auto-mount?                zfs-configuration-auto-mount?
+                              (default #t))
+
+  ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an
+  ; mcron time specification that can be given to `job`, or #f to
+  ; disable.
+  (auto-scrub                 zfs-configuration-auto-scrub
+                              (default 'weekly))
+
+  ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse`
+  ; disables auto-snapshot per dataset), #f if no auto-snapshotting
+  ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot
+  ; per dataset).
+  (auto-snapshot?             zfs-configuration-auto-snapshot?
+                              (default #t))
+
+  ; association list of symbol-number pairs to indicate the number
+  ; of automatic snapshots to keep for each of 'frequent, 'hourly,
+  ; 'daily, 'weekly, and 'monthly.
+  ; e.g. '((frequent . 8) (hourly . 12))
+  (auto-snapshot-keep         zfs-configuration-auto-snapshot-keep
+                              (default '())))
+
+(define %default-auto-snapshot-keep
+  '((frequent . 4)
+    (hourly . 24)
+    (daily . 31)
+    (weekly . 8)
+    (monthly . 12)))
+
+(define %auto-snapshot-mcron-schedule
+  '((frequent .  "0,15,30,45 * * * *")
+    (hourly .    "0 * * * *")
+    (daily .     "0 0 * * *")
+    (weekly .    "0 0 * * 7")
+    (monthly .   "0 0 1 * *")))
+
+;; A synthetic and unusable MAPPED-DEVICE intended for use when
+;; the user has created a mountable filesystem inside a ZFS
+;; zvol and wants it mounted inside the configuration.scm.
+(define %zfs-zvol-dependency
+  (mapped-device
+    (source '())
+    (targets '("zvol/*"))
+    (type #f)))
+
+(define (make-zfs-package conf)
+  (let ((kernel    (zfs-configuration-kernel conf))
+        (base-zfs  (zfs-configuration-base-zfs conf)))
+    (package
+      (inherit base-zfs)
+      (arguments (cons* #:linux kernel
+                        (package-arguments base-zfs))))))
+
+(define (make-zfs-auto-snapshot-package conf)
+  (let ((zfs                    (make-zfs-package conf))
+        (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot =
conf)))
+    (package
+      (inherit base-zfs-auto-snapshot)
+      (inputs `(("zfs" ,zfs))))))
+
+(define (zfs-loadable-modules conf)
+  (list (list (make-zfs-package conf) "module")))
+
+(define (zfs-shepherd-services conf)
+  (let* ((zfs-package     (make-zfs-package conf))
+         (zpool           (file-append zfs-package "/sbin/zpool"))
+         (zfs             (file-append zfs-package "/sbin/zfs"))
+         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
+         (scheme-modules  `((srfi srfi-1)
+                            (srfi srfi-34)
+                            (srfi srfi-35)
+                            (rnrs io ports)
+                            ,@%default-modules)))
+    (define zfs-scan
+      (shepherd-service
+        (provision '(zfs-scan))
+        (requirement `(root-file-system
+                       kernel-module-loader
+                       udev
+                       ,@(map dependency->shepherd-service-name
+                              (zfs-configuration-dependencies conf))))
+        (documentation "Scans for and imports ZFS pools.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error importing pools: ~s~%"
+                                      (condition-message c))
+                              #f))
+                     ; TODO: optionally use a cachefile.
+                     (invoke #$zpool "import" "-a" "-N"))))
+        ;; Why not one-shot?  Because we don't really want to rescan
+        ;; this each time a requiring process is restarted, as scanning
+        ;; can take a long time and a lot of I/O.
+        (stop #~(const #f))))
+
+    (define device-mapping-zvol/*
+      (shepherd-service
+        (provision '(device-mapping-zvol/*))
+        (requirement '(zfs-scan))
+        (documentation "Waits for all ZFS ZVOLs to be opened.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error opening zvols: ~s~%"
+                                      (condition-message c))
+                              #f))
+                     (invoke #$zvol_wait))))
+        (stop #~(const #f))))
+
+    (define zfs-auto-mount
+      (shepherd-service
+        (provision '(zfs-auto-mount))
+        (requirement '(zfs-scan))
+        (documentation "Mounts all non-legacy mounted ZFS filesystems.")
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "zfs: error mounting file systems: ~=
s~%"
+                                      (condition-message c))
+                              #f))
+                     ;; Output to current-error-port, otherwise the
+                     ;; user will not see any prompts for passwords
+                     ;; of encrypted datasets.
+                     ;; XXX Maybe better to explicitly open /dev/console ?
+                     (with-output-to-port (current-error-port)
+                       (lambda ()
+                         (invoke #$zfs "mount" "-a" "-l"))))))
+        (stop #~(lambda _
+                  ;; Make sure that Shepherd does not have a CWD that
+                  ;; is a mounted ZFS filesystem, which would prevent
+                  ;; unmounting.
+                  (chdir "/")
+                  (invoke #$zfs "unmount" "-a" "-f")))))
+
+    `(,zfs-scan
+      ,device-mapping-zvol/*
+      ,@(if (zfs-configuration-auto-mount? conf)
+            `(,zfs-auto-mount)
+            '()))))
+
+(define (zfs-user-processes conf)
+  (if (zfs-configuration-auto-mount? conf)
+      '(zfs-auto-mount)
+      '(zfs-scan)))
+
+(define (zfs-mcron-auto-snapshot-jobs conf)
+  (let* ((user-auto-snapshot-keep      (zfs-configuration-auto-snapshot-ke=
ep conf))
+         ;; assoc-ref has earlier entries overriding later ones.
+         (auto-snapshot-keep           (append user-auto-snapshot-keep
+                                               %default-auto-snapshot-keep=
))
+         (auto-snapshot?               (zfs-configuration-auto-snapshot? c=
onf))
+         (zfs-auto-snapshot-package    (make-zfs-auto-snapshot-package con=
f))
+         (zfs-auto-snapshot            (file-append zfs-auto-snapshot-pack=
age
+                                                    "/sbin/zfs-auto-snapsh=
ot")))
+    (map
+      (lambda (label)
+        (let ((keep   (assoc-ref auto-snapshot-keep label))
+              (sched  (assoc-ref %auto-snapshot-mcron-schedule label)))
+          #~(job '#$sched
+                 (string-append #$zfs-auto-snapshot
+                                " --quiet --syslog "
+                                " --label=3D" #$(symbol->string label)
+                                " --keep=3D" #$(number->string keep)
+                                " //"))))
+      '(frequent hourly daily weekly monthly))))
+
+(define (zfs-mcron-auto-scrub-jobs conf)
+  (let* ((zfs-package    (make-zfs-package conf))
+         (zpool          (file-append zfs-package "/sbin/zpool"))
+         (auto-scrub     (zfs-configuration-auto-scrub conf))
+         (sched          (cond
+                           ((eq? auto-scrub 'weekly)  "0 0 * * 7")
+                           ((eq? auto-scrub 'monthly) "0 0 1 * *")
+                           (else                      auto-scrub))))
+    (list
+      #~(job '#$sched
+             ;; Suppress errors: if there are no ZFS pools, the
+             ;; scrub will not be given any arguments, which makes
+             ;; it error out.
+             (string-append "(" #$zpool " scrub `" #$zpool " list -o name =
-H` "
+                            "> /dev/null 2>&1) "
+                            "|| exit 0")))))
+
+(define (zfs-mcron-jobs conf)
+  (append (zfs-mcron-auto-snapshot-jobs conf)
+          (if (zfs-configuration-auto-scrub conf)
+              (zfs-mcron-auto-scrub-jobs conf)
+              '())))
+
+(define zfs-service-type
+  (service-type
+    (name 'zfs)
+    (extensions
+      (list ;; Install OpenZFS kernel module into kernel profile.
+            (service-extension linux-loadable-module-service-type
+                               zfs-loadable-modules)
+            ;; And load it.
+            (service-extension kernel-module-loader-service-type
+                               (const '("zfs")))
+            ;; Make sure ZFS pools and datasets are mounted at
+            ;; boot.
+            (service-extension shepherd-root-service-type
+                               zfs-shepherd-services)
+            ;; Make sure user-processes don't start until
+            ;; after ZFS does.
+            (service-extension user-processes-service-type
+                               zfs-user-processes)
+            ;; Install automated scrubbing and snapshotting.
+            (service-extension mcron-service-type
+                               zfs-mcron-jobs)
+
+            ;; Install ZFS management commands in the system
+            ;; profile.
+            (service-extension profile-service-type
+                               (compose list make-zfs-package))
+            ;; Install ZFS udev rules.
+            (service-extension udev-service-type
+                               (compose list make-zfs-package))))
+    (description "Installs ZFS, an advanced filesystem and volume manager.=
")))
--
2.31.0





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:34:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 10:34:41 2021
Received: from localhost ([127.0.0.1]:58244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOLdh-0001vj-A7
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:34:41 -0400
Received: from mail-40141.protonmail.ch ([185.70.40.141]:34184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lOLdf-0001vX-KP
 for 45692 <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:34:40 -0400
Date: Mon, 22 Mar 2021 14:34:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1616423673;
 bh=QQM+qwaT1UTcQHbQW8JOM7Zj5IQqKU2fIhbum0hDGSM=;
 h=Date:To:From:Reply-To:Subject:From;
 b=IE2RzgCDCj6AUqxMq/WkpEeEYxhA+hUlqW2gKt4E5xpGdjAQ+sJl4l4EupiS5waR/
 ZRkkPsPmF3jIXBNUIF4FqXI5reNMxZNWw4WXMLfwFSGHzfRUmJ2KcziK3ieIDMYjNf
 N8tTGC0D8Hs9TaqJQpYvMiHUMwS6jG2OwVax5FzQ=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH v3 2/3] gnu: Add zfs-auto-snapshot.
Message-ID: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From 481dc87f77743b7a282777656e78615ea57d19cc Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Sun, 14 Mar 2021 16:40:47 +0800
Subject: [PATCH 2/3] gnu: Add zfs-auto-snapshot.

* gnu/packages/file-systems.scm (zfs-auto-snapshot): New variable.
---
 gnu/packages/file-systems.scm | 75 +++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 198653c639..6877f89f6e 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -976,6 +976,81 @@ originally developed for Solaris and is now maintained=
 by the OpenZFS
 community.")
     (license license:cddl1.0)))

+(define-public zfs-auto-snapshot
+  (package
+    (name "zfs-auto-snapshot")
+    (version "1.2.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://github.com/zfsonlinux/zfs-auto-snapshot/archive/up=
stream/"
+               version ".tar.gz"))
+        (sha256
+          (base32 "16ry1w43i44xc67gr73x6fa48ninfhqxr498ad4m3kya93vp2zrh"))=
))
+    (build-system gnu-build-system)
+    (inputs
+      ;; Note: if you are inheriting from the above zfs package in order
+      ;; to provide a specific stable kernel version, you should also
+      ;; inherit this package and replace the sole input below.
+      `(("zfs" ,zfs)))
+    (arguments
+      `(#:tests? #f ; No tests
+        #:phases
+        (modify-phases %standard-phases
+          (delete 'configure)
+          (delete 'build)
+          ;; Guix System may not have a traditional cron system, but
+          ;; the cron scripts installed by this package are convenient
+          ;; to use as targets for an mcron job specification, so make
+          ;; sure they can be run in-store.
+          (add-before 'install 'fix-scripts
+            (lambda* (#:key outputs inputs #:allow-other-keys)
+              (let* ((out                (assoc-ref outputs "out"))
+                     (zfs-auto-snapshot  (string-append
+                                           out
+                                           "/sbin/zfs-auto-snapshot"))
+                     (zfs-package        (assoc-ref inputs "zfs"))
+                     (zpool              (string-append
+                                           zfs-package
+                                           "/sbin/zpool"))
+                     (zfs                (string-append
+                                           zfs-package
+                                           "/sbin/zfs")))
+                (substitute* '("etc/zfs-auto-snapshot.cron.daily"
+                               "etc/zfs-auto-snapshot.cron.frequent"
+                               "etc/zfs-auto-snapshot.cron.hourly"
+                               "etc/zfs-auto-snapshot.cron.monthly"
+                               "etc/zfs-auto-snapshot.cron.weekly")
+                  (("zfs-auto-snapshot")
+                   zfs-auto-snapshot))
+                (substitute* "src/zfs-auto-snapshot.sh"
+                  (("LC_ALL=3DC zfs list")
+                   (string-append "LC_ALL=3DC " zfs " list"))
+                  (("LC_ALL=3DC zpool status")
+                   (string-append "LC_ALL=3DC " zpool " status"))
+                  (("zfs snapshot")
+                   (string-append zfs " snapshot"))
+                  (("zfs destroy")
+                   (string-append zfs " destroy"))))))
+          ;; Provide DESTDIR and PREFIX on make command.
+          (replace 'install
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((out (assoc-ref outputs "out")))
+                (invoke "make" "install"
+                        "PREFIX=3D"
+                        (string-append "DESTDIR=3D" out)))
+              #t)))))
+    (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot")
+    (synopsis "Automatically create, rotate, and destroy periodic ZFS snap=
shots")
+    (description
+      "An alternative implementation of the zfs-auto-snapshot service for =
Linux
+that is compatible with zfs-linux (now OpenZFS) and zfs-fuse.
+
+On Guix System, you will need to invoke the included shell scripts as @cod=
e{job}
+definitions in your @code{operating-system} declaration.")
+    (license license:gpl2+)))
+
 (define-public mergerfs
   (package
     (name "mergerfs")
--
2.31.0





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:34:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 10:34:03 2021
Received: from localhost ([127.0.0.1]:58240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOLcz-0001uM-5P
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:34:03 -0400
Received: from mail-40137.protonmail.ch ([185.70.40.137]:18535)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lOLcw-0001u8-Uk
 for 45692 <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:33:56 -0400
Date: Mon, 22 Mar 2021 14:33:39 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1616423627;
 bh=nC0SrT1UUqmuzzJcLCVexazP+FJ9FVBa+IiJp76WntA=;
 h=Date:To:From:Reply-To:Subject:From;
 b=D6Mp92VTvJjiM0x7mwj3F8aFsiOspXJJRoSLGUHqyeGmuENEI/RP9FdnFggNGDeuy
 2lzda1PvhpTTzqQoRgo03PfZ+GpHL4usBHKOKuYZPeM63SP05Vdj4WFPwF12mBJ1jC
 bPS6JiZoSHErd8f1wp/FMCYPlPCnaobRW1whkplE=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH v3 1/3] gnu: Allow services to install kernel-loadable modules.
Message-ID: <VQKkOa-eyRygylIYZoOrs8rI2MCV0e9iMe4ZXaFZZoEsT2UasU5NJjDRY4gge12_eBJrDYONBtVJ1qoojdiueq8LOmzSHl8wCZup8Fc9tR4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From d54d718dd83195041d9f536e8c675eb2bffdcb8d Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Mon, 22 Mar 2021 11:23:32 +0800
Subject: [PATCH 1/3] gnu: Allow services to install kernel-loadable modules=
.

* gnu/system.scm (operating-system-directory-base-entries): Remove code
to handle generation of "kernel" for linux-libre kernels.
(operating-system-default-essential-services): Instantiate
linux-builder-service-type.
(package-for-kernel): Move ...
* gnu/services.scm: ... to here.
(linux-builder-service-type): New variable.
(linux-builder-configuration): New type.
(linux-loadable-module-service-type): New variable.
* gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move
code to ...
(run-loadable-kernel-modules-test-base): ... new procedure here.
(run-loadable-kernel-modules-service-test): New procedure.
(%test-loadable-kernel-modules-service-0): New variable.
(%test-loadable-kernel-modules-service-1): New variable.
(%test-loadable-kernel-modules-service-2): New variable.
* doc/guix.texi: Document linux-loadable-module-service-type.
---
 doc/guix.texi               | 22 +++++++++
 gnu/services.scm            | 90 +++++++++++++++++++++++++++++++++++++
 gnu/system.scm              | 34 ++++----------
 gnu/tests/linux-modules.scm | 80 ++++++++++++++++++++++++++++-----
 4 files changed, 191 insertions(+), 35 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 386169b2a5..86b22f3673 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -33967,6 +33967,28 @@ configuration when you use @command{guix system re=
configure},
 @command{guix system init}, or @command{guix deploy}.
 @end defvr

+@defvr {Scheme Variable} linux-loadable-module-service-type
+Type of the service that collects lists of packages containing
+kernel-loadable modules, and adds them to the set of kernel-loadable
+modules.
+
+This service type is intended to be extended by other service types,
+such as below:
+
+@lisp
+(define module-installing-service-type
+  (service-type
+    (name 'module-installing-service)
+    (extensions (list (service-extension linux-loadable-module-service-typ=
e
+                                         (const (list module-to-install-1
+                                                      module-to-install-2)=
))))
+    (default-value #f)))
+@end lisp
+
+This does not actually load modules at bootup, only adds it to the
+kernel profile so that it @emph{can} be loaded by other means.
+@end defvr
+
 @node Shepherd Services
 @subsection Shepherd Services

diff --git a/gnu/services.scm b/gnu/services.scm
index ddd1bac30c..a20edeb8ec 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Court=
=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2016 Chris Marusich <cmmarusich@HIDDEN>
 ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,8 @@
   #:use-module (guix diagnostics)
   #:autoload   (guix openpgp) (openpgp-format-fingerprint)
   #:use-module (guix modules)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages hurd)
@@ -106,6 +109,12 @@
             profile-service-type
             firmware-service-type
             gc-root-service-type
+            linux-builder-service-type
+            linux-builder-configuration
+            linux-builder-configuration?
+            linux-builder-configuration-kernel
+            linux-builder-configuration-modules
+            linux-loadable-module-service-type

             %boot-service
             %activation-service
@@ -872,6 +881,87 @@ as Wifi cards.")))
 will not be reclaimed by the garbage collector.")
                 (default-value '())))

+;; Configuration for the Linux kernel builder.
+(define-record-type* <linux-builder-configuration>
+  linux-builder-configuration
+  make-linux-builder-configuration
+  linux-builder-configuration?
+  this-linux-builder-configuration
+
+  (kernel   linux-builder-configuration-kernel)                   ; packag=
e
+  (modules  linux-builder-configuration-modules  (default '())))  ; list o=
f packages
+
+(define (package-for-kernel target-kernel module-package)
+  "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
+possible (that is if there's a LINUX keyword argument in the build system)=
."
+  (package
+    (inherit module-package)
+    (arguments
+     (substitute-keyword-arguments (package-arguments module-package)
+       ((#:linux kernel #f)
+        target-kernel)))))
+
+(define (linux-builder-configuration->system-entry config)
+  "Return the kernel entry of the 'system' directory."
+  (let* ((kernel  (linux-builder-configuration-kernel config))
+         (modules (linux-builder-configuration-modules config))
+         (kernel  (profile
+                    (content (packages->manifest
+                              (cons kernel
+                                    (map (lambda (module)
+                                           (cond
+                                             ((package? module)
+                                              (package-for-kernel kernel m=
odule))
+                                             ;; support (,package "kernel-=
module-output")
+                                             ((and (list? module) (package=
? (car module)))
+                                              (cons (package-for-kernel ke=
rnel
+                                                                        (c=
ar module))
+                                                    (cdr module)))
+                                             (else
+                                              module)))
+                                         modules))))
+                    (hooks (list linux-module-database)))))
+    (with-monad %store-monad
+      (return `(("kernel" ,kernel))))))
+
+(define linux-builder-service-type
+  (service-type (name 'linux-builder)
+                (extensions
+                  (list (service-extension system-service-type
+                                           linux-builder-configuration->sy=
stem-entry)))
+                (default-value '())
+                (compose identity)
+                (extend (lambda (config modifiers)
+                          (if (null? modifiers)
+                              config
+                              ((apply compose modifiers) config))))
+                (description "Builds the linux-libre kernel profile, conta=
ining
+the kernel itself and any linux-loadable kernel modules.  This can be exte=
nded
+with a function that accepts the current configuration and returns a new
+configuration.")))
+
+(define (linux-loadable-module-builder-modifier modules)
+  "Extends linux-builder-service-type by appending the given MODULES to th=
e
+configuration of linux-builder-service-type."
+  (lambda (config)
+    (linux-builder-configuration
+      (inherit config)
+      (modules (append (linux-builder-configuration-modules config)
+                       modules)))))
+
+(define linux-loadable-module-service-type
+  (service-type (name 'linux-loadable-modules)
+                (extensions
+                  (list (service-extension linux-builder-service-type
+                                           linux-loadable-module-builder-m=
odifier)))
+                (default-value '())
+                (compose concatenate)
+                (extend append)
+                (description "Adds packages and package outputs as modules
+included in the booted linux-libre profile.  Other services can extend thi=
s
+service type to add particular modules to the set of linux-loadable module=
s.")))
+
+
 =0C
 ;;;
 ;;; Service folding.
diff --git a/gnu/system.scm b/gnu/system.scm
index 5bf2a85272..7cc4f134b7 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -13,6 +13,7 @@
 ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen <jannek@HIDDEN>
 ;;; Copyright =C2=A9 2020 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright =C2=A9 2021 Maxime Devos <maximedevos@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -601,16 +602,6 @@ OS."
       (file-append (operating-system-kernel os)
                       "/" (system-linux-image-file-name))))

-(define (package-for-kernel target-kernel module-package)
-  "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
-possible (that is if there's a LINUX keyword argument in the build system)=
."
-  (package
-    (inherit module-package)
-    (arguments
-     (substitute-keyword-arguments (package-arguments module-package)
-       ((#:linux kernel #f)
-        target-kernel)))))
-
 (define %default-modprobe-blacklist
   ;; List of kernel modules to blacklist by default.
   '("usbmouse" ;races with bcm5974, see <https://bugs.gnu.org/35574>
@@ -628,23 +619,12 @@ 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 kern=
el
-                                                                      modu=
le)
-                                                  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)) '())
+    `(,@(if hurd
+          `(("hurd" ,hurd)
+            ("kernel" ,kernel))
+          '())
       ("parameters" ,params)
       ,@(if initrd `(("initrd" ,initrd)) '())
       ("locale" ,locale))))   ;used by libc
@@ -664,6 +644,10 @@ bookkeeping."
          (host-name (host-name-service (operating-system-host-name os)))
          (entries   (operating-system-directory-base-entries os)))
     (cons* (service system-service-type entries)
+           (service linux-builder-service-type
+                    (linux-builder-configuration
+                      (kernel   (operating-system-kernel os))
+                      (modules  (operating-system-kernel-loadable-modules =
os))))
            %boot-service

            ;; %SHEPHERD-ROOT-SERVICE must come last so that the gexp that
diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm
index 953b132ef7..30d8eae03b 100644
--- a/gnu/tests/linux-modules.scm
+++ b/gnu/tests/linux-modules.scm
@@ -2,6 +2,7 @@
 ;;; Copyright =C2=A9 2019 Jakob L. Kreuze <zerodaysfordays@HIDDEN>
 ;;; Copyright =C2=A9 2020 Danny Milosavljevic <dannym@HIDDEN>
 ;;; Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,7 +35,10 @@
   #:use-module (guix utils)
   #:export (%test-loadable-kernel-modules-0
             %test-loadable-kernel-modules-1
-            %test-loadable-kernel-modules-2))
+            %test-loadable-kernel-modules-2
+            %test-loadable-kernel-modules-service-0
+            %test-loadable-kernel-modules-service-1
+            %test-loadable-kernel-modules-service-2))

 ;;; Commentary:
 ;;;
@@ -66,17 +70,11 @@ that MODULES are actually loaded."
                        (member module modules string=3D?))
                      '#$modules))))))

-(define* (run-loadable-kernel-modules-test module-packages module-names)
-  "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME=
S
-are loaded in memory."
+(define* (run-loadable-kernel-modules-test-base base-os module-names)
+  "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory=
."
   (define os
     (marionette-operating-system
-     (operating-system
-      (inherit (simple-operating-system))
-      (services (cons (service kernel-module-loader-service-type module-na=
mes)
-                      (operating-system-user-services
-                       (simple-operating-system))))
-      (kernel-loadable-modules module-packages))
+     base-os
      #:imported-modules '((guix combinators))))
   (define vm (virtual-machine os))
   (define (test script)
@@ -98,6 +96,36 @@ are loaded in memory."
   (gexp->derivation "loadable-kernel-modules"
                     (test (modules-loaded?-program os module-names))))

+(define* (run-loadable-kernel-modules-test module-packages module-names)
+  "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME=
S
+are loaded in memory."
+  (run-loadable-kernel-modules-test-base
+    (operating-system
+      (inherit (simple-operating-system))
+      (services (cons (service kernel-module-loader-service-type module-na=
mes)
+                      (operating-system-user-services
+                       (simple-operating-system))))
+      (kernel-loadable-modules module-packages))
+    module-names))
+
+(define* (run-loadable-kernel-modules-service-test module-packages module-=
names)
+  "Run a test of an OS having MODULE-PACKAGES, which are loaded by creatin=
g a
+service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that
+MODULE-NAMES are loaded in memory."
+  (define module-installing-service-type
+    (service-type
+      (name 'module-installing-service)
+      (extensions (list (service-extension linux-loadable-module-service-t=
ype
+                                           (const module-packages))))
+      (default-value #f)))
+  (run-loadable-kernel-modules-test-base
+    (operating-system
+      (inherit (simple-operating-system))
+      (services (cons* (service module-installing-service-type)
+                       (operating-system-user-services
+                        (simple-operating-system)))))
+    module-names))
+
 (define %test-loadable-kernel-modules-0
   (system-test
    (name "loadable-kernel-modules-0")
@@ -129,3 +157,35 @@ with two extra modules.")
                                                  (package-arguments
                                                   ddcci-driver-linux))))))
            '("acpi_call" "ddcci")))))
+
+(define %test-loadable-kernel-modules-service-0
+  (system-test
+   (name "loadable-kernel-modules-service-0")
+   (description "Tests loadable kernel modules extensible service with no
+extra modules.")
+   (value (run-loadable-kernel-modules-service-test '() '()))))
+
+(define %test-loadable-kernel-modules-service-1
+  (system-test
+   (name "loadable-kernel-modules-service-1")
+   (description "Tests loadable kernel modules extensible service with one
+extra module.")
+   (value (run-loadable-kernel-modules-service-test
+           (list ddcci-driver-linux)
+           '("ddcci")))))
+
+(define %test-loadable-kernel-modules-service-2
+  (system-test
+   (name "loadable-kernel-modules-service-2")
+   (description "Tests loadable kernel modules extensible service with two
+extra modules.")
+   (value (run-loadable-kernel-modules-service-test
+           (list acpi-call-linux-module
+                 (package
+                   (inherit ddcci-driver-linux)
+                   (arguments
+                    `(#:linux #f
+                      ,@(strip-keyword-arguments '(#:linux)
+                                                 (package-arguments
+                                                  ddcci-driver-linux))))))
+           '("acpi_call" "ddcci")))))
--
2.31.0





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:33:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 10:33:17 2021
Received: from localhost ([127.0.0.1]:58237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOLcK-0001tS-OS
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:33:17 -0400
Received: from mail-40141.protonmail.ch ([185.70.40.141]:42384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lOLcI-0001tF-Ve
 for 45692 <at> debbugs.gnu.org; Mon, 22 Mar 2021 10:33:16 -0400
Date: Mon, 22 Mar 2021 14:33:01 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1616423588;
 bh=DC02iGnLztxxykyEBl27bvddguEo/755+Ne4CN7ZtdA=;
 h=Date:To:From:Reply-To:Subject:From;
 b=nHnnzL4wPST9/Xd7FPFbnxNL/mLDznyJ4Y0XQJPFJvlgbp4pcubF22PdD7g9HEDt9
 YYhDOMeES3dTk+Qw99mxv0uLNHbPAC47CnizGRL9E+s+B3RfzlVOG0oVSb46hrZz4C
 UJhTfOdr75+/PFwgSkoIjWDFaOWyAY/Utc5beI+Q=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH v3 0/3] New patch series for Even Better ZFS Support on Guix
Message-ID: <K_sz_FR8KdZSXDYUr6uI-jabQq0PqKjVANb1wWph8rK6Yy0wLIq8vj5cMNuRlWWNZKL4BFfRQoni1elqjzbCW7FYvCdLrSC2x-1N97_RU34=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a new patch series, please completely forget the previous patch ser=
ies.

Notable differences are:

* ZFS automounted datasets are mounted before `user-processes` instead of `=
file-systems`, since there is strong objection to modifying `file-systems` =
so it can be extended to allow ZFS automounted datasets to be mounted befor=
e `file-systems`.  This prevents easy `/home` on ZFS (though see the added =
documentation in 3/3 for a workaround).
* The old `kernel-loadable-module-service-type` is renamed to `linux-loadab=
le-module-service-type`, despite the corresponding `operating-system` field=
 being named `kernel-loadable-modules`, and the loader service type being n=
amed `kernel-module-loader-service-type` :rolleyes:.
* There is a new `linux-builder-service-type`, which can be extended with a=
 function to modify its `linux-builder-configuration`.  The `linux-loadable=
-module-service-type` extends this base service.  I think this design pattt=
ern should be more extensively used in Guix; currently services are only ex=
tensible via one field of their configuration, this pattern allows creating=
 multiple service types for each extensible field of the configuration.  In=
 this particular case, the `kernel` of the `linux-builder-service-type` can=
 be extended (by adding/removing `configure` or `make` flags, or added `inp=
uts`) independently of the list of loadable modules using this design patte=
rn.
* Auto-scrub and auto-snapshot is now supported, with additional fields in =
`zfs-configuration` to support it.
* The auto-mounting Shepherd service has been renamed `zfs-auto-mount` (pre=
viously `zfs-automount`).
* Documentation includes a list of things that are currently not (fully) su=
pported.

Personally I'm not particularly motivated to push this anymore.  I have a f=
rankenstein's `configuration.scm` that gets me the bits of ZFS functionalit=
y that I absolutely need, with the rest something I'm just living without, =
and while it would be *nice* to have *some* out-of-the-box support for ZFS =
(or at least make it easy to get a box to get support for ZFS out of), I pe=
rsonally don't need it at this point.

Patch 1/3 corresponds to the original Patch 1/4.  Patch 2/3 has no correspo=
nding patch in the original patch set, but is the same patch as https://iss=
ues.guix.gnu.org/47134 which nobody is looking at, as usual.  Patch 3/3 cor=
responds to the original Patch 4/4.

The original Patch 2/4 has been removed since it's what makes `/home` on ZF=
S work by making `file-systems` extensible.  The original Patch 3/4 was alr=
eady merged.

This patch series is minimally tested compared to the previous patch series=
; I have homework to store on my ZFS pool and should really stop fooling ar=
ound with the operating system.  I have this patch series running in a VM w=
ith a ZFS pool.  Auto-scrub is not tested, though auto-snapshot looks worki=
ng.  Auto-mounting works as with previous patch series.  Encrypted and comp=
ressed filesystems are untested but I don't expect it to be significantly r=
egressed compared to the previous patch series.

More work can be done for ZFS support.  But I think the current set gives a=
 workable ZFS support; further work can be done piecemeal afterwards.  The =
documentation includes notes for anyone who feels motivated enough to keep =
improving the ZFS support.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 20 Feb 2021 11:43:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 20 06:43:03 2021
Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lDQf8-0002rB-Pt
	for submit <at> debbugs.gnu.org; Sat, 20 Feb 2021 06:43:03 -0500
Received: from mail-oln040092253108.outbound.protection.outlook.com
 ([40.92.253.108]:64912 helo=APC01-SG2-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1lDQf6-0002qa-Jo
 for 45692 <at> debbugs.gnu.org; Sat, 20 Feb 2021 06:43:01 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=EA4bQT3I94SrTfCqNX5GmqH+DsV1mmNS+C+NixvNhaAc950naXUH+IHw/34pFewcgtlY/0kvcvli4svYS6efoRp/wWwyVjb3Ei6yOs9kdgLQL+DD36I49YCo95baBUErNYyWVtmGCGrKT5ySaORIBsa/NXW8YsPUc1WQOunZEHGZPGa5GB1ZPi5UfDFOfq+s1cfsMgpIoxUqws9+dz0r97gKGYvmECHK8RYInCRGXG1ioQp4tzf5yRgBuiXVh8rUmOwxK+1UoEgm9mLfhMbzZD6HPWa35nn5n+Ghefzcp5N0GvVBldTCRAWpZxLAFwOyeFWLCKGtlK5I2g2gRSETGA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=3YSZyGG5RpCHCPAYQMU5+b1HJyW1wqbQvoaOJinjvPE=;
 b=VFc5kyOK2yu41U3zqXlb5LFgjW1HTjYxstA3TuIxh5Ciq5hLCf1/Tm6yXyAXaf5gvT8M2AH6WeD0VstOicOWW5sCbn0Wai0NyBm0sta/sU+8OWBAHrhHTA+LjZrUNLGVMG2pFeoXw2kZY+jBJjgAudcpfzeufSnpdOUyxOcG09QlaINgtV4hBXbt/ioWlc/K3BngJNB/GWNi+mNEw7V0Xoz7DN9hhIxTYKplrsg+MbrwSSSicVUMIWm6UVrjkF7hxsxPmxFro+eeX3k5S47wM1c/ehfucnYWqhc47lXsDi+76xKZvkmilTRVWHVcv350gQkKfRlIhC1bwHVB6vwh2Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=3YSZyGG5RpCHCPAYQMU5+b1HJyW1wqbQvoaOJinjvPE=;
 b=Nfz3rJLOT/LRgaSbqq07mFO1JQUdS4l2Ohgs1DHPkeL1hWIEBeE1Cbxt1i7wUV9NaV6VeXHfBF3mC5At0Z0Ujm9KRJTHpZAlOoz3rHiEdQPWVaapYMhgd+5UUqf585gBxNxsgo31KBI+ez77vF5mLXL8kag9kytJfeCJVvmOTlza+uxTurZ6wdUtZHe7l4X/EE80Pm1bu1I4F3TMcFVHeluTEWO7w9+tP40y0PTT2iS9jx/YF6WBFSQePM53L8nIb0cv6hpVkm54ETekPAiyp09L1Mov8ElNeAYopCFmeWzDy8Vse8/M9ktVUfea+FbH7EzCC2Nbj0yWlmgW01wf7A==
Received: from SG2APC01FT062.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebd::47) by
 SG2APC01HT210.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::471)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27; Sat, 20 Feb
 2021 11:42:47 +0000
Received: from OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM (2a01:111:e400:7ebd::46)
 by SG2APC01FT062.mail.protection.outlook.com
 (2a01:111:e400:7ebd::417) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend
 Transport; Sat, 20 Feb 2021 11:42:47 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:48B493884BF96639DE4552D4DB5F5915C2AB3F22666623496EE930C45F917BA9;
 UpperCasedChecksum:A6AABE73A988609F50F55AAC985E2D069ABCF4108B4F5383C000A1C771EF365F;
 SizeAsReceived:7817; Count:46
Received: from OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM
 ([fe80::9dbe:2c7:8c21:a40d]) by OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM
 ([fe80::9dbe:2c7:8c21:a40d%7]) with mapi id 15.20.3868.030; Sat, 20 Feb 2021
 11:42:47 +0000
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: ZFS on Guix, again
References: <ZoNE4PohkbyOLRF1wZSubnkSSDbNh3dUZAO-n5RXe6yZ3wx8xZvbEiHBU9B5D1i_tpdCrHBpjE-8Jy1pz5i9E-rh5X6IjsZQ0_1jmUJgp_s=@protonmail.com>
Date: Sat, 20 Feb 2021 19:44:34 +0800
In-Reply-To: <ZoNE4PohkbyOLRF1wZSubnkSSDbNh3dUZAO-n5RXe6yZ3wx8xZvbEiHBU9B5D1i_tpdCrHBpjE-8Jy1pz5i9E-rh5X6IjsZQ0_1jmUJgp_s=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Sat, 20 Feb 2021
 08:48:04 +0000")
Message-ID: <OS3P286MB066003E371477FEA2063411EA3839@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Content-Type: text/plain
X-TMN: [nyiGdd0qosyfjqVtuxVOI/zabaLgsTMHx8lRvbtz+WXpnuXkoSuEDhG5TzkJt32R]
X-ClientProxiedBy: AM8P191CA0028.EURP191.PROD.OUTLOOK.COM
 (2603:10a6:20b:21a::33) To OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:604:e4::6)
X-Microsoft-Original-Message-ID: <87ft1r2cbh.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:373:4790:2f1:f5ff:fe18:6bb) by
 AM8P191CA0028.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::33) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3868.27 via Frontend Transport; Sat, 20 Feb 2021 11:42:45 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 46
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 157db083-3087-48f0-e235-08d8d594a497
X-MS-TrafficTypeDiagnostic: SG2APC01HT210:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: ZBxT+JXwUflJMWbiMjU+zgQf2ypwqKcjw3I3Ywizlg0hxfXSZYWAGfqfUu0fY5qfMIaIBGDqy8iUiL2kb54agdt0RaZFcGM4O813c6ZmT/c2ICLIwYaqslBdFIr+h+MDm49fjcMBbYedNstSh/UYl4/jYLbtJeIeNrT5VT0iiGwiEwfPTjyB6Y0jOoqADWtRS81uJpxTlTU5sAhQo5D8nn+UVm2nqq7N3m1czW9TiTURkgREACMMz8OlmJwoeJpabAIX6ewqg6a6n5F9HnvazEKAxtKX+vQn5jON89NyCbNcPJqH7A5l8S8s5BHBQv0EN8t9OmsdDFwc5p562PW9xZse480/wKoKJlzNNhWY/FUZDtQ1KZeGcgkw3vwcjLdn
X-MS-Exchange-AntiSpam-MessageData: 0w82LLYL6JDr9+J6U/aNrHyp9KqITYRuvQxB30pqy9a4EhWJNai0ZlycfDUtvJHVQePsBWF5L0tFkEDwBMRJH4XXPZNN26j1rFDFV+M0Kv5+oQzrqJL8E8Z53bYg/OO62rLc3G9VBTvlpjgMwSE99IAlpZt3sPs2+LUe3kkEu4yx8vB9nzq8MSkyZWrQEnnv4Sh1VAMhYr3Hf6VdkfdL0A==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 157db083-3087-48f0-e235-08d8d594a497
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2021 11:42:47.1395 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: SG2APC01FT062.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT210
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "guix-devel@HIDDEN" <guix-devel@HIDDEN>,
 Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s?= <ludo@HIDDEN>,
 45692 <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: -1.0 (-)

raid5atemyhomework <raid5atemyhomework@HIDDEN> writes:

> Hi guix-devel,
>
> I had some questions on the big ZFS guix bugpatches a week ago, and
> did not find any response, so I am back here pestering everyone.

Hello, thank you for working on ZFS for guix!

>
> [...]
> There are two alternatives:
>
> * Go with what I already proposed which I think is more general-purpose and cleaner (there is a separate service type that accepts symbols, and a separate service type that accepts `<file-system>` records, and the latter just extends the former).
> * Don't make a separate service type, but now we need to add some kind of `fstab?` field to `file-system` so that the ZFS shepherd service that mounts ZFS file systems will not be included in the `/etc/fstab`.
>
> I think overall that having lots of tiny service types that are then
> combined together fits the functional design of Guix better.  So I
> would strongly propose my original design rather than hacks on top of
> `file-system-service-type`.

Well, I think the 'file-system-service-type' should handle all file
systems related configurations, but my opion is not strong.  Waiting
ludo to decide...




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 13 Feb 2021 01:49:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 12 20:49:23 2021
Received: from localhost ([127.0.0.1]:33266 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lAk3n-0008Am-E2
	for submit <at> debbugs.gnu.org; Fri, 12 Feb 2021 20:49:23 -0500
Received: from mail-40132.protonmail.ch ([185.70.40.132]:54282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1lAk3i-0008AJ-Og
 for 45692 <at> debbugs.gnu.org; Fri, 12 Feb 2021 20:49:20 -0500
Date: Sat, 13 Feb 2021 01:49:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1613180951;
 bh=nFtjDIdcilGJnBLHikjgo9HqHW88QRpZIgzQqrp7bmc=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=wi4kgscd/bKUJJDTz45YJb23tI3H9M0wS7U+yc3ETCDjUQdqctyMvyqJx9dA1tWkK
 u7cxysTNWBr35qSOBGs16Oz77FpqldjfbpemJvcC6GiDcK0iX2CxlMfB2iMlbgKzJG
 O2lToNw0K4Gd3LoRzq3RPjB/UnD54AwAJX5mbai8=
To: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
Message-ID: <20Uzjlb-aGAMYW_UfB_P-PUylV-NrHRtq3NpXLe6Fsfuuq-wssW64sgoWoRSzwQdj-t5g2P4ebBJR2fllYCiQc5LyLb8oc2YrDs021q9u-g=@protonmail.com>
In-Reply-To: <87eeho6ls3.fsf_-_@HIDDEN>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <87eeho6ls3.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Ludo',


> > +As a large and complex kernel module, ZFS on Linux has to be compiled
>
>                                          ^
>
>
> I think it=E2=80=99s a proper noun and is spelled =E2=80=9CZFS-on-Linux=
=E2=80=9D.

FWIW ZFSonLinux is now folded into OpenZFS (which is now a package that inc=
ludes both Linux and FreeBSD support, with plans to merge in the Illumos co=
debase as well) since 2.0.0.  The documentation was written when Guix was s=
till at 0.8.5 (when it was definitely ZoL), so I should probably change thi=
s to OpenZFS, and clarify whether I am referring to the ZFS file system or =
the OpenZFS package.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 16:50:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 11:50:00 2021
Received: from localhost ([127.0.0.1]:57097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9sgi-0000xr-N4
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 11:50:00 -0500
Received: from mail4.protonmail.ch ([185.70.40.27]:13189)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l9sgh-0000xd-KP
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 11:50:00 -0500
Date: Wed, 10 Feb 2021 16:49:45 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1612975792;
 bh=OYp5BBpXT+pt7UqkRkTUinLGi8WDuTPB5HNigwwIfwc=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=qULyoRUncvnNzZX0J8eqrrLZKGy0l3huoilU5Cv2tfJId7XNjB2gEsu53soaol+uP
 QOdbmRsSLOR9Iv8Lej1GJL6xJQcbc8Y8YRnOgW5mwT4F8Qw62wLNXB1scRMgufAfTT
 o7rBfP1fF8FmKOBCopvbbKoAId6dPF4X9uGyuJJo=
To: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
Message-ID: <Y5MIZ9SDFP1f6SdbG-fjEvSAkjgni6w0dilDSaKyWAauhgFfK-swJ6TpVCsLQ7c0bYA8tnIe1Fo7OiFAcuu-vO_W2h2UQdpfxNRZ1w_uSL0=@protonmail.com>
In-Reply-To: <87zh0c53m6.fsf_-_@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
 <87zh0c53m6.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: Danny Milosavljevic <dannym@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


> > +;; Configuration for the kernel builder.
> > +(define-record-type* <kernel-builder-configuration> kernel-builder-con=
figuration
> >
> > -   make-kernel-builder-configuration
> > -   kernel-builder-configuration?
> > -   this-kernel-builder-configuration
> > -
> > -   (kernel kernel-builder-configuration-kernel (default #f))
> > -   (hurd kernel-builder-configuration-hurd (default #f))
> > -   (modules kernel-builder-configuration-modules (default '())))
>
> How about <linux-build-configuration> instead?
>
> In general, throughout the project, we do not use =E2=80=9Ckernel=
=E2=80=9D and =E2=80=9CLinux=E2=80=9D
> interchangeably. Since this is a Linux-only feature, let=E2=80=99s call i=
t that
> way and remove the =E2=80=98hurd=E2=80=99 field (the Hurd has no notion o=
f in-kernel
> modules since pretty much everything happens in user-space.)

The `operating-system` record uses `kernel-loadable-modules` as the record =
field name.  I suggest changing that first, if you truly want to differenti=
ate "kernel" from "linux" "throughout the project".  Or deprecate it entire=
ly and instead use the new `linux-loadable-modules-service-type`, in princi=
ple the only field needed in `operating-system` should be `services`.

>
> > +(define kernel-loadable-module-service-type
> >
> > -   (service-type (name 'kernel-loadable-modules)
>
> Same here: =E2=80=98linux-loadable-module-service-type=E2=80=99.
>
> But=E2=80=A6 it=E2=80=99s not clear at first sight how this differs from =
the existing
> =E2=80=98kernel-module-loader=E2=80=99. Perhaps =E2=80=98linux-build-serv=
ice-type=E2=80=99 would be
> more accurate? Or am I missing something?


`kernel-module-loader` explicitly loads a module at startup, it does not ma=
ke a non-Linux-libre-built-in module actually *loadable*.  So there is a ne=
ed for something to augment the `linux-loadable-modules` record field of `o=
perating-system`.

Thanks
raid5atemyhomework





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.
Merged 45643 45692 45703. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 45692 45703. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 15:45:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 10:45:02 2021
Received: from localhost ([127.0.0.1]:56937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9rfp-0005db-U3
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 10:45:02 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39562)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1l9rfm-0005d4-Cz
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 10:45:00 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45623)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1l9rff-0006Xc-DM; Wed, 10 Feb 2021 10:44:51 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43354 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1l9rfe-0000YD-SJ; Wed, 10 Feb 2021 10:44:51 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
Date: Wed, 10 Feb 2021 16:44:49 +0100
In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Wed, 06 Jan 2021
 15:54:33 +0000")
Message-ID: <87zh0c53m6.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: Danny Milosavljevic <dannym@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

Hi,

raid5atemyhomework <raid5atemyhomework@HIDDEN> skribis:

>>From 4beb73c62995cf236b402dad8e1c36016027c781 Mon Sep 17 00:00:00 2001
> From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
> Date: Tue, 5 Jan 2021 22:27:56 +0800
> Subject: [PATCH 1/4] gnu: Allow services to install kernel-loadable modul=
es.
>
> * gnu/system.scm (operating-system-directory-base-entries): Remove code
> to handle generation of "kernel" and "hurd".
> (operating-system-default-essential-services): Instantiate
> kernel-loadable-module-service.
> (hurd-default-essential-services): Instantiate
> kernel-loadable-module-service.
> (package-for-kernel): Move ...
> * gnu/services.scm: ... to here.
> (kernel-loadable-module-service-type): New variable.
> (kernel-loadable-module-service): New procedure.
> * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move
> code to ...
> (run-loadable-kernel-modules-test-base): ... new procedure here.
> (run-loadable-kernel-modules-service-test): New procedure.
> (%test-loadable-kernel-modules-service-0): New variable.
> (%test-loadable-kernel-modules-service-1): New variable.
> (%test-loadable-kernel-modules-service-2): New variable.
> * doc/guix.texi: Document kernel-loadable-module-service-type.

[=E2=80=A6]

> +@defvr {Scheme Variable} kernel-loadable-module-service-type
> +Type of the service that collects lists of packages containing
> +kernel-loadable modules, and adds them to the set of kernel-loadable
> +modules.
> +@end defvr

Would be nice to expound a bit here, in particular by adding an example
(along the lines of those used in system tests maybe?).  Otherwise it
can be hard to fathom how this is meant to be used.

> +;; Configuration for the kernel builder.
> +(define-record-type* <kernel-builder-configuration> kernel-builder-confi=
guration
> +  make-kernel-builder-configuration
> +  kernel-builder-configuration?
> +  this-kernel-builder-configuration
> +
> +  (kernel   kernel-builder-configuration-kernel   (default #f))
> +  (hurd     kernel-builder-configuration-hurd     (default #f))
> +  (modules  kernel-builder-configuration-modules  (default '())))

How about <linux-build-configuration> instead?

In general, throughout the project, we do not use =E2=80=9Ckernel=E2=80=9D =
and =E2=80=9CLinux=E2=80=9D
interchangeably.  Since this is a Linux-only feature, let=E2=80=99s call it=
 that
way and remove the =E2=80=98hurd=E2=80=99 field (the Hurd has no notion of =
in-kernel
modules since pretty much everything happens in user-space.)

> +(define kernel-loadable-module-service-type
> +  (service-type (name 'kernel-loadable-modules)

Same here: =E2=80=98linux-loadable-module-service-type=E2=80=99.

But=E2=80=A6 it=E2=80=99s not clear at first sight how this differs from th=
e existing
=E2=80=98kernel-module-loader=E2=80=99.  Perhaps =E2=80=98linux-build-servi=
ce-type=E2=80=99 would be
more accurate?  Or am I missing something?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:46:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 09:46:58 2021
Received: from localhost ([127.0.0.1]:55831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9qld-0003wn-VW
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:46:58 -0500
Received: from mail-40138.protonmail.ch ([185.70.40.138]:43652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l9qla-0003wZ-VJ
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:46:56 -0500
Date: Wed, 10 Feb 2021 14:46:43 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1612968408;
 bh=+P5ouiEcYLvUVQm8glVp+e1u+fQuAdb8u0ce7sgJdxY=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=D64u2AO96kFAlJGLlsuQnIq4N+lZ3V2JJ22L04sW9x5MfYOv8TlmvSWsdh5Eg+DKk
 hvb/ga/iCPhcYjsgidofss9l9OrQwA1rjoMUyKOjvN9z9Odg5GDCiyzX1DSYadOkPZ
 +qO5TKWxvB/daGRuz6NJ81r++vcy7mo7Ye2MkF1I=
To: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
Message-ID: <HM9LDUftlNlIoFFvUdzDIRUsjIADdaZLVoCF0cg-l2EoW6hVu09JpTcsOBMbQbpefRhiRv0IKE4W5QMi3ww5NedWcg8eNiRjrzA3hhJ06N0=@protonmail.com>
In-Reply-To: <87sg646m7y.fsf_-_@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
 <OSZP286MB066439455D4B38ABA5F04337A3BF0@HIDDEN>
 <yrjG3wstz9GpyH32kV3JqsEiG-KdxmP9_JHe6ghdMoizrBWpIZhd3hl2VPjFuWagt1WLPXMqSGdMZZWTcvE6J7qxVjdcvq3zTK-Wccd3wEs=@protonmail.com>
 <87sg646m7y.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> Why do we need to extend with symbols?
>
> In general it=E2=80=99s much clearer if extensions receive only one type =
of
> object (<file-system> records in this case). It=E2=80=99s also best to av=
oid
> passing around symbolic names (that=E2=80=99s why we extend with <file-sy=
stem>
> records rather than with Shepherd service names or whatever.)

For this case, how would it be done?

ZFS file system, on other operating systems and distributions, is documente=
d as automatically mounting filesystems, without management in an `fstab` o=
r similar file, because the intent is that you would make lots of filesyste=
ms for various uses and managing an `fstab` would be too onerous.  Thus, ZF=
S file system expects to mount multiple file systems with a single `zfs mou=
nt -a` command at startup.

Would the below sketch be acceptable?

```scheme
; gnu/system/file-systems.scm
(define-record-type* file-system #;...
  #;...
  (has-fstab-entry?   file-system-has-fstab-entry?  (default #t)))

;...
; gnu/services/base,scm

(define file-system-service-type
  (service-type
    #;...
    (extensions
      (list #;...
            (service-extension fstab-service-type
                               (lambda (file-systems)
                                 (filter file-system-has-fstab-entry?
                                         file-systems)))
            #;...))
    #;...))

;...
; gnu/services/file-systems.scm

(define zfs-service-type
  (service-type
     #;...
     (extensions (list #;...
                       (service-extension file-system-service-type
                                          (const (list (file-system
                                                         (device "dummy")
                                                         (mount-point "zfs/=
*")
                                                         (has-fstab-entry? =
#f)))))))
    #;...))
```

Then there will be a Shepherd service providing `file-system-zfs/*` which w=
ould perform `zfs mount -a -l` on `start` and `zfs unmount -a -f` on `stop`=
.

Would that be acceptable?  I am wary of this since it creates a dummy file-=
system and needs an additional field on every `file-system` record, one whi=
ch is *only* used by ZFS.  I feel the `file-system-target-service-type` is =
more generic and does not use trickery.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:32:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 09:32:46 2021
Received: from localhost ([127.0.0.1]:55820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9qXu-0003cK-J2
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:32:46 -0500
Received: from mail-40130.protonmail.ch ([185.70.40.130]:51354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l9qXs-0003c5-8v
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:32:45 -0500
Date: Wed, 10 Feb 2021 14:32:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1612967557;
 bh=MpaDQVBQ8f5ck7fA1bwdQuXIG33Qn9xo03gJyylv4+M=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=YE3ur6OyAiO6zrF3s7su97HOVQ+BnSh6oQ/1dllusbDGi04vI1E4ZXaVRQ/n/AQxE
 OdmJOYcI0bZsRphc2LgryFSY+LJfRdlIiiRR+2sx5KGUhPfbxVJmf4zOrn5ibvUUmN
 mM5nOP7UeNQfnCh6JdhdA9XHXd7JssVSgyfFJpDA=
To: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
Message-ID: <ih7G5G36XJ1ajfM1OZo4G6oaKrwtRusZF9NJhKBtRudytmXCib41DxapatiWe6As3jl1miABW-Yp8oXy4wI4dq5xn4AXEFO9DAdXtFZYGyY=@protonmail.com>
In-Reply-To: <87eeho6ls3.fsf_-_@HIDDEN>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <87eeho6ls3.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Ludo,

> raid5atemyhomework raid5atemyhomework@HIDDEN skribis:
>
> > > From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 200=
1
> > > From: raid5atemyhomework raid5atemyhomework@HIDDEN
> > > Date: Wed, 6 Jan 2021 09:24:20 +0800
> > > Subject: [PATCH 4/4] gnu: Add service to install ZFS.
> >
> > -   gnu/services/file-systems.scm: New file.
> >     (zfs-service-type): New variable.
> >     (<zfs-configuration>): New type.
> >     (%zfs-zvol-dependency): New variable.
> >
> > -   gnu/local.mk: Add gnu/services/file-systems.scm.
> > -   gnu/services/base.scm (dependency->shepherd-service-name): Export.
> > -   doc/guix.texi (ZFS file system): New subsection.
>
> A bit of nitpicking on the documentation bits=E2=80=A6
>
> > +@node ZFS file system
> > +@subsection ZFS file system
>
> Please follow the same typographical conventions as in the rest of the
> manual. In particular, capitalize section titles and leave two spaces
> after end-of-sentence periods.

This was imitated from the `@subsection Btrfs file system`.

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:27:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 09:27:31 2021
Received: from localhost ([127.0.0.1]:55816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9qSi-0003Tm-LV
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:27:31 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1l9qSg-0003TV-Ln
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:27:23 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44294)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1l9qSa-0008I9-Px; Wed, 10 Feb 2021 09:27:16 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43094 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1l9qSU-0008I0-9a; Wed, 10 Feb 2021 09:27:11 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
Date: Wed, 10 Feb 2021 15:27:08 +0100
In-Reply-To: <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Fri, 08 Jan 2021
 15:02:21 +0000")
Message-ID: <87eeho6ls3.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

raid5atemyhomework <raid5atemyhomework@HIDDEN> skribis:

>>From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 2001
> From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
> Date: Wed, 6 Jan 2021 09:24:20 +0800
> Subject: [PATCH 4/4] gnu: Add service to install ZFS.
>
> * gnu/services/file-systems.scm: New file.
> (zfs-service-type): New variable.
> (<zfs-configuration>): New type.
> (%zfs-zvol-dependency): New variable.
> * gnu/local.mk: Add gnu/services/file-systems.scm.
> * gnu/services/base.scm (dependency->shepherd-service-name): Export.
> * doc/guix.texi (ZFS file system): New subsection.

A bit of nitpicking on the documentation bits=E2=80=A6

> +@node ZFS file system
> +@subsection ZFS file system

Please follow the same typographical conventions as in the rest of the
manual.  In particular, capitalize section titles and leave two spaces
after end-of-sentence periods.

Here I recommend s/ZFS file system/ZFS/ in all the text.

> +The ZFS file system has a license incompatible with the Linux kernel,
> +and thus cannot be distributed with the kernel. However, as a user
> +you have the right to do whatever you want on your own hardware,
> +including download the ZFS source code, compile it, link it to your
> +own private copy of Linux, and run it. You can even use the Guix build
> +system to automate this.

How about:

  ZFS is free software; unfortunately its license is incompatible with
  the GNU General Public License (GPL), the license of the Linux kernel,
  which means they cannot be distributed together.  However, as a user,
  you can choose to build ZFS and use it together with Linux; you can
  even rely on Guix to automate this task.  See
  @uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by
  the Free Software Foundation} for more information.

?

> +As a large and complex kernel module, ZFS on Linux has to be compiled
                                         ^
I think it=E2=80=99s a proper noun and is spelled =E2=80=9CZFS-on-Linux=E2=
=80=9D.

> +with a specific version of the kernel. Often even the latest ZFS
> +package available cannot be compiled with the latest Linux kernel
                                                        ^
s/Linux/Linux-libre/

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:17:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 09:17:47 2021
Received: from localhost ([127.0.0.1]:55811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9qJP-0003FQ-Nw
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:17:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48848)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1l9qJO-0003F9-Jq
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:17:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44032)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1l9qJH-0004iP-QN; Wed, 10 Feb 2021 09:17:40 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42972 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1l9qJH-0005xM-EB; Wed, 10 Feb 2021 09:17:39 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
 <OSZP286MB066439455D4B38ABA5F04337A3BF0@HIDDEN>
 <yrjG3wstz9GpyH32kV3JqsEiG-KdxmP9_JHe6ghdMoizrBWpIZhd3hl2VPjFuWagt1WLPXMqSGdMZZWTcvE6J7qxVjdcvq3zTK-Wccd3wEs=@protonmail.com>
Date: Wed, 10 Feb 2021 15:17:37 +0100
In-Reply-To: <yrjG3wstz9GpyH32kV3JqsEiG-KdxmP9_JHe6ghdMoizrBWpIZhd3hl2VPjFuWagt1WLPXMqSGdMZZWTcvE6J7qxVjdcvq3zTK-Wccd3wEs=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Mon, 25 Jan 2021
 00:18:12 +0000")
Message-ID: <87sg646m7y.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

Hi!

I agree with =E5=AE=8B=E6=96=87=E6=AD=A6.

Still=E2=80=A6

raid5atemyhomework <raid5atemyhomework@HIDDEN> skribis:

>    (service-type (name 'file-systems)
>                  (extensions
>                   (list (service-extension shepherd-root-service-type
> -                                          file-system-shepherd-services)
> +                                          (lambda (value)
> +                                            (file-system-shepherd-servic=
es
> +                                             (filter file-system? value)
> +                                             (filter symbol? value))))
>                         (service-extension fstab-service-type
> -                                          file-system-fstab-entries)
> +                                          (lambda (value)
> +                                            (file-system-fstab-entries
> +                                             (filter file-system? value)=
)))
>=20=20
>                         ;; Have 'user-processes' depend on 'file-systems'.
>                         (service-extension user-processes-service-type
>                                            (const '(file-systems)))))
> +
> +                ;; Extensions consist of lists of <file-system> objects =
or
> +                ;; shepherd services=E2=80=99 names (symbols).  In the l=
atter case,
> +                ;; the provided shepherd services supposed to mount and
> +                ;; unmount some file systems themself.

Why do we need to extend with symbols?

In general it=E2=80=99s much clearer if extensions receive only one type of
object (<file-system> records in this case).  It=E2=80=99s also best to avo=
id
passing around symbolic names (that=E2=80=99s why we extend with <file-syst=
em>
records rather than with Shepherd service names or whatever.)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:13:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 10 09:13:38 2021
Received: from localhost ([127.0.0.1]:55805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9qFO-00037v-3W
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:13:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47794)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1l9qFK-00037g-IG
 for 45692 <at> debbugs.gnu.org; Wed, 10 Feb 2021 09:13:37 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43952)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1l9qFF-0002xf-6l; Wed, 10 Feb 2021 09:13:29 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42956 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1l9qF8-0005gf-AP; Wed, 10 Feb 2021 09:13:27 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: bug#45692: [PATCH 0/4] Even Better ZFS Support on Guix
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
Date: Wed, 10 Feb 2021 15:13:19 +0100
In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Wed, 06 Jan 2021
 15:54:33 +0000")
Message-ID: <87zh0c6mf4.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: Danny Milosavljevic <dannym@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

raid5atemyhomework <raid5atemyhomework@HIDDEN> skribis:

> +(define (kernel-builder-configuration->system-entry config)
> +  "Return the kernel and hurd entries of the 'system' directory."
> +  (mbegin %store-monad
> +    (let* ((kernel  (kernel-builder-configuration-kernel config))
> +           (hurd    (kernel-builder-configuration-hurd config))
> +           (modules (kernel-builder-configuration-modules config))
> +           (kernel  (if hurd
> +                        kernel
> +                        (profile
> +                         (content (packages->manifest
> +                                   (cons kernel
> +                                         (map (lambda (module)
> +                                                (if (package? module)
> +                                                    (package-for-kernel =
kernel module)
> +                                                    module))
> +                                              modules))))
> +                         (hooks (list linux-module-database))))))
> +      (return `(("kernel" ,kernel)
> +                ,@(if hurd `(("hurd" ,hurd)) '()))))))

It may be clearer to avoid =E2=80=98mbegin=E2=80=99 and instead write it th=
is way:

  (define (kernel-builder-configuration-modules config)
    (let* =E2=80=A6
      (with-monad %store-monad
        (return =E2=80=A6))))

Both work but I find this variant slightly clearer.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Feb 2021 06:28:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 08 01:28:04 2021
Received: from localhost ([127.0.0.1]:49421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l901k-0004Yj-Eo
	for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 01:28:04 -0500
Received: from lists.gnu.org ([209.51.188.17]:50106)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l901j-0004Yc-Jt
 for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 01:28:04 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:34210)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l901Z-00025b-S6
 for guix-patches@HIDDEN; Mon, 08 Feb 2021 01:27:55 -0500
Received: from mail4.protonmail.ch ([185.70.40.27]:54310)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l900e-0005mt-1M
 for guix-patches@HIDDEN; Mon, 08 Feb 2021 01:27:47 -0500
Date: Mon, 08 Feb 2021 06:25:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1612765545;
 bh=8f3vakDa0PSC+MpmUEEbq8x/pEN+kqp0SMX/+KjqP/k=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=fhkfIZFuaec4aWg4B9rA36cAncpnOP86Xf6tw1UYPH/SYf7lFq5svQ0cpRvoQ4cc4
 0zlxuz/LGPIDlYLZwU70iw8LcUQAQdrO1hTMV6r4xnzGBlRFtedyp0fNs88zGP3ex5
 Fl77S0RZxLnN3MBGNVUdbOsROECjW7TqY1DfDlzI=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <yKAqBHv-O0IjcNxi3O1RSMfxY_53Le1QYhA8AS6AIp8JYPpR7eeK3wdWvvBluJhoA13O0iUD904p_DXG78_1XP4mQtE2pKixjvtO7tXSQv0=@protonmail.com>
In-Reply-To: <20210208043152.7cdd5900@HIDDEN>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
 <20210208043152.7cdd5900@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
Received-SPF: pass client-ip=185.70.40.27;
 envelope-from=raid5atemyhomework@HIDDEN; helo=mail4.protonmail.ch
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)




Sent with ProtonMail Secure Email.

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Monday, February 8, 2021 3:31 AM, Danny Milosavljevic <dannym@scratchpos=
t.org> wrote:

> Hello,
>
> is it necessary to manually load the ZFS Linux kernel module? Usually, Li=
nux
> should autoload its drivers when the device files are accessed--module or=
 not.
>
> If that fails, didn't you patch the zfs package so it refers to modprobe =
anyway?

It does, for `udev`.  Not certain if it would trigger the load, though.  Pr=
esumably it would, but I have not tested.

A lot of this code was written in 0.8.5, where the ZFS tools will *not* att=
empt to `modprobe` the module first, they just error out.  I think in 2.0.1=
 upstream added code to load the module if the ZFS tool(s) were invoked whi=
le the module was not loaded, which is why additional patch was added by me=
 for the 2.0.1 to patch in `modprobe`.  I have not tested if the `modprobe`=
-ing by the ZFS tools actually *works*, though.

Maybe when I find some amount of motivation I can go test it.

>
> (I wanna prevent having 543 places in Guix where modprobe is invoked)
>
> If it doesn't autoload, we can totally modprobe it, though.


Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 8 Feb 2021 06:25:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 08 01:25:53 2021
Received: from localhost ([127.0.0.1]:49413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8zzd-0004V6-HL
	for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 01:25:53 -0500
Received: from mail-40138.protonmail.ch ([185.70.40.138]:37622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l8zzb-0004Up-II
 for 45692 <at> debbugs.gnu.org; Mon, 08 Feb 2021 01:25:52 -0500
Date: Mon, 08 Feb 2021 06:25:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1612765545;
 bh=8f3vakDa0PSC+MpmUEEbq8x/pEN+kqp0SMX/+KjqP/k=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=fhkfIZFuaec4aWg4B9rA36cAncpnOP86Xf6tw1UYPH/SYf7lFq5svQ0cpRvoQ4cc4
 0zlxuz/LGPIDlYLZwU70iw8LcUQAQdrO1hTMV6r4xnzGBlRFtedyp0fNs88zGP3ex5
 Fl77S0RZxLnN3MBGNVUdbOsROECjW7TqY1DfDlzI=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <yKAqBHv-O0IjcNxi3O1RSMfxY_53Le1QYhA8AS6AIp8JYPpR7eeK3wdWvvBluJhoA13O0iUD904p_DXG78_1XP4mQtE2pKixjvtO7tXSQv0=@protonmail.com>
In-Reply-To: <20210208043152.7cdd5900@HIDDEN>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
 <20210208043152.7cdd5900@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)




Sent with ProtonMail Secure Email.

=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Monday, February 8, 2021 3:31 AM, Danny Milosavljevic <dannym@scratchpos=
t.org> wrote:

> Hello,
>
> is it necessary to manually load the ZFS Linux kernel module? Usually, Li=
nux
> should autoload its drivers when the device files are accessed--module or=
 not.
>
> If that fails, didn't you patch the zfs package so it refers to modprobe =
anyway?

It does, for `udev`.  Not certain if it would trigger the load, though.  Pr=
esumably it would, but I have not tested.

A lot of this code was written in 0.8.5, where the ZFS tools will *not* att=
empt to `modprobe` the module first, they just error out.  I think in 2.0.1=
 upstream added code to load the module if the ZFS tool(s) were invoked whi=
le the module was not loaded, which is why additional patch was added by me=
 for the 2.0.1 to patch in `modprobe`.  I have not tested if the `modprobe`=
-ing by the ZFS tools actually *works*, though.

Maybe when I find some amount of motivation I can go test it.

>
> (I wanna prevent having 543 places in Guix where modprobe is invoked)
>
> If it doesn't autoload, we can totally modprobe it, though.


Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Feb 2021 03:32:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 22:32:07 2021
Received: from localhost ([127.0.0.1]:49290 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8xHS-00009p-NQ
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 22:32:07 -0500
Received: from lists.gnu.org ([209.51.188.17]:59952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1l8xHP-00009e-1h
 for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 22:32:05 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37002)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dannym@HIDDEN>)
 id 1l8xHN-0007Ep-O8
 for guix-patches@HIDDEN; Sun, 07 Feb 2021 22:32:01 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:43254)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dannym@HIDDEN>)
 id 1l8xHL-0005Pv-Fo
 for guix-patches@HIDDEN; Sun, 07 Feb 2021 22:32:01 -0500
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id D772233648C5;
 Mon,  8 Feb 2021 04:31:55 +0100 (CET)
Date: Mon, 8 Feb 2021 04:31:52 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#45692] [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <20210208043152.7cdd5900@HIDDEN>
In-Reply-To: <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/L.zr+T00e3XjmyYQWRUWlj0";
 protocol="application/pgp-signature"; micalg=pgp-sha512
Received-SPF: none client-ip=85.13.145.193;
 envelope-from=dannym@HIDDEN; helo=dd26836.kasserver.com
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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 (---)

--Sig_/L.zr+T00e3XjmyYQWRUWlj0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

is it necessary to manually load the ZFS Linux kernel module?  Usually, Lin=
ux
should autoload its drivers when the device files are accessed--module or n=
ot.

If that fails, didn't you patch the zfs package so it refers to modprobe an=
yway?

(I wanna prevent having 543 places in Guix where modprobe is invoked)

If it doesn't autoload, we can totally modprobe it, though.

--Sig_/L.zr+T00e3XjmyYQWRUWlj0
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmAgsKgACgkQ5xo1VCww
uqWYlAf+LmpUSOE+T8s2fUOta0h6kXCDklfZ7ehCrHa83LfNAuOl0jVQS9Oeoabc
IN6y9gujcUY345NJI/QvWTqiKoU6deogK2Ut4VDLHfzhiD5H4J7WYGm1Z//ygFEq
ku7+YL1rbMTo/qe0s40U0MeMNq7V0PEDyg3XvKZmL7GdtYa71sAKRID3RMQ6M5pd
GJUUWOlNOs9p+VQOcobReTS1t9NMRhrCHg6tjrVtTrnc7aVQxuEg7y+BSGeNC6Mp
LA/SHxYcu8w6vomlNyGQL7oY6xNMNc6NihiToWrinkV56bG7x7ssLenJGYsWOCOG
5xqXwUy5VmcTHDYADCmx0q2v/4iJvQ==
=jbFl
-----END PGP SIGNATURE-----

--Sig_/L.zr+T00e3XjmyYQWRUWlj0--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 8 Feb 2021 03:32:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 07 22:32:00 2021
Received: from localhost ([127.0.0.1]:49286 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8xHM-000098-EV
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 22:32:00 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:40308)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1l8xHK-00008y-5s
 for 45692 <at> debbugs.gnu.org; Sun, 07 Feb 2021 22:31:59 -0500
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id D772233648C5;
 Mon,  8 Feb 2021 04:31:55 +0100 (CET)
Date: Mon, 8 Feb 2021 04:31:52 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#45692] [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <20210208043152.7cdd5900@HIDDEN>
In-Reply-To: <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
 <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/L.zr+T00e3XjmyYQWRUWlj0";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -1.7 (-)

--Sig_/L.zr+T00e3XjmyYQWRUWlj0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

is it necessary to manually load the ZFS Linux kernel module?  Usually, Lin=
ux
should autoload its drivers when the device files are accessed--module or n=
ot.

If that fails, didn't you patch the zfs package so it refers to modprobe an=
yway?

(I wanna prevent having 543 places in Guix where modprobe is invoked)

If it doesn't autoload, we can totally modprobe it, though.

--Sig_/L.zr+T00e3XjmyYQWRUWlj0
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmAgsKgACgkQ5xo1VCww
uqWYlAf+LmpUSOE+T8s2fUOta0h6kXCDklfZ7ehCrHa83LfNAuOl0jVQS9Oeoabc
IN6y9gujcUY345NJI/QvWTqiKoU6deogK2Ut4VDLHfzhiD5H4J7WYGm1Z//ygFEq
ku7+YL1rbMTo/qe0s40U0MeMNq7V0PEDyg3XvKZmL7GdtYa71sAKRID3RMQ6M5pd
GJUUWOlNOs9p+VQOcobReTS1t9NMRhrCHg6tjrVtTrnc7aVQxuEg7y+BSGeNC6Mp
LA/SHxYcu8w6vomlNyGQL7oY6xNMNc6NihiToWrinkV56bG7x7ssLenJGYsWOCOG
5xqXwUy5VmcTHDYADCmx0q2v/4iJvQ==
=jbFl
-----END PGP SIGNATURE-----

--Sig_/L.zr+T00e3XjmyYQWRUWlj0--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 25 Jan 2021 00:18:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 24 19:18:28 2021
Received: from localhost ([127.0.0.1]:37531 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l3paO-0003dq-6W
	for submit <at> debbugs.gnu.org; Sun, 24 Jan 2021 19:18:28 -0500
Received: from mail-40130.protonmail.ch ([185.70.40.130]:33797)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1l3paL-0003db-D4
 for 45692 <at> debbugs.gnu.org; Sun, 24 Jan 2021 19:18:26 -0500
Date: Mon, 25 Jan 2021 00:18:12 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1611533898;
 bh=D9VoTTPZCwyOkQsPug+GJ0CHaSS7PN5C5DpxCO3zVrM=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=UEeI9diarz717d+BV/h0FPdQtzJ70qj61HP8HIsCItW9faC1ADY9lp5LF2N6AvkTC
 TeN9lJT9RElDIvM7fyNEuhxu0kCK/PMWgsc16e2DCYDoEp3NVU8QTfCZVs6MPUFEfh
 WH/cpso0GQijqWjVN7Rdzbu1PC1VGYQXLUzi+44I=
To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH 2/4] gnu: Make file-systems target extensible
 by services.
Message-ID: <yrjG3wstz9GpyH32kV3JqsEiG-KdxmP9_JHe6ghdMoizrBWpIZhd3hl2VPjFuWagt1WLPXMqSGdMZZWTcvE6J7qxVjdcvq3zTK-Wccd3wEs=@protonmail.com>
In-Reply-To: <OSZP286MB066439455D4B38ABA5F04337A3BF0@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
 <OSZP286MB066439455D4B38ABA5F04337A3BF0@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ"
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.

--b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello as well,

That is certainly another possibility, would this be more palatable to Guix=
?

Thanks
raid5atemyhomework

> Hello!
>
> raid5atemyhomework raid5atemyhomework@HIDDEN writes:
>
> > > From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 200=
1
> > > From: raid5atemyhomework raid5atemyhomework@HIDDEN
> > > Date: Wed, 6 Jan 2021 08:15:54 +0800
> > > Subject: [PATCH 2/4] gnu: Make file-systems target extensible by serv=
ices.
>
> It=E2=80=99s not clear to me what =E2=80=9Cfile-systems target=E2=80=
=9D is, and why we=E2=80=99re
> extending =E2=80=98file-systems-target-service-type=E2=80=99=E2=80=A6 I t=
hink what we want is
> to extend the =E2=80=98file-system-service-type=E2=80=99 with shepherd se=
rvices=E2=80=99 names,
> which means some shepherd services that will handle file systems
> mounting themself instead of the usual <file-system> objects, fstab
> entries, mounted by kernel.
>
> So I write with this patch to extend file-system-service-type directly
> instead of introducing a new =E2=80=98file-systems-target-service-type=
=E2=80=99:
>
> What do you think? Thank you!


--b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ
Content-Type: text/x-patch; name=0001-services-Allow-file-system-service-type-extensible-b.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=0001-services-Allow-file-system-service-type-extensible-b.patch

RnJvbSA0NGVlMWU0NzBhMmY5ZDQ5ODVhZjRkNTE2NTRkOWY5NDNjYWEwZjI0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/PUU1PUFFPThCPUU2PTk2PTg3PUU2PUFEPUE2
Pz0gPGl5enNvbmdAbWVtYmVyLmZzZi5vcmc+CkRhdGU6IFNhdCwgMjMgSmFuIDIwMjEgMjA6Mzk6
MDYgKzA4MDAKU3ViamVjdDogW1BBVENIXSBzZXJ2aWNlczogQWxsb3cgJ2ZpbGUtc3lzdGVtLXNl
cnZpY2UtdHlwZScgZXh0ZW5zaWJsZSBieQogc2VydmljZSBuYW1lLgpNSU1FLVZlcnNpb246IDEu
MApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zl
ci1FbmNvZGluZzogOGJpdAoKKiBnbnUvc2VydmljZXMvYmFzZS5zY20gKGZpbGUtc3lzdGVtLXNo
ZXBoZXJkLXNlcnZpY2VzKTogQWRkCidleHRyYS1zZXJ2aWNlcy1uYW1lcycgcGFyYW1hdGVyLgoo
ZmlsZS1zeXN0ZW0tc2VydmljZS10eXBlKTogSGFuZGxlIHNlcnZpY2Vz4oCZIG5hbWVzIGZyb20g
ZXh0ZW5zaW9ucy4KLS0tCiBnbnUvc2VydmljZXMvYmFzZS5zY20gfCAyMyArKysrKysrKysrKysr
KysrKy0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDE3IGluc2VydGlvbnMoKyksIDYgZGVsZXRpb25z
KC0pCgpkaWZmIC0tZ2l0IGEvZ251L3NlcnZpY2VzL2Jhc2Uuc2NtIGIvZ251L3NlcnZpY2VzL2Jh
c2Uuc2NtCmluZGV4IGY2YTQ5MGY3MTIuLjdiZGRlZjUwMzQgMTAwNjQ0Ci0tLSBhL2dudS9zZXJ2
aWNlcy9iYXNlLnNjbQorKysgYi9nbnUvc2VydmljZXMvYmFzZS5zY20KQEAgLTM2NCwxNSArMzY0
LDE2IEBAIEZJTEUtU1lTVEVNLiIKICAgICAgICAgICAgICAgICAgICAgICAgKGdudSBzeXN0ZW0g
ZmlsZS1zeXN0ZW1zKQogICAgICAgICAgICAgICAgICAgICAgICAsQCVkZWZhdWx0LW1vZHVsZXMp
KSkpKSkpCiAKLShkZWZpbmUgKGZpbGUtc3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzIGZpbGUtc3lz
dGVtcykKKyhkZWZpbmUgKGZpbGUtc3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzIGZpbGUtc3lzdGVt
cyBleHRyYS1zZXJ2aWNlcy1uYW1lcykKICAgIlJldHVybiB0aGUgbGlzdCBvZiBTaGVwaGVyZCBz
ZXJ2aWNlcyBmb3IgRklMRS1TWVNURU1TLiIKICAgKGxldCogKChmaWxlLXN5c3RlbXMgKGZpbHRl
ciBmaWxlLXN5c3RlbS1tb3VudD8gZmlsZS1zeXN0ZW1zKSkpCiAgICAgKGRlZmluZSBzaW5rCiAg
ICAgICAoc2hlcGhlcmQtc2VydmljZQogICAgICAgIChwcm92aXNpb24gJyhmaWxlLXN5c3RlbXMp
KQotICAgICAgIChyZXF1aXJlbWVudCAoY29ucyogJ3Jvb3QtZmlsZS1zeXN0ZW0gJ3VzZXItZmls
ZS1zeXN0ZW1zCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAobWFwIGZpbGUtc3lzdGVtLT5z
aGVwaGVyZC1zZXJ2aWNlLW5hbWUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmls
ZS1zeXN0ZW1zKSkpCisgICAgICAgKHJlcXVpcmVtZW50IChhcHBlbmQgJyhyb290LWZpbGUtc3lz
dGVtIHVzZXItZmlsZS1zeXN0ZW1zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYXAg
ZmlsZS1zeXN0ZW0tPnNoZXBoZXJkLXNlcnZpY2UtbmFtZQorICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgZmlsZS1zeXN0ZW1zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4
dHJhLXNlcnZpY2VzLW5hbWVzKSkKICAgICAgICAoZG9jdW1lbnRhdGlvbiAiVGFyZ2V0IGZvciBh
bGwgdGhlIGluaXRpYWxseS1tb3VudGVkIGZpbGUgc3lzdGVtcyIpCiAgICAgICAgKHN0YXJ0ICN+
KGNvbnN0ICN0KSkKICAgICAgICAoc3RvcCAjfihjb25zdCAjZikpKSkKQEAgLTQyOSwxMyArNDMw
LDIzIEBAIEZJTEUtU1lTVEVNLiIKICAgKHNlcnZpY2UtdHlwZSAobmFtZSAnZmlsZS1zeXN0ZW1z
KQogICAgICAgICAgICAgICAgIChleHRlbnNpb25zCiAgICAgICAgICAgICAgICAgIChsaXN0IChz
ZXJ2aWNlLWV4dGVuc2lvbiBzaGVwaGVyZC1yb290LXNlcnZpY2UtdHlwZQotICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZS1zeXN0ZW0tc2hlcGhlcmQtc2Vydmlj
ZXMpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhICh2
YWx1ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZpbGUt
c3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAoZmlsdGVyIGZpbGUtc3lzdGVtPyB2YWx1ZSkKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmaWx0ZXIgc3ltYm9sPyB2YWx1ZSkpKSkK
ICAgICAgICAgICAgICAgICAgICAgICAgKHNlcnZpY2UtZXh0ZW5zaW9uIGZzdGFiLXNlcnZpY2Ut
dHlwZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZS1zeXN0
ZW0tZnN0YWItZW50cmllcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIChsYW1iZGEgKHZhbHVlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAoZmlsZS1zeXN0ZW0tZnN0YWItZW50cmllcworICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgKGZpbHRlciBmaWxlLXN5c3RlbT8gdmFsdWUpKSkpCiAK
ICAgICAgICAgICAgICAgICAgICAgICAgOzsgSGF2ZSAndXNlci1wcm9jZXNzZXMnIGRlcGVuZCBv
biAnZmlsZS1zeXN0ZW1zJy4KICAgICAgICAgICAgICAgICAgICAgICAgKHNlcnZpY2UtZXh0ZW5z
aW9uIHVzZXItcHJvY2Vzc2VzLXNlcnZpY2UtdHlwZQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgKGNvbnN0ICcoZmlsZS1zeXN0ZW1zKSkpKSkKKworICAgICAgICAg
ICAgICAgIDs7IEV4dGVuc2lvbnMgY29uc2lzdCBvZiBsaXN0cyBvZiA8ZmlsZS1zeXN0ZW0+IG9i
amVjdHMgb3IKKyAgICAgICAgICAgICAgICA7OyBzaGVwaGVyZCBzZXJ2aWNlc+KAmSBuYW1lcyAo
c3ltYm9scykuICBJbiB0aGUgbGF0dGVyIGNhc2UsCisgICAgICAgICAgICAgICAgOzsgdGhlIHBy
b3ZpZGVkIHNoZXBoZXJkIHNlcnZpY2VzIHN1cHBvc2VkIHRvIG1vdW50IGFuZAorICAgICAgICAg
ICAgICAgIDs7IHVubW91bnQgc29tZSBmaWxlIHN5c3RlbXMgdGhlbXNlbGYuCiAgICAgICAgICAg
ICAgICAgKGNvbXBvc2UgY29uY2F0ZW5hdGUpCiAgICAgICAgICAgICAgICAgKGV4dGVuZCBhcHBl
bmQpCiAgICAgICAgICAgICAgICAgKGRlc2NyaXB0aW9uCi0tIAoyLjI5LjIKCg==

--b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ--





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 23 Jan 2021 13:04:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 23 08:04:43 2021
Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l3Iap-0001dv-B2
	for submit <at> debbugs.gnu.org; Sat, 23 Jan 2021 08:04:43 -0500
Received: from mail-oln040092255014.outbound.protection.outlook.com
 ([40.92.255.14]:18704 helo=APC01-HK2-obe.outbound.protection.outlook.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1l3Iam-0001dh-FU
 for 45692 <at> debbugs.gnu.org; Sat, 23 Jan 2021 08:04:42 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=mIMxghx8Z14GQUNmbrzS5LDBC2vWUQ9tiDcrjrRw7xZ/tz7VOea9qsPlXDvSbOzaIbQ/Ue5kWrO4p3G0t9PpRNb8ARD9x5X30N7Wk1AHqYTvpFQYzxqoZd/SrdBgF7viiZYnkN6AFhtCMg0UYk25m/s9Jr2DhVV0JgQYPLyXASqdR7/usuqR2BEJ7vydon3leD2qctZiCjYfavWqTbFAziGzrQ6SiTKI4mjcDAk2wy5BBkBuoqhMknT7AJkYCCJDpBYLphKPatMf/1DRPAd3OAAvFS0l9g77v2Nfk+2MFkJVDOtVShaLwZkgYqDhXT1TYkb5JKSApRwWswVuShHipg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=;
 b=awxwd0AHQMecwI3KOVQL/Kz1MHavz8LpenryOT9nFLieAu+BHyardWzKx9U2JjzoAOZF8MWTCtX08DYl3/qn9PD6C70YPRd9KwWJCsxtIyFMlrl5d5F6Z6qsDMNnlGbhoxfCryOmIrYwPb5g/Da3lsYz7O7PWe4NS51oXnn/UgfHKBTk/W1a7bChmMIwP37kiU8Hv/ogNGFDFC52/JbgUDu1+Rv4KkM0hEykZfWeYBtTYjdiuPJwhqcM7xO6RsKbznRP/NgzvAzaulbFQOyNM/gFzFpDJz05Vl+7NzM/awMokUCoB5vrMFx+cph5o/CLZuKM6j5odPEALLtCflmj6Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=;
 b=rCMKfXRLy9BKyyvcuZRLXeoky/o6xvSg9ZIoQ+ev+E0TuLUNSLSKQ+SlkdL9IlH4Mepf6xfimH+XyLw0dN0u/d63O73L4BUWC9lasAJ2UZbel4L8QfNTQcz9OCUdNA64feKHBahRUC78nVRWoMFoNAzW+EBvZ/sffSqFWscJKAUQK9+WSaoEmYl+SApibzWHUtZB2bbi9pRw/HdnbXBMM8Dfhy+UHIMZIdb17p78vViiQEtqAZ3M5S71+E+pR5o2lYYCPDU/PhL6uyKg5e9HGHQWB1akAPmZD9FM/V25aoal5XjCjnJK6DcNWb8ZcN0ukr35N03AOuXAgwDXwHokIw==
Received: from PU1APC01FT026.eop-APC01.prod.protection.outlook.com
 (2a01:111:e400:7ebe::4a) by
 PU1APC01HT028.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::329)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Sat, 23 Jan
 2021 13:04:29 +0000
Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM (10.152.252.56) by
 PU1APC01FT026.mail.protection.outlook.com (10.152.252.235) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3784.11 via Frontend Transport; Sat, 23 Jan 2021 13:04:29 +0000
X-IncomingTopHeaderMarker: OriginalChecksum:52F3BB86BB62349C3ED0D3D26C52DF11289E966485B422BBD40DA849B3CD4D0D;
 UpperCasedChecksum:8617A2D03830379A80A0A7D356822EA01B73BEB8F405B85D771A8B5788751920;
 SizeAsReceived:9080; Count:46
Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM
 ([fe80::4987:bbf2:2bff:6b22]) by OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM
 ([fe80::4987:bbf2:2bff:6b22%5]) with mapi id 15.20.3784.016; Sat, 23 Jan 2021
 13:04:28 +0000
From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN>
To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [bug#45692] [PATCH 2/4] gnu: Make file-systems target
 extensible by services.
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
Date: Sat, 23 Jan 2021 21:05:36 +0800
In-Reply-To: <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
 (raid5atemyhomework@HIDDEN's message of "Wed, 06 Jan 2021
 15:55:36 +0000")
Message-ID: <OSZP286MB066439455D4B38ABA5F04337A3BF0@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Content-Type: multipart/mixed; boundary="=-=-="
X-TMN: [i3LMU7LzT9kGavNcn/tu7i4v+KhAoiaicViLi9nlbslVRatG481kwI+di7JFt9y3]
X-ClientProxiedBy: AM0PR08CA0021.eurprd08.prod.outlook.com
 (2603:10a6:208:d2::34) To OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM
 (2603:1096:604:ec::11)
X-Microsoft-Original-Message-ID: <87sg6r3isf.fsf@HIDDEN>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (2409:8a62:37f:8120:2f1:f5ff:fe18:6bb) by
 AM0PR08CA0021.eurprd08.prod.outlook.com (2603:10a6:208:d2::34) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3784.13 via Frontend Transport; Sat, 23 Jan 2021 13:04:27 +0000
X-MS-PublicTrafficType: Email
X-IncomingHeaderCount: 46
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-Correlation-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5
X-MS-TrafficTypeDiagnostic: PU1APC01HT028:
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: yaPFY+kVbeXOGXiaG6BYkELnBqbYwzPGW4wTCmpdWcyTe1Xnvu3FS3kXCL9tv7ernoLHu+a7rmy3ZhNfKEjb/p0kn0umLSIUV88ZxIm+AjNXCwUtCyUdROij3V95McMaHuuspP/9xnmoqLRE7yPuqXoc44kr9kKyi8wZIkzaW1eE0xhBUuUwvWDPrWjbz5qCjDxs032ygRqG8wtE9kNEBcSRgcz3ja4ZvpsTyoph+SLeJ0NouqMVtaZC5soSA8ih
X-MS-Exchange-AntiSpam-MessageData: hTti5cVwdPUgPbRaD3K2blrsmePbU4DkDw9lsFszJLjQoxQ09M16x7ZflA5ctvoPLPpzgI1iR3HjO247za4Rznq140By2F8rDctmxWF7+UF5IB10amDPWVsfLsmDH9HJBseA44DBD6TCj3tYkmdMq6FO/n9WcGrjG+4cMyoOEy/3s1GN8+Jj9dAxHwViCDi3YSjHvLcqeFJ6efA3c5tHxw==
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2021 13:04:28.7566 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT026.eop-APC01.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT028
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "45692 <at> debbugs.gnu.org" <45692 <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: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello!

raid5atemyhomework <raid5atemyhomework@HIDDEN> writes:
>>From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 2001
> From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
> Date: Wed, 6 Jan 2021 08:15:54 +0800
> Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services=
.

It=E2=80=99s not clear to me what =E2=80=9Cfile-systems target=E2=80=9D is,=
 and why we=E2=80=99re
extending =E2=80=98file-systems-target-service-type=E2=80=99=E2=80=A6  I th=
ink what we want is
to extend the =E2=80=98file-system-service-type=E2=80=99 with shepherd serv=
ices=E2=80=99 names,
which means some shepherd services that will handle file systems
mounting themself instead of the usual <file-system> objects, fstab
entries, mounted by kernel.


So I write with this patch to extend file-system-service-type directly
instead of introducing a new =E2=80=98file-systems-target-service-type=E2=
=80=99:


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0001-services-Allow-file-system-service-type-extensible-b.patch
Content-Transfer-Encoding: quoted-printable

From 44ee1e470a2f9d4985af4d51654d9f943caa0f24 Mon Sep 17 00:00:00 2001
From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D <iyzson=
g@HIDDEN>
Date: Sat, 23 Jan 2021 20:39:06 +0800
Subject: [PATCH] services: Allow 'file-system-service-type' extensible by
 service name.
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

* gnu/services/base.scm (file-system-shepherd-services): Add
'extra-services-names' paramater.
(file-system-service-type): Handle services=E2=80=99 names from extensions.
---
 gnu/services/base.scm | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f6a490f712..7bddef5034 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -364,15 +364,16 @@ FILE-SYSTEM."
                        (gnu system file-systems)
                        ,@%default-modules)))))))
=20
-(define (file-system-shepherd-services file-systems)
+(define (file-system-shepherd-services file-systems extra-services-names)
   "Return the list of Shepherd services for FILE-SYSTEMS."
   (let* ((file-systems (filter file-system-mount? file-systems)))
     (define sink
       (shepherd-service
        (provision '(file-systems))
-       (requirement (cons* 'root-file-system 'user-file-systems
-                           (map file-system->shepherd-service-name
-                                file-systems)))
+       (requirement (append '(root-file-system user-file-systems)
+                            (map file-system->shepherd-service-name
+                                 file-systems)
+                            extra-services-names))
        (documentation "Target for all the initially-mounted file systems")
        (start #~(const #t))
        (stop #~(const #f))))
@@ -429,13 +430,23 @@ FILE-SYSTEM."
   (service-type (name 'file-systems)
                 (extensions
                  (list (service-extension shepherd-root-service-type
-                                          file-system-shepherd-services)
+                                          (lambda (value)
+                                            (file-system-shepherd-services
+                                             (filter file-system? value)
+                                             (filter symbol? value))))
                        (service-extension fstab-service-type
-                                          file-system-fstab-entries)
+                                          (lambda (value)
+                                            (file-system-fstab-entries
+                                             (filter file-system? value)))=
)
=20
                        ;; Have 'user-processes' depend on 'file-systems'.
                        (service-extension user-processes-service-type
                                           (const '(file-systems)))))
+
+                ;; Extensions consist of lists of <file-system> objects or
+                ;; shepherd services=E2=80=99 names (symbols).  In the lat=
ter case,
+                ;; the provided shepherd services supposed to mount and
+                ;; unmount some file systems themself.
                 (compose concatenate)
                 (extend append)
                 (description
--=20
2.29.2


--=-=-=
Content-Type: text/plain


What do you think?  Thank you!

--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 9 Jan 2021 08:31:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 09 03:31:54 2021
Received: from localhost ([127.0.0.1]:51188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ky9f7-0004Bs-IY
	for submit <at> debbugs.gnu.org; Sat, 09 Jan 2021 03:31:54 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:14300)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1ky9f5-0004Bd-88
 for 45692 <at> debbugs.gnu.org; Sat, 09 Jan 2021 03:31:52 -0500
Date: Sat, 09 Jan 2021 08:31:37 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1610181104;
 bh=d643oRIfvk9MlprRc+g5Ld1PuPEGjmuzbCYSI31hQxU=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=xTqxNg5DjyvvJ/fYyrupt553KYdrXF8mISq9uK9Ys43BY0umRb7MlhA8szeHkjEE/
 QPCoV4HeLa3rcCflAHBdR5h1TyL8aU9z+WXtmMdCfCKDTqUljO4Le/4knDMHP0Byd2
 GI3WPBN1lKR4UOFG90mvyi5lIrXI0i9t2IUacEZA=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com>
In-Reply-To: <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

New version again.  Change: Fix documentation `doc/guix.texi` to remove men=
tions of `options` and add documentation about the new `dependencies` featu=
res.


From dfe9ad7512d348933beb5b42041965ff604422b5 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Wed, 6 Jan 2021 09:24:20 +0800
Subject: [PATCH 1/2] gnu: Add service to install ZFS.

* gnu/services/file-systems.scm: New file.
(zfs-service-type): New variable.
(<zfs-configuration>): New type.
(%zfs-zvol-dependency): New variable.
* gnu/local.mk: Add gnu/services/file-systems.scm.
* gnu/services/base.scm (dependency->shepherd-service-name): Export.
* doc/guix.texi (ZFS file system): New subsection.
---
 doc/guix.texi                 | 129 +++++++++++++++++++++++++
 gnu/local.mk                  |   1 +
 gnu/services/base.scm         |   4 +-
 gnu/services/file-systems.scm | 174 ++++++++++++++++++++++++++++++++++
 4 files changed, 307 insertions(+), 1 deletion(-)
 create mode 100644 gnu/services/file-systems.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index a31d355780..7004efe3c4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13886,6 +13886,135 @@ a file system declaration such as:
 compress-force=3Dzstd,space_cache=3Dv2"))
 @end lisp

+@node ZFS file system
+@subsection ZFS file system
+
+The ZFS file system has a license incompatible with the Linux kernel,
+and thus cannot be distributed with the kernel. However, as a user
+you have the right to do whatever you want on your own hardware,
+including download the ZFS source code, compile it, link it to your
+own private copy of Linux, and run it. You can even use the Guix build
+system to automate this.
+
+As a large and complex kernel module, ZFS on Linux has to be compiled
+with a specific version of the kernel. Often even the latest ZFS
+package available cannot be compiled with the latest Linux kernel
+package provided by Guix System. Thus, installing the @code{zfs}
+package is likely to fail.
+
+Instead, you have to use an older long-term-support Linux kernel.
+Do not use @code{linux-libre-lts}, since the latest long-term-support
+kernel might be too new for the ZFS package; instead, explicitly
+select the version number, like @code{linux-libre-5.4}, and upgrade
+it manually later when you have verified that the ZFS version
+available on Guix can be compiled with a later LTS kernel.
+
+Then, you have to modify your system configuration file and use the
+selected older kernel, and add the @code{zfs-service-type} service.
+
+@lisp
+(use-modules (gnu))
+(use-package-modules
+   ; @dots{}
+   linux)
+(use-service-modules
+   ; @dots{}
+   file-systems)
+
+(define my-kernel linux-libre-5.4)
+
+(operating-system
+  (kernel my-kernel)
+  ;; @dots{}
+  (services
+    (cons* (service zfs-service-type
+             (zfs-configuration
+               (kernel my-kernel)))
+           ; @dots{}
+           %desktop-services))
+  ;; @dots{}
+  )
+@end lisp
+
+@defvr {Scheme Variable} zfs-service-type
+This is the type of the service to compile and install OpenZFS to
+your operating system. It loads the ZFS module at startup, imports
+pools, mounts automounted ZFS datasets, and installs the ZFS command
+line tools.  Its value must be a @code{zfs-configuration} record
+(see below).
+
+Here is an example use:
+
+@lisp
+(service zfs-service-type
+  (zfs-configuration
+    (kernel linux-libre-5.4)))
+@end lisp
+@end defvr
+
+@deftp {Data Type} zfs-configuration
+This data type represents the configuration of the ZFS service.
+The available fields are:
+
+@table @asis
+@item @code{kernel}
+The package of the Linux kernel to compile ZFS for. Required. It
+@emph{must} be the same kernel you use in your operating system.
+
+@item @code{base-zfs} (default: @code{zfs})
+The ZFS package to use. It will be modified to use the indicated
+kernel.
+
+@item @code{dependencies} (default: @code{'()})
+A list of @code{<file-system>}s or @code{<mapped-device>}s that
+must be mounted or opened before ZFS scans for pools to import.
+For example, you might have LUKS containers as the leaf VDEVs of
+a ZFS pool.
+@end table
+@end deftp
+
+Once your system has been configured to include the ZFS service
+and you have restarted the system, you can manage ZFS pools and
+datasets with @code{zpool} and @code{zfs} commands.
+
+ZFS datasets with an appropriate @code{mountpoint} property will
+be automounted at startup after the root file system is started.
+Encrypted datasets that are automounted will cause boot to pause
+and prompt for the password to be provided on the console.
+
+It's possible to have a ZFS dataset as your @code{/home} by simply
+setting the @code{mountpoint} ZFS property. However, note that ZFS
+will refuse to mount over a non-empty directory, so if your root
+filesystem already has a non-empty @code{/home}, you should remove
+it and its contents, then restart the system.
+
+ZFS features @dfn{ZVOL}s, which are block devices that ZFS exposes
+to the system. You can put any file system inside a ZVOL. In order
+to mount such a filesystem at boot, you can declare it as dependent
+on @code{%zfs-zvol-dependency}.
+
+@defvr {Scheme Variable} %zfs-zvol-dependency
+This is an artificial @code{<mapped-device>} object which tells
+the file mounting service to wait for ZFS to provide ZVOLs before
+mounting the file system that is dependent on it. For example:
+
+@lisp
+(file-system
+  (device "/dev/zvol/pool-name/zvol-name")
+  (mount-point "/ext4-on-zfs")
+  (type "ext4")
+  (dependencies (list %zfs-zvol-dependency)))
+@end lisp
+
+Do @emph{not} add @code{%zfs-zvol-dependency} to your
+@code{mapped-devices} declaration, In addition, only use it as a
+@code{file-system} dependency if you instantiate a
+@code{zfs-service-type} service in your operating system.
+@end defvr
+
+Having ZFS as a root filesystem or as @code{/boot} is not supported
+yet.
+
 @node Mapped Devices
 @section Mapped Devices

diff --git a/gnu/local.mk b/gnu/local.mk
index 1151d4642e..5aeb45c4c2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -602,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\
   %D%/services/dict.scm=09=09=09=09\
   %D%/services/dns.scm=09=09=09=09\
   %D%/services/docker.scm=09=09=09\
+  %D%/services/file-systems.scm=09=09=09\
   %D%/services/authentication.scm=09=09\
   %D%/services/games.scm=09=09=09\
   %D%/services/ganeti.scm=09=09=09\
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 13cfb6a8a2..ef3680583b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -188,7 +188,9 @@

             references-file

-            %base-services))
+            %base-services
+
+            dependency->shepherd-service-name))

 ;;; Commentary:
 ;;;
diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
new file mode 100644
index 0000000000..9061ab9582
--- /dev/null
+++ b/gnu/services/file-systems.scm
@@ -0,0 +1,174 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services file-systems)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services linux)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system mapped-devices)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix records)
+  #:export (zfs-service-type
+
+            zfs-configuration
+            zfs-configuration?
+            zfs-configuration-kernel
+            zfs-configuration-base-zfs
+            zfs-configuration-dependencies
+
+            %zfs-zvol-dependency))
+
+(define-record-type* <zfs-configuration>
+  zfs-configuration make-zfs-configuration zfs-configuration?
+  ; kernel you want to compile the base-zfs module for.
+  (kernel         zfs-configuration-kernel)
+  ; base package that will be compiled for the kernel
+  (base-zfs       zfs-configuration-base-zfs
+                  (default zfs))
+  ; list of <mapped-device> | <file-system> we should wait for,
+  ; before scanning for ZFS pools.
+  (dependencies   zfs-configuration-dependencies
+                  (default '())))
+
+;; This is a synthetic and unusable MAPPED-DEVICE; its only use
+;; is to be added as a (dependency ...) of some FILE-SYSTEM.
+(define %zfs-zvol-dependency
+  (mapped-device
+    (source '())
+    ;; The /* prevents naming conflict with non-ZFS device mappings,
+    ;; since it is not a valid name for mapped devices, and also
+    ;; implies "all zvols" in terms of globs.
+    (targets '("zvol/*"))
+    (type #f)))
+
+(define (make-zfs-package conf)
+  (let ((base-zfs (zfs-configuration-base-zfs conf))
+        (kernel   (zfs-configuration-kernel conf)))
+    (package
+      (inherit base-zfs)
+      (name (string-join (list (package-name base-zfs)
+                               "for"
+                               (package-name kernel)
+                               (package-version kernel)
+                               "version")
+                         "-"))
+      (arguments (cons* #:linux kernel (package-arguments base-zfs))))))
+
+(define (zfs-loadable-module conf)
+  (list (list (make-zfs-package conf) "module")))
+
+(define (zfs-shepherd-services conf)
+  (let* ((zfs-package     (make-zfs-package conf))
+         (zpool           (file-append zfs-package "/sbin/zpool"))
+         (zfs             (file-append zfs-package "/sbin/zfs"))
+         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
+         (scheme-modules  `((srfi srfi-1)
+                            (srfi srfi-34)
+                            (srfi srfi-35)
+                            (rnrs io ports)
+                            ,@%default-modules)))
+
+    (define zfs-scan
+      (shepherd-service
+        (provision '(zfs-scan))
+        (documentation "Scans for ZFS pools.")
+        (requirement `(kernel-module-loader
+                       root-file-system
+                       ,@(map dependency->shepherd-service-name
+                              (zfs-configuration-dependencies conf))))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error importing zpools: ~a~%"
+                                      (condition-message c))
+                              #f))
+                     ; TODO: optionally use a cachefile, for systems with =
dozens or
+                     ; hundreds of devices.
+                     (invoke/quiet #$zpool "import" "-a" "-N"))))
+        (stop #~(const #t))))
+
+    (define device-mapping-zvol/*
+      (shepherd-service
+        (provision '(device-mapping-zvol/*))
+        (documentation "Waits for ZFS ZVOL devices to appear.")
+        (requirement '(zfs-scan))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error waiting for zvols: ~a~%"
+                                      (condition-message c))
+                              #f))
+                     (invoke/quiet #$zvol_wait))))
+        (stop #~(const #t))))
+
+    (define zfs-automount
+      (shepherd-service
+        (provision '(zfs-automount))
+        (documentation "Automounts ZFS datasets.")
+        (requirement '(zfs-scan))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error automounting zfs: ~a~$")
+                              #f))
+                     ; (current-output-port) is typically connected to /de=
v/klog,
+                     ; so redirect it to (current-error-port) so that user=
 can see
+                     ; prompts for passphrases on console
+                     (with-output-to-port (current-error-port)
+                       (lambda ()
+                         (invoke #$zfs "mount" "-a" "-l"))))))
+        (stop #~(lambda _
+                  ;; make sure we don't keep any ZFS mountpoints busy.
+                  (chdir "/")
+                  ;; unmount everything.
+                  (invoke/quiet #$zfs "unmount" "-a" "-f")))))
+
+    (list zfs-scan
+          device-mapping-zvol/*
+          zfs-automount)))
+
+(define zfs-service-type
+  (service-type (name 'zfs)
+                (extensions
+                  (list
+                    ; install the kernel module
+                    (service-extension kernel-loadable-module-service-type
+                                       zfs-loadable-module)
+                    ; load the kernel module
+                    (service-extension kernel-module-loader-service-type
+                                       (const '("zfs")))
+                    ; scan ZFS pools, automount filesystem, wait for zvols=
.
+                    (service-extension shepherd-root-service-type
+                                       zfs-shepherd-services)
+                    ; make sure automount occurs before file-systems targe=
t is reached
+                    (service-extension file-systems-target-service-type
+                                       (const '(zfs-automount)))
+                    ; install ZFS management tools
+                    (service-extension profile-service-type
+                                       (compose list make-zfs-package))
+                    ; install ZFS udev rules
+                    (service-extension udev-service-type
+                                       (compose list make-zfs-package))))
+                (description
+                  "Install ZFS, an advanced filesystem and volume manager.=
")))
--
2.30.0




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 8 Jan 2021 16:16:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 08 11:16:28 2021
Received: from localhost ([127.0.0.1]:50439 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxuR9-0003Ny-Pj
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 11:16:28 -0500
Received: from mail-40141.protonmail.ch ([185.70.40.141]:47230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxuR7-0003Ne-M3
 for 45692 <at> debbugs.gnu.org; Fri, 08 Jan 2021 11:16:26 -0500
Date: Fri, 08 Jan 2021 16:16:14 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1610122579;
 bh=GYMcE88SCqUPmaRoJyfWgECfOCgErmWbbQhX8PJPoQA=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=iSOY6OUDPnQoxGg5KbW5D4oSzeoB948olYE/QCA+NBQ+7MUGiKhayCEjN90YcpIGS
 71UZw0mVovMINE+EFg1SVfA9EMQLn8pHEj+mrqL5/6WuiQ+HG+ttv5DU5I5FLW4SUj
 uUqVp3FA0+GGm9kfxhWPLO9y+TiouEHHtqU/zz7g=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH 1/4] gnu: Allow services to install kernel-loadable
 modules.
Message-ID: <dczqwG2jPjcW8kLCB2rWgE7UxjX4eGFliB97Uug4pxwzaEVw7Wtrwm3S4fO1tRv3AG816TT0pAZWaaZY-3gE5RmAaDV9NLbCKyuW4HeBoZA=@protonmail.com>
In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
References: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Is this patch acceptable? https://lists.nongnu.org/archive/html/guix-devel/=
2021-01/msg00070.html I reported that I compared a `guix system build` resu=
lt of an `operating-system` that used the existing `(kernel-loadable-module=
s ...)` field, with and without this patch.

The resulting builds resulted in different hashes, but with exactly the sam=
e contents in the build --- `diff -r` very quickly reported no differences =
because it saw that nearly all the symlinks pointed to the same gnu store i=
tems.






Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 8 Jan 2021 15:02:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 08 10:02:34 2021
Received: from localhost ([127.0.0.1]:50340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxtHe-0001SV-5T
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 10:02:34 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:58897)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxtHb-0001S7-Tr
 for 45692 <at> debbugs.gnu.org; Fri, 08 Jan 2021 10:02:33 -0500
Date: Fri, 08 Jan 2021 15:02:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1610118144;
 bh=PVd20+nCRSa82RwW8MCxBXQjWmfcoUyW9lE6OjQqE6U=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=CfsYzv4brhNE8l7amVV3Ue/MMmbJE2P/Z6sAraMOYRbs3nJT2Ge3RGF1hwV3nYs4L
 wrV8Re9vrBz33YYUo8/JDgPQmyHYaJRKkAcr9wv6eg/n/OpPyvIV5IyzJB4EvhMYsX
 BHg03m6ZiHv46sSCtO1vUJq5C+k+CHYQyUzX7O4Y=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <LmlpVtErWRRqKI9LIqHvswFA3ig_rjwIk9u8S96Bp6A9VG_l0bAnQdhIQsxf_fB5CAJxMnoClNXDObuPloDX7JDDOl4ZuFGn6u54FmJ5K2o=@protonmail.com>
In-Reply-To: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This new version is dependent on https://issues.guix.info/45723 and https:/=
/issues.guix.info/45722

New features:

* We can now delay pool importation after particular mapped devices are ope=
ned or file systems are mounted.  This is useful if you want to make a ZFS =
pool out of LUKS containers, or mount an encrypted ZFS dataset with the enc=
ryption key in another (hopefully also encrypted) filesystem.
* We can now put other non-ZFS filesystems inside ZVOLs, block devices prov=
ided by a ZFS pool, and have them mounted after ZFS has scanned pools and o=
pened such ZVOLs for use by the ystem.

It's now possible to have a bunch of LUKS containers in a ZPOOL that provid=
es a ZVOL that contains an EXT4 filesystem (though why would you do that, j=
ust use builtin ZFS encryption).

This uses my [PATCH 1/4] instead of https://issues.guix.info/42193#4.  Shou=
ld I use the latter instead?  What would get ZFS on Guix faster?

I decided to remove ZFS parameter options, because I don't know whether I s=
hould wait for https://issues.guix.info/42193 and how long that would take.


From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Wed, 6 Jan 2021 09:24:20 +0800
Subject: [PATCH 4/4] gnu: Add service to install ZFS.

* gnu/services/file-systems.scm: New file.
(zfs-service-type): New variable.
(<zfs-configuration>): New type.
(%zfs-zvol-dependency): New variable.
* gnu/local.mk: Add gnu/services/file-systems.scm.
* gnu/services/base.scm (dependency->shepherd-service-name): Export.
* doc/guix.texi (ZFS file system): New subsection.
---
 doc/guix.texi                 | 107 +++++++++++++++++++++
 gnu/local.mk                  |   1 +
 gnu/services/base.scm         |   4 +-
 gnu/services/file-systems.scm | 174 ++++++++++++++++++++++++++++++++++
 4 files changed, 285 insertions(+), 1 deletion(-)
 create mode 100644 gnu/services/file-systems.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index a31d355780..714274b8c9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13886,6 +13886,113 @@ a file system declaration such as:
 compress-force=3Dzstd,space_cache=3Dv2"))
 @end lisp

+@node ZFS file system
+@subsection ZFS file system
+
+The ZFS file system has a license incompatible with the Linux kernel,
+and thus cannot be distributed with the kernel. However, as a user
+you have the right to do whatever you want on your own hardware,
+including download the ZFS source code, compile it, link it to your
+own private copy of Linux, and run it. You can even use the Guix build
+system to automate this.
+
+As a large and complex kernel module, ZFS on Linux has to be compiled
+with a specific version of the kernel. Often even the latest ZFS
+package available cannot be compiled with the latest Linux kernel
+package provided by Guix System. Thus, installing the @code{zfs}
+package is likely to fail.
+
+Instead, you have to use an older long-term-support Linux kernel.
+Do not use @code{linux-libre-lts} as the latest long-term-support
+kernel might be too new for the ZFS package; instead, explicitly
+select the version number, like @code{linux-libre-5.4}.
+
+Then, you have to modify your system configuration file and use the
+selected older kernel, and add the @code{zfs-service-type} service.
+
+@lisp
+(use-modules (gnu))
+(use-package-modules
+   ; @dots{}
+   linux)
+(use-service-modules
+   ; @dots{}
+   file-systems)
+
+(define my-kernel linux-libre-5.4)
+
+(operating-system
+  (kernel my-kernel)
+  ;; @dots{}
+  (services
+    (cons* (service zfs-service-type
+             (zfs-configuration
+               (kernel my-kernel)))
+           ; @dots{}
+           %desktop-services))
+  ;; @dots{}
+  )
+@end lisp
+
+@defvr {Scheme Variable} zfs-service-type
+This is the type of the service to compile and install OpenZFS to
+your operating system. It loads the ZFS module at startup, imports
+pools, mounts automounted ZFS datasets, installs the ZFS command
+line tools, and can provide module options for the ZFS module.  Its
+value must be a @code{zfs-configuration} record (see below).
+
+Here is an example use:
+
+@lisp
+(service zfs-service-type
+  (zfs-configuration
+    (kernel linux-libre-5.4)
+    (options '("zfs_arc_max=3D5000000000"))))
+@end lisp
+@end defvr
+
+@deftp {Data Type} zfs-configuration
+This data type represents the configuration of the ZFS service.
+The available fields are:
+
+@table @asis
+@item @code{kernel}
+The package of the Linux kernel to compile ZFS for. Required.
+
+@item @code{base-zfs} (default: @code{zfs})
+The ZFS package to use. It will be modified to use the indicated
+kernel.
+
+@item @code{options} (default: @code{'()})
+A list of string options to pass as options to the ZFS module.
+These will be put in a @file{/etc/modprobe.d/zfs.conf} file,
+for example setting this to @code{'("zfs_admin_snapshot=3D1"
+"zfs_trim_extent_bytes_min=3D0")} will create the following file:
+
+@example
+options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0
+@end example
+@end table
+@end deftp
+
+Once your system has been configured to include the ZFS service
+and you have restarted the system, you can manage ZFS pools and
+datasets with @code{zpool} and @code{zfs} commands.
+
+ZFS datasets with an appropriate @code{mountpoint} property will
+be automounted at startup after the root file system is started.
+Encrypted datasets that are automounted will cause boot to pause
+and prompt for the password to be provided on the console.
+
+It's possible to have a ZFS dataset as your @code{/home} by simply
+setting the @code{mountpoint} property. However, note that ZFS will
+refuse to mount over a non-empty directory, so if your root
+filesystem already has a non-empty @code{/home}, you should remove
+it and its contents, then restart the system.
+
+Having ZFS as a root filesystem or as @code{/boot} is not supported
+yet.
+
 @node Mapped Devices
 @section Mapped Devices

diff --git a/gnu/local.mk b/gnu/local.mk
index 1151d4642e..5aeb45c4c2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -602,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\
   %D%/services/dict.scm=09=09=09=09\
   %D%/services/dns.scm=09=09=09=09\
   %D%/services/docker.scm=09=09=09\
+  %D%/services/file-systems.scm=09=09=09\
   %D%/services/authentication.scm=09=09\
   %D%/services/games.scm=09=09=09\
   %D%/services/ganeti.scm=09=09=09\
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 13cfb6a8a2..ef3680583b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -188,7 +188,9 @@

             references-file

-            %base-services))
+            %base-services
+
+            dependency->shepherd-service-name))

 ;;; Commentary:
 ;;;
diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
new file mode 100644
index 0000000000..9061ab9582
--- /dev/null
+++ b/gnu/services/file-systems.scm
@@ -0,0 +1,174 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services file-systems)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services linux)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu system mapped-devices)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix records)
+  #:export (zfs-service-type
+
+            zfs-configuration
+            zfs-configuration?
+            zfs-configuration-kernel
+            zfs-configuration-base-zfs
+            zfs-configuration-dependencies
+
+            %zfs-zvol-dependency))
+
+(define-record-type* <zfs-configuration>
+  zfs-configuration make-zfs-configuration zfs-configuration?
+  ; kernel you want to compile the base-zfs module for.
+  (kernel         zfs-configuration-kernel)
+  ; base package that will be compiled for the kernel
+  (base-zfs       zfs-configuration-base-zfs
+                  (default zfs))
+  ; list of <mapped-device> | <file-system> we should wait for,
+  ; before scanning for ZFS pools.
+  (dependencies   zfs-configuration-dependencies
+                  (default '())))
+
+;; This is a synthetic and unusable MAPPED-DEVICE; its only use
+;; is to be added as a (dependency ...) of some FILE-SYSTEM.
+(define %zfs-zvol-dependency
+  (mapped-device
+    (source '())
+    ;; The /* prevents naming conflict with non-ZFS device mappings,
+    ;; since it is not a valid name for mapped devices, and also
+    ;; implies "all zvols" in terms of globs.
+    (targets '("zvol/*"))
+    (type #f)))
+
+(define (make-zfs-package conf)
+  (let ((base-zfs (zfs-configuration-base-zfs conf))
+        (kernel   (zfs-configuration-kernel conf)))
+    (package
+      (inherit base-zfs)
+      (name (string-join (list (package-name base-zfs)
+                               "for"
+                               (package-name kernel)
+                               (package-version kernel)
+                               "version")
+                         "-"))
+      (arguments (cons* #:linux kernel (package-arguments base-zfs))))))
+
+(define (zfs-loadable-module conf)
+  (list (list (make-zfs-package conf) "module")))
+
+(define (zfs-shepherd-services conf)
+  (let* ((zfs-package     (make-zfs-package conf))
+         (zpool           (file-append zfs-package "/sbin/zpool"))
+         (zfs             (file-append zfs-package "/sbin/zfs"))
+         (zvol_wait       (file-append zfs-package "/bin/zvol_wait"))
+         (scheme-modules  `((srfi srfi-1)
+                            (srfi srfi-34)
+                            (srfi srfi-35)
+                            (rnrs io ports)
+                            ,@%default-modules)))
+
+    (define zfs-scan
+      (shepherd-service
+        (provision '(zfs-scan))
+        (documentation "Scans for ZFS pools.")
+        (requirement `(kernel-module-loader
+                       root-file-system
+                       ,@(map dependency->shepherd-service-name
+                              (zfs-configuration-dependencies conf))))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error importing zpools: ~a~%"
+                                      (condition-message c))
+                              #f))
+                     ; TODO: optionally use a cachefile, for systems with =
dozens or
+                     ; hundreds of devices.
+                     (invoke/quiet #$zpool "import" "-a" "-N"))))
+        (stop #~(const #t))))
+
+    (define device-mapping-zvol/*
+      (shepherd-service
+        (provision '(device-mapping-zvol/*))
+        (documentation "Waits for ZFS ZVOL devices to appear.")
+        (requirement '(zfs-scan))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error waiting for zvols: ~a~%"
+                                      (condition-message c))
+                              #f))
+                     (invoke/quiet #$zvol_wait))))
+        (stop #~(const #t))))
+
+    (define zfs-automount
+      (shepherd-service
+        (provision '(zfs-automount))
+        (documentation "Automounts ZFS datasets.")
+        (requirement '(zfs-scan))
+        (modules scheme-modules)
+        (start #~(lambda _
+                   (guard (c ((message-condition? c)
+                              (format (current-error-port)
+                                      "error automounting zfs: ~a~$")
+                              #f))
+                     ; (current-output-port) is typically connected to /de=
v/klog,
+                     ; so redirect it to (current-error-port) so that user=
 can see
+                     ; prompts for passphrases on console
+                     (with-output-to-port (current-error-port)
+                       (lambda ()
+                         (invoke #$zfs "mount" "-a" "-l"))))))
+        (stop #~(lambda _
+                  ;; make sure we don't keep any ZFS mountpoints busy.
+                  (chdir "/")
+                  ;; unmount everything.
+                  (invoke/quiet #$zfs "unmount" "-a" "-f")))))
+
+    (list zfs-scan
+          device-mapping-zvol/*
+          zfs-automount)))
+
+(define zfs-service-type
+  (service-type (name 'zfs)
+                (extensions
+                  (list
+                    ; install the kernel module
+                    (service-extension kernel-loadable-module-service-type
+                                       zfs-loadable-module)
+                    ; load the kernel module
+                    (service-extension kernel-module-loader-service-type
+                                       (const '("zfs")))
+                    ; scan ZFS pools, automount filesystem, wait for zvols=
.
+                    (service-extension shepherd-root-service-type
+                                       zfs-shepherd-services)
+                    ; make sure automount occurs before file-systems targe=
t is reached
+                    (service-extension file-systems-target-service-type
+                                       (const '(zfs-automount)))
+                    ; install ZFS management tools
+                    (service-extension profile-service-type
+                                       (compose list make-zfs-package))
+                    ; install ZFS udev rules
+                    (service-extension udev-service-type
+                                       (compose list make-zfs-package))))
+                (description
+                  "Install ZFS, an advanced filesystem and volume manager.=
")))
--
2.30.0





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 7 Jan 2021 08:23:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 03:23:36 2021
Received: from localhost ([127.0.0.1]:46240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxQa0-0002vi-67
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 03:23:36 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:59444)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1kxQZy-0002va-J1
 for 45692 <at> debbugs.gnu.org; Thu, 07 Jan 2021 03:23:35 -0500
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id BF972336582A;
 Thu,  7 Jan 2021 09:23:32 +0100 (CET)
Date: Thu, 7 Jan 2021 09:23:31 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: [bug#45692] [PATCH 3/4] gnu: Fix ZFS package.
Message-ID: <20210107092331.0b2fc752@HIDDEN>
In-Reply-To: <acw65x5599Yvgtn3iJ_lyNBHCVnac88F4pw4NdemkLG-SFzy_URDm9Fp01CWjbIkNT-5UjqceOHDNBmZpakN0ifetm1ehaED4z65hHgUKwo=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <acw65x5599Yvgtn3iJ_lyNBHCVnac88F4pw4NdemkLG-SFzy_URDm9Fp01CWjbIkNT-5UjqceOHDNBmZpakN0ifetm1ehaED4z65hHgUKwo=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/oEwIY/k+=82Vxd3Ij0SwK=d";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -0.5 (/)

--Sig_/oEwIY/k+=82Vxd3Ij0SwK=d
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Pushed this one patch that fixes package "zfs" to guix master as
commit 8d3184c5bcf1a590f59a701f0484ab5cec673188.

--Sig_/oEwIY/k+=82Vxd3Ij0SwK=d
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl/2xQMACgkQ5xo1VCww
uqU2tQgAmIWZQ+ODdXCvUgDlwdVR5olRbLAZeTC7ZIHErRte4VzFAjJyvUkk1mAr
0k/o9Y+SFda5TRza7GWHwgfZXiAoSyGgqUyrKH6MO0YKJlAljN9W69LSyigDuSvZ
SPQxRW8WHhDCJFrKkaW8cgXN2Im/QJ2Pd2kZDav266riE3Jk4JyRpS60VHHfnuE8
2jNT2UfnJuPK/SgAH8Q3G7z8+wd9iiMWKxpkkapHFGEdPUxJGsupNX8XtnWcCSeg
WQhRglVn0yY7gFhMODJcfjfqGLoDce6OjOWab4Snnv3Wjzmq3fn1gMUSzv1avIwX
KbmSBldqAUk+VjiPrI6Si3ixZjK+xQ==
=ilmp
-----END PGP SIGNATURE-----

--Sig_/oEwIY/k+=82Vxd3Ij0SwK=d--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 7 Jan 2021 05:38:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 00:38:19 2021
Received: from localhost ([127.0.0.1]:46099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxO02-0007F2-Or
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 00:38:19 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:20588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxO01-0007Ep-5l
 for 45692 <at> debbugs.gnu.org; Thu, 07 Jan 2021 00:38:17 -0500
Date: Thu, 07 Jan 2021 05:38:05 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609997890;
 bh=wV4po8bvpOhi9FVXRrjBOgBSUnNRGk1sLkxlx5jP/TQ=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=BEhekRIV6PzW1qiyGRdO2+tNdlhndCBXjmutt2iiOJ3+43drwyc5kuJqwnM+2Oy9M
 IAUuuN/aAew5QamRVaBZFKaVJ70l7EcOsDX5mQ5a6iZb7X9d07a4bYSHPwdNtXB9wt
 Uyoh9BL4OTHLw6sK7WU3+qC3Wa6RGuCho3GtCe4M=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: kernel-module-configuration-service for configuring kernel
 parameters
Message-ID: <7kahfDckMJIQd8o2gH_zQ-G9ORP_P0w-VD44R2OJHNP6rJHss8przoTyObTYxx_UEI5CERTD3OlGORnTCBmZA2VMASWpF2Ea0Hx1ZAbUh-I=@protonmail.com>
In-Reply-To: <pilwAVCb0NEG83BVTSEqXkLCNEvBBrnb-QyKV_9PoF4xuCjSXKuF-F3_L5lSOke5BRjagVrUoSzJCST1fkigF162f9j76K12jBraNMAj7E4=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <20210106204134.38e83db4@HIDDEN>
 <pilwAVCb0NEG83BVTSEqXkLCNEvBBrnb-QyKV_9PoF4xuCjSXKuF-F3_L5lSOke5BRjagVrUoSzJCST1fkigF162f9j76K12jBraNMAj7E4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "ludo@HIDDEN" <ludo@HIDDEN>,
 raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
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 Danny,

> > See also https://issues.guix.info/issue/42193 for an earlier attempt (w=
hich
> > is already very far--but it has a bug somewhere). There's also already =
a
> > kernel profile thing like you wrote in that patchset.
> > (Note that I would prefer there not to be a "LOAD?" in there because it
> > confuses loading the module (which is usually NOT started by user space
> > but by the kernel on its own) and confguring the module (which has to b=
e
> > done by user space because it's specifying policy, not mechanism))
>
> Looks like that patchset was merged in, so basically I can just depend on=
 that? So the first patch in this patchset would be dropped?

No, sorry, my mistake, only one patch completely unrelated to the actual ne=
w service type was merged in.

In any case --- is this objection something that would block this patchset =
from being added to Guix? I appreciate that we should "do it right" --- but=
 there's also an argument for "keep it simple", and the first patch in this=
 patchset gets us a good part of the way to what is needed.

It seems that my patch is equivalent to the existing WIP 2/6 `kernel-profil=
e-service-type`, so maybe I can just steal that patch for now, write tests =
specific for it, and get on with running ZFS in production?

Can we at least get patch 3/4 of *this* patchset merged since it's a trivia=
l bugfix?  How about patch 2/4, which is not so trivial, but does give some=
 flexibility in case other filesystems want to be as ambitious as ZFS is?

I imagine a later, much more comprehensive `kernel-module-configuration-ser=
vice-type` can be built on top of `kernel-profile-service-type`, `kernel-mo=
dule-loader-service-type`, and a later `kernel-module-options-service-type`=
.  Then `zfs-service-type` can be modified to use that `kernel-module-confi=
guration-service-type` instead of rolling its own bits and pieces.

----

On the other hand, if we want to think of `/` on ZFS, then we need a notion=
 of kernel modules that are added to the `initrd` file, rather than to the =
`kernel` directory.

Diving into `gnu/system/linux-initrd.scm`, I note that we can provide a ker=
nel package and a list of modules to copy from the kernel package to the `i=
nitrd` by a `(flat-linux-module-directory linux modules)` function.

I imagine that it would be possible to modify this as follows:

* Have `flat-linux-module-directory` accept a list of packages from which t=
o find module names, not just a single package.
* Remove more code from `(operating-system-directory-base-entries os)`, and=
 put the creation of the `"initrd"` file into a service, in much the same w=
ay that my patch does (unless there's an existing more-guixy way of putting=
 files into `initrd`?).
  * Create a service type that gathers packages whose modules are to be add=
ed to the `initrd`, and if that list is non-empty, pass it to a new key `#:=
extra-linux-module-packages` of the `initrd` function.
    * `raw-initrd` would then pass that field together with the `linux` arg=
ument to the modified `flat-linux-module-directory` procedure.
  * Create another service type that gathers module names to be loaded at `=
boot` and appends them to the `#:linux-modules` to the `initrd` function.
  * Modify the `kernel-module-options-service-type` to pass in options via =
kernel command line always, maybe.

Then ZFS module can get loaded early, at boot, before the switch from `init=
rd` root to the "real" root.

* Create a service type that gathers additional pre-mount actions, which `r=
aw-initrd` will accept as a new key `#:additional-pre-mount` and append to =
the `pre-mount` it passes to `boot-system`.
  * The `zfs-service-type` would then extend this service type to pass in a=
n action to perform a `zpool import -a -N`, which makes ZFS scan for device=
s containing ZFS pools.
* Somehow figure out a static build for the ZFS package, so we can use a st=
atically-linked `zpool` in the above.
  * The `zfs-service-type` already inherits a ZFS package from the given `b=
ase-package`, I imagine it would be possible to make further inheritance wh=
ich modifies the build to be static.  It does require an additional build, =
though.  Maybe an additional `root-on-zfs?` field in `zfs-configuration` ca=
n gate this, so that we don't add the static build and extend the boot scri=
pt if `(not root-on-zfs?)` (i.e. use `kernel-module-configuration-service-t=
ype` if `(not root-on-zfs?)`, else use the new put-it-in-the-initrd service=
 types).
* Modify the various checks elsewhere so that ZFS poolnames can be passed a=
s the `device` field of `file-system` records.  See https://issues.guix.gnu=
.org/45643#3
  * Then the installer can be modified so that if ZFS is included with the =
installer's profile, it can look at ZFS pools and offer to install to a ZFS=
 pool instead of a `/dev` partition directly, then add `(file-system (devic=
e "rootpool") (mountpoint "/") (type "zfs"))` and the appropriate `zfs-serv=
ice-type` and etc. and now we get `/` on ZFS.

But that can come later, much much later, I just need ZFS, *any* ZFS, befor=
e RAID5 eats more of my homework.

Thanks
raid5atemyhomework


> > But I guess the ZFS Linux kernel module can't be built-in into the kern=
el
> > anyway.
> > But that's a special case--in general, it's very much possible to make =
modules
> > built-in.
>
> ZFScan be built-in to the kernel, Ubuntu does it. You can't distribute it=
 like that (Ubuntu distributes it like that but presumably they have enough=
 lawyers to muddy the waters so that they can get away with it), but as the=
 documentation in this patch notes: the user has every right to do whatever=
 they want on the machine they own, including build a Linux kernel that has=
 ZFS built-in and run it, they just can't make that version available to so=
mebody else.
>
> So to go whole-hog, we would have a service that replaces the kernel pack=
age and inserts kernel module sources in-tree somehow, then compiles Linux-=
libre on the user's machine. That would probably be a lot more painful to i=
nstall ZFS with (the user has to recompile the whole kernel at each update =
of either kernel or ZFS, whereas with a kernel module the user has to recom=
pile just the kernel module), so maybe kernel module is still better overal=
l.
>
> > > -                         ;; You'd think we could've used kernel-modu=
le-loader-service-type,
> > >
> > >
> >
> > Definitely.
> >
> > > -                         ;; but the kernel-module-loader shepherd se=
rvice is dependent on
> > >
> > >
> > > -                         ;; file-systems,
> > >
> > >
> >
> > Yes--but why is that dependent on 'file-systems ? Is it because it need=
s /proc ?
> > Or is it an oversight ? I would prefer to get rid of this dependency an=
d then
> > use kernel-module-loader-service-type.
>
> Dunno --- one VM I tested, I removed the`zfs-scan-automount` shepherd ser=
vice from the `file-systems` target, and the VM still wouldn't boot, claimi=
ng a stack overflow (the same error which I got when I was still trying to =
use kernel-module-loader-service-type here). Or maybe I just got confused w=
ith which VM was which, testing VMs wasn't a stress-free vacation. I just w=
ant ZFS, because MD RAID5 ate my homework, this is getting tiresome...
>
> One thing I notice about `kernel-module-loader-service-type` is that it's=
 not instantiated in essential services, or indeed anywhere in Guix. A few =
services do extend it. But my very rough understanding is that if you're go=
ing to extend a service, it had better be instantiated once in the list of =
services.
>
> In particular I note that the documentation for `kernel-module-loader-ser=
vice-type` shows an example where it uses `service` to program the `kernel-=
module-loader-service-type`, not `simple-service`. This suggests to me that=
 `kernel-module-loader-service-type` is broken because it's not in the list=
 of essential services but is extensible. Maybe. It's designed as an extens=
ible service, but isn't instantiated at default. Maybe that's what really b=
it me and not the shepherd circular dependency loop? shrug
>
> > Also, this manual loading of kernel modules is not supposed to be the w=
ay to
> > do things in Linux. That a kernel module was compiled as a module is
> > an implementation detail--so Linux should (and usually does) automatica=
lly
> > load kernel modules the first time a device for them is accessed (after=
 all,
> > how would user space know whether something is compiled as a module or
> > built-in--that would be too much to ask).
>
> So how do I get ZFS loaded? Note that the devices it targets are block de=
vices and it needs to scan for block devices that are formatted for ZFS. Do=
 other filesystems have some autoload rule?
>
> Thanks
> raid5atemyhomework






Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Jan 2021 05:38:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 07 00:38:38 2021
Received: from localhost ([127.0.0.1]:46102 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxO0L-0007Fa-CU
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 00:38:38 -0500
Received: from lists.gnu.org ([209.51.188.17]:43880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxO04-0007FA-10
 for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 00:38:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39102)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxO02-0004Bt-AU
 for guix-patches@HIDDEN; Thu, 07 Jan 2021 00:38:18 -0500
Received: from mail-40135.protonmail.ch ([185.70.40.135]:28105)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxNzy-0007jK-7x
 for guix-patches@HIDDEN; Thu, 07 Jan 2021 00:38:17 -0500
Date: Thu, 07 Jan 2021 05:38:05 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609997890;
 bh=wV4po8bvpOhi9FVXRrjBOgBSUnNRGk1sLkxlx5jP/TQ=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=BEhekRIV6PzW1qiyGRdO2+tNdlhndCBXjmutt2iiOJ3+43drwyc5kuJqwnM+2Oy9M
 IAUuuN/aAew5QamRVaBZFKaVJ70l7EcOsDX5mQ5a6iZb7X9d07a4bYSHPwdNtXB9wt
 Uyoh9BL4OTHLw6sK7WU3+qC3Wa6RGuCho3GtCe4M=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: kernel-module-configuration-service for configuring kernel
 parameters
Message-ID: <7kahfDckMJIQd8o2gH_zQ-G9ORP_P0w-VD44R2OJHNP6rJHss8przoTyObTYxx_UEI5CERTD3OlGORnTCBmZA2VMASWpF2Ea0Hx1ZAbUh-I=@protonmail.com>
In-Reply-To: <pilwAVCb0NEG83BVTSEqXkLCNEvBBrnb-QyKV_9PoF4xuCjSXKuF-F3_L5lSOke5BRjagVrUoSzJCST1fkigF162f9j76K12jBraNMAj7E4=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <20210106204134.38e83db4@HIDDEN>
 <pilwAVCb0NEG83BVTSEqXkLCNEvBBrnb-QyKV_9PoF4xuCjSXKuF-F3_L5lSOke5BRjagVrUoSzJCST1fkigF162f9j76K12jBraNMAj7E4=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
Received-SPF: pass client-ip=185.70.40.135;
 envelope-from=raid5atemyhomework@HIDDEN; 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=unavailable autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: "ludo@HIDDEN" <ludo@HIDDEN>,
 raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
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 Danny,

> > See also https://issues.guix.info/issue/42193 for an earlier attempt (w=
hich
> > is already very far--but it has a bug somewhere). There's also already =
a
> > kernel profile thing like you wrote in that patchset.
> > (Note that I would prefer there not to be a "LOAD?" in there because it
> > confuses loading the module (which is usually NOT started by user space
> > but by the kernel on its own) and confguring the module (which has to b=
e
> > done by user space because it's specifying policy, not mechanism))
>
> Looks like that patchset was merged in, so basically I can just depend on=
 that? So the first patch in this patchset would be dropped?

No, sorry, my mistake, only one patch completely unrelated to the actual ne=
w service type was merged in.

In any case --- is this objection something that would block this patchset =
from being added to Guix? I appreciate that we should "do it right" --- but=
 there's also an argument for "keep it simple", and the first patch in this=
 patchset gets us a good part of the way to what is needed.

It seems that my patch is equivalent to the existing WIP 2/6 `kernel-profil=
e-service-type`, so maybe I can just steal that patch for now, write tests =
specific for it, and get on with running ZFS in production?

Can we at least get patch 3/4 of *this* patchset merged since it's a trivia=
l bugfix?  How about patch 2/4, which is not so trivial, but does give some=
 flexibility in case other filesystems want to be as ambitious as ZFS is?

I imagine a later, much more comprehensive `kernel-module-configuration-ser=
vice-type` can be built on top of `kernel-profile-service-type`, `kernel-mo=
dule-loader-service-type`, and a later `kernel-module-options-service-type`=
.  Then `zfs-service-type` can be modified to use that `kernel-module-confi=
guration-service-type` instead of rolling its own bits and pieces.

----

On the other hand, if we want to think of `/` on ZFS, then we need a notion=
 of kernel modules that are added to the `initrd` file, rather than to the =
`kernel` directory.

Diving into `gnu/system/linux-initrd.scm`, I note that we can provide a ker=
nel package and a list of modules to copy from the kernel package to the `i=
nitrd` by a `(flat-linux-module-directory linux modules)` function.

I imagine that it would be possible to modify this as follows:

* Have `flat-linux-module-directory` accept a list of packages from which t=
o find module names, not just a single package.
* Remove more code from `(operating-system-directory-base-entries os)`, and=
 put the creation of the `"initrd"` file into a service, in much the same w=
ay that my patch does (unless there's an existing more-guixy way of putting=
 files into `initrd`?).
  * Create a service type that gathers packages whose modules are to be add=
ed to the `initrd`, and if that list is non-empty, pass it to a new key `#:=
extra-linux-module-packages` of the `initrd` function.
    * `raw-initrd` would then pass that field together with the `linux` arg=
ument to the modified `flat-linux-module-directory` procedure.
  * Create another service type that gathers module names to be loaded at `=
boot` and appends them to the `#:linux-modules` to the `initrd` function.
  * Modify the `kernel-module-options-service-type` to pass in options via =
kernel command line always, maybe.

Then ZFS module can get loaded early, at boot, before the switch from `init=
rd` root to the "real" root.

* Create a service type that gathers additional pre-mount actions, which `r=
aw-initrd` will accept as a new key `#:additional-pre-mount` and append to =
the `pre-mount` it passes to `boot-system`.
  * The `zfs-service-type` would then extend this service type to pass in a=
n action to perform a `zpool import -a -N`, which makes ZFS scan for device=
s containing ZFS pools.
* Somehow figure out a static build for the ZFS package, so we can use a st=
atically-linked `zpool` in the above.
  * The `zfs-service-type` already inherits a ZFS package from the given `b=
ase-package`, I imagine it would be possible to make further inheritance wh=
ich modifies the build to be static.  It does require an additional build, =
though.  Maybe an additional `root-on-zfs?` field in `zfs-configuration` ca=
n gate this, so that we don't add the static build and extend the boot scri=
pt if `(not root-on-zfs?)` (i.e. use `kernel-module-configuration-service-t=
ype` if `(not root-on-zfs?)`, else use the new put-it-in-the-initrd service=
 types).
* Modify the various checks elsewhere so that ZFS poolnames can be passed a=
s the `device` field of `file-system` records.  See https://issues.guix.gnu=
.org/45643#3
  * Then the installer can be modified so that if ZFS is included with the =
installer's profile, it can look at ZFS pools and offer to install to a ZFS=
 pool instead of a `/dev` partition directly, then add `(file-system (devic=
e "rootpool") (mountpoint "/") (type "zfs"))` and the appropriate `zfs-serv=
ice-type` and etc. and now we get `/` on ZFS.

But that can come later, much much later, I just need ZFS, *any* ZFS, befor=
e RAID5 eats more of my homework.

Thanks
raid5atemyhomework


> > But I guess the ZFS Linux kernel module can't be built-in into the kern=
el
> > anyway.
> > But that's a special case--in general, it's very much possible to make =
modules
> > built-in.
>
> ZFScan be built-in to the kernel, Ubuntu does it. You can't distribute it=
 like that (Ubuntu distributes it like that but presumably they have enough=
 lawyers to muddy the waters so that they can get away with it), but as the=
 documentation in this patch notes: the user has every right to do whatever=
 they want on the machine they own, including build a Linux kernel that has=
 ZFS built-in and run it, they just can't make that version available to so=
mebody else.
>
> So to go whole-hog, we would have a service that replaces the kernel pack=
age and inserts kernel module sources in-tree somehow, then compiles Linux-=
libre on the user's machine. That would probably be a lot more painful to i=
nstall ZFS with (the user has to recompile the whole kernel at each update =
of either kernel or ZFS, whereas with a kernel module the user has to recom=
pile just the kernel module), so maybe kernel module is still better overal=
l.
>
> > > -                         ;; You'd think we could've used kernel-modu=
le-loader-service-type,
> > >
> > >
> >
> > Definitely.
> >
> > > -                         ;; but the kernel-module-loader shepherd se=
rvice is dependent on
> > >
> > >
> > > -                         ;; file-systems,
> > >
> > >
> >
> > Yes--but why is that dependent on 'file-systems ? Is it because it need=
s /proc ?
> > Or is it an oversight ? I would prefer to get rid of this dependency an=
d then
> > use kernel-module-loader-service-type.
>
> Dunno --- one VM I tested, I removed the`zfs-scan-automount` shepherd ser=
vice from the `file-systems` target, and the VM still wouldn't boot, claimi=
ng a stack overflow (the same error which I got when I was still trying to =
use kernel-module-loader-service-type here). Or maybe I just got confused w=
ith which VM was which, testing VMs wasn't a stress-free vacation. I just w=
ant ZFS, because MD RAID5 ate my homework, this is getting tiresome...
>
> One thing I notice about `kernel-module-loader-service-type` is that it's=
 not instantiated in essential services, or indeed anywhere in Guix. A few =
services do extend it. But my very rough understanding is that if you're go=
ing to extend a service, it had better be instantiated once in the list of =
services.
>
> In particular I note that the documentation for `kernel-module-loader-ser=
vice-type` shows an example where it uses `service` to program the `kernel-=
module-loader-service-type`, not `simple-service`. This suggests to me that=
 `kernel-module-loader-service-type` is broken because it's not in the list=
 of essential services but is extensible. Maybe. It's designed as an extens=
ible service, but isn't instantiated at default. Maybe that's what really b=
it me and not the shepherd circular dependency loop? shrug
>
> > Also, this manual loading of kernel modules is not supposed to be the w=
ay to
> > do things in Linux. That a kernel module was compiled as a module is
> > an implementation detail--so Linux should (and usually does) automatica=
lly
> > load kernel modules the first time a device for them is accessed (after=
 all,
> > how would user space know whether something is compiled as a module or
> > built-in--that would be too much to ask).
>
> So how do I get ZFS loaded? Note that the devices it targets are block de=
vices and it needs to scan for block devices that are formatted for ZFS. Do=
 other filesystems have some autoload rule?
>
> Thanks
> raid5atemyhomework






Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 7 Jan 2021 00:04:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 19:04:13 2021
Received: from localhost ([127.0.0.1]:45913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxImj-0007p6-7Z
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 19:04:13 -0500
Received: from mail-40135.protonmail.ch ([185.70.40.135]:10114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxImg-0007or-U0
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 19:04:11 -0500
Date: Thu, 07 Jan 2021 00:04:02 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609977844;
 bh=d3Ry/xjDaP+dE6gE2ujwfTaJHs3PWHZ1uPkKd4mERVY=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=movietufHyBuzlxm4+HNuyzY07Jp8L1HSwhvFyHXR6tDIX58we/ica2El8hg0Oe8o
 yh6EiwnKBdBCUk0WSewdsHp7vN/Tgv8HvEqRxYG0dHmyUP33cyxQKAyXbT4H9ktTV7
 7OJkgTlWw0KYS+gNcCRO5M2eTKxJWwZdpfrgY0tE=
To: Danny Milosavljevic <dannym@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: Re: kernel-module-configuration-service for configuring kernel
 parameters
Message-ID: <pilwAVCb0NEG83BVTSEqXkLCNEvBBrnb-QyKV_9PoF4xuCjSXKuF-F3_L5lSOke5BRjagVrUoSzJCST1fkigF162f9j76K12jBraNMAj7E4=@protonmail.com>
In-Reply-To: <20210106204134.38e83db4@HIDDEN>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
 <20210106204134.38e83db4@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
Cc: "ludo@HIDDEN" <ludo@HIDDEN>,
 raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Danny,


> See also https://issues.guix.info/issue/42193 for an earlier attempt (whi=
ch
> is already very far--but it has a bug somewhere). There's also already a
> kernel profile thing like you wrote in that patchset.
> (Note that I would prefer there not to be a "LOAD?" in there because it
> confuses loading the module (which is usually NOT started by user space
> but by the kernel on its own) and confguring the module (which has to be
> done by user space because it's specifying policy, not mechanism))

Looks like that patchset was merged in, so basically I can just depend on t=
hat? So the first patch in this patchset would be dropped?

> But I guess the ZFS Linux kernel module can't be built-in into the kernel
> anyway.
>
> But that's a special case--in general, it's very much possible to make mo=
dules
> built-in.

ZFS *can* be built-in to the kernel, Ubuntu does it. You can't distribute i=
t like that (Ubuntu distributes it like that but presumably they have enoug=
h lawyers to muddy the waters so that they can get away with it), but as th=
e documentation in this patch notes: the user has every right to do whateve=
r they want on the machine they own, including build a Linux kernel that ha=
s ZFS built-in and run it, they just can't make that version available to s=
omebody else.

So to go whole-hog, we would have a service that replaces the kernel packag=
e and inserts kernel module sources in-tree somehow, then compiles Linux-li=
bre on the user's machine. That would probably be a lot more painful to ins=
tall ZFS with (the user has to recompile the whole kernel at each update of=
 either kernel or ZFS, whereas with a kernel module the user has to recompi=
le just the kernel module), so maybe kernel module is still better overall.


> > -                       ;; You'd think we could've used kernel-module-l=
oader-service-type,
> >
> >
>
> Definitely.
>
> > -                       ;; but the kernel-module-loader shepherd servic=
e is dependent on
> >
> >
> > -                       ;; file-systems,
> >
> >
>
> Yes--but why is that dependent on 'file-systems ? Is it because it needs =
/proc ?
> Or is it an oversight ? I would prefer to get rid of this dependency and =
then
> use kernel-module-loader-service-type.

Dunno --- one VM I tested, I removed the `zfs-scan-automount` shepherd serv=
ice from the `file-systems` target, and the VM still wouldn't boot, claimin=
g a stack overflow (the same error which I got when I was still trying to u=
se kernel-module-loader-service-type here).  Or maybe I just got confused w=
ith which VM was which, testing VMs wasn't a stress-free vacation.  I just =
want ZFS, because MD RAID5 ate my homework, this is getting tiresome...

One thing I notice about `kernel-module-loader-service-type` is that it's n=
ot instantiated in essential services, or indeed anywhere in Guix.  A few s=
ervices *do* extend it.  But my **very rough** understanding is that if you=
're going to extend a service, it had better be instantiated *once* in the =
list of services.

In particular I note that the documentation for `kernel-module-loader-servi=
ce-type` shows an example where it uses `service` to program the `kernel-mo=
dule-loader-service-type`, not `simple-service`.  This suggests to me that =
`kernel-module-loader-service-type` is broken because it's not in the list =
of essential services but is extensible.  Maybe.  It's designed as an exten=
sible service, but isn't instantiated at default.  Maybe that's what really=
 bit me and not the shepherd circular dependency loop? *shrug*


>
> Also, this manual loading of kernel modules is not supposed to be the way=
 to
> do things in Linux. That a kernel module was compiled as a module is
> an implementation detail--so Linux should (and usually does) automaticall=
y
> load kernel modules the first time a device for them is accessed (after a=
ll,
> how would user space know whether something is compiled as a module or
> built-in--that would be too much to ask).

So how do I get ZFS loaded? Note that the devices it targets are block devi=
ces and it needs to scan for block devices that are formatted for ZFS.  Do =
other filesystems have some autoload rule?

Thanks
raid5atemyhomework




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 19:41:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 14:41:45 2021
Received: from localhost ([127.0.0.1]:45619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxEgj-0001Ib-17
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 14:41:45 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:39156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1kxEgg-0001IS-AT
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 14:41:43 -0500
Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at
 [80.110.127.104])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id B8C183365398;
 Wed,  6 Jan 2021 20:41:39 +0100 (CET)
Date: Wed, 6 Jan 2021 20:41:34 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
Subject: kernel-module-configuration-service for configuring kernel parameters
Message-ID: <20210106204134.38e83db4@HIDDEN>
In-Reply-To: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
References: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
 <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/xXlbAOfUGZoWGj8WvcLyYPd";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 45692
Cc: raid5atemyhomework <raid5atemyhomework@HIDDEN>, ludo@HIDDEN,
 raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN>,
 "45692 <at> debbugs.gnu.org" <45692 <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: -0.5 (/)

--Sig_/xXlbAOfUGZoWGj8WvcLyYPd
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi raid5atemyhomework,
Hi everyone,

@raid5atemyhomework, thanks for all the patches!

On Wed, 06 Jan 2021 15:57:19 +0000
raid5atemyhomework via Guix-patches via <guix-patches@HIDDEN> wrote:

> +@item @code{options} (default: @code{'()})
> +A list of string options to pass as options to the ZFS module.

> +These will be put in a @file{/etc/modprobe.d/zfs.conf} file,
> +for example setting this to @code{'("zfs_admin_snapshot=3D1"
> +"zfs_trim_extent_bytes_min=3D0")} will create the following file:

Sure, but it would be better to create a way to configure those module para=
meters
in Guix in a declarative way, first.

Your new kernel-loadable-module-service-type would be a good template
to write a kernel-module-configuration-service that can be extended by
other services.  The latter should allow users to parametrize the kernel
in general via the operating-system form, and also allow services to extend
such configuration (with merging, and conflict detection).

It would be used:

(1) To declaratively specify the contents of something like /etc/modprobe.d=
 .
It shouldn't even be called "/etc/modprobe.d"--it should also be in the sto=
re
instead.  This directory is only useful for non-Linux-builtins.

(2) If the "module" is built-in then the kernel command line must get the
options instead.  (in fact, it works as a kernel command line option also
if it's a loadable module--so not sure we need /etc/modprobe.d at all--at
least at first.  But there's probably a maximal length for the kernel comma=
nd
line that we could exceed if we did that long term)

I know it's annoying that Guix doesn't have this facility already, but the
time to introduce an interface for /etc/modprobe.d and the kernel command
line for builtin modules is before other services introduce their own
ad hoc way to create /etc/modprobe.d--like this tries to do here.

See also https://issues.guix.info/issue/42193 for an earlier attempt (which
is already very far--but it has a bug somewhere).  There's also already a
kernel profile thing like you wrote in that patchset.
(Note that I would prefer there not to be a "LOAD?" in there because it
confuses loading the module (which is usually NOT started by user space
but by the kernel on its own) and confguring the module (which has to be
done by user space because it's specifying policy, not mechanism))

Also, because the kernel usually loads loadable modules on its own (potenti=
ally
really early), /etc/modprobe.d has to be preset and known to the modprobe
executable VERY EARLY (via environment variable MODPROBE_OPTIONS--see=20
gnu/services.scm %modprobe-wrapper).

It is totally possible that some modules in the initrd need options, too
(see load-linux-modules-from-directory for where this would need to go).
load-linux-module/fd already accepts options and flags--but both are not gi=
ven
on the call.  For this, part of future kernel-module-configuration entries
(the ones needed for modules in the initrd) should be copied into the initr=
d,
too.

Then there's the handoff between initrd and main system.  It would be bad
if the kernel tried and succeeded to load a module that is not in the initrd
just before the modprobe.d directory is set up (because it would be loaded
without passing the options the user configured)--so that needs to be avoid=
ed.

@ludo: Could you help here?

> +@example
> +options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0

Note:

This can be usefully put in a modprobe.d-like directory if zfs is a module,=
 but
not if it's built into the kernel.  But it can be put into the kernel comma=
nd
line in both cases.

But I guess the ZFS Linux kernel module can't be built-in into the kernel
anyway.

But that's a special case--in general, it's very much possible to make modu=
les
built-in.

> +                     ;; You'd think we could've used kernel-module-loade=
r-service-type,

Definitely.

> +                     ;; but the kernel-module-loader shepherd service is=
 dependent on
> +                     ;; file-systems,=20

Yes--but why is that dependent on 'file-systems ? Is it because it needs /p=
roc ?
Or is it an oversight ?  I would prefer to get rid of this dependency and t=
hen
use kernel-module-loader-service-type.

Also, this manual loading of kernel modules is not supposed to be the way to
do things in Linux.  That a kernel module was compiled as a module is
an *implementation detail*--so Linux should (and usually does) automatically
load kernel modules the first time a device for them is accessed (after all,
how would user space know whether something is compiled as a module or
built-in--that would be too much to ask).

Linux is not a microkernel, so the kind of modularily modprobe.d suggests
exists does not in fact exist in kernel space--even though Linux does a good
job faking it:  modprobe.d contains:

* "alias": a feature to configure aliases, with wildcards (only one level of
aliases allowed!)
* "options" per module (also works for aliases with wildcards!  That will be
"fun" to map to Guix)
* "install" in order to run some custom executable instead of loading the
module.
* "remove" in order to run some custom executable instead of unloading the
module.
* "blacklist" to ignore specific internal aliases of a module (that does
not do what one would intuitively think!).

If the file name of the regular file under /etc/modprobe.d is not used for
anything, then we can just have one file /gnu/store/*modprobe.d/guix.conf
in total in there.

Then there are sysctl kernel parameters--but those Guix already exposes via
sysctl-service-type.  But those should also be made able to be extended
by other services, and merge conflicts should be handled.  For example, use=
rs
often set net.ipv4.ip_forward=3D1 (for example via sysctl).

Thank you for all your effort to make ZFS work nicely in Guix.

--Sig_/xXlbAOfUGZoWGj8WvcLyYPd
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl/2Em4ACgkQ5xo1VCww
uqX7VQf/bHxCWBZt0FXRb5E0zvb0AZVwMPajkYvOBjfXJC+XcMbgjP3FKNW7VLGK
FakRsyWnVX6gtFPxUDImjnCIGcY5LGYuaHxnDR4CTqzDBb06LRAMeJ1YTIyr+j+S
ZO17TG4hZa+xWLqM6MUpfEwuc1I/b5o9oN39XJJLJAWJOdXMi2ZGwOKY8dpYhaDw
zDPoOb3xHj9oDyXyWjOfb/8VK8bF8+L9Fzy3Bjt2WiG58j5jXpkYz9ZQe3zA1hbH
zwFmmKqkFbL2gFhTxGWuQrp6x29T60lzBwUcjG58waCQee23TVFR9K/v7fvjrBal
kHMS+9/Dc8FBIdzlHAbxj8/74qYkUQ==
=nYdc
-----END PGP SIGNATURE-----

--Sig_/xXlbAOfUGZoWGj8WvcLyYPd--




Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:57:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 10:57:39 2021
Received: from localhost ([127.0.0.1]:45316 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxBBr-00026v-6W
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:57:39 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:58035)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxBBo-00026g-BU
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:57:37 -0500
Date: Wed, 06 Jan 2021 15:57:19 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609948650;
 bh=+sTyLZEtmpxQDhHBaG434JA++LcD2ayQQpzePuQHEZA=;
 h=Date:To:From:Reply-To:Subject:From;
 b=pDHYImwpaLjyZKWrvu29YmIeXLLBERImkycZhPKKsQY8wxoEGwFv9CZBk9gJc6W8L
 Wsx9OptfvpV592a2cuCo9Aoe8lTMtBvqfKFotPtY3OPXklyIqyRZjiB6fFBVWrYNDS
 YMk0s/18a3u7CYDmfxK/QHJODP5ZGUNj32uvhtyM=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH 4/4] gnu: Add ZFS service.
Message-ID: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From deded39fe88c44a18b0b66bab8c4300aca4c387e Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Wed, 6 Jan 2021 09:24:20 +0800
Subject: [PATCH 4/4] gnu: Add ZFS service.

* gnu/services/file-systems.scm: New file.
(zfs-service-type): New variable.
(zfs-configuration): New variable.
(zfs-configuration?): New procedure.
* gnu/local.mk: Add gnu/services/file-systems.scm.
* doc/guix.texi (ZFS file system): New subsection.
---
 doc/guix.texi                 | 107 ++++++++++++++++++++++++++
 gnu/local.mk                  |   2 +
 gnu/services/file-systems.scm | 136 ++++++++++++++++++++++++++++++++++
 3 files changed, 245 insertions(+)
 create mode 100644 gnu/services/file-systems.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index 78770151e3..62437083cb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13885,6 +13885,113 @@ a file system declaration such as:
 compress-force=3Dzstd,space_cache=3Dv2"))
 @end lisp

+@node ZFS file system
+@subsection ZFS file system
+
+The ZFS file system has a license incompatible with the Linux kernel,
+and thus cannot be distributed with the kernel. However, as a user
+you have the right to do whatever you want on your own hardware,
+including download the ZFS source code, compile it, link it to your
+own private copy of Linux, and run it. You can even use the Guix build
+system to automate this.
+
+As a large and complex kernel module, ZFS on Linux has to be compiled
+with a specific version of the kernel. Often even the latest ZFS
+package available cannot be compiled with the latest Linux kernel
+package provided by Guix System. Thus, installing the @code{zfs}
+package is likely to fail.
+
+Instead, you have to use an older long-term-support Linux kernel.
+Do not use @code{linux-libre-lts} as the latest long-term-support
+kernel might be too new for the ZFS package; instead, explicitly
+select the version number, like @code{linux-libre-5.4}.
+
+Then, you have to modify your system configuration file and use the
+selected older kernel, and add the @code{zfs-service-type} service.
+
+@lisp
+(use-modules (gnu))
+(use-package-modules
+   ; @dots{}
+   linux)
+(use-service-modules
+   ; @dots{}
+   file-systems)
+
+(define my-kernel linux-libre-5.4)
+
+(operating-system
+  (kernel my-kernel)
+  ;; @dots{}
+  (services
+    (cons* (service zfs-service-type
+             (zfs-configuration
+               (kernel my-kernel)))
+           ; @dots{}
+           %desktop-services))
+  ;; @dots{}
+  )
+@end lisp
+
+@defvr {Scheme Variable} zfs-service-type
+This is the type of the service to compile and install OpenZFS to
+your operating system. It loads the ZFS module at startup, imports
+pools, mounts automounted ZFS datasets, installs the ZFS command
+line tools, and can provide module options for the ZFS module.  Its
+value must be a @code{zfs-configuration} record (see below).
+
+Here is an example use:
+
+@lisp
+(service zfs-service-type
+  (zfs-configuration
+    (kernel linux-libre-5.4)
+    (options '("zfs_arc_max=3D5000000000"))))
+@end lisp
+@end defvr
+
+@deftp {Data Type} zfs-configuration
+This data type represents the configuration of the ZFS service.
+The available fields are:
+
+@table @asis
+@item @code{kernel}
+The package of the Linux kernel to compile ZFS for. Required.
+
+@item @code{base-zfs} (default: @code{zfs})
+The ZFS package to use. It will be modified to use the indicated
+kernel.
+
+@item @code{options} (default: @code{'()})
+A list of string options to pass as options to the ZFS module.
+These will be put in a @file{/etc/modprobe.d/zfs.conf} file,
+for example setting this to @code{'("zfs_admin_snapshot=3D1"
+"zfs_trim_extent_bytes_min=3D0")} will create the following file:
+
+@example
+options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0
+@end example
+@end table
+@end deftp
+
+Once your system has been configured to include the ZFS service
+and you have restarted the system, you can manage ZFS pools and
+datasets with @code{zpool} and @code{zfs} commands.
+
+ZFS datasets with an appropriate @code{mountpoint} property will
+be automounted at startup after the root file system is started.
+Encrypted datasets that are automounted will cause boot to pause
+and prompt for the password to be provided on the console.
+
+It's possible to have a ZFS dataset as your @code{/home} by simply
+setting the @code{mountpoint} property. However, note that ZFS will
+refuse to mount over a non-empty directory, so if your root
+filesystem already has a non-empty @code{/home}, you should remove
+it and its contents, then restart the system.
+
+Having ZFS as a root filesystem or as @code{/boot} is not supported
+yet.
+
 @node Mapped Devices
 @section Mapped Devices

diff --git a/gnu/local.mk b/gnu/local.mk
index 53a67e6ffe..49073ac2ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -39,6 +39,7 @@
 # Copyright =C2=A9 2020 Martin Becze <mjbecze@HIDDEN>
 # Copyright =C2=A9 2020 Malte Frank Gerdes <mate.f.gerdes@HIDDEN>
 # Copyright =C2=A9 2020 Vinicius Monego <monego@HIDDEN>
+# Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmail.=
com>
 #
 # This file is part of GNU Guix.
 #
@@ -601,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\
   %D%/services/dict.scm=09=09=09=09\
   %D%/services/dns.scm=09=09=09=09\
   %D%/services/docker.scm=09=09=09\
+  %D%/services/file-systems.scm=09=09=09\
   %D%/services/authentication.scm=09=09\
   %D%/services/games.scm=09=09=09\
   %D%/services/ganeti.scm=09=09=09\
diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm
new file mode 100644
index 0000000000..7a92a2b9d5
--- /dev/null
+++ b/gnu/services/file-systems.scm
@@ -0,0 +1,136 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services file-systems)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services shepherd)
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix records)
+  #:export (zfs-service-type
+            zfs-configuration
+            zfs-configuration?))
+
+(define-record-type* <zfs-configuration>
+  zfs-configuration make-zfs-configuration zfs-configuration?
+  ; kernel you want to compile the base-zfs module for.
+  (kernel     zfs-configuration-kernel)
+  ; base package that will be compiled for the kernel
+  (base-zfs   zfs-configuration-base-zfs  (default zfs))
+  ; list of string options.
+  (options    zfs-configuration-options   (default '())))
+
+(define (make-zfs-package conf)
+  (let ((base-zfs (zfs-configuration-base-zfs conf))
+        (kernel   (zfs-configuration-kernel conf)))
+    (package
+      (inherit base-zfs)
+      (name (string-join (list (package-name base-zfs)
+                               "for"
+                               (package-name kernel)
+                               (package-version kernel)
+                               "version")
+                         "-"))
+      (arguments (cons* #:linux kernel (package-arguments base-zfs))))))
+
+(define (zfs-loadable-module conf)
+  (list (list (make-zfs-package conf) "module")))
+
+(define (zfs-shepherd-services conf)
+  (let* ((zfs-package (make-zfs-package conf))
+         (zpool       (file-append zfs-package "/sbin/zpool")))
+    (list
+      (shepherd-service
+        (documentation "Scans for ZFS pools and automounts filesystems.")
+        (provision '(zfs-scan-automount))
+        (requirement '(root-file-system))
+        (modules `((srfi srfi-1)
+                   (srfi srfi-34)
+                   (srfi srfi-35)
+                   (rnrs io ports)
+                   ,@%default-modules))
+        (start #~(lambda _
+                   (and
+                     ;; You'd think we could've used kernel-module-loader-=
service-type,
+                     ;; but the kernel-module-loader shepherd service is d=
ependent on
+                     ;; file-systems, and file-systems is made dependent o=
n this
+                     ;; service. And we need the kernel module to be loade=
d before we
+                     ;; scan for ZFS pools. So break the dependency loop b=
y just
+                     ;; loading ZFS module here by ourselves.
+                     (or (file-exists? "/proc/sys/kernel/modprobe")
+                         (begin
+                           (format (current-error-port) "error loading 'zf=
s' module: ~a~%"
+                                   "Kernel is missing loadable module supp=
ort.")
+                           #f))
+                     (guard (c ((message-condition? c)
+                                (format (current-error-port)
+                                        "error loading 'zfs' module: ~a~%"
+                                        (condition-message c))
+                                #f))
+                       (let ((modprobe (call-with-input-file "/proc/sys/ke=
rnel/modprobe"
+                                                             get-line)))
+                         (invoke/quiet modprobe "--" "zfs")))
+
+                     ; scan for pools and automount contained datasets.
+                     (guard (c ((message-condition? c)
+                                (format (current-error-port)
+                                        "error importing zpools: ~a~%"
+                                        (condition-message?))
+                                #f))
+                       ;; (current-output-port) is typically connected to =
/dev/klog,
+                       ;; so redirect it to (current-error-port) so that u=
ser can see
+                       ;; prompts for passphrases on console
+                       (with-output-to-port (current-error-port)
+                         (lambda ()
+                           (invoke #$zpool "import" "-a" "-l")))))))
+        (stop #~(const #t))))))
+
+(define (zfs-profile-service conf)
+  (list (make-zfs-package conf)))
+
+(define (zfs-etc-service conf)
+  (let ((options (zfs-configuration-options conf)))
+    (if (null? options)
+        '()
+        `(("modprobe.d/zfs.conf"
+           ,(plain-file "zfs.conf"
+                        (string-join (cons "options zfs" options) " ")))))=
))
+
+(define zfs-service-type
+  (service-type (name 'zfs)
+                (extensions
+                  (list
+                    ; install the kernel module
+                    (service-extension kernel-loadable-module-service-type
+                                       zfs-loadable-module)
+                    ; load ZFS module, scan ZFS pools, and automount files=
ystems
+                    (service-extension shepherd-root-service-type
+                                       zfs-shepherd-services)
+                    ; make sure automount occurs before file-systems targe=
t is reached
+                    (service-extension file-systems-target-service-type
+                                       (const '(zfs-scan-automount)))
+                    ; install ZFS management tools
+                    (service-extension profile-service-type
+                                       zfs-profile-service)
+                    ; install ZFS module options
+                    (service-extension etc-service-type
+                                       zfs-etc-service)))
+                (description
+                  "Install ZFS, an advanced filesystem and volume manager.=
")))
--
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:56:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 10:56:53 2021
Received: from localhost ([127.0.0.1]:45312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxBB6-00025P-S6
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:56:53 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:11179)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxBB3-000257-V9
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:56:51 -0500
Date: Wed, 06 Jan 2021 15:56:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609948604;
 bh=gPxzhvpUdKObuRlyTPGRFncAR7asLteqHD1lt9RsH7k=;
 h=Date:To:From:Reply-To:Subject:From;
 b=cUe8SFmJYjV/tomQQ1qLErI1yrkFiLs0IcJuZ2KgyxnY98g7ix6ei+7lclL2jzxNI
 0i6v2sHptSrx9LVXtjLUUifJQyYBZN+ilmlZ7qmge1NsH/BwikF8bVApzkfdT9FHhy
 ejV4MC4O8hHTCOBwGktzFbAsd0YVci+A99GhqVWE=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH 3/4] gnu: Fix ZFS package.
Message-ID: <acw65x5599Yvgtn3iJ_lyNBHCVnac88F4pw4NdemkLG-SFzy_URDm9Fp01CWjbIkNT-5UjqceOHDNBmZpakN0ifetm1ehaED4z65hHgUKwo=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From d1c88161f2a32f4c03de57ee9d7582cc6c40f6bc Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Tue, 5 Jan 2021 20:00:50 +0800
Subject: [PATCH 3/4] gnu: Fix ZFS package.

* gnu/packages/file-systems.scm (zfs): Correct "util-linux" input, add
separate "util-linux:lib" input.
---
 gnu/packages/file-systems.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 895ad069c5..2c5ad95d63 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -6,6 +6,7 @@
 ;;; Copyright =C2=A9 2019, 2020 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright =C2=A9 2020 Raghav Gururajan <raghavgururajan@HIDDEN>
 ;;; Copyright =C2=A9 2020 Morgan Smith <Morgan.J.Smith@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhoemwork <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -944,7 +945,8 @@ APFS.")
        ("openssl" ,openssl)
        ("python" ,python)
        ("python-cffi" ,python-cffi)
-       ("util-linux" ,util-linux "lib")
+       ("util-linux" ,util-linux)
+       ("util-linux:lib" ,util-linux "lib")
        ("zlib" ,zlib)))
     (home-page "https://zfsonlinux.org/")
     (synopsis "Native ZFS on Linux")
--
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:55:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 10:55:48 2021
Received: from localhost ([127.0.0.1]:45306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxBA4-000234-BS
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:55:48 -0500
Received: from mail-40137.protonmail.ch ([185.70.40.137]:29246)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxBA2-00022q-FJ
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:55:47 -0500
Date: Wed, 06 Jan 2021 15:55:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609948539;
 bh=GxSEl8pf4rtfbeKWy5CBrnQ7sXo8U9yJRByUJ+I7Dec=;
 h=Date:To:From:Reply-To:Subject:From;
 b=PIZTFn5cFfG4etRzfdqsEMGYg1hZ50+zw2uSaY9vK+EmRdZdhy1oZXYAYQTbPFkPY
 HDuyliz8kirBEiqps0zct0niWFD6s0xaOq27xiRVdtNBk7EX5+f8GjPrYSe9vn8ksw
 jdQ7I/ugFr2x/7sMHl7OWd4wkmTTXWY6VXes8eJw=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services.
Message-ID: <Mg_8FIL2l-Zd7f6rM0kLocdknqSlZfYwXsKBY88f0vqvn_pqTW3otQGnYeTcg1SLbUXuzsO0P5-O35udXT5-c-gzr21W0E0XEYTAbAkdlpI=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Wed, 6 Jan 2021 08:15:54 +0800
Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services.

* gnu/services/base.scm (file-system-shepherd-services): Move file-systems
shepherd service to ...
(file-systems-target-shepherd-services): ... new procedure here.
(file-systems-target-service-type): New variable.
(file-system-service-type): Extend file-systems-target service to add each
file-system as a requirement.
* gnu/system.scm (operating-system-default-essential-services): Instantiate
file-systems-target-service-type.
(hurd-default-essential-services): Instantiate file-systems-target-service-=
type.
---
 gnu/services/base.scm | 37 +++++++++++++++++++++++++++----------
 gnu/system.scm        |  2 ++
 2 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 945b546607..13cfb6a8a2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -13,6 +13,7 @@
 ;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
 ;;; Copyright =C2=A9 2020 Florian Pelz <pelzflorian@HIDDEN>
 ;;; Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -67,6 +68,7 @@
   #:export (fstab-service-type
             root-file-system-service
             file-system-service-type
+            file-systems-target-service-type
             swap-service
             host-name-service
             console-keymap-service
@@ -362,18 +364,29 @@ FILE-SYSTEM."
                        (gnu system file-systems)
                        ,@%default-modules)))))))

+(define (file-systems-target-shepherd-services requirements)
+  (list
+    (shepherd-service
+      (provision '(file-systems))
+      (requirement (cons* 'root-file-system 'user-file-systems requirement=
s))
+      (documentation "Target for all the initially-mounted file systems")
+      (start #~(const #t))
+      (stop #~(const #t)))))
+(define file-systems-target-service-type
+  (service-type
+    (name 'file-systems)
+    (extensions (list (service-extension shepherd-root-service-type
+                                         file-systems-target-shepherd-serv=
ices)))
+    (compose concatenate)
+    (extend append)
+    ;; Extensions can add new values to this list.
+    (default-value '())
+    (description "The @code{file-systems} service is the target that is st=
arted
+when all file systems have been mounted.")))
+
 (define (file-system-shepherd-services file-systems)
   "Return the list of Shepherd services for FILE-SYSTEMS."
   (let* ((file-systems (filter file-system-mount? file-systems)))
-    (define sink
-      (shepherd-service
-       (provision '(file-systems))
-       (requirement (cons* 'root-file-system 'user-file-systems
-                           (map file-system->shepherd-service-name
-                                file-systems)))
-       (documentation "Target for all the initially-mounted file systems")
-       (start #~(const #t))
-       (stop #~(const #f))))

     (define known-mount-points
       (map file-system-mount-point file-systems))
@@ -403,7 +416,7 @@ FILE-SYSTEM."
                            (filter (negate known?) (mount-points)))
                  #f))))

-    (cons* sink user-unmount
+    (cons* user-unmount
            (map file-system-shepherd-service file-systems))))

 (define (file-system-fstab-entries file-systems)
@@ -431,6 +444,10 @@ FILE-SYSTEM."
                        (service-extension fstab-service-type
                                           file-system-fstab-entries)

+                       ;; Have 'file-systems' depend on each declared file=
 system.
+                       (service-extension file-systems-target-service-type
+                                          (cut map file-system->shepherd-s=
ervice-name <>))
+
                        ;; Have 'user-processes' depend on 'file-systems'.
                        (service-extension user-processes-service-type
                                           (const '(file-systems)))))
diff --git a/gnu/system.scm b/gnu/system.scm
index 5c530f176e..6987641ee8 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -667,6 +667,7 @@ bookkeeping."
                     (operating-system-setuid-programs os))
            (service profile-service-type
                     (operating-system-packages os))
+           (service file-systems-target-service-type)
            other-fs
            (append mappings swaps

@@ -691,6 +692,7 @@ bookkeeping."
                                    (operating-system-groups os))
                            (operating-system-skeletons os))
           (root-file-system-service)
+          (service file-systems-target-service-type)
           (service file-system-service-type '())
           (service fstab-service-type
                    (filter file-system-needed-for-boot?
--
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at 45692 <at> debbugs.gnu.org:


Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:54:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 10:54:54 2021
Received: from localhost ([127.0.0.1]:45299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxB97-00020x-L4
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:54:54 -0500
Received: from mail-40132.protonmail.ch ([185.70.40.132]:19967)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxB92-00020b-GN
 for 45692 <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:54:48 -0500
Date: Wed, 06 Jan 2021 15:54:33 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609948477;
 bh=hGPrUa6tM+1uugZYWcqsoLzUVtMpEchptuPfK1FnEJg=;
 h=Date:To:From:Reply-To:Subject:From;
 b=t54NBqbXP5kB/Kjrstc3ARP9sUJWzISaby8HMNpvRGeebjx5kt26uvbY1FjBIEmss
 KToZQh4So8J/A+bx4i5SzJ2v5SXjVoXSzbVgzjLOq/rhrgwVyHECZKSB+GYmkWOue1
 CIBIy9EbQ9gN1MxN6dqfI/H/e60cadqGjsHFmizc=
To: "45692 <at> debbugs.gnu.org" <45692 <at> debbugs.gnu.org>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH 1/4] gnu: Allow services to install kernel-loadable modules.
Message-ID: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 45692
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From 4beb73c62995cf236b402dad8e1c36016027c781 Mon Sep 17 00:00:00 2001
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Date: Tue, 5 Jan 2021 22:27:56 +0800
Subject: [PATCH 1/4] gnu: Allow services to install kernel-loadable modules=
.

* gnu/system.scm (operating-system-directory-base-entries): Remove code
to handle generation of "kernel" and "hurd".
(operating-system-default-essential-services): Instantiate
kernel-loadable-module-service.
(hurd-default-essential-services): Instantiate
kernel-loadable-module-service.
(package-for-kernel): Move ...
* gnu/services.scm: ... to here.
(kernel-loadable-module-service-type): New variable.
(kernel-loadable-module-service): New procedure.
* gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move
code to ...
(run-loadable-kernel-modules-test-base): ... new procedure here.
(run-loadable-kernel-modules-service-test): New procedure.
(%test-loadable-kernel-modules-service-0): New variable.
(%test-loadable-kernel-modules-service-1): New variable.
(%test-loadable-kernel-modules-service-2): New variable.
* doc/guix.texi: Document kernel-loadable-module-service-type.
---
 doc/guix.texi               |  6 +++
 gnu/services.scm            | 70 ++++++++++++++++++++++++++++++++
 gnu/system.scm              | 37 +++++------------
 gnu/tests/linux-modules.scm | 81 ++++++++++++++++++++++++++++++++-----
 4 files changed, 157 insertions(+), 37 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 0f6e95a65a..78770151e3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32409,6 +32409,12 @@ configuration when you use @command{guix system re=
configure},
 @command{guix system init}, or @command{guix deploy}.
 @end defvr

+@defvr {Scheme Variable} kernel-loadable-module-service-type
+Type of the service that collects lists of packages containing
+kernel-loadable modules, and adds them to the set of kernel-loadable
+modules.
+@end defvr
+
 @node Shepherd Services
 @subsection Shepherd Services

diff --git a/gnu/services.scm b/gnu/services.scm
index 13259dfaee..d7332a46b2 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -2,6 +2,7 @@
 ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Court=
=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2016 Chris Marusich <cmmarusich@HIDDEN>
 ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,8 @@
   #:use-module (guix diagnostics)
   #:autoload   (guix openpgp) (openpgp-format-fingerprint)
   #:use-module (guix modules)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages hurd)
@@ -75,6 +78,7 @@
             service-back-edges
             instantiate-missing-services
             fold-services
+            kernel-loadable-module-service

             service-error?
             missing-value-service-error?
@@ -106,6 +110,7 @@
             profile-service-type
             firmware-service-type
             gc-root-service-type
+            kernel-loadable-module-service-type

             %boot-service
             %activation-service
@@ -864,6 +869,71 @@ as Wifi cards.")))
 will not be reclaimed by the garbage collector.")
                 (default-value '())))

+;; Configuration for the kernel builder.
+(define-record-type* <kernel-builder-configuration> kernel-builder-configu=
ration
+  make-kernel-builder-configuration
+  kernel-builder-configuration?
+  this-kernel-builder-configuration
+
+  (kernel   kernel-builder-configuration-kernel   (default #f))
+  (hurd     kernel-builder-configuration-hurd     (default #f))
+  (modules  kernel-builder-configuration-modules  (default '())))
+
+(define (package-for-kernel target-kernel module-package)
+  "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
+possible (that is if there's a LINUX keyword argument in the build system)=
."
+  (package
+    (inherit module-package)
+    (arguments
+     (substitute-keyword-arguments (package-arguments module-package)
+       ((#:linux kernel #f)
+        target-kernel)))))
+
+(define (kernel-builder-configuration->system-entry config)
+  "Return the kernel and hurd entries of the 'system' directory."
+  (mbegin %store-monad
+    (let* ((kernel  (kernel-builder-configuration-kernel config))
+           (hurd    (kernel-builder-configuration-hurd config))
+           (modules (kernel-builder-configuration-modules config))
+           (kernel  (if hurd
+                        kernel
+                        (profile
+                         (content (packages->manifest
+                                   (cons kernel
+                                         (map (lambda (module)
+                                                (if (package? module)
+                                                    (package-for-kernel ke=
rnel module)
+                                                    module))
+                                              modules))))
+                         (hooks (list linux-module-database))))))
+      (return `(("kernel" ,kernel)
+                ,@(if hurd `(("hurd" ,hurd)) '()))))))
+
+(define (kernel-builder-configuration-add-modules config modules)
+  "Constructs a kernel builder configuration that has its modules extended=
."
+  (kernel-builder-configuration
+    (inherit config)
+    (modules (append (kernel-builder-configuration-modules config) modules=
))))
+
+(define kernel-loadable-module-service-type
+  (service-type (name 'kernel-loadable-modules)
+                (extensions
+                 (list (service-extension system-service-type
+                                          kernel-builder-configuration->sy=
stem-entry)))
+                (compose concatenate)
+                (extend kernel-builder-configuration-add-modules)
+                (description
+                 "Register packages containing kernel-loadable modules and=
 adds them
+to the system.")))
+
+(define (kernel-loadable-module-service kernel hurd modules)
+  "Constructs the service that sets up kernel loadable modules."
+  (service kernel-loadable-module-service-type
+    (kernel-builder-configuration
+      (kernel kernel)
+      (hurd hurd)
+      (modules modules))))
+
 =0C
 ;;;
 ;;; Service folding.
diff --git a/gnu/system.scm b/gnu/system.scm
index c284a18379..5c530f176e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -12,6 +12,7 @@
 ;;; Copyright =C2=A9 2020 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen <jannek@HIDDEN>
 ;;; Copyright =C2=A9 2020 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -600,16 +601,6 @@ OS."
       (file-append (operating-system-kernel os)
                       "/" (system-linux-image-file-name))))

-(define (package-for-kernel target-kernel module-package)
-  "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if
-possible (that is if there's a LINUX keyword argument in the build system)=
."
-  (package
-    (inherit module-package)
-    (arguments
-     (substitute-keyword-arguments (package-arguments module-package)
-       ((#:linux kernel #f)
-        target-kernel)))))
-
 (define %default-modprobe-blacklist
   ;; List of kernel modules to blacklist by default.
   '("usbmouse" ;races with bcm5974, see <https://bugs.gnu.org/35574>
@@ -625,26 +616,10 @@ possible (that is if there's a LINUX keyword argument=
 in the build system)."
   "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 kern=
el
-                                                                      modu=
le)
-                                                  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)
+    `(("parameters" ,params)
       ,@(if initrd `(("initrd" ,initrd)) '())
       ("locale" ,locale))))   ;used by libc

@@ -663,6 +638,10 @@ bookkeeping."
          (host-name (host-name-service (operating-system-host-name os)))
          (entries   (operating-system-directory-base-entries os)))
     (cons* (service system-service-type entries)
+           (kernel-loadable-module-service
+             (operating-system-kernel os)
+             (operating-system-hurd os)
+             (operating-system-kernel-loadable-modules os))
            %boot-service

            ;; %SHEPHERD-ROOT-SERVICE must come last so that the gexp that
@@ -699,6 +678,10 @@ bookkeeping."
 (define (hurd-default-essential-services os)
   (let ((entries (operating-system-directory-base-entries os)))
     (list (service system-service-type entries)
+          (kernel-loadable-module-service
+            (operating-system-kernel os)
+            (operating-system-hurd os)
+            (operating-system-kernel-loadable-modules os))
           %boot-service
           %hurd-startup-service
           %activation-service
diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm
index 953b132ef7..9739e4124d 100644
--- a/gnu/tests/linux-modules.scm
+++ b/gnu/tests/linux-modules.scm
@@ -2,6 +2,7 @@
 ;;; Copyright =C2=A9 2019 Jakob L. Kreuze <zerodaysfordays@HIDDEN>
 ;;; Copyright =C2=A9 2020 Danny Milosavljevic <dannym@HIDDEN>
 ;;; Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN>
+;;; Copyright =C2=A9 2021 raid5atemyhomework <raid5atemyhomework@protonmai=
l.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,7 +35,10 @@
   #:use-module (guix utils)
   #:export (%test-loadable-kernel-modules-0
             %test-loadable-kernel-modules-1
-            %test-loadable-kernel-modules-2))
+            %test-loadable-kernel-modules-2
+            %test-loadable-kernel-modules-service-0
+            %test-loadable-kernel-modules-service-1
+            %test-loadable-kernel-modules-service-2))

 ;;; Commentary:
 ;;;
@@ -66,17 +70,11 @@ that MODULES are actually loaded."
                        (member module modules string=3D?))
                      '#$modules))))))

-(define* (run-loadable-kernel-modules-test module-packages module-names)
-  "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME=
S
-are loaded in memory."
+(define* (run-loadable-kernel-modules-test-base base-os module-names)
+  "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory=
."
   (define os
     (marionette-operating-system
-     (operating-system
-      (inherit (simple-operating-system))
-      (services (cons (service kernel-module-loader-service-type module-na=
mes)
-                      (operating-system-user-services
-                       (simple-operating-system))))
-      (kernel-loadable-modules module-packages))
+     base-os
      #:imported-modules '((guix combinators))))
   (define vm (virtual-machine os))
   (define (test script)
@@ -98,6 +96,37 @@ are loaded in memory."
   (gexp->derivation "loadable-kernel-modules"
                     (test (modules-loaded?-program os module-names))))

+(define* (run-loadable-kernel-modules-test module-packages module-names)
+  "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME=
S
+are loaded in memory."
+  (run-loadable-kernel-modules-test-base
+    (operating-system
+      (inherit (simple-operating-system))
+      (services (cons (service kernel-module-loader-service-type module-na=
mes)
+                      (operating-system-user-services
+                       (simple-operating-system))))
+      (kernel-loadable-modules module-packages))
+    module-names))
+
+(define* (run-loadable-kernel-modules-service-test module-packages module-=
names)
+  "Run a test of an OS having MODULE-PACKAGES, which are loaded by creatin=
g a
+service that extends KERNEL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that
+MODULE-NAMES are loaded in memory."
+  (define module-installing-service-type
+    (service-type
+      (name 'module-installing-service)
+      (extensions (list (service-extension kernel-loadable-module-service-=
type
+                                           (const module-packages))))
+      (default-value #f)))
+  (run-loadable-kernel-modules-test-base
+    (operating-system
+      (inherit (simple-operating-system))
+      (services (cons* (service kernel-module-loader-service-type module-n=
ames)
+                       (service module-installing-service-type)
+                       (operating-system-user-services
+                        (simple-operating-system)))))
+    module-names))
+
 (define %test-loadable-kernel-modules-0
   (system-test
    (name "loadable-kernel-modules-0")
@@ -129,3 +158,35 @@ with two extra modules.")
                                                  (package-arguments
                                                   ddcci-driver-linux))))))
            '("acpi_call" "ddcci")))))
+
+(define %test-loadable-kernel-modules-service-0
+  (system-test
+   (name "loadable-kernel-modules-service-0")
+   (description "Tests loadable kernel modules extensible service with no
+extra modules.")
+   (value (run-loadable-kernel-modules-service-test '() '()))))
+
+(define %test-loadable-kernel-modules-service-1
+  (system-test
+   (name "loadable-kernel-modules-service-1")
+   (description "Tests loadable kernel modules extensible service with one
+extra module.")
+   (value (run-loadable-kernel-modules-service-test
+           (list ddcci-driver-linux)
+           '("ddcci")))))
+
+(define %test-loadable-kernel-modules-service-2
+  (system-test
+   (name "loadable-kernel-modules-service-2")
+   (description "Tests loadable kernel modules extensible service with two
+extra modules.")
+   (value (run-loadable-kernel-modules-service-test
+           (list acpi-call-linux-module
+                 (package
+                   (inherit ddcci-driver-linux)
+                   (arguments
+                    `(#:linux #f
+                      ,@(strip-keyword-arguments '(#:linux)
+                                                 (package-arguments
+                                                  ddcci-driver-linux))))))
+           '("acpi_call" "ddcci")))))
--
2.29.2





Information forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jan 2021 15:52:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 06 10:52:41 2021
Received: from localhost ([127.0.0.1]:45290 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxB73-0001wZ-0c
	for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:52:41 -0500
Received: from lists.gnu.org ([209.51.188.17]:57622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxB71-0001wS-UI
 for submit <at> debbugs.gnu.org; Wed, 06 Jan 2021 10:52:40 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:42464)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxB71-0007UT-Kb
 for guix-patches@HIDDEN; Wed, 06 Jan 2021 10:52:39 -0500
Received: from mail-40135.protonmail.ch ([185.70.40.135]:27027)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <raid5atemyhomework@HIDDEN>)
 id 1kxB6y-0004kl-T8
 for guix-patches@HIDDEN; Wed, 06 Jan 2021 10:52:39 -0500
Date: Wed, 06 Jan 2021 15:52:24 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1609948351;
 bh=TknNbLTq+VeNLmsLGnE7p1xFzzi5f2WTVcKGNIWanQY=;
 h=Date:To:From:Reply-To:Subject:From;
 b=Mx84byrn3tK4NM+AJUUvXRJ9lXoHEn6yAmR721X3SjqtAO51raC46MHFDxIkybo1S
 FkT5vnwtMVRzgVvSvXwtVwMUuR3TNEuDukiIUSRA+v/n6haXNsNmLDDKsmQyGvPQn+
 Vn9iWm2dyNxIgbxzgr4oCD052k+f5VG9nXXrYq4g=
To: "guix-patches@HIDDEN" <guix-patches@HIDDEN>
From: raid5atemyhomework <raid5atemyhomework@HIDDEN>
Subject: [PATCH 0/4] Even Better ZFS Support on Guix
Message-ID: <f9YNSdmHSIAVHWwDRwnh8QVeNjUG4M6YMJMntulZ3s8cYPVCBHrVIirwkuGxpYIduWVNAyi13dFVlqUKs7_QXPDBvbDe_JNNEC_SoNBTprk=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 mailout.protonmail.ch
Received-SPF: pass client-ip=185.70.40.135;
 envelope-from=raid5atemyhomework@HIDDEN; 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-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
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>
Reply-To: raid5atemyhomework <raid5atemyhomework@HIDDEN>
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 all,

Sorry for the excessive number of patches.

This patchset contains 4 patches, two that add new features to Guix and do =
not involve ZFS at all, one bugfix of the ZFS package, and one which makes =
installing ZFS on Guix easy.

* Patch 1: Create an extensible service type that installs kernel-loadable =
modules into the kernel.
  * This allows a ZFS service to add the ZFS module to the kernel.
* Patch 2: Make the `file-systems` shepherd service an extensible target, s=
o that other services can add more requirements for `file-systems`.
  * This allows a ZFS service to make `file-systems` wait for the ZFS autom=
ount at startup, which is necessary in any case in order to ensure that ZFS=
 has scanned for ZFS pools installed in the hardware.
* Patch 3: Fix the ZFS package definition.
* Patch 4: Add a ZFS service type that installs everything needed for basic=
 ZFS usage!

I've tested the ZFS functionality in about a half-dozen VMs already, includ=
ing checking that the ZFS setup persists across reboots of the VM:

* No ZFS installed.
* With ZFS installed but without any ZFS pools.
* With ZFS pool that is automounted.
* With ZFS pool in legacy mode (needs manual `mount -t zfs poolname /mountp=
oint`).
* Encrypted ZFS dataset (prompts passphrase at boot to mount).
* Encrypted ZFS dataseet as `/home` (prompts passphrase at boot to mount, u=
ser `/home` directories are created and maintained).

Other bits of ZFS functionality would be *nice* but aren't in this patchset=
 yet (and at least for my purposes are not really necessary, except perhaps=
 the auto-scrubbing, I just need to wrap my head around `mcron`...):

* Auto-scrubbing of ZFS pools to ensure no data corruption.
* Auto-snapshotting of ZFS datasets to protect against user error.
* `/` on ZFS.
* `/boot` on ZFS.
* Managing ZFS "legacy" mountpoints on  `(file-system ...)` declarations.
* Managing ZFS pool setup in the `operating-system` declaration somehow (no=
t sure how to do this).

Thanks
raid5atemyhomework




Acknowledgement sent to raid5atemyhomework <raid5atemyhomework@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#45692; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 21 Sep 2021 10:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.