Commit ee98aca2 authored by Mark Mentovai's avatar Mark Mentovai Committed by Commit Bot

mac: support ULMO (lzma) in pkg-dmg

Disk images produced with this compression can only be created and
mounted on macOS 10.15 (“Catalina”) and later. This may be useful in the
near term for things shipped to arm64 users, as the baseline OS for
mac-arm64 is macOS 11.0 (“Big Sur”).

This also adds ULFO (lzfse/lzvn) support to pkg-dmg, but that’s not
interesting and I doubt we’ll ever use it.

Bug: 1130557
Change-Id: I1ba54b8fcc0a69d8770af98a364123b64e24423b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505683Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821992}
parent e9635861
......@@ -98,6 +98,10 @@ The format to create the disk image in. Valid values for I<format> are:
- UDRO - uncompressed, read-only; extension I<.dmg>
- UDRW - uncompressed, read-write; extension I<.dmg>
- UDSP - uncompressed, read-write, sparse; extension I<.sparseimage>
- ULFO - LZFSE/LZVN-compressed, read-only; extension I<.dmg>;
create and use on 10.11 ("El Capitan") and later only
- ULMO - LZMA-compressed, read-only; extension I<.dmg>;
create and use on 10.15 ("Catalina") and later only
UDZO is the default format.
......@@ -154,11 +158,11 @@ or to use formatted text, prepare a resource and use L<--resource>.
=item B<--resource> I<file>
A resource file to merge into I<target-image>. If I<format> is UDZO, UDBZ,
or UDRO, the disk image will be flattened to a single-fork file that contains
the resource but may be freely transferred without any special encodings.
I<file> must be in a format suitable for L<Rez(1)>. See L<Rez(1)> for a
description of the format, and L<hdiutil(1)> for a discussion on flattened
disk images. B<--resource> may appear multiple times.
UDRO, ULFO, or ULMO, the disk image will be flattened to a single-fork file
that contains the resource but may be freely transferred without any special
encodings. I<file> must be in a format suitable for L<Rez(1)>. See
L<Rez(1)> for a description of the format, and L<hdiutil(1)> for a discussion
on flattened disk images. B<--resource> may appear multiple times.
This option is useful for adding license agreements and other messages
to disk images.
......@@ -1324,7 +1328,8 @@ sub hdidMountImage($@) {
sub isFormatReadOnly($) {
my($format);
($format) = @_;
return $format eq 'UDZO' || $format eq 'UDBZ' || $format eq 'UDRO';
return $format eq 'UDZO' || $format eq 'UDBZ' || $format eq 'UDRO' ||
$format eq 'ULFO' || $format eq 'ULMO';
}
# licenseMaker($text, $resource)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment