summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-06-20 21:55:08 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-06-20 21:55:08 +0200
commit78c7929ac4f03d90e956cc1052208c646feaabf3 (patch)
tree617b7b89a02d082f347208a7a0cac834ed965798 /solenv
parent7e5b36af8c524671a30b91dd2323d812686aca2c (diff)
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
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm18
1 files changed, 13 insertions, 5 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index ac337988af6e..95ccfe75255f 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')
{