diff mbox series

[bug#41804] ISO image & HFS+ tree

Message ID 87mu59llxr.fsf@gnu.org
State Accepted
Headers show
Series [bug#41804] ISO image & HFS+ tree | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Mathieu Othacehe June 11, 2020, 2:24 p.m. UTC
Hello,

When running the "gui-installed-desktop-os-encrypted" test which
produces a big ISO9660 image (~4GiB), the following error occurs:

--8<---------------cut here---------------start------------->8---
xorriso : UPDATE :  434919 files added in 18 seconds
libisofs: FAILURE : HFS+ map nodes aren't implemented
libisofs: FAILURE : Too much files to mangle, cannot guarantee unique file names
--8<---------------cut here---------------end--------------->8---

I asked Thomas Schmitt (of GNU Xorriso) about it. It seems that
producing an HFS+ tree could fail if a directory contains more than
30720 files.

HFS+ seems to be used to work-around filesystem limits that we don't
have on Intel architectures (see Thomas kind answer below).

Here's a patch that disables HFS+ tree production, and the solves the
problem above.

Thanks,

Mathieu

Comments

Danny Milosavljevic June 11, 2020, 9:14 p.m. UTC | #1
Hi Mathieu,

thanks for On Thu, 11 Jun 2020 16:24:48 +0200
Mathieu Othacehe <othacehe@gnu.org> wrote:

> Here's a patch that disables HFS+ tree production, and the solves the
> problem above.

Thanks for the investigation and fix!

What do you think about putting the comment into the source code?

;; Producing an HFS tree via "mbr_hfs" would fail if a directory has more than
;; 30720 files. The xorriso error message is:
;; xorriso : UPDATE :  434919 files added in 18 seconds
;; libisofs: FAILURE : HFS+ map nodes aren't implemented
;; libisofs: FAILURE : Too much files to mangle, cannot guarantee unique file
;; names.
;; So we use "mbr_only" mode to make sure that no HFS+ tree is generated.
'(("MKRESCUE_SED_MODE" . "mbr_only")))))))

You can remove it from the commit message, or not (I would).

In any case I'd rather not have to read the source code *and* all commit
messages once some problem appears.

I think it's as important to know what not to do as it is to know what is
possible--especially for something as obscure as that.

So I for one would welcome a comment in the source code of what already
caused problems, even re-adding the problem as a comment.

Otherwise LGTM!
Mathieu Othacehe June 12, 2020, 3:24 p.m. UTC | #2
Hey Danny,

> In any case I'd rather not have to read the source code *and* all commit
> messages once some problem appears.
>
> I think it's as important to know what not to do as it is to know what is
> possible--especially for something as obscure as that.
>
> So I for one would welcome a comment in the source code of what already
> caused problems, even re-adding the problem as a comment.

Yes, you're right, I followed your advice and added some details as
comments. Thanks for reviewing, pushed!

Mathieu
diff mbox series

Patch

From 604adfe81615ea05905fc73d62fba59a19437cdf Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Thu, 11 Jun 2020 15:25:02 +0200
Subject: [PATCH] system: image: Do not produce an HFS tree when building an
 ISO.

Producing an HFS tree will fail if a directory has more that 30720 files. The
xorriso error message is:

xorriso : UPDATE :  434919 files added in 18 seconds
libisofs: FAILURE : HFS+ map nodes aren't implemented
libisofs: FAILURE : Too much files to mangle, cannot guarantee unique file names

Use "mbr_only" mode to make sure that no HFS+ tree are generated.

* gnu/system/image.scm (system-image): Set MKRESCUE_SED_MODE to "mbr_only".
---
 gnu/system/image.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index a0e6bf31f1..9e47bcc508 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -545,7 +545,7 @@  image, depending on IMAGE format."
                              #:inputs `(("system" ,os)
                                         ("bootcfg" ,bootcfg))
                              #:grub-mkrescue-environment
-                             '(("MKRESCUE_SED_MODE" . "mbr_hfs")))))))
+                             '(("MKRESCUE_SED_MODE" . "mbr_only")))))))
 
 (define (find-image file-system-type)
   "Find and return an image that could match the given FILE-SYSTEM-TYPE.  This
-- 
2.26.2