summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-18 11:01:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-20 08:50:45 +0100
commitc0813a5d46080c3f5f0261e44a27db31c3695de3 (patch)
tree77b548458ae332ac6527bafd089b235437e4fac5 /solenv
parent06035cdc0e43ca53601a6f66c10b95ce4b4b26a8 (diff)
mac: don't put script files into Contents/MacOS or framework-bin directory
Signing them as executable code would require external attributes, and those in turn break packaging into hfs+ dmg when building on apfs with Big Sur. It is not a new thing - the old Code Signing in Depth technote https://developer.apple.com/library/archive/technotes/tn2206/_index.html already reads: "Store Python, Perl, shell, and other script files and other non-Mach-O executables in your app's Contents/Resources directory. While it's possible to sign such executables and store them in Contents/MacOS, this is not recommended. […] Put another way, a properly-signed app that has all of its files in the correct places will not contain any signatures stored as extended attributes." The patch does exactly that for LO and the shipped python framework and adds symlinks for the moved files. Same applies for the Language pack applescript and the tarball - those are also moved into Contents/Resources also incluses the follow-up fix by Stephan Bergmann Fix unoinfo on macOS – https://gerrit.libreoffice.org/c/core/+/109627 Change-Id: Iab21e77b73f941248ca89c6e80703fdf67a1057c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109537 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 4b9190fc29aec0f005f08c0269bb9ff081f19fe3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109573 Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index d2d36e259dcf..01a594a5e72c 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -324,11 +324,12 @@ sub create_package
}
my $sourcefile = $srcfolder . "/" . $tarballname;
- my $destfile = $contentsfolder . "/" . $tarballname;
+ my $destfile = $contentsfolder . "/Resources/" . $tarballname;
installer::systemactions::remove_complete_directory($appfolder);
installer::systemactions::create_directory($appfolder);
installer::systemactions::create_directory($contentsfolder);
+ installer::systemactions::create_directory($contentsfolder . "/Resources");
installer::systemactions::copy_one_file($sourcefile, $destfile);
installer::systemactions::remove_complete_directory($srcfolder);
@@ -350,7 +351,7 @@ sub create_package
if (! -f $scriptref) { installer::exiter::exit_program("ERROR: Could not find Apple script $scriptfilename ($scriptref)!", "create_package"); }
if (! -f $scripthelperfilename) { installer::exiter::exit_program("ERROR: Could not find Apple script $scripthelperfilename!", "create_package"); }
- $scriptfilename = $contentsfolder . "/" . $scriptrealfilename;
+ $scriptfilename = $contentsfolder . "/Resources/" . $scriptrealfilename;
$scripthelperrealfilename = $contentsfolder . "/" . $scripthelperrealfilename;
installer::systemactions::copy_one_file($scriptref, $scriptfilename);