[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - setup_native/scripts setup_native/source solenv/bin

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Tue Jun 21 03:43:32 UTC 2016


 setup_native/scripts/osx_install_languagepack.applescript |    8 ++++++
 setup_native/source/mac/Info.plist.langpack               |    2 -
 solenv/bin/modules/installer/simplepackage.pm             |   18 ++++++++++----
 3 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 3491a1a7d17bc12a30af900fa83df44ddbd75108
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Mon Jun 20 21:55:08 2016 +0200

    tdf#89657 sign Mac languagepack installer and force-start-close LO
    
    starting LO once satisfies Gatekeeper's verification, even when the
    langaugepack's content are added afterwards
    
    Change-Id: Ie548df39a7ec07cc485c40148e4ca75101346798
    (cherry picked from commit 78c7929ac4f03d90e956cc1052208c646feaabf3)
    Reviewed-on: https://gerrit.libreoffice.org/26528
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript
index cbd7743..49c8e54 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -143,6 +143,14 @@ end if
 -- touch extensions folder to have LO register bundled dictionaries
 set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2 && touch " & quoted form of (choice as string) & "/Contents/Resources/extensions"
 try
+	(* A start of unchanged LO must take place so Gatekeeper will verify
+	   the signature prior to installing the languagepack
+	*)
+	if application choice is not running then
+		-- this will flash the startcenter once...
+		tell application choice to activate
+		tell application choice to quit
+	end if
 	do shell script tarCommand
 	
 on error errMSG number errNUM
diff --git a/setup_native/source/mac/Info.plist.langpack b/setup_native/source/mac/Info.plist.langpack
index 372e645e..361a4b4 100644
--- a/setup_native/source/mac/Info.plist.langpack
+++ b/setup_native/source/mac/Info.plist.langpack
@@ -35,7 +35,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>9</string>
 	<key>CFBundleIdentifier</key>
-	<string>${BUNDLEIDENTIFIER}</string>
+	<string>[BUNDLEIDENTIFIER].langpack</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index ac33798..95ccfe7 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -379,19 +379,27 @@ sub create_package
             $destfile = $subdir . "/" . $iconfile;
             installer::systemactions::copy_one_file($iconfileref, $destfile);
 
-            my $installname = "Info.plist";
             my $infoplistfile = $ENV{'SRCDIR'} . "/setup_native/source/mac/Info.plist.langpack";
             if (! -f $infoplistfile) { installer::exiter::exit_program("ERROR: Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
-            $destfile = $contentsfolder . "/" . $installname;
-            installer::systemactions::copy_one_file($infoplistfile, $destfile);
-
+            $destfile = "$contentsfolder/Info.plist";
             # Replacing variables in Info.plist
-            $scriptfilecontent = installer::files::read_file($destfile);
+            $scriptfilecontent = installer::files::read_file($infoplistfile);
             # replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
             replace_one_variable_in_shellscript($scriptfilecontent, $volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
+            replace_one_variable_in_shellscript($scriptfilecontent, $ENV{'MACOSX_BUNDLE_IDENTIFIER'}, "BUNDLEIDENTIFIER" );
             installer::files::save_file($destfile, $scriptfilecontent);
 
             chdir $localfrom;
+
+            if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) {
+                my @lp_sign = ('codesign', '--verbose', '--sign', $ENV{'MACOSX_CODESIGNING_IDENTITY'}, '--deep', $appfolder);
+                if (system(@lp_sign) == 0) {
+                    $infoline = "Success: \"@lp_sign\" executed successfully!\n";
+                } else {
+                    $infoline = "ERROR: Could not codesign the languagepack using \"@lp_sign\"!\n";
+                }
+                push( @installer::globals::logfileinfo, $infoline);
+            }
         }
         elsif ($volume_name_classic_app eq 'LibreOffice' || $volume_name_classic_app eq 'LibreOfficeDev')
         {


More information about the Libreoffice-commits mailing list