solenv/bin/modules/installer/simplepackage.pm |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 5537a4b2c696bfee3c4c85c9ae3e01cd8d3d3257
Author:     Patrick Luby <[email protected]>
AuthorDate: Fri Dec 16 12:29:51 2022 -0500
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Dec 21 12:07:32 2022 +0000

    tdf#151341 Use lzfse compression instead of bzip2
    
    Several users reported that copying the LibreOffice.app package
    in the Finder from a .dmg file compressed with lzfse compression
    copies the package several times faster than from a .dmg compressed
    with bzip2 compression.
    
    On a mid-2015 Intel MacBook Pro running macOS, copying in the Finder
    was at least 5 times faster with lzfse than with bzip2. Also, the
    hdiutil man page as of macOS Monterey 12.6.2 has marked bzip2 as
    deprecated. lzfse is marked as supported since macOS El Capitan 10.11
    so this change appears safe.
    
    The one thing that bzip2 has is better compression so a .dmg with
    bzip2 should be smaller than with lzfse. A .dmg built from a debug
    build was 262M with bzip2 and 273MB for lzfse. So it appears that
    lzfse creates .dmg files that are only 4% or 5% larger than bzip2.
    
    Change-Id: I61e2a08cede19a5bb8c257d4fa4762168a3a9dc3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144342
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit 5c98d8e79b4b35d30f1198f8c7b4beef44e421f4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144605
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/solenv/bin/modules/installer/simplepackage.pm 
b/solenv/bin/modules/installer/simplepackage.pm
index 5ab12978362d..e681a00ffe19 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -455,8 +455,23 @@ sub create_package
             }
         }
         my $megabytes = 1500;
-        $megabytes = 2000 if $ENV{'ENABLE_DEBUG'};
-        $systemcall = "cd $localtempdir && hdiutil create -megabytes 
$megabytes -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" 
-format UDBZ";
+        $megabytes = 3000 if $ENV{'ENABLE_DEBUG'};
+
+        # tdf#151341 Use lzfse compression instead of bzip2
+        # Several users reported that copying the LibreOffice.app package
+        # in the Finder from a .dmg file compressed with lzfse compression
+        # copies the package several times faster than from a .dmg compressed
+        # with bzip2 compression.
+        # On a mid-2015 Intel MacBook Pro running macOS, copying in the Finder
+        # was at least 5 times faster with lzfse than with bzip2. Also, the
+        # hdiutil man page as of macOS Monterey 12.6.2 has marked bzip2 as
+        # deprecated. lzfse is marked as supported since macOS El Capitan 10.11
+        # so this change appears safe.
+        # The one thing that bzip2 has is better compression so a .dmg with
+        # bzip2 should be smaller than with lzfse. A .dmg built from a debug
+        # build was 262M with bzip2 and 273MB for lzfse. So it appears that
+        # lzfse creates .dmg files that are only 4% or 5% larger than bzip2.
+        $systemcall = "cd $localtempdir && hdiutil create -megabytes 
$megabytes -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" 
-format ULFO";
         if (( $ref ne "" ) && ( $$ref ne "" ) && system("hdiutil 2>&1 | grep 
unflatten") == 0) {
             $systemcall .= " && hdiutil unflatten $archive && Rez -a $$ref -o 
$archive && hdiutil flatten $archive &&";
         }

Reply via email to