Split recipes at . surrounded by whitespace instead of any .
Without this patch, it is impossible to pass in EXTRA_ARGS to mdadm during array creation that choose any md-specific superblock/metadata format other than 0.90 or 1.2, because any "." character (ASCII 0x2e) will be used to split the list of recipes.
As of mdadm 4.2 (Debian bookworm), the -e/--metadata
option is
implemented and documented as follows:
-e, --metadata= Declare the style of RAID metadata (superblock) to be used. The default is 1.2 for --create, and to guess for other op‐ erations. The default can be overridden by setting the metadata value for the CREATE keyword in mdadm.conf.
Options are: 0, 0.90 Use the original 0.90 format superblock. This for‐ [...] 1, 1.0, 1.1, 1.2 default Use the new version-1 format superblock. This has fewer restrictions. It can easily be moved between hosts with different endian-ness, and a recovery op‐ eration can be checkpointed and restarted. The dif‐ ferent sub-versions store the superblock at differ‐ ent locations on the device, either at the end (for 1.0), at the start (for 1.1) or 4K from the start (for 1.2). "1" is equivalent to "1.2" (the commonly preferred 1.x format). "default" is equivalent to "1.2".
Hence, the following pre-seed stanza should be fit to create a RAID1 array with a version 1.0 md superblock on /dev/sd[ab]1:
d-i partman-auto-raid/recipe string
1 2 0 fat32 - /dev/sda1#/dev/sdb1 # --metadata=1.0 .
1 2 0 lvm - /dev/sda2#/dev/sdb2 .
Without this patch, partman-auto-raid fails to properly split the provided recipe into its intended two parts, and will end up with three broken individual recipes (with one gratuitous split in the middle of "1.0") instead.
Superblock versions other than 0.90 and 1.2 can be useful under various circumstances, such as when trying to provide ESP (EFI System Partition) redundancy without any specific userland tricks to copy data from one "primary" ESP to any others.