Package: hfsprogs
Version: 540.1.linux3-4
Hello Maintainers,
Creating an HFS volume with a volume name other than the default of
"untitled" is currently not possible. It does appear that it should be
possible. Here is output exhibiting this issue:
==================================================
# mkfs.hfs -b 512 -v 'grub' -h /tmp/hfs.img
Initialized /tmp/hfs.img as a 5120 MB HFS volume
# fsck.hfs /tmp/hfs.img
** /tmp/hfs.img
Executing fsck_hfs (version 540.1-Linux).
** Checking HFS volume.
The volume name is untitled
** Checking extents overflow file.
** Checking catalog file.
** Checking catalog hierarchy.
** Checking volume bitmap.
** Checking volume information.
** The volume untitled appears to be OK.
==================================================
Using -N to print the parameters shows that at least the option parsing
allows this:
==================================================
# mkfs.hfs -N -b 512b -v 'grub' -h /tmp/hfs.img
0 sectors at 512 bytes per sector
HFS format parameters:
volume name: "grub"
block-size: 262144
total blocks: 20480
first free catalog node id: 16
initial catalog file size: 1048576
initial extents file size: 1048576
file clump size: 1048576
==================================================
Looking at the package source, I see that HFS volume creation is added
as a debian package patch and not part of the upstream source in patch
file
debian/patches/0005-Re-add-support-for-creating-legacy-HFS-filesystems.patch.
The issue appears to be that the volume name passed in as the -v option
argument and being written to the hfs parameters struct is being
unconditionally overritten in line 325 of the patch file with the
default volume name. This can be fixed by swapping the first two
aruments to bcopy on that line, however, the comment and the lines
directly above it lead me to believe there's potentially more to it.
This is causing GRUB HFS tests to fail and it would be nice to get them
passing again without disabling the failing test.
Thanks,
Glenn