mkimg: How to create partition from image, but set specific size

I'm dealing with a bug in poudriere image which occurred after I upgraded the poudriere server to 14.0-RELEASE.

Apparently mkimg has changed how parameters to `-p` are parsed. I've read the man page for mkimg and read the usage instructions from `mkimg`, but according to them, how poudriere image calls mkimg *should never have worked* :)

This is the line from poudriere image_zfs.sh:

Code:
gptboot="-p freebsd-boot::512k=${mnt}/boot/gptzfsboot"

I believe the intention was to create a partition from ${mnt}/boot/gptzfsboot, but set the size of the partition to 512K.

Usage instructions for mkimg say:

Code:
partition specification:
    <t>[/<l>]::<size>[:[+]<offset>]    -  empty partition of given size and
                       optional relative or absolute offset
    <t>[/<l>]:=<file>[:[+]offset]    -  partition content and size are
                       determined by the named file and
                       optional relative or absolute offset
    <t>[/<l>]:-<cmd>        -  partition content and size are taken
                       from the output of the command to run
    -                -  unused partition entry
        where:
        <t>    -  scheme neutral partition type
        <l>    -  optional scheme-dependent partition label

According to these instructions, you can only set the size of the partition if you're creating an empty partition.
These instructions did not change between 13.2-RELEASE and 14.0-RELEASE, but the code obviously did.

Does anybody with knowledge of mkimg know if there is a way in 14.0 to make mkimg create a partition from an image, but set it to a specific size?
 
Back
Top