Subject: bug#51425: closed (Re: bug#51425: file-system: validate flags)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 07 Nov 2021 22:17:02 +0000

Your bug report

#51425: Invalid <file-system> flags lead to a crash when booting

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
51425: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51425
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#51425: file-system: validate flags
From: Ludovic Courtès <[email-masked]>
To: Jonathan Brielmaier <[email-masked]>
Cc: [email-masked], Maxim Cournoyer <[email-masked]>
Date: Sun, 07 Nov 2021 23:16:17 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Ludovic Courtès <[email-masked]> skribis:

> Jonathan Brielmaier <[email-masked]> skribis:
>
>> Imagine the following file system definition in your config.scm:
>>
>> ```
>> (file-system
>>   (device (uuid "UUID-123"))
>>   (flags '((create-mount-point? #t)))
>>   (mount-point "/mnt")
>>   (type "ext4")))
>> ```
>>
>> When you reconfigure there will be no complain, but when you reboot your
>> system wont boot.
>
> I suppose it fails to boot because of a match error in
> ‘mount-flags->bit-mask’, right?
>
>> The parameter to flags is nonsense, it should be something like:
>> `read-only`. So mounting of the file system will fail...
>
> That’s a good use case for the recently-added ‘sanitize’ record field
> property.

Done in 5eb5c0789f34e87ee417a53ddfcfa3b6521bb337.

Thanks,
Ludo’.

Subject: file-system: validate flags
From: Jonathan Brielmaier <[email-masked]>
To: [email-masked]
Date: Wed, 27 Oct 2021 00:24:28 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Imagine the following file system definition in your config.scm:

```
(file-system
   (device (uuid "UUID-123"))
   (flags '((create-mount-point? #t)))
   (mount-point "/mnt")
   (type "ext4")))
```

When you reconfigure there will be no complain, but when you reboot your
system wont boot. The parameter to flags is nonsense, it should be
something like: `read-only`. So mounting of the file system will fail...

It would be nice if we can have some flag validation during reconfigure.

~Jonathan