summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-08 01:08:42 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-10 05:25:01 +0000
commit4db4976033e55e35eb779e0f9083981f8a2b2cbc (patch)
treef262f52fc3fadf13f624434ed27fe8ac9a94d26e /solenv
parent662f0c0d4f07927534359a17055ffaa78508c8bc (diff)
Add support for codesigning on Mac OS X
Only sign the .app. Presumably that's enough here in the 4.0 branch. Change-Id: I7a25c6b7bfa2047b1cb6bcb913750b1b476124f6 Reviewed-on: https://gerrit.libreoffice.org/2031 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/modules/installer/simplepackage.pm37
1 files changed, 37 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 561b0fe3f25f..26911a4d414b 100755
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -418,6 +418,43 @@ sub create_package
chdir $localfrom;
}
+ else
+ {
+ if (defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}))
+ {
+ # Just sign the .app as a whole, which means signing
+ # the CFBundleExecutable from Info.plist,
+ # i.e. soffice, plus the contents of the Resources
+ # treee (which is not much, far from all of our
+ # non-code "resources").
+
+ # Don't bother here in the 4.0 branch to sign each
+ # individual .dylib, or each additional binary. See
+ # master for more work plus possibly eventually
+ # re-organising the app bundle structure to be more
+ # Mac-like (the "program" symlink, eek!) and actually
+ # putting all non-code resources (including extension
+ # scripts!) into Resources so that they participate
+ # in the signing and their validity can be guaranteed.
+
+ $systemcall = "codesign --sign $ENV{'MACOSX_CODESIGNING_IDENTITY'} -v -v -v $tempdir/$packagename/$volume_name_classic_app.app";
+ print "... $systemcall ...\n";
+ my $returnvalue = system($systemcall);
+ $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ if ($returnvalue)
+ {
+ $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+ else
+ {
+ $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+ }
+ }
$systemcall = "cd $localtempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDBZ $installdir/tmp.dmg -o $archive && ";
if (( $ref ne "" ) && ( $$ref ne "" )) {