Adding filesystem utilities based on file-systems

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 8 Feb 2020 01:31
(address . bug-guix@gnu.org)
20200208003122.GA31711@jasmine.lan
As discussed in #39332 [0], it would be great if filesystem utility
packages were added to the system profile if a file-systems entry uses
that filesystem type.

For example, btrfs-progs could be added if a btrfs filesystem was listed
in file-systems.

[0]
L
L
Ludovic Courtès wrote on 10 Feb 2020 23:06
(name . Leo Famulari)(address . leo@famulari.name)(address . 39505@debbugs.gnu.org)
87r1z2gkqo.fsf@gnu.org
Hi Leo,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (7 lines)
> As discussed in #39332 [0], it would be great if filesystem utility
> packages were added to the system profile if a file-systems entry uses
> that filesystem type.
>
> For example, btrfs-progs could be added if a btrfs filesystem was listed
> in file-systems.

This could be done with something like:
Toggle diff (17 lines)
diff --git a/gnu/system.scm b/gnu/system.scm
index 01baa248a2..3ff3073017 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -203,7 +203,11 @@
(default %default-issue))
(packages operating-system-packages ; list of (PACKAGE OUTPUT...)
- (default %base-packages)) ; or just PACKAGE
+ (thunked) ; or just PACKAGE
+ (default (append (file-system-packages
+ (operating-system-file-systems
+ this-operating-system))
+ %base-packages)))
(timezone operating-system-timezone) ; string
(locale operating-system-locale ; string
However, this would only work for the default values of ‘packages’. In
other cases, users would have to add (file-system-packages …) explicitly
by themselves, which is not great.

Alternately, we could turn ‘%base-packages’ into a macro that expands
to something like:

(gimme-the-base-packages this-operating-system)

but that wouldn’t be great because now you’d be unable to refer to
‘%base-packages’ like a regular variable, outside the lexical context of
an ‘operating-system’ form.

Thoughts?

Ludo’.
M
M
Maxim Cournoyer wrote on 20 Feb 2020 04:31
(name . Leo Famulari)(address . leo@famulari.name)(address . 39505@debbugs.gnu.org)
87blpu2av8.fsf@apteryx.i-did-not-set--mail-host-address--so-tickle-me
Hello Leo,

Leo Famulari <leo@famulari.name> writes:

Toggle quote (10 lines)
> As discussed in #39332 [0], it would be great if filesystem utility
> packages were added to the system profile if a file-systems entry uses
> that filesystem type.
>
> For example, btrfs-progs could be added if a btrfs filesystem was listed
> in file-systems.
>
> [0]
> https://issues.guix.info/issue/39332#3

What is the use case? Just having btrfs utilities to manage Btrfs file
systems, or is there some problems to avoid? I know that for NFS you
must add nfs-utils so that the util-linux provided 'mount' is able to
mount NFS shares.

If the later is the use case, perhaps we could try to hard reference to
each file system utility in util-linux, instead of having it dispatch
some tool supposed to be in the PATH? I'm not sure how difficult that
would be, and it'd for sure increase the size of util-linux, but perhaps
the pros outweighs the cons.

Maxim
L
L
Leo Famulari wrote on 20 Feb 2020 19:37
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 39505@debbugs.gnu.org)
20200220183726.GA6891@jasmine.lan
On Wed, Feb 19, 2020 at 10:31:07PM -0500, Maxim Cournoyer wrote:
Toggle quote (5 lines)
> What is the use case? Just having btrfs utilities to manage Btrfs file
> systems, or is there some problems to avoid? I know that for NFS you
> must add nfs-utils so that the util-linux provided 'mount' is able to
> mount NFS shares.

It's just to manage the filesystems. For example, the equivalent of `df
-h` requires btrfs-progs.

Toggle quote (6 lines)
> If the later is the use case, perhaps we could try to hard reference to
> each file system utility in util-linux, instead of having it dispatch
> some tool supposed to be in the PATH? I'm not sure how difficult that
> would be, and it'd for sure increase the size of util-linux, but perhaps
> the pros outweighs the cons.

Is there some integration between util-linux and btrfs-progs?
M
M
Maxim Cournoyer wrote on 20 Feb 2020 21:32
(name . Leo Famulari)(address . leo@famulari.name)(address . 39505@debbugs.gnu.org)
87k14hxanr.fsf@gmail.com
Leo Famulari <leo@famulari.name> writes:

Toggle quote (9 lines)
> On Wed, Feb 19, 2020 at 10:31:07PM -0500, Maxim Cournoyer wrote:
>> What is the use case? Just having btrfs utilities to manage Btrfs file
>> systems, or is there some problems to avoid? I know that for NFS you
>> must add nfs-utils so that the util-linux provided 'mount' is able to
>> mount NFS shares.
>
> It's just to manage the filesystems. For example, the equivalent of `df
> -h` requires btrfs-progs.

OK; so just as a convenience.

Toggle quote (8 lines)
>> If the later is the use case, perhaps we could try to hard reference to
>> each file system utility in util-linux, instead of having it dispatch
>> some tool supposed to be in the PATH? I'm not sure how difficult that
>> would be, and it'd for sure increase the size of util-linux, but perhaps
>> the pros outweighs the cons.
>
> Is there some integration between util-linux and btrfs-progs?

No, at least mounting Btrfs doesn't require a mount.btrfs helper like
NFS does.

Maxim
M
M
Maxim Cournoyer wrote on 29 Sep 2022 01:53
(name . Leo Famulari)(address . leo@famulari.name)(address . 39505-done@debbugs.gnu.org)
87sfkbqcmg.fsf@gmail.com
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (11 lines)
> Leo Famulari <leo@famulari.name> writes:
>
>> On Wed, Feb 19, 2020 at 10:31:07PM -0500, Maxim Cournoyer wrote:
>>> What is the use case? Just having btrfs utilities to manage Btrfs file
>>> systems, or is there some problems to avoid? I know that for NFS you
>>> must add nfs-utils so that the util-linux provided 'mount' is able to
>>> mount NFS shares.
>>
>> It's just to manage the filesystems. For example, the equivalent of `df
>> -h` requires btrfs-progs.

[...]

I pushed the change made by Brice addressing this as
45eac6cdf5c8d9d7b0c564b105c790d2d2007799.

Closing, thanks!

Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 39505@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 39505
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch